PR tree-optimization/80631
[official-gcc.git] / gcc / ChangeLog
blob2d53e24b4c1f7943625c03a8ec8e6d651f694125
1 2017-12-12  Jeff Law  <law@redhat.com>
3         PR tree-optimization/83410
4         * tree-ssa-threadupdate.c (thread_block_1): Avoid certain jump
5         threads when parallelizing loops.
7 2017-12-15  Jakub Jelinek  <jakub@redhat.com>
9         * tree-core.h (struct attribute_spec): Swap affects_type_identity and
10         handler fields.
11         * config/alpha/alpha.c (vms_attribute_table): Swap
12         affects_type_identity and handler fields, adjust comments.
13         * config/mips/mips.c (mips_attribute_table): Likewise.
14         * config/visium/visium.c (visium_attribute_table): Likewise.
15         * config/epiphany/epiphany.c (epiphany_attribute_table): Likewise.
16         * config/microblaze/microblaze.c (microblaze_attribute_table):
17         Likewise.
18         * config/spu/spu.c (spu_attribute_table): Likewise.
19         * config/mcore/mcore.c (mcore_attribute_table): Likewise.
20         * config/arc/arc.c (arc_attribute_table): Likewise.
21         * config/m68k/m68k.c (m68k_attribute_table): Likewise.
22         * config/v850/v850.c (v850_handle_interrupt_attribute,
23         v850_handle_data_area_attribute): Formatting fixes.
24         (v850_attribute_table): Swap affects_type_identity and handler
25         fields, adjust comments.
26         * config/m32r/m32r.c (m32r_attribute_table): Likewise.
27         * config/arm/arm.c (arm_attribute_table): Likewise.
28         * config/avr/avr.c (avr_attribute_table): Likewise.
29         * config/s390/s390.c (s390_attribute_table): Likewise.
30         * config/sh/sh.c (sh_attribute_table): Likewise.
31         * config/i386/i386.c (ix86_handle_cconv_attribute,
32         ix86_handle_callee_pop_aggregate_return): Formatting fixes.
33         (ix86_attribute_table): Swap affects_type_identity and handler
34         fields, adjust comments.
35         * config/i386/cygming.h (SUBTARGET_ATTRIBUTE_TABLE): Likewise.
36         * config/sparc/sparc.c (sparc_attribute_table): Likewise.
37         * config/m32c/m32c.c (m32c_attribute_table): Likewise.
38         * config/sol2.h (SOLARIS_ATTRIBUTE_TABLE): Likewise.
39         * config/ia64/ia64.c (ia64_attribute_table): Likewise.
40         * config/msp430/msp430.c (msp430_attribute_table): Likewise.
41         * config/rx/rx.c (rx_attribute_table): Likewise.
42         * config/cr16/cr16.c (cr16_attribute_table): Likewise.
43         * config/h8300/h8300.c (h8300_attribute_table): Likewise.
44         * config/nvptx/nvptx.c (nvptx_attribute_table): Likewise.
45         * config/powerpcspe/powerpcspe.c (rs6000_attribute_table): Likewise.
46         * config/darwin.h (SUBTARGET_ATTRIBUTE_TABLE): Likewise.
47         * config/stormy16/stormy16.c (xstormy16_attribute_table): Likewise.
48         * config/bfin/bfin.c (bfin_attribute_table): Likewise.
49         * config/rs6000/rs6000.c (rs6000_attribute_table): Likewise.
50         * config/rl78/rl78.c (rl78_attribute_table): Likewise.
51         * config/nds32/nds32.c (nds32_attribute_table): Likewise.
52         * doc/plugins.texi (user_attr): Likewise.  Add NULL for
53         exclude.
54         * attribs.c (empty_attribute_table): Swap affects_type_identity and
55         handler fields.
56         (register_scoped_attributes, decl_attributes): Formatting fixes.
58         PR tree-optimization/83269
59         * fold-const.c (fold_binary_loc): Perform (-A) - B -> (-B) - A
60         subtraction in arg0's type if type is signed and arg0 is unsigned.
61         Formatting fix.
63         PR sanitizer/81281
64         * match.pd ((T)(P + A) - (T)P -> (T) A): Use @@0 instead of @0 and
65         convert? on @0 instead of convert.  Check type of @1, not @0.
66         ((T)P - (T)(P + A) -> -(T) A): Use @@0 instead of @0 and
67         convert? on @0 instead of convert.  Check type of @1, not @0.
68         ((T)(P + A) - (T)(P + B) -> (T)A - (T)B): Use @@0 instead of @0,
69         only optimize if either both @1 and @2 types are narrower
70         precision, or both are wider or equal precision, and in the former
71         case only if both have undefined overflow.
73 2017-12-15  Richard Biener  <rguenther@suse.de>
75         PR lto/83388
76         * internal-fn.def (IFN_NOP): Add.
77         * internal-fn.c (expand_NOP): Do nothing.
78         * lto-streamer-in.c (input_function): Instead of removing
79         sanitizer calls replace them with IFN_NOP calls.
81 2017-12-15  Richard Sandiford  <richard.sandiford@linaro.org>
82             Alan Hayward  <alan.hayward@arm.com>
83             David Sherwood  <david.sherwood@arm.com>
85         * dse.c (store_info, read_info_type): Replace begin and end with
86         offset and width.
87         (print_range): New function.
88         (set_all_positions_unneeded, any_positions_needed_p)
89         (check_mem_read_rtx, scan_stores, scan_reads, dse_step5): Update
90         accordingly.
91         (record_store): Likewise.  Optimize the case in which all positions
92         are unneeded.
93         (get_stored_val): Replace read_begin and read_end with read_offset
94         and read_width.
95         (replace_read): Update call accordingly.
97 2017-12-15  Bin Cheng  <bin.cheng@arm.com>
99         * gimple-loop-interchange.cc (STMT_COST_RATIO): New macro.
100         (loop_cand::m_num_stmts, loop_cand::m_const_init_reduc): New members.
101         (loop_cand::loop_cand): Initialize above members.
102         (loop_cand::supported_operations): Delete.
103         (loop_cand::can_interchange_p): Inline above function.
104         (loop_cand::classify_simple_reduction): Record number of constant
105         initialized simple reductions.
106         (should_interchange_loops): New parameters.  Check stmt cost of loops
107         to be interchange.
108         (tree_loop_interchange::interchange): Prepare stmt cost of outer loop.
109         Update call to should_interchange_loops.
110         (should_interchange_loop_nest): Update call to
111         should_interchange_loops.
113 2017-12-15  Eric Botcazou  <ebotcazou@adacore.com>
115         PR target/66488
116         * ggc-page.c (HOST_BITS_PER_PTR): Do not define here...
117         * hwint.h (HOST_BITS_PER_PTR): ...but here instead.
118         * config/i386/xm-mingw32.h (HOST_BITS_PER_PTR): Delete.
120 2017-12-15  Julia Koval  <julia.koval@intel.com>
122         * config/i386/i386-builtin.def (__builtin_ia32_vaesenclast_v16qi,
123         __builtin_ia32_vaesenclast_v32qi, __builtin_ia32_vaesenclast_v64qi): New.
124         * config/i386/sse.md (vaesenclast_<mode>): New pattern.
125         * config/i386/vaesintrin.h (_mm256_aesenclast_epi128,
126         _mm512_aesenclast_epi128, _mm_aesenclast_epi128): New intrinsics.
128 2017-12-15  Julia Koval  <julia.koval@intel.com>
130         * config/i386/i386-builtin.def (__builtin_ia32_vaesenc_v16qi,
131         __builtin_ia32_vaesenc_v32qi, __builtin_ia32_vaesenc_v64qi): New.
132         * config/i386/sse.md (vaesenc_<mode>): New pattern.
133         * config/i386/vaesintrin.h (_mm256_aesenc_epi128, _mm512_aesenc_epi128,
134         _mm_aesenc_epi128): New intrinsics.
136 2017-12-15  Julia Koval  <julia.koval@intel.com>
138         * config/i386/i386-builtin.def (__builtin_ia32_vaesdeclast_v16qi,
139         __builtin_ia32_vaesdeclast_v32qi, __builtin_ia32_vaesdeclast_v64qi): New.
140         * config/i386/sse.md (vaesdeclast_<mode>): New pattern.
141         * config/i386/vaesintrin.h (_mm256_aesdeclast_epi128,
142         _mm512_aesdeclast_epi128, _mm_aesdeclast_epi128): New intrinsics.
144 2017-12-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
146         * gimple-ssa-strength-reduction.c (analyze_increments):
147         Distinguish replacement costs for constant strides from those for
148         unknown strides.
150 2017-12-14  Jakub Jelinek  <jakub@redhat.com>
152         * var-tracking.c (variable_tracking_main_1): Formatting fix.
154 2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
156         * doc/invoke.texi: Document -Wcast-function-type.
157         * recog.h (stored_funcptr): Change signature.
158         * tree-dump.c (dump_node): Avoid warning.
159         * typed-splay-tree.h (typed_splay_tree): Avoid warning.
161 2017-12-14  Qing Zhao  <qing.zhao@oracle.com>
163         PR middle_end/79538
164         * gimple-fold.c (get_range_strlen): Add the handling of non-member 
165         array.
167 2017-12-14  David Malcolm  <dmalcolm@redhat.com>
169         PR tree-optimization/83312
170         * domwalk.h (dom_walker::dom_walker): Fix typo in comment.
171         * tree-cfg.c (find_taken_edge): Update to handle NULL_TREE for
172         "val" param, and to cope with arbitrary basic blocks.
173         (find_taken_edge_cond_expr): Add "cond_stmt" param and use it to
174         handle NULL_TREE for "val", dropping "bb" param.
175         (find_taken_edge_switch_expr): Make "switch_stmt" param const and
176         drop "bb" param.  Handle NULL_TREE for "val".
177         (find_case_label_for_value): Make "switch_stmt" param const.
178         * tree-vrp.c (class check_array_bounds_dom_walker): New subclass
179         of dom_walker.
180         (vrp_prop::check_all_array_refs): Reimplement as...
181         (check_array_bounds_dom_walker::before_dom_children): ...this new
182         vfunc.  Replace linear search through BB block list, excluding
183         those with non-executable in-edges via dominator walk.
185 2017-12-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
187         * config/arm/arm.opt (mverbose-cost-dump): New option.
188         * config/arm/arm.c (arm_rtx_costs): Use it.
190 2017-12-14  Andreas Schwab  <schwab@linux-m68k.org>
192         PR bootstrap/83396
193         * reload1.c (emit_input_reload_insns): Skip debug markers.
195 2017-12-14  Alexandre Oliva <aoliva@redhat.com>
197         * config/i386/i386.c (rest_of_insert_endbranch): Use call loc
198         for its nop_endbr.
200         PR bootstrap/83396
201         * config/arc/arc.c (hwloop_optimize): Skip debug insns.
202         * config/sh/sh-protos.h (sh_find_set_of_reg): Adjust.
203         * config/sh/sh.c: Skip debug insns besides notes.
204         * config/sh/sh.md: Likewise.
205         * config/sh/sh_treg_combine.cc: Likewise.
206         * config/sh/sync.md: Likewise.
208 2017-12-14  Tom de Vries  <tom@codesourcery.com>
210         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
211         Add item for weak_undefined.
213 2017-12-14  Richard Biener  <rguenther@suse.de>
215         PR tree-optimization/67842
216         * sese.h (bb_in_region): Remove #if 0'ed code.
218 2017-12-14  Richard Biener  <rguenther@suse.de>
220         PR tree-optimization/83326
221         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Add
222         may_be_zero parameter and handle it by not marking the first
223         peeled copy as not exiting the loop.
224         (try_peel_loop): Likewise.
225         (canonicalize_loop_induction_variables): Use number_of_iterations_exit
226         to handle the case of constant or zero iterations and perform
227         loop header copying on-the-fly.
229 2017-12-14  Richard Biener  <rguenther@suse.de>
231         PR tree-optimization/83418
232         * vr-values.c (vr_values::extract_range_for_var_from_comparison_expr):
233         Instead of asserting we don't get unfolded comparisons deal with
234         them.
236 2017-12-14  Jakub Jelinek  <jakub@redhat.com>
238         PR bootstrap/83396
239         * var-tracking.c (vt_initialize): Ignore non-DEBUG_INSNs outside of
240         basic blocks.  Assert debug bind insns don't appear outside of bbs,
241         don't reset them.  Assert insns without BLOCK_FOR_INSN are outside of
242         bb.  Simplify.
244         PR tree-optimization/83198
245         * gimple-ssa-sprintf.c (format_floating): Set type solely based on
246         dir.modifier, regardless of TREE_TYPE (arg).  Assume non-REAL_CST
247         value if arg is a REAL_CST with incompatible type.
249 2017-12-14  Sudakshina Das  <sudi.das@arm.com>
250             Bin Cheng  <bin.cheng@arm.com>
252         PR target/81228
253         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Move LTGT
254         to CCFPEmode.
255         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Add
256         LTGT.
258 2017-12-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
260         * config/aarch64/aarch64-cores.def (cortex-a55, cortex-a75,
261         cortex-a75.cortex-a55): Specify AARCH64_FL_F16 in the arch features.
263 2017-12-14  Richard Sandiford  <richard.sandiford@linaro.org>
264             Alan Hayward  <alan.hayward@arm.com>
265             David Sherwood  <david.sherwood@arm.com>
267         * poly-int.h: New file.
268         * poly-int-types.h: Likewise.
269         * coretypes.h: Include them.
270         (POLY_INT_CONVERSION): Define.
271         * target.def (estimated_poly_value): New hook.
272         * doc/tm.texi.in (TARGET_ESTIMATED_POLY_VALUE): New hook.
273         * doc/tm.texi: Regenerate.
274         * doc/poly-int.texi: New file.
275         * doc/gccint.texi: Include it.
276         * doc/rtl.texi: Describe restrictions on subreg modes.
277         * Makefile.in (TEXI_GCCINT_FILES): Add poly-int.texi.
278         * genmodes.c (NUM_POLY_INT_COEFFS): Provide a default definition.
279         (emit_insn_modes_h): Emit a definition of NUM_POLY_INT_COEFFS.
280         * targhooks.h (default_estimated_poly_value): Declare.
281         * targhooks.c (default_estimated_poly_value): New function.
282         * target.h (estimated_poly_value): Likewise.
283         * wide-int.h (WI_UNARY_RESULT): Use wi::binary_traits.
284         (wi::unary_traits): Delete.
285         (wi::binary_traits::signed_shift_result_type): Define for
286         offset_int << HOST_WIDE_INT, etc.
287         (generic_wide_int::operator <<=): Define for all types and use
288         wi::lshift instead of <<.
289         (wi::hwi_with_prec): Add a default constructor.
290         (wi::ints_for): New class.
291         (operator <<): Define for all wide-int types.
292         (operator /): New function.
293         (operator %): Likewise.
294         * selftest.h (ASSERT_KNOWN_EQ, ASSERT_KNOWN_EQ_AT, ASSERT_MAYBE_NE)
295         (ASSERT_MAYBE_NE_AT): New macros.
297 2017-12-13  Eric Botcazou  <ebotcazou@adacore.com>
298             Dominik Vogt  <vogt@linux.vnet.ibm.com>
300         PR middle-end/78468
301         * emit-rtl.c (init_emit): Remove ??? comment.
302         * explow.c (get_dynamic_stack_size): Take known alignment of stack
303         pointer + STACK_DYNAMIC_OFFSET into account in lieu of STACK_BOUNDARY.
304         * config/sparc/sparc.h (INIT_EXPANDERS): In 32-bit mode, lower the
305         alignment of 3 virtual registers to BITS_PER_WORD.
307         * config/sparc/sparc.c (sparc_compute_frame_size): Simplify.
309 2017-12-13  Peter Bergner  <bergner@vnet.ibm.com>
311         * config/rs6000/ppc-auxv.h (PPC_FEATURE2_HTM_NO_SUSPEND): New define.
312         * config/rs6000/rs6000.c (cpu_supports_info): Use it.
314 2017-12-13  Alexandre Oliva <aoliva@redhat.com>
316         PR bootstrap/83396
317         * reload1.c (eliminate_regs_in_insn): Skip debug markers.
319 2017-12-13  Jakub Jelinek  <jakub@redhat.com>
321         * tree-cfg.c (verify_gimple_in_cfg): Verify no non-label stmts
322         with the exception of debug begin stmt markers appear before
323         labels.
325         PR bootstrap/83396
326         * final.c (rest_of_handle_final): Call variable_tracking_main only
327         if !flag_var_tracking.
329 2017-12-13  Alexandre Oliva  <aoliva@redhat.com>
330             Jakub Jelinek  <jakub@redhat.com>
332         PR bootstrap/83396
333         PR debug/83391
334         * tree-cfgcleanup.c (remove_forwarder_block): Keep after
335         labels debug stmts that can only appear after labels.
337 2017-12-13  Alexander Monakov  <amonakov@ispras.ru>
339         PR rtl-optimization/82398
340         * sel-sched.c (sel_rank_for_schedule): Fix check for zero
341         EXPR_USEFULNESS in priority comparison.
343 2017-12-13  Segher Boessenkool  <segher@kernel.crashing.org>
345         PR rtl-optimization/83393
346         * combine.c (move_deaths): If reg_stat points to a too new insn in
347         last_death, do not use it: find the proper insn instead.
349 2017-12-12  Jeff Law  <law@redhat.com>
351         PR tree-optimization/83298
352         PR tree-optimization/83362
353         PR tree-optimization/83383
354         * gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Make
355         push_value_range a public interface.  Add new argument to
356         record_ranges_from_stmt.
357         * gimple-ssa-evrp-analyze.c
358         (evrp_range_analyzer::record_ranges_from_stmt): Add new argument.
359         Update comments.  Handle recording temporary equivalences.
360         * tree-ssa-dom.c (dom_opt_opt_walker::before_dom_children): Add
361         new argument to call to evrp_range_analyzer::record_ranges_from_stmt.
362         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Likewise.
363         * tree-ssa-threadedge.c: Include alloc-pool.h, vr-values.h and
364         gimple-ssa-evrp-analyze.h.
365         (record_temporary_equivalences_from_phis): Add new argument.  When
366         the PHI arg is an SSA_NAME, set the result's range to the range
367         of the PHI arg.
368         (record_temporary_equivalences_from_stmts_at_dest): Record ranges
369         from statements too.
370         (thread_through_normal_block): Accept new argument, evrp_range_analyzer.
371         Pass it down to children as needed.
372         (thread_outgoing_edges): Likewise.
373         (thread_across_edge): Likewise.   Push/pop range state as needed.
374         * tree-ssa-threadedge.h (thread_outgoing_edges): Update prototype.
376 2017-12-12  Julia Koval  <julia.koval@intel.com>
378         * config/i386/i386.c (PTA_SKYLAKE_AVX512): Add PTA_CLWB.
379         (PTA_CANNONLAKE): Remove PTA_CLWB.
381 2017-12-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
383         PR target/83332
384         * config/rs6000/vector.md (vcondv2dfv2di): New define_expand.
385         (vcondv2div2df): Likewise.
386         (vconduv2dfv2di): Likewise.
388 2017-12-12  Jakub Jelinek  <jakub@redhat.com>
390         * builtins.def (BUILT_IN_NEXTAFTER, BUILT_IN_NEXTAFTERF,
391         BUILT_IN_NEXTAFTERL, BUILT_IN_NEXTTOWARD, BUILT_IN_NEXTTOWARDF,
392         BUILT_IN_NEXTTOWARDL): Use ATTR_MATHFN_ERRNO instead of
393         ATTR_MATHFN_FPROUNDING_ERRNO.
395 2017-12-12  Richard Biener  <rguenther@suse.de>
397         PR tree-optimization/83385
398         * graphite-scop-detection.c (get_order, order): Remove.
399         (bb_to_rpo): New global.
400         (cmp_pbbs): Adjust.
401         (build_scops): Sort pbbs in RPO order.
403 2017-12-12  James Greenhalgh  <james.greenhalgh@arm.com>
405         * combine.c (simplify_set): Do not transform subregs to zero_extends
406         if the destination mode is a vector mode.
408 2017-12-12  Jakub Jelinek  <jakub@redhat.com>
410         PR tree-optimization/83359
411         * tree-cfg.h (fold_loop_internal_call): Declare.
412         * tree-vectorizer.c (fold_loop_internal_call): Moved to ...
413         * tree-cfg.c (fold_loop_internal_call): ... here.  No longer static.
414         (find_loop_dist_alias): New function.
415         (move_sese_region_to_fn): If any dloop->orig_loop_num value is
416         updated, also adjust any corresponding LOOP_DIST_ALIAS internal
417         calls.
419         PR tree-optimization/80631
420         * tree-vect-loop.c (get_initial_def_for_reduction): Fix comment typo.
421         (vect_create_epilog_for_reduction): Add INDUC_VAL and INDUC_CODE
422         arguments, for INTEGER_INDUC_COND_REDUCTION use INDUC_VAL instead of
423         hardcoding zero as the value if COND_EXPR is never true.  For
424         INTEGER_INDUC_COND_REDUCTION don't emit the final COND_EXPR if
425         INDUC_VAL is equal to INITIAL_DEF, and use INDUC_CODE instead of
426         hardcoding MAX_EXPR as the reduction operation.
427         (is_nonwrapping_integer_induction): Allow negative step.
428         (vectorizable_reduction): Compute INDUC_VAL and INDUC_CODE for
429         vect_create_epilog_for_reduction, if no value is suitable, don't
430         use INTEGER_INDUC_COND_REDUCTION for now.  Formatting fixes.
432 2017-12-12  Richard Biener  <rguenther@suse.de>
434         PR tree-optimization/81889
435         * tree-ssa-loop-niter.c (infer_loop_bounds_from_signedness): Use
436         range info from the non-wrapping IV instead of just the range
437         of the type.
439 2017-12-12  Julia Koval  <julia.koval@intel.com>
441         * config.gcc: Add vaesintrin.h.
442         * config/i386/i386-builtin-types.def (V64QI_FTYPE_V64QI_V64QI):
443         New type.
444         * config/i386/i386-builtin.def (__builtin_ia32_vaesdec_v16qi,
445         __builtin_ia32_vaesdec_v32qi, __builtin_ia32_vaesdec_v64qi):
446         New builtins.
447         * config/i386/i386.c (ix86_expand_args_builtin): Handle new type.
448         * config/i386/immintrin.h: Include vaesintrin.h.
449         * config/i386/sse.md (vaesdec_<mode>): New pattern.
450         * config/i386/vaesintrin.h (_mm256_aesdec_epi128, _mm512_aesdec_epi128,
451         _mm_aesdec_epi128): New intrinsics.
453 2017-12-12  Julia Koval  <julia.koval@intel.com>
455         * common/config/i386/i386-common.c (OPTION_MASK_ISA_VAES_SET,
456         OPTION_MASK_ISA_VAES_UNSET): New.
457         (ix86_handle_option): Handle -mvaes.
458         * config/i386/cpuid.h: Define bit_VAES.
459         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mvaes.
460         * config/i386/i386-c.c (__VAES__): New.
461         * config/i386/i386.c (ix86_target_string): Add -mvaes.
462         (ix86_valid_target_attribute_inner_p): Ditto.
463         * config/i386/i386.h (TARGET_VAES, TARGET_VAES_P): New.
464         * config/i386/i386.opt: Add -mvaes.
465         * doc/invoke.texi: Ditto.
467 2017-12-12  Alexandre Oliva  <aoliva@redhat.com>
469         * debug.h (gcc_debug_hooks): Add inline_entry.
470         * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
471         * debug.c (do_nothing_debug_hooks): Likewise.
472         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
473         * dwarf2out.c (dwarf2_debug_hooks): Likewise.
474         (dwarf2_lineno_debug_hooks): Likewise.
476         * common.opt (gstatement-frontiers): New, setting
477         debug_nonbind_markers_p.
478         * rtl.h (MAY_HAVE_DEBUG_MARKER_INSNS): Activate.
479         * toplev.c (process_options): Autodetect value for debug statement
480         frontiers option.
481         * tree.h (MAY_HAVE_DEBUG_MARKER_STMTS): Activate.
482         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers): New.
484         * cfgexpand.c (expand_gimple_basic_block): Handle begin stmt
485         markers.  Integrate source bind into debug stmt expand loop.
486         (pass_expand::execute): Check debug marker limit.  Avoid deep
487         TER and expand debug locations for debug bind insns only.
488         * cse.c (insn_live_p): Keep nonbind markers and debug bindings
489         followed by them.
490         * df-scan.c (df_insn_delete): Accept out-of-block debug insn.
491         * final.c (reemit_insn_block_notes): Take current block from
492         nonbind markers.  Declare note where it's first set.
493         (final_scan_insn): Handle begin stmt notes.  Emit is_stmt according to
494         begin stmt markers if enabled.
495         (notice_source_line): Handle nonbind markers.  Fail if their
496         location is unknown or that of builtins.
497         (rest_of_handle_final): Convert begin stmt markers to notes if
498         var-tracking didn't run.
499         (rest_of_clean_state): Skip begin stmt markers.
500         * gimple-pretty-print.c (dump_gimple_debug): Handle begin stmt
501         markers.
502         * function.c (allocate_struct_function): Set begin_stmt_markers.
503         * function.h (struct function): Add debug_marker_count counter
504         and debug_nonbind_markers flag.
505         * gimple-iterator.c (gsi_remove): Adjust debug_marker_count.
506         * gimple-low.c (lower_function_body): Adjust
507         debug_nonbind_markers.
508         (lower_stmt): Drop or skip gimple debug stmts.
509         (lower_try_catch): Skip debug stmts.
510         * gimple.c (gimple_build_debug_begin_stmt): New.
511         (gimple_copy): Increment debug_marker_count if copying one.
512         * gimple.h (gimple_build_debug_begin_stmt): Declare.
513         * gimplify.c (rexpr_location): New.
514         (rexpr_has_location): New.
515         (warn_switch_unreachable_r): Handle gimple debug stmts.
516         (shortcut_cond_r): Call expr_location.
517         (find_goto): New.
518         (find_goto_label): New.
519         (shortcut_cond_expr): Call expr_has_location, expr_location, and
520         find_goto_label.
521         (gimplify_cond_expr): Call find_goto_label, expr_has_location, and
522         expr_location.
523         (gimplify_expr): Handle begin stmt markers.  Reject debug expr decls.
524         * langhooks-def.h (LANG_HOOKS_EMITS_BEGIN_STMT): New.  Add to...
525         (LANG_HOOKS_INITIALIZER): ... this.
526         * langhooks.h (struct lang_hooks): Add emits_begin_stmt.
527         * lra-contraints.c (inherit_reload_reg): Tolerate between-blocks
528         debug insns.
529         (update_ebb_live_info): Skip debug insn markers.
530         * lra.c (debug_insn_static_data): Rename to...
531         (debug_bind_static_data): ... this.
532         (debug_marker_static_data): New.
533         (lra_set_insn_recog_data): Select one of the above depending
534         on debug insn kind.
535         (lra_update_isn_regno_info): Don't assume debug insns have
536         freqs.
537         (push_insns): Skip debug insns.
538         * lto-streamer-in.c (input_function): Drop debug stmts
539         depending on active options.  Adjust debug_nonbind_markers.
540         * params.def (PARAM_MAX_DEBUG_MARKER_COUNT): New.
541         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
542         begin stmt marker notes.
543         (print_insn): Likewise.
544         * recog.c (extract_insn): Recognize rtl for debug markers.
545         * rtl.def (DEBUG_MARKER): New.
546         * tree-inline.c: Include params.h.
547         (remap_gimple_stmt): Handle nonbind markers.
548         (maybe_move_debug_stmts_to_successors): Likewise.
549         (copy_debug_stmt): Likewise.
550         * tree-iterator.c (append_to_statement_list_1): Append begin stmt
551         markers regardless of no side effects.
552         (tsi_link_before): Don't update container's side effects when adding
553         a begin stmt marker.
554         (tsi_link_after): Likewise.
555         (expr_first): Skip begin stmt markers.
556         (expr_last): Likewise.
557         * tree-pretty-print (dump_generic_node): Handle begin stmt markers.
558         * tree-ssa-threadedge.c (propagate_threaded_block_debug_info):
559         Disregard nonbind markers.
560         * tree.c (make_node_stat): Don't set side effects for begin stmt
561         markers.
562         (build1_stat): Likewise.
563         * tree.def (DEBUG_BEGIN_STMT): New.
564         * tree.h (GOTO_DESTINATION): Require a GOTO_EXPR.
565         * var-tracking.c (delete_debug_insns): Renamed to...
566         (delete_vta_debug_insns): ... this.
567         (reemit_marker_as_note): New.
568         (vt_initialize): Reemit markers.
569         (delete_vta_debug_insns): Likewise.
570         (vt_debug_insns_local): Reemit or delete markers.
571         (variable_tracking_main_1): Likewise.
572         * doc/generic.texi (DEBUG_BEGIN_STMT): Document.
573         * doc/gimple.texi (gimple_debug_begin_stmt_p): New.
574         (gimple_debug_nonbind_marker_p): New.
575         (gimple_build_debug_bind): Adjust.
576         (gimple_build_debug_begin_stmt): New.
577         * doc/invoke.texi (max-debug-marker-count): New param.
578         * doc/rtl.texi (debug_implicit_ptr, entry_value): New.
579         (debug_parameter_ref, debug_marker): New.
580         (NOTE_INSN_BEGIN_STMT): New.
581         (DEBUG_INSN): Describe begin stmt markers.
583         * cfgbuild.c (find_bb_boundaries): Don't purge dead edges if,
584         without debug insns, we wouldn't, but clean up debug insns
585         after a control flow insn nevertheless.
587         * cfgcleanup.c (delete_unreachable_blocks): Use alternate
588         block removal order if MAY_HAVE_DEBUG_BIND_INSNS.
589         * cfgexpand.c (label_rtx_for_bb): Skip debug insns.
590         * cfgrtl.c (try_redirect_by_replacing_jump): Skip debug insns.
591         (rtl_tidy_fallthru_edge): Likewise.
592         (rtl_verify_fallthru): Likewise.
593         (rtl_verify_bb_layout): Likewise.
594         (skip_insns_after_block): Likewise.
595         (duplicate_insn_chain): Use DEBUG_BIND_INSN_P.
596         * dwarf2out.c: Include print-rtl.h.
597         (dwarf2out_next_real_insn): New.
598         (dwarf2out_var_location): Call it.  Disregard begin stmt markers.
599         Dump debug binds in asm comments.
600         * gimple-iterator.c (gimple_find_edge_insert_loc): Skip debug stmts.
601         * gimple-iterator.h (gsi_start_bb_nondebug): Remove; adjust
602         callers to use gsi_start_nondebug_bb instead.
603         (gsi_after_labels): Skip gimple debug stmts.
604         (gsi_start_nondebug): New.
605         * gimple-loop-interchange.c (find_deps_in_bb_for_stmt): Adjust.
606         (proper_loop_form_for_interchange): Adjust.
607         * gimple-low.c (gimple_seq_may_fallthru): Take last nondebug stmt.
608         * gimple.h (gimple_seq_last_nondebug_stmt): New.
609         * gimplify.c (last_stmt_in_scope): Skip debug stmts.
610         (collect_fallthrough_labels): Likewise.
611         (should_warn_for_implicit_fallthrough): Likewise.
612         (warn_implicit_fallthrough_r): Likewise.
613         (expand_FALLTHROUGH_r): Likewise.
614         * graphite-isl-ast-to-gimple.c (gsi_insert_earliest): Adjust.
615         (graphite_copy_stmts_from_block): Skip nonbind markers.
616         * haifa-sched.c (sched_extend_bb): Skip debug insns.
617         * ipa-icf-gimple.c (func_checker::compare_bb): Adjust.
618         * jump.c (clean_barriers): Skip debug insns.
619         * omp-expand.c (expand_parallel_call): Skip debug insns.
620         (expand_task_call): Likewise.
621         (remove_exit_barrier): Likewise.
622         (expand_omp_taskreg): Likewise.
623         (expand_omp_for_init_counts): Likewise.
624         (expand_omp_for_generic): Likewise.
625         (expand_omp_for_static_nochunk): Likewise.
626         (expand_omp_for_static_chunk): Likewise.
627         (expand_omp_simd): Likewise.
628         (expand_omp_taskloop_for_outer): Likewise.
629         (expand_omp_taskloop_for_inner): Likewise.
630         (expand_oacc_for): Likewise.
631         (expand_omp_sections): Likewise.
632         (expand_omp_single): Likewise.
633         (expand_omp_synch): Likewise.
634         (expand_omp_atomic_load): Likewise.
635         (expand_omp_atomic_store): Likewise.
636         (expand_omp_atomic_fetch_op): Likewise.
637         (expand_omp_atomic_pipeline): Likewise.
638         (expand_omp_atomic_mutex): Likewise.
639         (expand_omp_target): Likewise.
640         (grid_expand_omp_for_loop): Likewise.
641         (grid_expand_target_grid_body): Likewise.
642         (build_omp_regions_1): Likewise.
643         * omp-low.c (check_combined_parallel): Skip debug stmts.
644         * postreload.c (fixup_debug_insns): Skip nonbind debug insns.
645         * regcprop.c (find_oldest_value_reg): Ensure REGNO is not a pseudo.
646         * sese.c (sese_trivially_empty_bb_p): Call is_gimple_debug in
647         test.
648         * tree-cfg.c (make_blobs_1): Skip debug stmts.
649         (make_edges): Likewise.
650         (cleanup_dead_labels): Likewise.
651         (gimple_can_merge_blocks_p): Likewise.
652         (stmt_starts_bb_p): Likewise.
653         (gimple_block_label): Likewise.
654         (gimple_redirect_edge_and_branch): Likewise.
655         * tree-cfgcleanup.c (remove_forwarder_block): Rearrange skipping
656         of debug stmts.
657         (execute_cleanup_cfg_post_optimizing): Dump enumerated decls with
658         TDF_SLIM.
659         * tree-pretty-print (print_declaration): Omit initializer in slim
660         dumps.
661         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Mark begin stmt
662         markers.
663         (eliminate_unnecessary_stmts): Stabilize block removal order.
664         * tree-ssa-tail-merge.c (find_duplicate): Skip debug stmts.
665         * var-tracking.c (get_first_insn): New.
666         (vt_emit_notes): Call it.
667         (vt_initialize): Walk any insns before the first BB.
668         (delete_debug_insns): Likewise.
670         * gimple.h (enum gimple_debug_subcode): Add
671         GIMPLE_DEBUG_BEGIN_STMT.
672         (gimple_debug_begin_stmt_p): New.
673         (gimple_debug_nonbind_marker_p): New.
674         * tree.h (MAY_HAVE_DEBUG_MARKER_STMTS): New.
675         (MAY_HAVE_DEBUG_BIND_STMTS): Renamed from....
676         (MAY_HAVE_DEBUG_STMTS): ... this.  Check both.
677         * insn-notes.def (BEGIN_STMT): New.
678         * rtl.h (MAY_HAVE_DEBUG_MARKER_INSNS): New.
679         (MAY_HAVE_DEBUG_BIND_INSNS): Renamed from....
680         (MAY_HAVE_DEBUG_INSNS): ... this.  Check both.
681         (NOTE_MARKER_LOCATION, NOTE_MARKER_P): New.
682         (DEBUG_BIND_INSN_P, DEBUG_MARKER_INSN_P): New.
683         (INSN_DEBUG_MARKER_KIND): New.
684         (GEN_RTX_DEBUG_MARKER_BEGIN_STMT_PAT): New.
685         (INSN_VAR_LOCATION): Check for VAR_LOCATION.
686         (INSN_VAR_LOCATION_PTR): New.
687         * cfgexpand.c (expand_debug_locations): Handle debug bind insns
688         only.
689         (expand_gimple_basic_block): Likewise.  Emit debug temps for TER
690         deps only if debug bind insns are enabled.
691         (pass_expand::execute): Avoid deep TER and expand
692         debug locations for debug bind insns only.
693         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Narrow
694         debug stmts special handling down to debug bind stmts.
695         * combine.c (try_combine): Narrow debug insns special handling
696         down to debug bind insns.
697         * cse.c (delete_trivially_dead_insns): Handle debug bindings.
698         Narrow debug insns preexisting special handling down to debug
699         bind insns.
700         * dce.c (rest_of_handle_ud_dce): Narrow debug insns special
701         handling down to debug bind insns.
702         * function.c (instantiate_virtual_regs): Skip debug markers,
703         adjust handling of debug binds.
704         * gimple-ssa-backprop.c (backprop::prepare_change): Try debug
705         temp insertion iff MAY_HAVE_DEBUG_BIND_STMTS.
706         * haifa-sched.c (schedule_insn): Narrow special handling of debug
707         insns to debug bind insns.
708         * ipa-param-manipulation.c (ipa_modify_call_arguments): Narrow
709         special handling of debug stmts to debug bind stmts.
710         * ipa-split.c (split_function): Likewise.
711         * ira.c (combine_and_move_insns): Adjust debug bind insns only.
712         * loop-unroll.c (apply_opt_in_copies): Adjust tests on bind
713         debug insns.
714         * reg-stack.c (convert_regs_1): Use DEBUG_BIND_INSN_P.
715         * regrename.c (build_def_use): Likewise.
716         * regcprop.c (copyprop_hardreg_forward_1): Likewise.
717         (pass_cprop_hardreg): Narrow special casing of debug insns to
718         debug bind insns.
719         * regstat.c (regstat_init_n_sets_and_refs): Likewise.
720         * reload1.c (reload): Likewise.
721         * sese.c (sese_insert_phis_for_liveouts): Narrow special
722         casing of debug stmts to debug bind stmts.
723         * shrink-wrap.c (move_insn_for_shrink_wrap): Likewise.
724         * ssa-iterators.h (num_imm_uses): Likewise.
725         * tree-cfg.c (gimple_merge_blocks): Narrow special casing of
726         debug stmts to debug bind stmts.
727         * tree-inline.c (tree_function_versioning): Narrow special casing
728         of debug stmts to debug bind stmts.
729         * tree-loop-distribution.c (generate_loops_for_partition):
730         Narrow special casing of debug stmts to debug bind stmts.
731         * tree-sra.c (analyze_access_subtree): Narrow special casing
732         of debug stmts to debug bind stmts.
733         * tree-ssa-dce.c (remove_dead_stmt): Narrow special casing of debug
734         stmts to debug bind stmts.
735         * tree-ssa-loop-ivopt.c (remove_unused_ivs): Narrow special
736         casing of debug stmts to debug bind stmts.
737         * tree-ssa-reassoc.c (reassoc_remove_stmt): Likewise.
738         * tree-ssa-tail-merge.c (tail_merge_optimize): Narrow special
739         casing of debug stmts to debug bind stmts.
740         * tree-ssa-threadedge.c (propagate_threaded_block_debug_info):
741         Likewise.
742         * tree-ssa.c (flush_pending_stmts): Narrow special casing of
743         debug stmts to debug bind stmts.
744         (gimple_replace_ssa_lhs): Likewise.
745         (insert_debug_temp_for_var_def): Likewise.
746         (insert_debug_temps_for_defs): Likewise.
747         (reset_debug_uses): Likewise.
748         * tree-ssanames.c (release_ssa_name_fn): Likewise.
749         * tree-vect-loop-manip.c (adjust_debug_stmts_now): Likewise.
750         (adjust_debug_stmts): Likewise.
751         (adjust_phi_and_debug_stmts): Likewise.
752         (vect_do_peeling): Likewise.
753         * tree-vect-loop.c (vect_transform_loop): Likewise.
754         * valtrack.c (propagate_for_debug): Use BIND_DEBUG_INSN_P.
755         * var-tracking.c (adjust_mems): Narrow special casing of debug
756         insns to debug bind insns.
757         (dv_onepart_p, dataflow_set_clar_at_call, use_type): Likewise.
758         (compute_bb_dataflow, vt_find_locations): Likewise.
759         (vt_expand_loc, emit_notes_for_changes): Likewise.
760         (vt_init_cfa_base): Likewise.
761         (vt_emit_notes): Likewise.
762         (vt_initialize): Likewise.
763         (vt_finalize): Likewise.
765         * emit-rtl.c (next_nondebug_insn, prev_nondebug_insn): Reorder.
766         (next_nonnote_nondebug_insn, prev_nonnote_nondebug_insn): Reorder.
767         (next_nonnote_nondebug_insn_bb): New.
768         (prev_nonnote_nondebug_insn_bb): New.
769         (prev_nonnote_insn_bb, next_nonnote_insn_bb): Remove.
770         * rtl.h (prev_nonnote_insn_bb, next_nonnote_insn_bb): Remove decls.
771         (prev_nonnote_nondebug_insn_bb): Declare.
772         (next_nonnote_nondebug_insn_bb): Declare.
773         * cfgbuild.c (find_bb_boundaries): Adjust to skip debug insns.
774         * cfgrtl.c (get_last_bb_insn): Likewise.
775         * lra.c (push_insns): Likewise.
777 2017-12-11  David Malcolm  <dmalcolm@redhat.com>
779         PR c/82050
780         * selftest-run-tests.c (selftest::run_tests): Move start/finish code
781         to...
782         * selftest.c (selftest::test_runner::test_runner): New ctor.
783         (selftest::test_runner::~test_runner): New dtor.
784         * selftest.h (class selftest::test_runner): New class.
786 2017-12-11  Carl Love  <cel@us.ibm.com>
788         * config/rs6000/altivec.h (vec_extract_fp32_from_shorth,
789         vec_extract_fp32_from_shortl]): Add #defines.
790         * config/rs6000/rs6000-builtin.def (VSLDOI_2DI): Add macro expansion.
791         * config/rs6000/rs6000-c.c (ALTIVEC_BUILTIN_VEC_UNPACKH,
792         ALTIVEC_BUILTIN_VEC_UNPACKL, ALTIVEC_BUILTIN_VEC_AND,
793         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SRL,
794         ALTIVEC_BUILTIN_VEC_SRO, ALTIVEC_BUILTIN_VEC_SLD,
795         ALTIVEC_BUILTIN_VEC_SLL): Add expansions.
796         * doc/extend.texi: Add documentation for the added builtins.
798 2017-12-11  Alexandre Oliva  <aoliva@redhat.com>
800         PR rtl-optimization/80693
801         PR rtl-optimization/81019
802         PR rtl-optimization/81020
803         * combine.c (distribute_notes): Reset any REG_UNUSED REGs that
804         are not mentioned in i3.  Place the REG_UNUSED note on i2,
805         possibly modified to REG_DEAD, if it did not originate in i3.
807 2017-12-11  Jakub Jelinek  <jakub@redhat.com>
809         * recog.c (store_data_bypass_p_1): New function.
810         (store_data_bypass_p): Handle USE in a PARALLEL like CLOBBER.  Use
811         store_data_bypass_p_1 to avoid code duplication.  Formatting fixes.
813 2017-12-11  Segher Boessenkool  <segher@kernel.crashing.org>
815         PR rtl-optimization/83361
816         * ifcvt.c (if_convert): Call fixup_partitions.
818 2017-12-11  Will Schmidt  <will_schmidt@vnet.ibm.com>
820         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
821         early folding of splat_u{8,16,32}.
823 2017-12-11  Jakub Jelinek  <jakub@redhat.com>
825         * config/aarch64/aarch64.c (aarch64_print_operand): Don't start
826         output_operand_lossage first argument with capital letter.
827         (aarch64_override_options): Don't start error and sorry first argument
828         with capital letter.
830 2017-12-11  Andi Kleen  <ak@linux.intel.com>
832         PR gcov-profile/83355
833         * auto-profile.c (string_table::get_index_by_decl): Don't
834         recurse when abstract origin points to itself.
836 2017-12-11  Bin Cheng  <bin.cheng@arm.com>
838         PR tree-optimization/83320
839         * gimple-loop-interchange.cc (free_data_refs_with_aux): Use delete.
840         (prune_datarefs_not_in_loop): Ditto.
842 2017-12-10  Gerald Pfeifer  <gerald@pfeifer.com>
844         * doc/install.texi (Specific): Tweak link to mkssoftware.com.
846 2017-12-10  Jakub Jelinek  <jakub@redhat.com>
848         PR tree-optimization/83337
849         * gimple-loop-interchange.cc (compute_access_stride): Handle
850         bitfield DRs properly.
852 2017-12-09  Jakub Jelinek  <jakub@redhat.com>
854         PR tree-optimization/83338
855         * tree-vect-stmts.c (vectorizable_operation): Handle POINTER_DIFF_EXPR
856         vectorization as MINUS_EXPR with a subsequent VIEW_CONVERT_EXPR from
857         vector of unsigned integers to vector of signed integers.
859 2017-12-08  Vladimir Makarov  <vmakarov@redhat.com>
861         PR rtl-optimization/83317
862         * lra-constraints.c (process_address_1): Add insn code check.
864 2017-12-08  Michael Matz  <matz@suse.de>
866         Fix PR tree-optimization/83323
867         * gimple-loop-jam (unroll_jam_possible_p): Correct test for
868         head-controlled loops and loop BBs.
869         * common.opt (funroll-and-jam): Remove, instead ...
870         (floop-unroll-and-jam): ... reuse this option.
871         * opts.c (default_options_table): Use OPT_floop_unroll_and_jam.
872         * doc/invoke.texi (-funroll-and-jam): Move docu to ...
873         (-floop-unroll-and-jam): ... this option.
875 2017-12-08  Jakub Jelinek  <jakub@redhat.com>
877         * ipa-polymorphic-call.c (noncall_stmt_may_be_vtbl_ptr_store): Fix
878         a comment typo, get_base_ref_and_offset -> get_ref_base_and_extent.
879         * ipa-prop.c (stmt_may_be_vtbl_ptr_store): Likewise.
881 2017-12-08  Richard Biener  <rguenther@suse.de>
883         PR middle-end/81782
884         * tree-ssa-uninit.c (warn_uninitialized_vars): Properly
885         handle accesses outside of zero-sized vars.
887 2017-12-08  Martin Jambor  <mjambor@suse.cz>
889         PR tree-optimization/83141
890         * tree-sra.c (contains_vce_or_bfcref_p): Move up in the file, also
891         test for MEM_REFs implicitely changing types with padding.  Remove
892         inline keyword.
893         (build_accesses_from_assign): Added contains_vce_or_bfcref_p checks.
895 2017-12-08  Jakub Jelinek  <jakub@redhat.com>
897         * config/arc/arc.c (arc_attribute_table): Add exclusions to
898         the comment.
899         * config/avr/avr.c (avr_attribute_table): Likewise.
900         * config/msp430/msp430.c (msp430_attribute_table): Likewise.
901         * config/rl78/rl78.c (rl78_attribute_table): Likewise.
902         * config/nds32/nds32.c (nds32_attribute_table): Likewise.
903         * config/darwin.h (SUBTARGET_ATTRIBUTE_TABLE): Initialize new member
904         of struct attribute_spec.
905         * config/i386/cygming.h (SUBTARGET_ATTRIBUTE_TABLE): Likewise.
907 2017-12-08  Ulrich Weigand  <uweigand@de.ibm.com>
909         PR target/82960
910         * config/spu/spu.c (pad_bb): Only check INSN_CODE when INSN_P is true.
912 2017-12-08  Jan Hubicka  <hubicka@ucw.cz>
914         PR middle-end/83609
915         * profile-count.c (profile_count::from_gcov_type): Move from
916         profile-count.h; handle overflow.
917         * profile-count.h (profile_count::from_gcov_type): Move offline.
919 2017-12-08  Segher Boessenkool  <segher@kernel.crashing.org>
921         PR rtl-optimization/83304
922         * combine.c (move_deaths): If we do not know where a register died,
923         search for it.
925 2017-12-08  Richard Biener  <rguenther@suse.de>
927         * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
928         Provide -fopt-info-loop feedback when we interchange in a nest.
930 2017-06-08  Richard Earnshaw  <rearnsha@arm.com>
932         * config/arm/driver-arm.c (arm_cpu_table): Use fp-capable product names
933         for armv6 ARM CPU IDs.
935 2017-06-08  Richard Earnshaw  <rearnsha@arm.com>
937         * common/config/arm/arm-common.c: Include <algorithm>.
938         (INCLUDE_VECTOR): Define.
939         (compare_opt_names): New function.
940         (arm_rewrite_selected_arch): Only strip out extensions that can be
941         expressed through -mfpu.  Sort the remaining extensions
942         alphabetically.
944 2017-06-08  Richard Earnshaw  <rearnsha@arm.com>
946         * config/arm/arm.h (arm_asm_auto_mfpu): Declare.
947         (ASM_CPU_SPEC_FUNCTIONS): Add new rule asm_auto_mfpu.
948         (ASM_CPU_SPEC): Use it if -mfpu is set to auto.
949         * common/config/arm/arm-common.c (arm_asm_auto_mfpu): New function.
951 2017-06-08  Tristan Gingold  <gindold@adacore.com>
953         PR ada/81470
954         * dwarf2out.c (dwarf2out_do_cfi_startproc): Only emit
955         .cfi_personality or .cfi_lsda if the eh data format is dwarf2.
957 2017-12-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
959         * config/sol2.h (SOLARIS_ATTRIBUTE_TABLE): Initialize new member
960         of struct attribute_spec.
962 2017-12-08  Julia Koval  <julia.koval@intel.com>
964         * config/i386/avx512vnniintrin.h (_mm512_dpwssds_epi32,
965         _mm512_mask_dpwssds_epi32, _mm512_maskz_dpwssds_epi32): New intrinsics.
966         * config/i386/avx512vnnivlintrin.h (_mm256_dpwssds_epi32,
967         _mm256_mask_dpwssds_epi32, _mm256_maskz_dpwssds_epi32,
968         _mm_dpwssds_epi32, _mm_mask_dpwssds_epi32,
969         _mm_maskz_dpwssds_epi32): Ditto.
971 2017-12-08  Richard Biener  <rguenther@suse.de>
973         PR tree-optimization/81303
974         * tree-vect-stmts.c (vect_is_simple_cond): For invariant
975         conditions try to create a comparison vector type matching
976         the data vector type.
977         (vectorizable_condition): Adjust.
978         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
979         Leave invariant conditions alone in case we can vectorize those.
981 2017-12-08  Julia Koval  <julia.koval@intel.com>
983         * config/i386/avx512vnniintrin.h (_mm512_dpwssd_epi32,
984         _mm512_mask_dpwssd_epi32, _mm512_maskz_dpwssd_epi32): New intrinsics.
985         * config/i386/avx512vnnivlintrin.h (_mm256_dpwssd_epi32,
986         _mm256_mask_dpwssd_epi32, _mm256_maskz_dpwssd_epi32, _mm_dpwssd_epi32,
987         _mm_mask_dpwssd_epi32, _mm_maskz_dpwssd_epi32): Ditto.
989 2017-12-08  Julia Koval  <julia.koval@intel.com>
991         * config/i386/avx512vnniintrin.h (_mm512_dpbusds_epi32,
992         _mm512_mask_dpbusds_epi32, _mm512_maskz_dpbusds_epi32): New.
993         * config/i386/avx512vnnivlintrin.h (_mm256_dpbusds_epi32,
994         _mm256_mask_dpbusds_epi32, _mm256_maskz_dpbusds_epi32,
995         _mm_dpbusds_epi32, _mm_mask_dpbusds_epi32,
996         _mm_maskz_dpbusds_epi32): New intrinsics.
998 2017-12-07  Sandra Loosemore  <sandra@codesourcery.com>
1000         * config/nios2/nios2.md (ld<bhw_uns>io): Add splitter for memory
1001         operand.
1002         (ld<bh>io_signed): Likewise.
1003         (st<bhw>io): Likewise.
1004         * config/nios2/predicates.md (ldstio_memory_operand): Allow
1005         SMALL_INT12 constant integer operand.
1007 2017-12-07  Sandra Loosemore  <sandra@codesourcery.com>
1009         * config/nios2/nios2.c (nios2_symbolic_constant_allowed):
1010         Rename to...
1011         (nios2_large_constant_allowed): ...this.  Adjust uses.
1012         (nios2_plus_symbolic_constant_p): Rename to...
1013         (nios2_plus_large_constant_p): ...this.  Adjust uses.
1014         (nios2_legitimate_address_p): Correct CONST_INT handling.
1015         (nios2_symbolic_memory_operand_p): Rename to...
1016         (nios2_large_constant_memory_operand_p): ...this.  Adjust uses.
1017         (nios2_large_constant_p): Check for large constant integers too.
1018         (nios2_split_large_constant): Handle constant integers.
1019         (nios2_split_symbolic_memory_operand): Rename to...
1020         (nios2_split_large_constant_memory_operand): ...this.  Adjust uses.
1021         (nios2_legitimize_constant_address): Handle constant integers.
1022         (r0rel_constant_p): Handle small constant integers.
1023         (nios2_print_operand_address): Handle r0-relative integer addresses.
1024         * config/nios2/nios2-protos.h: Adjust for renamed functions.
1025         * config/nios2/nios2.md: Adjust for renamed functions.
1027 2017-12-07  Andrew Waterman  <andrew@sifive.com>
1029         * config/riscv/riscv.c (TARGET_ASM_SELECT_SECTION): New define.
1030         (TARGET_HAVE_SRODATA_SECTION): New define.
1031         (riscv_select_section): New function.
1033 2017-12-08  Joseph Myers  <joseph@codesourcery.com>
1034             Alexander Monakov  <amonakov@ispras.ru>
1035             Jakub Jelinek  <jakub@redhat.com>
1037         PR target/81906
1038         * config/i386/i386.c (ix86_expand_rint): Handle flag_rounding_math.
1040 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
1042         * config/aarch64/aarch64.c (aarch64_print_address_internal): Return
1043         a bool success value.  Don't call output_operand_lossage here.
1044         (aarch64_print_ldpstp_address): Return a bool success value.
1045         (aarch64_print_operand_address): Call output_addr_const if
1046         aarch64_print_address_internal fails.
1047         (aarch64_print_operand): Don't assert that the mode is 16 bytes for
1048         'y'; call output_operand_lossage instead.  Call output_operand_lossage
1049         if aarch64_print_ldpstp_address fails.
1051 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
1053         * tree-vector-builder.h
1054         (tree_vector_builder::binary_encoded_nelts): Declare.
1055         * tree-vector-builder.c
1056         (tree_vector_builder::binary_encoded_nelts): New function.
1057         * fold-const.c (negate_expr_p): Likewise.
1058         (operand_equal_p, fold_checksum_tree): Likewise.
1059         * tree-loop-distribution.c (const_with_all_bytes_same): Likewise.
1060         * tree.c (integer_zerop, integer_onep, integer_all_onesp, real_zerop)
1061         (real_onep, real_minus_onep, add_expr, initializer_zerop): Likewise.
1062         (uniform_vector_p): Likewise.
1063         * varasm.c (const_hash_1, compare_constant): Likewise.
1064         * tree-ssa-ccp.c: Include tree-vector-builder.h.
1065         (valid_lattice_transition): Operate directly on the VECTOR_CST
1066         encoding.
1067         * ipa-icf.c: Include tree-vector-builder.h.
1068         (sem_variable::equals): Operate directly on the VECTOR_CST encoding.
1069         * print-tree.c (print_node): Print encoding of VECTOR_CSTs.
1071 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
1073         * tree.c (build_vector): Delete.
1074         * tree.h (build_vector): Make static and move into the self-testing
1075         block.
1077 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
1079         * vector-builder.h (vector_builder::derived): New const overload.
1080         (vector_builder::elt): New function.
1081         * tree-vector-builder.h (tree_vector_builder::type): New function.
1082         (tree_vector_builder::apply_step): Declare.
1083         * tree-vector-builder.c (tree_vector_builder::apply_step): New
1084         function.
1085         * gimple-fold.h (tree_vector_builder): Declare.
1086         (gimple_build_vector): Take a tree_vector_builder instead of a
1087         type and vector of elements.
1088         * gimple-fold.c (gimple_build_vector): Likewise.
1089         * tree-vect-loop.c (get_initial_def_for_reduction): Update call
1090         accordingly.
1091         (get_initial_defs_for_reduction): Likewise.
1092         (vectorizable_induction): Likewise.
1094 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
1096         * tree-vector-builder.h
1097         (tree_vector_builder::new_binary_operation): Declare.
1098         * tree-vector-builder.c
1099         (tree_vector_builder::new_binary_operation): New function.
1100         * fold-const.c (fold_relational_const): Use it.
1101         (const_binop): Likewise.  Check that both input vectors have
1102         the same number of elements, thus excluding things like WIDEN_SUM.
1103         Check whether it is possible to operate directly on the encodings
1104         of stepped inputs.
1106 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
1108         * fold-const.c (fold_negate_expr_1): Use tree_vector_builder and
1109         new_unary_operation, operating only on the encoded elements.
1110         (const_unop): Likewise.
1111         (exact_inverse): Likewise.
1112         (distributes_over_addition_p): New function.
1113         (const_binop): Use tree_vector_builder and new_unary_operation
1114         for combinations of VECTOR_CST and INTEGER_CST.  Operate only
1115         on the encoded elements unless the encoding is strided and the
1116         operation does not distribute over addition.
1117         (fold_convert_const):  Use tree_vector_builder and
1118         new_unary_operation.  Operate only on the encoded elements
1119         for truncating integer conversions, or for non-stepped encodings.
1121 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
1123         * config/sparc/sparc.c: Include tree-vector-builder.h.
1124         (sparc_fold_builtin): Use tree_vector_builder instead of build_vector.
1125         * expmed.c: Include tree-vector-builder.h.
1126         (make_tree): Use tree_vector_builder instead of build_vector.
1127         * fold-const.c: Include tree-vector-builder.h.
1128         (const_binop): Use tree_vector_builder instead of build_vector.
1129         (const_unop): Likewise.
1130         (native_interpret_vector): Likewise.
1131         (fold_vec_perm): Likewise.
1132         (fold_ternary_loc): Likewise.
1133         * gimple-fold.c: Include tree-vector-builder.h.
1134         (gimple_fold_stmt_to_constant_1): Use tree_vector_builder instead
1135         of build_vector.
1136         * tree-ssa-forwprop.c: Include tree-vector-builder.h.
1137         (simplify_vector_constructor): Use tree_vector_builder instead
1138         of build_vector.
1139         * tree-vect-generic.c: Include tree-vector-builder.h.
1140         (add_rshift): Use tree_vector_builder instead of build_vector.
1141         (expand_vector_divmod): Likewise.
1142         (optimize_vector_constructor): Likewise.
1143         * tree-vect-loop.c: Include tree-vector-builder.h.
1144         (vect_create_epilog_for_reduction): Use tree_vector_builder instead
1145         of build_vector.  Explicitly use a stepped encoding for
1146         { 1, 2, 3, ... }.
1147         * tree-vect-slp.c: Include tree-vector-builder.h.
1148         (vect_get_constant_vectors): Use tree_vector_builder instead
1149         of build_vector.
1150         (vect_transform_slp_perm_load): Likewise.
1151         (vect_schedule_slp_instance): Likewise.
1152         * tree-vect-stmts.c: Include tree-vector-builder.h.
1153         (vectorizable_bswap): Use tree_vector_builder instead of build_vector.
1154         (vect_gen_perm_mask_any): Likewise.
1155         (vectorizable_call): Likewise.  Explicitly use a stepped encoding.
1156         * tree.c: (build_vector_from_ctor): Use tree_vector_builder instead
1157         of build_vector.
1158         (build_vector_from_val): Likewise.  Explicitly use a duplicate
1159         encoding.
1161 2017-12-07  Richard Sandiford  <richard.sandiford@arm.com>
1163         * doc/generic.texi (VECTOR_CST): Describe new representation of
1164         vector constants.
1165         * vector-builder.h: New file.
1166         * tree-vector-builder.h: Likewise.
1167         * tree-vector-builder.c: Likewise.
1168         * Makefile.in (OBJS): Add tree-vector-builder.o.
1169         * tree.def (VECTOR_CST): Update comment to refer to generic.texi.
1170         * tree-core.h (tree_base): Add a vector_cst field to the u union.
1171         (tree_vector): Change the number of elements to
1172         vector_cst_encoded_nelts.
1173         * tree.h (VECTOR_CST_NELTS): Redefine using TYPE_VECTOR_SUBPARTS.
1174         (VECTOR_CST_ELTS): Delete.
1175         (VECTOR_CST_ELT): Redefine using vector_cst_elt.
1176         (VECTOR_CST_LOG2_NPATTERNS, VECTOR_CST_NPATTERNS): New macros.
1177         (VECTOR_CST_NELTS_PER_PATTERN, VECTOR_CST_DUPLICATE_P): Likewise.
1178         (VECTOR_CST_STEPPED_P, VECTOR_CST_ENCODED_ELTS): Likewise.
1179         (VECTOR_CST_ENCODED_ELT): Likewise.
1180         (vector_cst_encoded_nelts): New function.
1181         (make_vector): Take the values of VECTOR_CST_LOG2_NPATTERNS and
1182         VECTOR_CST_NELTS_PER_PATTERN as arguments.
1183         (vector_cst_int_elt, vector_cst_elt): Declare.
1184         * tree.c: Include tree-vector-builder.h.
1185         (tree_code_size): Abort if passed VECTOR_CST.
1186         (tree_size): Update for new VECTOR_CST layout.
1187         (make_vector): Take the values of VECTOR_CST_LOG2_NPATTERNS and
1188         VECTOR_CST_NELTS_PER_PATTERN as arguments.
1189         (build_vector): Use tree_vector_builder.
1190         (vector_cst_int_elt, vector_cst_elt): New functions.
1191         (drop_tree_overflow): For VECTOR_CST, drop the TREE_OVERFLOW from the
1192         encoded elements and then create the vector in the canonical form.
1193         (check_vector_cst, check_vector_cst_duplicate, check_vector_cst_fill)
1194         (check_vector_cst_stepped, test_vector_cst_patterns): New functions.
1195         (tree_c_tests): Call test_vector_cst_patterns.
1196         * lto-streamer-out.c (DFS::DFS_write_tree_body): Handle the new
1197         VECTOR_CST fields.
1198         (hash_tree): Likewise.
1199         * tree-streamer-out.c (write_ts_vector_tree_pointers): Likewise.
1200         (streamer_write_tree_header): Likewise.
1201         * tree-streamer-in.c (lto_input_ts_vector_tree_pointers): Likewise.
1202         (streamer_alloc_tree): Likewise.  Update call to make_vector.
1203         * fold-const.c (fold_ternary_loc): Avoid using VECTOR_CST_ELTS.
1205 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
1207         * selftest.h (ASSERT_TRUE_AT, ASSERT_FALSE_AT, ASSERT_EQ_AT)
1208         (ASSERT_NE, ASSERT_PRED1): Add underscores to local variable names
1209         * selftest-rtl.h (ASSERT_RTX_EQ, ASSERT_RTX_PTR_EQ): Likewise.
1211 2017-12-07  Bin Cheng  <bin.cheng@arm.com>
1212             Richard Biener  <rguenther@suse.de>
1214         PR tree-optimization/81303
1215         * Makefile.in (gimple-loop-interchange.o): New object file.
1216         * common.opt (floop-interchange): Reuse the option from graphite.
1217         * doc/invoke.texi (-floop-interchange): Ditto.  New document for
1218         -floop-interchange and mention it for -O3.
1219         * opts.c (default_options_table): Enable -floop-interchange at -O3.
1220         * gimple-loop-interchange.cc: New file.
1221         * params.def (PARAM_LOOP_INTERCHANGE_MAX_NUM_STMTS): New parameter.
1222         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): New parameter.
1223         * passes.def (pass_linterchange): New pass.
1224         * timevar.def (TV_LINTERCHANGE): New time var.
1225         * tree-pass.h (make_pass_linterchange): New declaration.
1226         * tree-ssa-loop-ivcanon.c (create_canonical_iv): Change to external
1227         interchange.  Record IV before/after increment in new parameters.
1228         * tree-ssa-loop-ivopts.h (create_canonical_iv): New declaration.
1229         * tree-vect-loop.c (vect_is_simple_reduction): Factor out reduction
1230         path check into...
1231         (check_reduction_path): ...New function here.
1232         * tree-vectorizer.h (check_reduction_path): New declaration.
1234 2017-12-07  Vladimir Makarov  <vmakarov@redhat.com>
1236         PR target/83252
1237         PR rtl-optimization/80818
1238         * lra.c (add_regs_to_insn_regno_info): Make a hard reg in CLOBBER
1239         always early clobbered.
1240         * lra-lives.c (process_bb_lives): Check input hard regs for early
1241         clobbered non-operand hard reg.
1243 2017-12-07  Jakub Jelinek  <jakub@redhat.com>
1245         PR middle-end/83164
1246         * tree-cfg.c (verify_gimple_assign_binary): Don't require
1247         types_compatible_p, just that TYPE_MODE is the same.
1249 2017-12-07  Martin Sebor  <msebor@redhat.com>
1251         PR c/81544
1252         * attribs.c (empty_attribute_table): Initialize new member of
1253         struct attribute_spec.
1254         (decl_attributes): Add argument.  Handle mutually exclusive
1255         combinations of attributes.
1256         (selftests::test_attribute_exclusions): New function.
1257         (selftests::attribute_c_tests): Ditto.
1258         * attribs.h (decl_attributes): Add default argument.
1259         * selftest.h (attribute_c_tests): Declare.
1260         * selftest-run-tests.c (selftest::run_tests): Call attribute_c_tests.
1261         * tree-core.h (attribute_spec::exclusions, exclude): New type and
1262         member.
1263         * doc/extend.texi (Common Function Attributes): Update const and pure.
1264         * config/alpha/alpha.c (vms_attribute_table): Initialize new member
1265         of struct attribute_spec.
1266         * config/arc/arc.c (arc_attribute_table): Same.
1267         * config/arm/arm.c (arm_attribute_table): Same.
1268         * config/avr/avr.c ( avr_attribute_table): Same.
1269         * config/bfin/bfin.c (bfin_attribute_table): Same.
1270         * config/cr16/cr16.c (cr16_attribute_table): Same.
1271         * config/epiphany/epiphany.c (epiphany_attribute_table): Same.
1272         * config/h8300/h8300.c (h8300_attribute_table): Same.
1273         * config/i386/i386.c (ix86_attribute_table): Same.
1274         * config/ia64/ia64.c (ia64_attribute_table): Same.
1275         * config/m32c/m32c.c (m32c_attribute_table): Same.
1276         * config/m32r/m32r.c (m32r_attribute_table): Same.
1277         * config/m68k/m68k.c (m68k_attribute_table): Same.
1278         * config/mcore/mcore.c (mcore_attribute_table): Same.
1279         * config/microblaze/microblaze.c (microblaze_attribute_table): Same.
1280         * config/mips/mips.c (mips_attribute_table): Same.
1281         * config/msp430/msp430.c (msp430_attribute_table): Same.
1282         * config/nds32/nds32.c (nds32_attribute_table): Same.
1283         * config/nvptx/nvptx.c (nvptx_attribute_table): Same.
1284         * config/powerpcspe/powerpcspe.c (rs6000_attribute_table): Same.
1285         * config/rl78/rl78.c (rl78__attribute_table): Same.
1286         * config/rs6000/rs6000.c (rs6000_attribute_table): Same.
1287         * onfig/rx/rx.c (rx_attribute_table): Same.
1288         * config/s390/s390.c (s390_handle_vectorbool_attribute): Same.
1289         * config/sh/sh.c (sh_attribute_table): Same.
1290         * config/sparc/sparc.c (sparc_attribute_table): Same.
1291         * config/spu/spu.c (spu_attribute_table): Same.
1292         * config/stormy16/stormy16.c (xstormy16_attribute_table): Same.
1293         * config/v850/v850.c (v850_attribute_table): Same.
1294         * config/visium/visium.c (visium_attribute_table): Same.
1296 2017-12-07  Tamar Christina  <tamar.christina@arm.com>
1298         PR target/82641
1299         * config/arm/arm.c (INCLUDE_STRING): Define.
1300         (arm_last_printed_arch_string, arm_last_printed_fpu_string): New.
1301         (arm_declare_function_name): Conservatively emit .arch, .arch_extensions
1302         and .fpu.
1304 2017-12-07  Michael Matz  <matz@suse.de>
1306         Add unroll and jam pass
1308         * gimple-loop-jam.c: New file.
1309         * Makefile.in (OBJS): Add gimple-loop-jam.o.
1310         * common.opt (funroll-and-jam): New option.
1311         * opts.c (default_options_table): Add unroll-and-jam at -O3.
1312         * params.def (PARAM_UNROLL_JAM_MIN_PERCENT): New param.
1313         (PARAM_UNROLL_JAM_MAX_UNROLL): Ditto.
1314         * passes.def: Add pass_loop_jam.
1315         * timevar.def (TV_LOOP_JAM): Add.
1316         * tree-pass.h (make_pass_loop_jam): Declare.
1317         * cfgloop.c (flow_loop_tree_node_add): Add AT argument.
1318         * cfgloop.h (flow_loop_tree_node_add): Adjust declaration.
1319         * cfgloopmanip.c (duplicate_loop): Add AT argument, adjust call
1320         to flow_loop_tree_node_add.
1321         (duplicate_subloops, copy_loops_to): Append to sibling list.
1322         * cfgloopmanip.h: (duplicate_loop): Adjust declaration.
1323         * doc/invoke.texi (-funroll-and-jam): Document new option.
1324         (unroll-jam-min-percent, unroll-jam-max-unroll): Document new params.
1326 2017-12-07  Richard Biener  <rguenther@suse.de>
1328         PR tree-optimization/83296
1329         PR tree-optimization/67769
1330         * tree-ssa-phiopt.c (conditional_replacement): Do not reset
1331         flow sensitive info in an unrelated BB.
1332         (value_replacement): Use reset_flow_sensitive_info.
1333         (minmax_replacement): Reset flow sensitive info on the def
1334         we move.  Do not reset flow sensitive info in the whole BB
1335         we move the stmt to.
1336         (abs_replacement): Likewise.
1338 2017-12-07  Segher Boessenkool  <segher@kernel.crashing.org>
1340         PR target/43871
1341         * config/rs6000/rs6000.c (rs6000_option_override_internal): Set
1342         rs6000_cpu to the given -mcpu=, or to the default processor.
1344 2017-12-07  Segher Boessenkool  <segher@kernel.crashing.org>
1346         * config/rs6000/rs6000.h (rs6000_cpu_attr): Delete.
1347         * config/rs6000/rs6000.c (rs6000_variable_issue_1): Use rs6000_tune
1348         instead of rs6000_cpu_attr.
1349         (rs6000_adjust_cost): Ditto.
1350         (is_microcoded_insn): Ditto.
1351         (rs6000_adjust_priority): Ditto.
1352         (rs6000_issue_rate): Ditto.
1353         (rs6000_use_sched_lookahead): Ditto.
1354         (rs6000_use_sched_lookahead_guard): Ditto.
1355         (rs6000_sched_reorder): Ditto.
1356         (force_new_group): Ditto.
1357         * config/rs6000/rs6000.md (cpu attribute): Ditto.
1358         (group_ending_nop): Ditto.
1360 2017-12-07  Segher Boessenkool  <segher@kernel.crashing.org>
1362         * config/rs6000/rs6000.opt (rs6000_tune): New variable.
1363         * config/rs6000/rs6000.c (rs6000_option_override_internal): Also set
1364         rs6000_tune.  Use rs6000_tune instead of rs6000_cpu where appropriate.
1365         (rs6000_loop_align): Use rs6000_tune instead of rs6000_cpu where
1366         appropriate.
1367         (rs6000_reassociation_width): Ditto.
1368         (rs6000_emit_epilogue): Ditto.
1369         (rs6000_adjust_cost): Ditto.
1370         (is_microcoded_insn): Ditto.
1371         (is_cracked_insn): Ditto.
1372         (rs6000_adjust_priority): Ditto.
1373         (rs6000_sched_reorder): Ditto.
1374         (rs6000_sched_reorder2): Ditto.
1375         (insn_must_be_first_in_group): Ditto.
1376         (insn_must_be_last_in_group): Ditto.
1377         (rs6000_register_move_cost): Ditto.
1378         * config/rs6000/rs6000.h (rs6000_cpu_attr): Use rs6000_tune instead of
1379         rs6000_cpu.
1381 2017-12-07  Julia Koval  <julia.koval@intel.com>
1383         * config.gcc: Add vaesintrin.h.
1384         * config/i386/i386-builtin-types.def (V64QI_FTYPE_V64QI_V64QI):
1385         New type.
1386         * config/i386/i386-builtin.def (__builtin_ia32_vaesdec_v16qi,
1387         __builtin_ia32_vaesdec_v32qi, __builtin_ia32_vaesdec_v64qi):
1388         New builtins.
1389         * config/i386/i386.c (ix86_expand_args_builtin): Handle new type.
1390         * config/i386/immintrin.h: Include vaesintrin.h.
1391         * config/i386/sse.md (vaesdec_<mode>): New pattern.
1392         * config/i386/vaesintrin.h (_mm256_aesdec_epi128, _mm512_aesdec_epi128,
1393         _mm_aesdec_epi128): New intrinsics.
1395 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
1397         * Makefile.in (C_COMMON_OBJS): Add c-family/c-spellcheck.o.
1398         * spellcheck-tree.c (find_closest_macro_cpp_cb): Move to
1399         c-family/c-spellcheck.cc.
1400         (best_macro_match::best_macro_match): Likewise.
1401         * spellcheck-tree.h
1402         (struct edit_distance_traits<cpp_hashnode *>): Move to
1403         c-family/c-spellcheck.h.
1404         (class best_macro_match): Likewise.
1406 2017-12-06  Jakub Jelinek  <jakub@redhat.com>
1408         PR tree-optimization/83293
1409         * gimple-ssa-strength-reduction.c (insert_initializers): Use
1410         GSI_NEW_STMT instead of GSI_SAME_STMT in gsi_insert_after that
1411         might insert into empty bb.
1413         PR sanitizer/81281
1414         * match.pd ((T)(P + A) - (T)P -> (T) A): Split into separate
1415         simplify for plus with :c added, and pointer_plus without that.
1416         ((T)P - (T)(P + A) -> -(T) A): Likewise.  If type is integral
1417         with undefined overflow and the conversion is not widening,
1418         perform negation in utype and only convert to type afterwards.
1419         ((T)(P + A) - (T)(P + B) -> (T)A - (T)B): Split into separate
1420         simplify for plus with :c added, and pointer_plus without that.
1421         If type is integral with undefined overflow and the conversion is
1422         not widening, perform minus in utype and only convert to type
1423         afterwards.  Move the last pointer_diff_expr simplify into the
1424         two outermost ifs.
1426 2017-12-06  Martin Sebor  <msebor@redhat.com>
1428         PR tree-optimization/82646
1429         * builtins.c (maybe_emit_chk_warning): Use size as the bound for
1430         strncpy, not maxlen.
1432 2017-12-06  Martin Sebor  <msebor@redhat.com>
1434         * doc/invoke.texi (-Wstringop-truncation): Mention attribute
1435         nonstring.
1437         PR tree-optimization/83075
1438         * tree-ssa-strlen.c (handle_builtin_stxncpy): Avoid assuming
1439         strncat/strncpy don't change length of source string.
1441 2017-12-06  Eric Botcazou  <ebotcazou@adacore.com>
1443         Revert
1444         2017-11-29  Martin Aberg  <maberg@gaisler.com>
1446         * config/sparc/sparc.md (divdf3_fix): Add NOP and adjust length
1447         to prevent b2bst errata sequence.
1448         (sqrtdf2_fix): Likewise.
1450 2017-12-06  Jakub Jelinek  <jakub@redhat.com>
1452         PR tree-optimization/81945
1453         * cfgloop.h (FOR_EACH_LOOP_FN): Use FN instead of hardcoding fn.
1454         * tree-cfg.c (move_sese_region_to_fn): If any of the loops moved
1455         to dest_cfun has orig_loop_num set, either remap it to the new
1456         loop number if the loop got moved too, or clear it.
1458 2017-12-05  Steve Ellcey  <sellcey@cavium.com>
1460         * config/aarch64/thunderx2-t99.md (thunderx2t99_branch): Add trap
1461         to reservation.
1462         (thunderx2t99_nothing): New insn reservation.
1463         (thunderx2t99_mrs): New insn reservation.
1464         (thunderx2t99_multiple): New insn reservation.
1465         (thunderx2t99_alu_basi): Add bfx to reservation.
1466         (thunderx2t99_fp_cmp): Add fccmps and fccmpd to reservation.
1468 2017-12-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
1470         PR target/82248
1471         * config/arm/arm.md (probe_stack) : Use the 'o' constraint.
1473 2017-12-05  Bin Cheng  <bin.cheng@arm.com>
1475         * tree-ssa-dce.c (simple_dce_from_worklist): Move and rename from
1476         tree-ssa-pre.c::remove_dead_inserted_code.
1477         * tree-ssa-dce.h: New file.
1478         * tree-ssa-pre.c (tree-ssa-dce.h): Include new header file.
1479         (remove_dead_inserted_code): Move and rename to function
1480         tree-ssa-dce.c::simple_dce_from_worklist.
1481         (pass_pre::execute): Update use.
1483 2017-12-05  Richard Biener  <rguenther@suse.de>
1485         PR tree-optimization/83277
1486         * graphite-isl-ast-to-gimple.c (should_copy_to_new_region): Make sure
1487         to code-gen liveout vars.
1489 2017-12-05  Richard Sandiford  <richard.sandiford@linaro.org>
1491         * config/aarch64/aarch64-simd.md (aarch64_simd_bsldi_internal)
1492         (aarch64_simd_bsldi_alt): Check REG_P before GP_REGNUM_P.
1493         (aarch64_cm<optab>di, aarch64_cmtstdi): Add leading "&&" to
1494         split condition.
1496 2017-12-05  Max Filippov  <jcmvbkbc@gmail.com>
1498         * config/xtensa/xtensa.c (xtensa_asan_shadow_offset): New
1499         function.
1500         (TARGET_ASAN_SHADOW_OFFSET): New macro definition.
1501         * config/xtensa/xtensa.h (FRAME_GROWS_DOWNWARD): Set to 1 if
1502         ASAN is enabled.
1504 2017-12-05  Richard Biener   <rguenther@suse.de>
1506         * timevar.def (TV_TREE_RECIP, TV_TREE_SINCOS, TV_TREE_WIDEN_MUL): Add.
1507         * tree-ssa-math-opts.c (pass_data_cse_reciprocal): Use TV_TREE_RECIP.
1508         (pass_data_cse_sincos): Use TV_TREE_SINCOS.
1509         (pass_data_optimize_widening_mul): Use TV_TREE_WIDEN_MUL.
1511 2017-12-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1513         * dbxout.c (dbxout_block): Grow buf to 30 bytes.
1515 2017-12-05  Martin Liska  <mliska@suse.cz>
1516             Jakub Jelinek  <jakub@redhat.com>
1518         * doc/invoke.texi: Document the options.
1519         * flag-types.h (enum sanitize_code): Add
1520         SANITIZE_POINTER_COMPARE and SANITIZE_POINTER_SUBTRACT.
1521         * ipa-inline.c (sanitize_attrs_match_for_inline_p): Add handling
1522         of SANITIZE_POINTER_COMPARE and SANITIZE_POINTER_SUBTRACT.
1523         * opts.c: Define new sanitizer options.
1524         * sanitizer.def (BUILT_IN_ASAN_POINTER_COMPARE): Likewise.
1525         (BUILT_IN_ASAN_POINTER_SUBTRACT): Likewise.
1527 2017-12-05  Julia Koval  <julia.koval@intel.com>
1529         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VNNI_SET,
1530         OPTION_MASK_ISA_AVX512VNNI_UNSET): New.
1531         (ix86_handle_option): Handle -mavx512vnni.
1532         * config/i386/cpuid.h (bit_AVX512VNNI): New bit.
1533         * config/i386/driver-i386.c (host_detect_local_cpu): Handle new bit.
1534         * config/i386/i386-c (__AVX512VNNI__): New.
1535         * config/i386/i386.c (ix86_target_string): Handle new option.
1536         (ix86_valid_target_attribute_inner_p): Handle new option.
1537         * config/i386/i386.h (TARGET_AVX512VNNI, TARGET_AVX512VNNI_P): New.
1538         * config/i386/i386.opt (mavx512vnni): New option.
1540 2017-12-01  Jan Hubicka  <hubicka@ucw.cz>
1542         PR target/81616
1543         * athlon.md: Disable for generic.
1544         * haswell.md: Enable for generic.
1545         * i386.c (ix86_sched_init_global): Add core hooks for generic.
1546         * x86-tune-sched.c (ix86_issue_rate): Increase issue rate for generic
1547         to 4.
1548         (ix86_adjust_cost): Move generic to haswell path.
1550 2017-12-04  Eric Botcazou  <ebotcazou@adacore.com>
1552         * config/sparc/sparc.c (sparc_do_work_around_errata): Use mem_ref
1553         instead of MEM_P in a couple more places.  Fix formatting issues.
1555 2017-12-04  Jim Wilson  <jimw@sifive.com>
1557         * config/riscv/riscv.c (riscv_for_each_saved_reg): Use GP_REG_LAST
1558         instead of GP_REG_LAST-1.
1559         (riscv_adjust_libcall_cfi_prologue): Likewise.
1560         (riscv_adjust_libcall_cri_epilogue): Likewise.
1561         * config/riscv/riscv.h (CALL_USED_REGISTERS): Change a6 to t6 in
1562         comment.
1564 2017-12-04  Luis Machado  <luis.machado@linaro.org>
1566         * ipa-pure-const.c (check_decl): Add missing newline.
1567         (state_from_flags): Likewise.
1569 2017-12-04  Jeff Law  <law@redhat.com>
1571         PR tree-optimizatin/78496
1572         * gimple-ssa-evrp-analyze.h
1573         (evrp_range_analyzer::get_vr_values): Simplify.
1574         * gimple-ssa-evrp-analyze.c: Corresponding changes.
1575         * tree-ssa-dom.c: Include alloc-pool.h, tree-vrp.h, vr-values.h
1576         and gimple-ssa-evrp-analyze.h.
1577         (dom_opt_dom_walker class): Add evrp_range_analyzer member.
1578         (simplify_stmt_for_jump_threading): Copy a blob of code from
1579         tree-vrp.c to use ranges to simplify statements.
1580         (dom_opt_dom_walker::before_dom_children): Call
1581         evrp_range_analyzer::{enter,record_ranges_from_stmt} methods.
1582         (dom_opt_dom_walker::after_dom_children): Similarly for
1583         evrp_range_analyzer::leave.
1584         (dom_opt_dom_walker::optimize_stmt): Use EVRP ranges to optimize
1585         conditionals.
1587         * gimple-ssa-evrp-analyze.c
1588         (evrp_range_analyzer::extract_range_from_stmt):  Always use
1589         vr_values::update_value_range so preexisting range info is
1590         medged with new range info, even if the new range is VR_VARYING.
1592 2017-12-04  Segher Boessenkool  <segher@kernel.crashing.org>
1594         * combine.c: Adjust comment.
1595         (use_crosses_set_p): Delete.
1596         (can_combine_p): Use modified_between_p instead of use_crosses_set_p.
1597         (try_combine): Ditto.
1599 2017-12-04  Richard Biener  <rguenther@suse.de>
1601         PR tree-optimization/83255
1602         * graphite-isl-ast-to-gimple.c (translate_isl_ast_node_for):
1603         Re-add zero-iteration check.
1605 2017-12-04  Segher Boessenkool  <segher@kernel.crashing.org>
1607         PR rtl-optimization/83245
1608         * lra.c (collect_non_operand_hard_regs): Treat clobbers of non-operand
1609         hard registers as earlyclobber, also if not in an asm.
1611 2017-12-04  Segher Boessenkool  <segher@kernel.crashing.org>
1613         PR bootstrap/83265
1614         Revert
1615         2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
1617         PR target/43871
1618         * config/rs6000/rs6000.c (rs6000_option_override_internal): Set
1619         rs6000_cpu based on cpu_index, not tune_index.
1621 2017-12-04  Richard Biener  <rguenther@suse.de>
1623         PR tree-optimization/83238
1624         * graphite-scop-detection.c (scop_detection::merge_sese): Make
1625         code match comment, rejecting invalid SESE regions.
1627 2017-12-03  John David Anglin  <danglin@gcc.gnu.org>
1629         * config/pa/pa.c (pa_legitimate_address_p): For scaled indexing,
1630         require base operand is a REG_POINTER prior to reload on targets
1631         with non-equivalent space registers.
1633 2017-12-01  Jan Hubicka  <hubicka@ucw.cz>
1635         * ipa-cp.c (ipcp_lattice<valtype>::print): Update dumping.
1636         (update_specialized_profile): Fix updating of counts.
1637         (perhaps_add_new_callers): Likewise.
1639 2017-12-01  Jan Hubicka  <hubicka@ucw.cz>
1641         PR target/81616
1642         * x86-tune.def: Remove obsolette FIXMEs.
1643         (X86_TUNE_PARTIAL_FLAG_REG_STALL): Disable for generic
1644         (X86_TUNE_FUSE_CMP_AND_BRANCH_32, X86_TUNE_FUSE_CMP_AND_BRANCH_64,
1645         X86_TUNE_FUSE_CMP_AND_BRANCH_SOFLAGS, X86_TUNE_FUSE_ALU_AND_BRANCH):
1646         Enable for generic.
1647         (X86_TUNE_PAD_RETURNS): Disable for generic.
1649 2017-12-02  Jakub Jelinek  <jakub@redhat.com>
1651         PR tree-optimization/83170
1652         PR tree-optimization/83241
1653         * gimple-ssa-store-merging.c
1654         (imm_store_chain_info::try_coalesce_bswap): Update vuse field from
1655         gimple_vuse (ins_stmt) in case it has changed.
1656         (imm_store_chain_info::output_merged_store): Likewise.
1658         * tree-chkp.c (chkp_compute_bounds_for_assignment): Handle
1659         POINTER_DIFF_EXPR.
1661         PR c++/81212
1662         * tree-cfg.c (pass_warn_function_return::execute): Handle
1663         __builtin_ubsan_handle_missing_return like __builtin_unreachable
1664         with BUILTINS_LOCATION.
1666         PR target/78643
1667         PR target/80583
1668         * expr.c (get_inner_reference): If DECL_MODE of a non-bitfield
1669         is BLKmode for vector field with vector raw mode, use TYPE_MODE
1670         instead of DECL_MODE.
1672         * config/i386/i386-protos.h (standard_sse_constant_opcode): Change
1673         last argument to rtx pointer.
1674         * config/i386/i386.c (standard_sse_constant_opcode): Replace X argument
1675         with OPERANDS.  For AVX+ 128-bit VEX encoded instructions over 256-bit
1676         or 512-bit.  If setting EXT_REX_SSE_REG_P, use EVEX encoded insn
1677         depending on the chosen ISAs.
1678         * config/i386/i386.md (*movxi_internal_avx512f, *movoi_internal_avx,
1679         *movti_internal, *movdi_internal, *movsi_internal, *movtf_internal,
1680         *movdf_internal, *movsf_internal): Adjust standard_sse_constant_opcode
1681         callers.
1682         * config/i386/sse.md (mov<mode>_internal): Likewise.
1683         * config/i386/mmx.md (*mov<mode>_internal): Likewise.
1685 2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
1687         * doc/invoke.texi (-dp): Say that instruction cost is printed as well.
1689 2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
1691         * config/rs6000/rs6000-protos.h (emit_fusion_addis): Remove last two
1692         parameters from prototype.
1693         * config/rs6000/rs6000.c (emit_fusion_addis): Remove last two
1694         parameters.  Don't print a comment.
1695         (emit_fusion_gpr_load): Adjust.
1696         (emit_fusion_load_store): Adjust.
1697         * config/rs6000/rs6000.md (*fusion_p9_<mode>_constant): Adjust.
1698         * config/rs6000/vsx.md (two peepholes): Print the "vector load fusion"
1699         comment on the second line.
1701 2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
1703         PR target/43871
1704         * config/rs6000/rs6000.c (rs6000_option_override_internal): Set
1705         rs6000_cpu based on cpu_index, not tune_index.
1707 2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
1709         * final.c (output_asm_name): Print insn_cost.  Shorten output.  Print
1710         which_alternative instead of which_alternative + 1.
1711         (output_asm_insn): Print an extra tab if the template is short.
1713 2017-12-01  Jim Wilson  <jimw@sifive.com>
1715         * common.opt (use_gnu_debug_info_extensions): Delete DWARF_DEBUG from
1716         comment.
1717         * config/vx-common.h (DWARF_DEBUGGING_INFO): Delete undef.
1718         * doc/tm.texi.in (PREFERRED_DEBUGGING_TYPE): Delete DWARF_DEBUG
1719         reference.
1720         * doc/tm.texi: Regenerate.
1722 2017-12-01  Michael Meissner  <meissner@linux.vnet.ibm.com>
1724         PR target/81959
1725         * config/rs6000/rs6000.c (rs6000_address_for_fpconvert): Check for
1726         whether we can allocate pseudos before trying to fix an address.
1727         * config/rs6000/rs6000.md (float_<mode>si2_hw): Make sure the
1728         memory address is indexed or indirect.
1729         (floatuns_<mode>si2_hw2): Likewise.
1731 2017-12-01  Jason Merrill  <jason@redhat.com>
1733         * Makefile.in (TAGS): Add c-family/*.cc.
1735 2017-12-01  Wilco Dijkstra  <wdijkstr@arm.com>
1737         * config/aarch64/aarch64.md (call_insn): Use %c rather than %a.
1738         (call_value_insn): Likewise.
1739         (sibcall_insn): Likewise.
1740         (sibcall_value_insn): Likewise.
1741         (movsi_aarch64): Likewise.
1742         (movdi_aarch64): Likewise.
1743         (add_losym_): Likewise.
1744         (ldr_got_small_): Likewise.
1745         (ldr_got_small_sidi): Likewise.
1746         (ldr_got_small_28k_): Likewise.
1747         (ldr_got_small_28k_sidi): Likewise.
1748         * config/aarch64/aarch64.c (aarch64_print_address_internal):
1749         Move output_addr_const to symbolic case. Add error check.
1751 2017-12-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1753         * config/s390/predicates.md (plus16_Q_operand): New predicate.
1754         * config/s390/s390.md: Disable MVC merging peephole if it would
1755         disable operand forwarding.
1756         (new peephole2): Split MVCs if it would turn them into up to 2
1757         forwardable MVCs.
1759 2017-12-01  Richard Biener  <rguenther@suse.de>
1761         PR tree-optimization/83232
1762         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Fix
1763         detection of same access. Instead of breaking the group here
1764         do not consider the duplicate.  Add comment explaining real fix.
1766 2017-12-01  Jonathan Wakely  <jwakely@redhat.com>
1768         * doc/md.texi (Insn Splitting): Fix "central flowgraph" typo.
1770 2017-12-01  Sudakshina Das  <sudi.das@arm.com>
1772         * config/arm/vfp.md (*movhf_vfp_fp16): Add conds attribute.
1774 2017-12-01  Jakub Jelinek  <jakub@redhat.com>
1776         * function.h (struct function): Remove cilk_frame_decl,
1777         is_cilk_function and calls_cilk_spawn fields.
1778         * tree-inline.h (struct copy_body_data): Remove remap_var_for_cilk
1779         field.
1780         * omp-simd-clone.c (simd_clone_clauses_extract): Don't clear
1781         cilk_elemental field.
1782         * cgraph.h (struct cgraph_simd_clone): Remove cilk_elemental field.
1783         * target.def: Adjust comment.
1784         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
1785         Don't test cilk_elemental.
1787         PR tree-optimization/83233
1788         * gimple-ssa-store-merging.c (nop_stats, bswap_stats): Use
1789         bswap_stat name for the struct.
1791         PR c/79153
1792         * tree.h (SWITCH_BREAK_LABEL_P): Define.
1793         * gimplify.c (collect_fallthrough_labels): Handle GIMPLE_BIND
1794         starting with a GIMPLE_SWITCH and ending with GIMPLE_LABEL with
1795         SWITCH_BREAK_LABEL_P set on the label.
1796         (gimplify_switch_expr): Set SWITCH_BREAK_LABEL_P on the label
1797         added for default case if it was missing and not all cases covered.
1798         Wrap GIMPLE_SWITCH and the switch_body_seq into a GIMPLE_BIND if
1799         switch_body_seq ends with a GIMPLE_LABEL with SWITCH_BREAK_LABEL_P
1800         set on the label.
1801         * tree-chrec.c (evolution_function_is_univariate_p): Add return true;
1802         to avoid -Wimplicit-fallthrough warning.
1803         * config/i386/i386.c (ix86_expand_special_args_builtin): Add
1804         FALLTHRU comment to avoid -Wimplicit-fallthrough warning.
1806         PR tree-optimization/83221
1807         * tree-ssa-reassoc.c (sort_by_operand_rank): Shift bb_rank
1808         down by 16.
1809         (init_reassoc): Formatting fix.
1811         PR sanitizer/81275
1812         * tree-cfg.c (group_case_labels_stmt): Don't optimize away
1813         C++ FE implicitly added __builtin_unreachable () until -Wreturn-type
1814         is diagnosed.
1816         PR sanitizer/83219
1817         * tree-cfg.c: Include asan.h.
1818         (gimple_seq_unreachable_p): Return false for -fsanitize=unreachable.
1820 2017-12-01  Sergey Shalnov  <Sergey.Shalnov@intel.com>
1822         * config/i386/i386.md: Fix AVX512 register width in AVX512 instruction.
1824 2017-12-01  Sergey Shalnov  <Sergey.Shalnov@intel.com>
1826         * config/i386/i386.c (standard_sse_constant_opcode): Fix wrong form for
1827         vpcmpeqd instruction.
1829 2017-12-01  Sergey Shalnov  <Sergey.Shalnov@intel.com>
1831         * config/i386/i386.c (standard_sse_constant_opcode): Fix
1832         registers type for 128bit mode.
1834 2017-11-30  Jakub Jelinek  <jakub@redhat.com>
1836         * spellcheck-tree.c (test_find_closest_identifier): Use ; instead
1837         of ;;.
1838         * gengtype-state.c (read_state_pair): Likewise.
1839         * gimple-fold.c (gimple_fold_builtin_string_compare): Likewise.
1840         * sel-sched-dump.c (dump_insn_rtx_1): Likewise.
1841         * ipa-cp.c (intersect_aggregates_with_edge): Likewise.
1842         * ifcvt.c (noce_try_store_flag_constants): Likewise.
1843         * tree-ssa-ccp.c (ccp_finalize): Likewise.
1844         * omp-grid.c (grid_process_kernel_body_copy): Likewise.
1845         * builtins.c (fold_builtin_3): Likewise.
1846         * graphite-scop-detection.c
1847         (scop_detection::stmt_has_simple_data_refs_p): Likewise.
1848         * hsa-gen.c (hsa_function_representation::hsa_function_representation):
1849         Likewise.
1851 2017-12-01  Maxim Ostapenko  <m.ostapenko@samsung.com>
1853         PR sanitizer/81697
1854         * asan.c (asan_protect_global): Add new ignore_decl_rtl_set_p
1855         parameter. Return true if ignore_decl_rtl_set_p is true and other
1856         conditions are satisfied.
1857         * asan.h (asan_protect_global): Add new parameter.
1858         * varasm.c (categorize_decl_for_section): Pass true as second parameter
1859         to asan_protect_global calls.
1861 2017-11-30  Jim Wilson  <jimw@sifive.com>
1863         * doc/invoke.texi (RISC-V Options): Delete nonexistent -mmemcpy and
1864         -mno-memcpy options.  For -mplt, -mfdiv, -mdiv, -msave-restore, and
1865         -mstrict-align, add info on default value.  Delete redundant lines for
1866         -mabi.  Add missing -mexplicit-relocs docs.
1868 2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>
1870         * config/arc/arc.md (trap): New pattern.
1872 2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>
1874         * config/arc/arc.c (hwloop_optimize): Prevent the last ZOL
1875         instruction to end into a delay slot.
1876         * config/arc/arc.md (cond_delay_insn): Check if the instruction
1877         can be placed into a delay slot against reg_note.
1879 2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>
1881         * config/arc/arc.c (hwloop_optimize): Update hw-loop's end/start
1882         labels number of usages.
1884 2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>
1886         * config/arc/arc.c (arc_cannot_substitue_mem_equiv_p): New
1887         function.
1888         (TARGET_CANNOT_SUBSTITUTE_MEM_EQUIV_P): Define.
1890 2017-11-30  Jakub Jelinek  <jakub@redhat.com>
1892         PR target/83210
1893         * internal-fn.c (expand_mul_overflow): Optimize unsigned
1894         multiplication by power of 2 constant into two shifts + comparison.
1896 2017-11-30  Jan Hubicka  <hubicka@ucw.cz>
1898         PR target/81616
1899         * config/i386/x86-tune-costs.h (generic_cost): Revise for modern CPUs.
1901 2017-11-30  Richard Biener  <rguenther@suse.de>
1903         PR tree-optimization/83202
1904         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Add
1905         allow_peel argument and guard peeling.
1906         (canonicalize_loop_induction_variables): Likewise.
1907         (canonicalize_induction_variables): Pass false.
1908         (tree_unroll_loops_completely_1): Pass unroll_outer to disallow
1909         peeling from cunrolli.
1911 2017-11-29  Segher Boessenkool  <segher@kernel.crashing.org>
1913         * combine.c (try_combine): Print a message to dump file whenever
1914         I0, I1, or I2 cannot be combined into I3.
1916 2017-11-29  Segher Boessenkool  <segher@kernel.crashing.org>
1918         PR rtl-optimization/83156
1919         PR rtl-optimization/82621
1920         * combine.c (try_combine): Don't split an I2 if one of the dests is
1921         set again before I3.  Allow unused dests.
1923 2017-11-29  Segher Boessenkool  <segher@kernel.crashing.org>
1925         * config/rs6000/rs6000.md (*add<mode>3_carry_in_internal2): New.
1927 2017-11-29  Vladimir Makarov  <vmakarov@redhat.com>
1929         PR rtl-optimization/80818
1930         * lra.c (collect_non_operand_hard_regs): New arg insn.  Pass it
1931         recursively.  Use insn code for clobber.
1932         (lra_set_insn_recog_data): Pass the new arg to
1933         collect_non_operand_hard_regs.
1934         (add_regs_to_insn_regno_info): Pass insn instead of uid.  Use insn
1935         code for clobber.
1936         (lra_update_insn_regno_info): Pass insn to
1937         add_regs_to_insn_regno_info.
1939 2017-11-29  Jim Wilson  <jimw@sifive.com>
1940             Andrew Waterman  <andrew@sifive.com>
1942         * config/riscv/riscv.c (SINGLE_SHIFT_COST): New.
1943         (riscv_rtx_costs): Case ZERO_EXTRACT, match new pattern, and return
1944         SINGLE_SHIFT_COST.  Case LT and ZERO_EXTEND, likewise.  Case ASHIFT,
1945         use SINGLE_SHIFT_COST.
1946         * config/riscv/riscv.md (lshrsi3_zero_extend_1): New.
1947         (lshrsi3_zero_extend_2, lshrsi3_zero_extend_3): New.
1949 2017-11-29  Julia Koval  <julia.koval@intel.com>
1951         * config/i386/avx512vbmi2intrin.h (_mm512_shldv_epi16,
1952         _mm512_mask_shldv_epi16, _mm512_maskz_shldv_epi16, _mm512_shldv_epi32,
1953         _mm512_mask_shldv_epi32, _mm512_maskz_shldv_epi32, _mm512_shldv_epi64,
1954         _mm512_mask_shldv_epi64, _mm512_maskz_shldv_epi64): New intrinsics.
1955         * config/i386/avx512vbmi2vlintrin.h (_mm256_shldv_epi16,
1956         _mm256_mask_shldv_epi16, _mm256_maskz_shldv_epi16, _mm256_shldv_epi32,
1957         _mm256_mask_shldv_epi32, _mm256_maskz_shldv_epi32, _mm256_shldv_epi64,
1958         _mm256_mask_shldv_epi64, _mm256_maskz_shldv_epi64, _mm_shldv_epi16,
1959         _mm_mask_shldv_epi16, _mm_maskz_shldv_epi16, _mm_shldv_epi32,
1960         _mm_mask_shldv_epi32, _mm_maskz_shldv_epi32, _mm_shldv_epi64,
1961         _mm_mask_shldv_epi64, _mm_maskz_shldv_epi64): Ditto.
1962         * config/i386/i386-builtin.def (__builtin_ia32_vpshldv_v32hi,
1963         __builtin_ia32_vpshldv_v32hi_mask, __builtin_ia32_vpshldv_v32hi_maskz,
1964         __builtin_ia32_vpshldv_v16hi, __builtin_ia32_vpshldv_v16hi_mask,
1965         __builtin_ia32_vpshldv_v16hi_maskz, __builtin_ia32_vpshldv_v8hi,
1966         __builtin_ia32_vpshldv_v8hi_mask, __builtin_ia32_vpshldv_v8hi_maskz,
1967         __builtin_ia32_vpshldv_v16si, __builtin_ia32_vpshldv_v16si_mask,
1968         __builtin_ia32_vpshldv_v16si_maskz, __builtin_ia32_vpshldv_v8si,
1969         __builtin_ia32_vpshldv_v8si_mask, __builtin_ia32_vpshldv_v8si_maskz,
1970         __builtin_ia32_vpshldv_v4si, __builtin_ia32_vpshldv_v4si_mask,
1971         __builtin_ia32_vpshldv_v4si_maskz, __builtin_ia32_vpshldv_v8di,
1972         __builtin_ia32_vpshldv_v8di_mask, __builtin_ia32_vpshldv_v8di_maskz,
1973         __builtin_ia32_vpshldv_v4di, __builtin_ia32_vpshldv_v4di_mask,
1974         __builtin_ia32_vpshldv_v4di_maskz, __builtin_ia32_vpshldv_v2di,
1975         __builtin_ia32_vpshldv_v2di_mask,
1976         __builtin_ia32_vpshldv_v2di_maskz): New builtins.
1977         * config/i386/sse.md (vpshldv_<mode>, vpshldv_<mode>_mask,
1978         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): New patterns.
1980 2017-11-29  Julia Koval  <julia.koval@intel.com>
1982         * config/i386/avx512vbmi2intrin.h (_mm512_shrdv_epi16,
1983         _mm512_mask_shrdv_epi16, _mm512_maskz_shrdv_epi16, _mm512_shrdv_epi32,
1984         _mm512_mask_shrdv_epi32, _mm512_maskz_shrdv_epi32, _mm512_shrdv_epi64,
1985         _mm512_mask_shrdv_epi64, _mm512_maskz_shrdv_epi64): New intrinsics.
1986         * config/i386/avx512vbmi2vlintrin.h (_mm256_shrdv_epi16,
1987         _mm256_mask_shrdv_epi16, _mm256_maskz_shrdv_epi16, _mm256_shrdv_epi32,
1988         _mm256_mask_shrdv_epi32, _mm256_maskz_shrdv_epi32, _mm256_shrdv_epi64,
1989         _mm256_mask_shrdv_epi64, _mm256_maskz_shrdv_epi64, _mm_shrdv_epi16,
1990         _mm_mask_shrdv_epi16, _mm_maskz_shrdv_epi16, _mm_shrdv_epi32,
1991         _mm_mask_shrdv_epi32, _mm_maskz_shrdv_epi32, _mm_shrdv_epi64,
1992         _mm_mask_shrdv_epi64, _mm_maskz_shrdv_epi64): Ditto.
1993         * config/i386/i386-builtin-types.def (V32HI_FTYPE_V32HI_V32HI_V32HI,
1994         V32HI_FTYPE_V32HI_V32HI_V32HI_INT, V16HI_FTYPE_V16HI_V16HI_V16HI_INT,
1995         V8HI_FTYPE_V8HI_V8HI_V8HI_INT, V8SI_FTYPE_V8SI_V8SI_V8SI_INT,
1996         V4SI_FTYPE_V4SI_V4SI_V4SI_INT, V8DI_FTYPE_V8DI_V8DI_V8DI,
1997         V8DI_FTYPE_V8DI_V8DI_V8DI_INT, V4DI_FTYPE_V4DI_V4DI_V4DI_INT,
1998         V16SI_FTYPE_V16SI_V16SI_V16SI, V16SI_FTYPE_V16SI_V16SI_V16SI_INT,
1999         V2DI_FTYPE_V2DI_V2DI_V2DI_INT): New types.
2000         * config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
2001         * config/i386/sse.md (vpshrdv_<mode>, vpshrdv_<mode>_mask,
2002         vpshrdv_<mode>_maskz, vpshrdv_<mode>_maskz_1): New pattern.
2004 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
2006         * config/sparc/sparc.c (sparc_do_work_around_errata): Treat the
2007         movsi_pic_gotdata_op instruction as a load for the UT699 errata
2008         workaround.
2010 2017-11-29  Martin Aberg  <maberg@gaisler.com>
2012         * config/sparc/sparc.md (divdf3_fix): Add NOP and adjust length
2013         to prevent b2bst errata sequence.
2014         (sqrtdf2_fix): Likewise.
2016 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
2018         * config/sparc/sparc.c (fpop_reg_depend_p): New function.
2019         (div_sqrt_insn_p): New function.
2020         (sparc_do_work_around_errata): Insert NOP instructions to
2021         prevent sequences that could trigger the TN-0013 errata for
2022         certain LEON3 processors.
2023         (pass_work_around_errata::gate): Also test sparc_fix_lost_divsqrt.
2024         (sparc_option_override): Set sparc_fix_lost_divsqrt appropriately.
2025         * config/sparc/sparc.md (fix_lost_divsqrt): New attribute.
2026         (in_branch_delay): Prevent div and sqrt in delay slot if
2027         fix_lost_divsqrt.
2028         * config/sparc/sparc.opt (sparc_fix_lost_divsqrt): New variable.
2030 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
2032         * config/sparc/sparc.c (atomic_insn_p): New function.
2033         (sparc_do_work_around_errata): Insert NOP instructions to
2034         prevent sequences that could trigger the TN-0010 errata for
2035         UT700.
2036         * config/sparc/sync.md (atomic_compare_and_swap_leon3_1): Make
2037         instruction referable in atomic_insns_p.
2039 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
2041         * config/sparc/sync.md (swapsi): 16-byte align if sparc_fix_gr712rc.
2042         (atomic_compare_and_swap_leon3_1): Likewise.
2043         (ldstub): Likewise.
2045 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
2047         * config/sparc/sparc.c (fpop_insn_p): New function.
2048         (sparc_do_work_around_errata): Insert NOP instructions to
2049         prevent sequences that could trigger the TN-0012 errata for
2050         GR712RC.
2051         (pass_work_around_errata::gate): Also test sparc_fix_gr712rc.
2052         * config/sparc/sparc.md (fix_gr712rc): New attribute.
2053         (in_branch_annul_delay): Prevent floating-point instructions
2054         in delay slot of annulled integer branch.
2056 2017-11-29  Richard Biener  <rguenther@suse.de>
2058         PR tree-optimization/83202
2059         * tree-vect-slp.c (scalar_stmts_set_t): New typedef.
2060         (bst_fail): Use it.
2061         (vect_analyze_slp_cost_1): Add visited set, do not account SLP
2062         nodes vectorized to the same stmts multiple times.
2063         (vect_analyze_slp_cost): Allocate a visited set and pass it down.
2064         (vect_analyze_slp_instance): Adjust.
2065         (scalar_stmts_to_slp_tree_map_t): New typedef.
2066         (vect_schedule_slp_instance): Add a map recording the SLP node
2067         representing the vectorized stmts for a set of scalar stmts.
2068         Avoid code-generating redundancies.
2069         (vect_schedule_slp): Allocate map and pass it down.
2071 2017-11-29  Nathan Sidwell  <nathan@acm.org>
2073         PR c++/83187
2074         * tree.c (build_complex_type): Fix canonicalization.  Only fill in
2075         type if it is new.
2077 2017-11-29  Wilco Dijkstra  <wdijkstr@arm.com>
2079         * config/aarch64/aarch64.c (aarch64_print_operand): Add new
2080         cases for printing LDP/STP memory addresses.
2081         (aarch64_print_address_internal): Renamed from
2082         aarch64_print_operand_address, added parameter, add Pmode check.
2083         (aarch64_print_ldpstp_address): New function for LDP/STP addresses.
2084         (aarch64_print_operand_address): Indirect to
2085         aarch64_print_address_internal.
2086         * config/aarch64/aarch64-simd.md (store_pair_lanes): Use new
2087         'y' operand output specifier.
2089 2017-11-29  Jakub Jelinek  <jakub@redhat.com>
2091         PR middle-end/83185
2092         * tree.c (build_simple_mem_ref_loc): Handle
2093         get_addr_base_and_unit_offset returning a MEM_REF.
2095         PR middle-end/80929
2096         * rtlanal.c (seq_cost): For non-single_set insns try to use insn_cost.
2098         PR target/80819
2099         * config/i386/sse.md (vec_concatv2di): Remove * from (=Yr,0,*rm)
2100         alternative.
2102 2017-11-28  David Malcolm  <dmalcolm@redhat.com>
2104         * diagnostic-show-locus.c (layout::print_trailing_fixits): Handle
2105         m_x_offset.
2106         (layout::move_to_column): Likewise.
2108 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
2110         PR sanitizer/81275
2111         * tree.c (block_may_fallthru): Return false if SWITCH_ALL_CASES_P
2112         is set on SWITCH_EXPR and !block_may_fallthru (SWITCH_BODY ()).
2114 2017-11-28  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2115             Martin Jambor  <mjambor@suse.cz>
2117         PR ipa/82808
2118         * tree.h (expr_type_first_operand_type_p): Declare
2119         * tree.c (expr_type_first_operand_type_p): New function.
2120         * ipa-prop.h (ipa_get_type): Allow i to be out of bounds.
2121         (ipa_value_from_jfunc): Adjust declaration.
2122         * ipa-cp.c (ipa_get_jf_pass_through_result): New parameter RES_TYPE.
2123         Use it as result type for arithmetics, unless it is NULL in which case
2124         be more conservative.
2125         (ipa_value_from_jfunc): New parameter PARM_TYPE, pass it to
2126         ipa_get_jf_pass_through_result.
2127         (propagate_vals_across_pass_through): Likewise.
2128         (propagate_scalar_across_jump_function): New parameter PARM_TYPE, pass
2129         is to propagate_vals_across_pass_through.
2130         (propagate_constants_across_call): Pass PARM_TYPE to
2131         propagate_scalar_across_jump_function.
2132         (find_more_scalar_values_for_callers_subset): Pass parameter type to
2133         ipa_value_from_jfunc.
2134         (cgraph_edge_brings_all_scalars_for_node): Likewise.
2135         * ipa-fnsummary.c (evaluate_properties_for_edge): Renamed parms_info
2136         to caller_parms_info, pass parameter type to ipa_value_from_jfunc.
2137         * ipa-prop.c (try_make_edge_direct_simple_call): New parameter
2138         target_type, pass it to ipa_value_from_jfunc.
2139         (update_indirect_edges_after_inlining): Pass parameter type to
2140         try_make_edge_direct_simple_call.
2142 2017-11-28  Jeff Law  <law@redhat.com>
2144         * gimple-ssa-evrp-analyze.c
2145         (evrp_range_analyzer::record_ranges_from_phis): Only use SCEV to
2146         refine ranges if scev_initialized_p returns true.
2147         * vr-values.c (vr_values::extract_range_from_phi_node): Likewise.
2149 2017-11-28  Julia Koval  <julia.koval@intel.com>
2151         * config/i386/avx512vbmi2intrin.h (_mm512_shrdi_epi16,
2152         _mm512_mask_shrdi_epi16, _mm512_maskz_shrdi_epi16, _mm512_shrdi_epi32,
2153         _mm512_mask_shrdi_epi32, _mm512_maskz_shrdi_epi32, _mm512_shrdi_epi64,
2154         _mm512_mask_shrdi_epi64, _mm512_maskz_shrdi_epi64): New intrinsics.
2155         * config/i386/avx512vbmi2vlintrin.h (_mm256_shrdi_epi16,
2156         _mm256_mask_shrdi_epi16, _mm256_maskz_shrdi_epi16,
2157         _mm256_mask_shrdi_epi32, _mm256_maskz_shrdi_epi32, _mm256_shrdi_epi32,
2158         _mm256_mask_shrdi_epi64, _mm256_maskz_shrdi_epi64, _mm256_shrdi_epi64,
2159         _mm_mask_shrdi_epi16, _mm_maskz_shrdi_epi16, _mm_shrdi_epi16,
2160         _mm_mask_shrdi_epi32, _mm_maskz_shrdi_epi32, _mm_shrdi_epi32,
2161         _mm_mask_shrdi_epi64, _mm_maskz_shrdi_epi64, _mm_shrdi_epi64): Ditto.
2162         * config/i386/i386-builtin.def (__builtin_ia32_vpshrd_v32hi,
2163         __builtin_ia32_vpshrd_v32hi_mask, __builtin_ia32_vpshrd_v16hi,
2164         __builtin_ia32_vpshrd_v16hi_mask, __builtin_ia32_vpshrd_v8hi,
2165         __builtin_ia32_vpshrd_v8hi_mask, __builtin_ia32_vpshrd_v16si,
2166         __builtin_ia32_vpshrd_v16si_mask, __builtin_ia32_vpshrd_v8si,
2167         __builtin_ia32_vpshrd_v8si_mask, __builtin_ia32_vpshrd_v4si,
2168         __builtin_ia32_vpshrd_v4si_mask, __builtin_ia32_vpshrd_v8di,
2169         __builtin_ia32_vpshrd_v8di_mask, __builtin_ia32_vpshrd_v4di,
2170         __builtin_ia32_vpshrd_v4di_mask, __builtin_ia32_vpshrd_v2di,
2171         __builtin_ia32_vpshrd_v2di_mask): New builtins.
2172         * config/i386/sse.md (vpshrd_<mode><mask_name>): New pattern.
2174 2017-11-28  Julia Koval  <julia.koval@intel.com>
2176         * config/i386/avx512vbmi2intrin.h (_mm512_shldi_epi16,
2177         _mm512_mask_shldi_epi16, _mm512_maskz_shldi_epi16, _mm512_shldi_epi32,
2178         _mm512_mask_shldi_epi32, _mm512_maskz_shldi_epi32, _mm512_shldi_epi64,
2179         _mm512_mask_shldi_epi64, _mm512_maskz_shldi_epi64): New intrinsics.
2180         * config/i386/avx512vbmi2vlintrin.h (_mm256_shldi_epi16,
2181         _mm256_mask_shldi_epi16, _mm256_maskz_shldi_epi16,
2182         _mm256_mask_shldi_epi32, _mm256_maskz_shldi_epi32, _mm256_shldi_epi32,
2183         _mm256_mask_shldi_epi64, _mm256_maskz_shldi_epi64, _mm256_shldi_epi64,
2184         _mm_mask_shldi_epi16, _mm_maskz_shldi_epi16, _mm_shldi_epi16,
2185         _mm_mask_shldi_epi32, _mm_maskz_shldi_epi32, _mm_shldi_epi32,
2186         _mm_mask_shldi_epi64, _mm_maskz_shldi_epi64, _mm_shldi_epi64): Ditto.
2187         * config/i386/i386-builtin-types.def (V32HI_FTYPE_V32HI_V32HI_INT,
2188         V32HI_FTYPE_V32HI_V32HI_INT_V32HI_INT, V16SI_FTYPE_V16SI_V16SI_INT,
2189         V16SI_FTYPE_V16SI_V16SI_INT_V16SI_INT,
2190         V8DI_FTYPE_V8DI_V8DI_INT_V8DI_INT, V8SI_FTYPE_V8SI_V8SI_INT_V8SI_INT,
2191         V16HI_FTYPE_V16HI_V16HI_INT_V16HI_INT,
2192         V4DI_FTYPE_V4DI_V4DI_INT_V4DI_INT,
2193         V8HI_FTYPE_V8HI_V8HI_INT_V8HI_INT,
2194         V4SI_FTYPE_V4SI_V4SI_INT_V4SI_INT,
2195         V2DI_FTYPE_V2DI_V2DI_INT_V2DI_INT): New types.
2196         * config/i386/i386-builtin.def (__builtin_ia32_vpshld_v32hi,
2197         __builtin_ia32_vpshld_v32hi_mask, __builtin_ia32_vpshld_v16hi,
2198         __builtin_ia32_vpshld_v16hi_mask, __builtin_ia32_vpshld_v8hi,
2199         __builtin_ia32_vpshld_v8hi_mask, __builtin_ia32_vpshld_v16si,
2200         __builtin_ia32_vpshld_v16si_mask, __builtin_ia32_vpshld_v8si,
2201         __builtin_ia32_vpshld_v8si_mask, __builtin_ia32_vpshld_v4si,
2202         __builtin_ia32_vpshld_v4si_mask, __builtin_ia32_vpshld_v8di,
2203         __builtin_ia32_vpshld_v8di_mask, __builtin_ia32_vpshld_v4di,
2204         __builtin_ia32_vpshld_v4di_mask, __builtin_ia32_vpshld_v2di,
2205         __builtin_ia32_vpshld_v2di_mask): New builtins.
2206         * config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
2207         * config/i386/sse.md (vpshld_<mode><mask_name>): New pattern.
2209 2017-11-28  Richard Biener  <rguenther@suse.de>
2211         PR tree-optimization/80776
2212         * gimple-ssa-evrp-analyze.h (evrp_range_analyzer::set_ssa_range_info):
2213         Declare.
2214         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::set_ssa_range_info):
2215         New function.
2216         (evrp_range_analyzer::record_ranges_from_incoming_edges):
2217         If the incoming edge is an effective fallthru because the other
2218         edge only reaches a __builtin_unreachable () then record ranges
2219         derived from the controlling condition in SSA info.
2220         (evrp_range_analyzer::record_ranges_from_phis): Use set_ssa_range_info.
2221         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
2223 2017-11-28  Olivier Hainque  <hainque@adacore.com>
2225         * Makefile.in (SELFTEST_FLAGS): Use nul instead of /dev/null
2226         on mingw build hosts.
2228 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
2230         PR debug/81307
2231         * dbxout.c (dbx_block_with_cold_children): Fix function comment.
2233 2017-11-28  Richard Biener  <rguenther@suse.de>
2235         PR middle-end/83141
2236         * gimple-fold.c (gimple_fold_builtin_memory_op): For aggregate
2237         copies generated from memcpy use a character array as reference
2238         type.
2240 2017-11-28  Julia Koval  <julia.koval@intel.com>
2241             Sebastian Peryt  <sebastian.peryt@intel.com>
2243         * Makefile.in (cilkplus.def, cilk-builtins.def, c-family/cilk.o,
2244         c-family/c-cilkplus.o, c-family/array-notation-common.o,
2245         cilk-common.o, cilk.h, cilk-common.c): Remove.
2246         * builtin-types.def
2247         (BT_FN_INT_PTR_PTR_PTR_FTYPE_BT_INT_BT_PTR_BT_PTR_BT_PTR): Remove.
2248         * builtins.c (is_builtin_name): Remove cilkplus condition.
2249         (BUILT_IN_CILK_DETACH, BUILT_IN_CILK_POP_FRAME): Remove.
2250         * builtins.def (DEF_CILK_BUILTIN_STUB, DEF_CILKPLUS_BUILTIN,
2251         cilk-builtins.def, cilkplus.def): Remove.
2252         * cif-code.def (CILK_SPAWN): Remove.
2253         * cilk-builtins.def: Delete.
2254         * cilk-common.c: Ditto.
2255         * cilk.h: Ditto.
2256         * cilkplus.def: Ditto.
2257         * config/darwin.h (fcilkplus): Delete.
2258         * cppbuiltin.c: Ditto.
2259         * doc/extend.texi: Remove cilkplus doc.
2260         * doc/generic.texi: Ditto.
2261         * doc/invoke.texi: Ditto.
2262         * doc/passes.texi: Ditto.
2263         * gcc.c (fcilkplus): Remove.
2264         * gengtype.c (cilk.h): Remove.
2265         * gimple-pretty-print.c (dump_gimple_omp_for): Remove cilkplus
2266         support.
2267         * gimple.h (GF_OMP_FOR_KIND_CILKFOR, GF_OMP_FOR_KIND_CILKSIMD):
2268         Remove.
2269         * gimplify.c (gimplify_return_expr, maybe_fold_stmt,
2270         gimplify_call_expr,
2271         is_gimple_stmt, gimplify_modify_expr, gimplify_scan_omp_clauses,
2272         gimplify_adjust_omp_clauses, gimplify_omp_for, gimplify_expr): Remove
2273         cilkplus conditions.
2274         * ipa-fnsummary.c (ipa_dump_fn_summary, compute_fn_summary,
2275         inline_read_section): Ditto.
2276         * ipa-inline-analysis.c (cilk.h): Remove.
2277         * ira.c (ira_setup_eliminable_regset): Remove cilkplus support.
2278         * lto-wrapper.c (merge_and_complain, append_compiler_options,
2279         append_linker_options): Remove condition for fcilkplus.
2280         * lto/lto-lang.c (cilk.h): Remove.
2281         (lto_init): Remove condition for fcilkplus.
2282         * omp-expand.c (expand_cilk_for_call): Delete.
2283         (expand_omp_taskreg, expand_omp_for_static_chunk,
2284         expand_omp_for): Remove cilkplus
2285         conditions.
2286         (expand_cilk_for): Delete.
2287         * omp-general.c (omp_extract_for_data): Remove cilkplus support.
2288         * omp-low.c (scan_sharing_clauses, create_omp_child_function,
2289         execute_lower_omp, diagnose_sb_0): Ditto.
2290         * omp-simd-clone.c (simd_clone_clauses_extract): Ditto.
2291         * tree-core.h (OMP_CLAUSE__CILK_FOR_COUNT_): Delete.
2292         * tree-nested.c: Ditto.
2293         * tree-pretty-print.c (dump_omp_clause): Remove cilkplus support.
2294         (dump_generic_node): Ditto.
2295         * tree.c (OMP_CLAUSE__CILK_FOR_COUNT_): Delete.
2296         * tree.def (cilk_simd, cilk_for, cilk_spawn_stmt, cilk_sync_stmt):
2297         Delete.
2298         * tree.h (CILK_SPAWN_FN, EXPR_CILK_SPAWN): Delete.
2300 2017-11-28  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
2302         * config/aarch64/aarch64.md (div<mode>3): Change check to TARGET_FLOAT.
2303         * config/aarch64/aarch64.c (aarch64_emit_approx_div): Add early exit
2304         for vector mode and !TARGET_SIMD.
2306 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
2308         * tree.def (SWITCH_EXPR): Change from 3 operand to 2 operand tree.
2309         Adjust comment.
2310         * tree.h (SWITCH_LABELS): Remove.
2311         * gimplify.c (gimplify_switch_expr): Don't test SWITCH_LABELS,
2312         assert SWITCH_BODY is non-NULL.
2313         * tree-pretty-print.c (dump_generic_node): Remove SWITCH_LABELS
2314         handling.
2315         * tree.c (block_may_fallthru): Always return true; for SWITCH_EXPR.
2317         PR tree-optimization/80788
2318         * match.pd (X +- C1 CMP C2 -> X CMP C2 -+ C1): If res
2319         has TREE_OVERFLOW set, call drop_tree_overflow.
2321 2017-11-28  Richard Biener  <rguenther@suse.de>
2323         PR tree-optimization/83158
2324         * tree-vrp.c (intersect_ranges): Prefer ~[0, 0] in a few more cases.
2326 2017-11-28  Segher Boessenkool  <segher@kernel.crashing.org>
2328         PR 81288/target
2329         * config/rs6000/rs6000.c (rs6000_rtx_costs): Do not handle
2330         TARGET_ISEL && !TARGET_MFCRF differently.  Simplify code.
2332 2017-11-27  Segher Boessenkool  <segher@kernel.crashing.org>
2334         * config/rs6000/rs6000.md (<code><GPR:mode><GPR2:mode>2_isel): Change
2335         LT/GT/LTU/GTU to LE/GE/LEU/GEU where possible.
2337 2017-11-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
2339         PR middle_end/82333
2340         * varasm.c (compare_constant): Take the mode of the constants into
2341         account when comparing floating point constants.
2343 2017-11-27  Gerald Pfeifer  <gerald@pfeifer.com>
2345         * hash-set.h (DEFINE_DEBUG_HASH_SET): Remove static qualifier
2346         from explicit instantiation of debug_helper.
2347         * vec.h (DEFINE_DEBUG_VEC): Ditto.
2349 2017-11-27  Richard Biener  <rguenther@suse.de>
2351         * gimple-fold.c (gimple_fold_builtin_memory_op): Remove dead code,
2352         refactor a bit.
2354 2017-11-27  Richard Biener  <rguenther@suse.de>
2356         * tree.c (wide_int_to_tree): Free discarded INTEGER_CST.
2357         (type_hash_canon): Also clear int_cst_hash_table entry for
2358         TYPE_MIN/MAX_VALUE.
2359         (build_nonstandard_integer_type): Hash all TYPE_MAX_VALUEs.
2361 2017-11-27  Tamar Christina  <tamar.christina@arm.com>
2363         * doc/extend.texi: Add -A suffix (ARMv8*-A, ARMv7-A).
2364         * doc/invoke.texi: Add -A suffix (ARMv8*-A, ARMv7-A).
2365         * doc/sourcebuild.texi: Add -A suffix (ARMv8*-A, ARMv7-A).
2367 2017-11-27  Markus Trippelsdorf  <markus@trippelsdorf.de>
2369         * hash-map.h (gt_cleare_cache): Avoid UB.
2371 2017-11-27  Eric Botcazou  <ebotcazou@adacore.com>
2373         * cfgloop.h (struct loop): Document usage of USHRT_MAX for unroll.
2374         * loop-unroll.c (decide_unroll_constant_iterations): Implement it.
2375         (decide_unroll_runtime_iterations): Likewise.
2376         (decide_unroll_stupid): Likewise.
2378 2017-11-27  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
2380         PR target/83109
2381         * config/i386/i386.md: Add a loop with incssp.
2383 2017-11-27  Martin Jambor  <mjambor@suse.cz>
2385         PR tree-optimization/81248
2386         * tree-sra.c (splice_param_accesses): Remove size check.
2387         (decide_one_param_reduction): Fix size check.
2388         * gimple-pretty-print.c (dump_profile): Silence warning.
2389         * params.def (PARAM_IPA_SRA_PTR_GROWTH_FACTOR): Adjust description.
2391 2017-11-27  Jakub Jelinek  <jakub@redhat.com>
2393         PR debug/81307
2394         * dbxout.c (lastlineno): New variable.
2395         (dbx_debug_hooks): Use dbxout_switch_text_section as
2396         switch_text_section debug hook.
2397         (dbxout_function_end): Switch to current_function_section
2398         rather than function_section.  If crtl->has_bb_partition,
2399         output just one N_FUN, depending on in_cold_section_p.
2400         (dbxout_source_line): Remember last lineno in lastlineno.
2401         (dbxout_switch_text_section): New function.
2402         (dbxout_function_decl): Adjust dbxout_block caller.
2403         (dbx_block_with_cold_children): New function.
2404         (dbxout_block): Return true if any LBRAC/RBRAC have been
2405         emitted.  Use dbx_block_with_cold_children at depth == 0
2406         in second partition.  Add PARENT_BLOCKNUM argument, pass
2407         it optionally adjusted to children.  Output LBRAC/RBRAC
2408         around recursive call only if the block is in the current
2409         partition, if not and anything was output, emit empty
2410         range LBRAC/RBRAC.
2411         * final.c (final_scan_insn): Compute cold_function_name
2412         before calling switch_text_section debug hook.  Call
2413         that hook even if dwarf2out_do_frame if not emitting
2414         dwarf debug info.
2416         PR target/83100
2417         * varasm.c (bss_initializer_p): Return true for DECL_COMMON
2418         TREE_READONLY decls.
2420 2017-11-27  Markus Trippelsdorf  <markus@trippelsdorf.de>
2422         PR rtl-optimization/82488
2423         * expr.c (fixup_args_size_notes): Avoid signed integer overflow.
2425 2017-11-26  Julia Koval  <julia.koval@intel.com>
2427         * config/i386/i386.c (processor_target_table): Add skylake_cost for
2428         skylake-avx512.
2429         * config/i386/x86-tune-costs.h (skylake_memcpy, skylake_memset,
2430         skylake_cost): New.
2432 2017-11-26  Julia Koval  <julia.koval@intel.com>
2434         * config/i386/driver-i386.c (host_detect_local_cpu):
2435         Detect skylake-avx512.
2437 2017-11-26  Julia Koval  <julia.koval@intel.com>
2439         * config.gcc: Add -march=cannonlake.
2440         * config/i386/driver-i386.c (host_detect_local_cpu): Detect cannonlake.
2441         * config/i386/i386-c.c (ix86_target_macros_internal): Handle cannonlake.
2442         * config/i386/i386.c (processor_costs): Add m_CANNONLAKE.
2443         (PTA_CANNONLAKE): New.
2444         (processor_target_table): Add cannonlake.
2445         (ix86_option_override_internal): Ditto.
2446         (fold_builtin_cpu): Ditto.
2447         (get_builtin_code_for_version): Handle cannonlake.
2448         (M_INTEL_COREI7_CANNONLAKE): New.
2449         * config/i386/i386.h (TARGET_CANNONLAKE, PROCESSOR_CANNONLAKE): New.
2450         * doc/invoke.texi: Add -march=cannonlake.
2452 2017-11-14  Boris Kolpackov  <boris@codesynthesis.com>
2454         * plugin.c (add_new_plugin): Use platform-specific library extensions.
2455         (try_init_one_plugin): Alternative implementation for MinGW.
2456         * Makefile.in (plugin_implib): New.
2457         (gengtype-lex.c): Fix broken AIX workaround.
2458         * configure: Regenerate.
2459         * doc/plugins.texi: Document support for MinGW.
2461 2017-11-25  Jakub Jelinek  <jakub@redhat.com>
2463         PR rtl-optimization/81553
2464         * combine.c (simplify_if_then_else): In (if_then_else COND (OP Z C1) Z)
2465         to (OP Z (mult COND (C1 * STORE_FLAG_VALUE))) optimization, if OP
2466         is a shift where C1 has different mode than the whole shift, use C1's
2467         mode for MULT rather than the shift's mode.
2469         PR target/82848
2470         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Don't fold
2471         builtins not enabled in the currently selected ISA.
2473 2017-11-24  Jackson Woodruff  <jackson.woodruff@arm.com>
2475         PR tree-optimization/71026
2476         * tree-ssa-math-opts (is_division_by_square, is_square_of): New.
2477         (insert_reciprocals): Change to insert reciprocals before a division
2478         by a square and to insert the square of a reciprocal.
2479         (execute_cse_reciprocals_1): Change to consider division by a square.
2480         (register_division_in): Add importance parameter.
2482 2017-11-24  Richard Biener  <rguenther@suse.de>
2484         PR tree-optimization/82402
2485         * tree-vect-loop-manip.c (create_lcssa_for_virtual_phi): Properly
2486         set SSA_NAME_OCCURS_IN_ABNORMAL_PHI.
2488 2017-11-24  Marc Glisse  <marc.glisse@inria.fr>
2490         * match.pd (0-ptr): New transformation.
2492 2017-11-24  Jan Hubicka  <hubicka@ucw.cz>
2494         PR bootstrap/83015
2495         * ipa-inline.c (inline_small_functions): Set current badnes correctly
2496         when skipping checking.
2498 2017-11-24  Richard Biener  <rguenther@suse.de>
2500         PR tree-optimization/83128
2501         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Handle STRING_CSTs.
2502         (vn_reference_lookup_3): Likewise.
2504 2017-11-24  Jakub Jelinek  <jakub@redhat.com>
2506         PR sanitizer/83014
2507         * ubsan.c (ubsan_type_descriptor): Use pp_unsigned_wide_integer
2508         instead of pp_printf with HOST_WIDE_INT_PRINT_DEC.  Avoid calling
2509         tree_to_uhwi twice.
2511         * tree-object-size.c (pass_through_call): Use gimple_call_return_flags
2512         ERF_RETURN*ARG* for builtins other than BUILT_IN_ASSUME_ALIGNED,
2513         check for the latter with gimple_call_builtin_p.  Do not handle
2514         BUILT_IN_STPNCPY_CHK which is not a pass through call.
2516 2017-11-24  Christophe Lyon  <christophe.lyon@linaro.org>
2518         * config/arm/arm_neon.h: Fix pragma GCC push_options before
2519         vdot_u32.
2521 2017-11-23  Julia Koval  <julia.koval@intel.com>
2523         * config/i386/avx512vbmi2intrin.h (_mm512_mask_expand_epi8,
2524         _mm512_maskz_expand_epi8, _mm512_mask_expandloadu_epi8,
2525         _mm512_maskz_expandloadu_epi8, _mm512_mask_expand_epi16,
2526         _mm512_maskz_expand_epi16, _mm512_mask_expandloadu_epi16,
2527         _mm512_maskz_expandloadu_epi16): New intrinsics.
2528         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_expand_epi8,
2529         _mm_maskz_expand_epi8, _mm_mask_expandloadu_epi8,
2530         _mm_maskz_expandloadu_epi8, _mm_mask_expand_epi16,
2531         _mm_maskz_expand_epi16, _mm_mask_expandloadu_epi16,
2532         _mm_maskz_expandloadu_epi16, _mm256_mask_expand_epi16,
2533         _mm256_maskz_expand_epi16, _mm256_mask_expandloadu_epi16,
2534         _mm256_maskz_expandloadu_epi16, _mm256_mask_expand_epi8,
2535         _mm256_maskz_expand_epi8, _mm256_mask_expandloadu_epi8,
2536         _mm256_maskz_expandloadu_epi8): New intrinsics.
2537         * config/i386/i386-builtin-types.def (V64QI_FTYPE_PCV64QI_V64QI_UDI,
2538         V32HI_FTYPE_PCV32HI_V32HI_USI, V32QI_FTYPE_PCV32QI_V32QI_USI,
2539         V16HI_FTYPE_PCV16HI_V16HI_UHI, V16QI_FTYPE_PCV16QI_V16QI_UHI,
2540         V8HI_FTYPE_PCV8HI_V8HI_UQI): New types.
2541         * config/i386/i386.c (ix86_expand_special_args_builtin): Use new types.
2542         * config/i386/sse.md (VI248_VLBW): New iterator.
2543         (expand<mode>_mask, expand<mode>_maskz): New patterns.
2545 2017-11-23  Julia Koval  <julia.koval@intel.com>
2547         * config.gcc (avx512vbmi2intrin.h, avx512vbmi2vlintrin): New headers.
2548         * config/i386/avx512vbmi2intrin.h (_mm512_mask_compress_epi8,
2549         _mm512_maskz_compress_epi8, _mm512_mask_compressstoreu_epi8,
2550         _mm512_mask_compress_epi16, _mm512_maskz_compress_epi16,
2551         _mm512_mask_compressstoreu_epi16): New.
2552         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_compress_epi8,
2553         _mm_maskz_compress_epi8, _mm256_mask_compressstoreu_epi16,
2554         _mm_mask_compress_epi16, _mm_maskz_compress_epi16,
2555         _mm256_mask_compress_epi16, _mm256_maskz_compress_epi16,
2556         _mm_mask_compressstoreu_epi8, _mm_mask_compressstoreu_epi16,
2557         _mm256_mask_compress_epi8, _mm256_maskz_compress_epi8,
2558         _mm256_mask_compressstoreu_epi8): New.
2559         * config/i386/i386-builtin-types.def (VOID_FTYPE_PV64QI_V64QI_UDI,
2560         VOID_FTYPE_PV32HI_V32HI_USI, VOID_FTYPE_PV32QI_V32QI_USI,
2561         VOID_FTYPE_PV16QI_V16QI_UHI, VOID_FTYPE_PV16HI_V16HI_UHI,
2562         VOID_FTYPE_PV8HI_V8HI_UQI): New types.
2563         * config/i386/i386-builtin.def (__builtin_ia32_compressqi512_mask,
2564         __builtin_ia32_compresshi512_mask, __builtin_ia32_compressqi256_mask,
2565         __builtin_ia32_compressqi128_mask, __builtin_ia32_compresshi256_mask,
2566         __builtin_ia32_compresshi128_mask,
2567         __builtin_ia32_compressstoreuqi512_mask,
2568         __builtin_ia32_compressstoreuhi512_mask,
2569         __builtin_ia32_compressstoreuqi256_mask,
2570         __builtin_ia32_compressstoreuqi128_mask,
2571         __builtin_ia32_compressstoreuhi256_mask,
2572         __builtin_ia32_compressstoreuhi128_mask): New builtins.
2573         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Create special args
2574         array for flags2.
2575         (ix86_expand_special_args_builtin): Handle new types.
2576         (s4fma_expand): Handle new builtin array.
2577         * config/i386/immintrin.h: Include new headers.
2578         * config/i386/sse.md (VI12_AVX512VLBW): New iterator.
2579         (compress<mode>_mask, compressstore<mode>_mask): New patterns.
2581 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
2583         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Formatting
2584         fixes.  Declare temp and g variables at the top in order to avoid
2585         {} in most of the cases.
2587 2017-11-23  Marc Glisse  <marc.glisse@inria.fr>
2589         * match.pd (ptr-0): New transformation.
2591 2017-11-23  Charles Baylis  <charles.baylis@linaro.org>
2593         * config/arm/arm-protos.h (enum arm_addr_mode_op): New.
2594         (struct addr_mode_cost_table): New.
2595         (struct tune_params): Add field addr_mode_costs.
2596         * config/arm/arm.c (generic_addr_mode_costs): New.
2597         (arm_slowmul_tune): Initialise addr_mode_costs field.
2598         (arm_fastmul_tune): Likewise.
2599         (arm_strongarm_tune): Likewise.
2600         (arm_xscale_tune): Likewise.
2601         (arm_9e_tune): Likewise.
2602         (arm_marvell_pj4_tune): Likewise.
2603         (arm_v6t2_tune): Likewise.
2604         (arm_cortex_tune): Likewise.
2605         (arm_cortex_a8_tune): Likewise.
2606         (arm_cortex_a7_tune): Likewise.
2607         (arm_cortex_a15_tune): Likewise.
2608         (arm_cortex_a35_tune): Likewise.
2609         (arm_cortex_a53_tune): Likewise.
2610         (arm_cortex_a57_tune): Likewise.
2611         (arm_exynosm1_tune): Likewise.
2612         (arm_xgene1_tune): Likewise.
2613         (arm_cortex_a5_tune): Likewise.
2614         (arm_cortex_a9_tune): Likewise.
2615         (arm_cortex_a12_tune): Likewise.
2616         (arm_cortex_a73_tune): Likewise.
2617         (arm_v7m_tune): Likewise.
2618         (arm_cortex_m7_tune): Likewise.
2619         (arm_v6m_tune): Likewise.
2620         (arm_fa726te_tune): Likewise.
2621         (arm_mem_costs): Use table lookup to calculate cost of addressing mode.
2623 2017-11-23  Charles Baylis  <charles.baylis@linaro.org>
2625         * config/arm/arm.c (arm_mem_costs): New function.
2626         (arm_rtx_costs_internal): Use arm_mem_costs.
2628 2017-11-23  Mark Wielaard  <mark@klomp.org>
2630         * dwarf2out.c (init_sections_and_labels): Use generation to create
2631         unique ranges_section_label and ranges_base_label. Return generation.
2632         (output_rnglists): Add generation argument. Use generation to create
2633         unique ranges labels.
2634         (dwarf2out_finish): Get generation from init_sections_and_labels
2635         and pass generation to output_rnglists.
2637 2017-11-23  Mike Stump  <mikestump@comcast.net>
2638             Eric Botcazou  <ebotcazou@adacore.com>
2640         * doc/generic.texi (ANNOTATE_EXPR): Document 3rd operand.
2641         * cfgloop.h (struct loop): Add unroll field.
2642         * function.h (struct function): Add has_unroll bitfield.
2643         * gimplify.c (gimple_boolify) <ANNOTATE_EXPR>: Deal with unroll kind.
2644         (gimplify_expr) <ANNOTATE_EXPR>: Propagate 3rd operand.
2645         * loop-init.c (pass_loop2::gate): Return true if cfun->has_unroll.
2646         (pass_rtl_unroll_loops::gate): Likewise.
2647         * loop-unroll.c (decide_unrolling): Tweak note message.  Skip loops
2648         for which loop->unroll==1.
2649         (decide_unroll_constant_iterations): Use note for consistency and
2650         take loop->unroll into account.  Return early if loop->unroll is set.
2651         Fix thinko in existing test.
2652         (decide_unroll_runtime_iterations): Use note for consistency and
2653         take loop->unroll into account.
2654         (decide_unroll_stupid): Likewise.
2655         * lto-streamer-in.c (input_cfg): Read loop->unroll.
2656         * lto-streamer-out.c (output_cfg): Write loop->unroll.
2657         * tree-cfg.c (replace_loop_annotate_in_block) <annot_expr_unroll_kind>:
2658         New case.
2659         (replace_loop_annotate) <annot_expr_unroll_kind>: Likewise.
2660         (print_loop): Print loop->unroll if set.
2661         * tree-core.h (enum annot_expr_kind): Add annot_expr_unroll_kind.
2662         * tree-inline.c (copy_loops): Copy unroll and set cfun->has_unroll.
2663         * tree-pretty-print.c (dump_generic_node) <annot_expr_unroll_kind>:
2664         New case.
2665         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Bail out if
2666         loop->unroll is set and smaller than the trip count.  Otherwise bypass
2667         entirely the heuristics if loop->unroll is set.  Remove dead note.
2668         Fix off-by-one bug in other note.
2669         (try_peel_loop): Bail out if loop->unroll is set.  Fix formatting.
2670         (tree_unroll_loops_completely_1): Force unrolling if loop->unroll
2671         is greater than 1.
2672         (tree_unroll_loops_completely): Make static.
2673         (pass_complete_unroll::execute): Use correct type for variable.
2674         (pass_complete_unrolli::execute): Fix formatting.
2675         * tree.def (ANNOTATE_EXPR): Add 3rd operand.
2677 2017-11-23  Sergey Shalnov  <Sergey.Shalnov@intel.com>
2679         * config/i386/i386.h (TARGET_PREFER_AVX256): Also
2680         enable when TARGET_PREFER_AVX128 is set.
2682 2017-11-23  Jan Hubicka  <hubicka@ucw.cz>
2684         * ipa-profile.c (ipa_propagate_frequency_1): Use count instead of
2685         frequency.
2686         * cgraph.c (cgraph_edge::dump_edge_flags): Dump sreal frequencies.
2687         (cgraph_edge::maybe_hot_p): Use sreal frequencies.
2689 2017-11-23  Jan Hubicka  <hubicka@ucw.cz>
2691         * ipa-fnsummary.c (record_modified_bb_info): Use sreal
2692         frequencies. Fix estimation of aggregate parameters.
2694 2017-11-23  Jan Hubicka  <hubicka@ucw.cz>
2696         * cgraphclones.c (cgraph_node::create_clone): Fix updating of profile
2697         when inlining.
2699 2017-11-23  Tom de Vries  <tom@codesourcery.com>
2701         * config/sh/sh.h (ASM_OUTPUT_ADDR_VEC_ELT): Wrap in "do {} while (0)".
2703 2017-11-23  Tom de Vries  <tom@codesourcery.com>
2705         * config/ft32/ft32.h (ASM_OUTPUT_ADDR_VEC_ELT): Remove semicolon after
2706         macro.
2708 2017-11-23  Oleg Endo  <olegendo@gcc.gnu.org>
2710         PR target/83111
2711         * config/sh/sh.md (udivsi3, divsi3, sibcall_value_pcrel,
2712         sibcall_value_pcrel_fdpic): Use local variable instead of
2713         operands[3].
2714         (calli_tbr_rel): Add missing operand 2.
2715         (call_valuei_tbr_rel): Add missing operand 3.
2717 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
2719         PR middle-end/82253
2720         * expr.c (expand_assignment): For CONCAT to_rtx, complex type from and
2721         bitpos/bitsize covering the whole destination, use store_expr only if
2722         the complex mode is the same.  Otherwise, use expand_normal and if
2723         it returns CONCAT, subreg each part separately instead of trying to
2724         subreg the whole result.
2726 2017-11-23  Richard Biener  <rguenther@suse.de>
2728         PR tree-optimization/23094
2729         * tree-ssa-sccvn.c (vuse_ssa_val): Handle VN_TOP when we
2730         come here from walking over backedges in the first iteration.
2731         (vn_reference_lookup_3): Skip clobbers that store the same value.
2733 2017-11-23  Richard Biener  <rguenther@suse.de>
2735         PR tree-optimization/81403
2736         * tree-ssa-pre.c (get_representative_for): Add parameter specifying
2737         a block we need a leader relative to.
2738         (phi_translate_1): For nary processing require a leader from
2739         get_representative_for given we run expression simplification
2740         using match-and-simplify.  Remove previous fix.
2742 2017-11-22  Jeff Law  <law@redhat.com>
2744         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
2745         Use new method allocate_value_range rather than accessing the
2746         vrp_value_range_pool data member directly.
2747         * tree-vrp.c (simplify_stmt_for_jump_threading): Tweak slightly
2748         to use extract_range_from_stmt method to avoid need for
2749         extract_range_from_assignment method.
2750         (vrp_prop::vrp_finalize): Use set_lattice_propagation_complete
2751         method rather than setting values_propgated data member directly.
2752         * vr-values.h (class vr_values): Privatize vrp_value_range_pool,
2753         and values propagated data members and extract_range_from_assignment
2754         method.  Reorder private data members to conform to standards.
2755         Add new methods set_lattice_propagation_complete and
2756         allocate_value_range.
2758 2017-11-22  Eric Botcazou  <ebotcazou@adacore.com>
2760         PR rtl-optimization/83030
2761         * doc/rtl.texi (Flags in an RTL Expression): Alphabetize, add entry
2762         for CROSSING_JUMP_P and mention usage of 'jump' for JUMP_INSNs.
2763         (Insns): Delete entry for REG_CROSSING_JUMP in register notes.
2764         * bb-reorder.c (update_crossing_jump_flags): Do not test whether the
2765         CROSSING_JUMP_P flag is already set before setting it.
2766         * cfgrtl.c (fixup_partition_crossing): Likewise.
2767         * reorg.c (relax_delay_slots): Do not consider a CROSSING_JUMP_P
2768         insn as useless.
2770 2017-11-22  Jakub Jelinek  <jakub@redhat.com>
2772         * simplify-rtx.c (simplify_binary_operation_1) <case VEC_SERIES>:
2773         Handle the case where both arguments are using gen_const_vec_series.
2775 2017-11-22  David Malcolm  <dmalcolm@redhat.com>
2777         PR c++/62170
2778         * pretty-print.c (pp_format): Move quoting implementation to
2779         pp_begin_quote and pp_end_quote.  Update pp_format_decoder call
2780         to pass address of "quote" local.
2781         (pp_begin_quote): New function.
2782         (pp_end_quote): New function.
2783         * pretty-print.h (printer_fn): Convert penultimate param from bool
2784         to bool *.
2785         (pp_begin_quote): New decl.
2786         (pp_end_quote): New decl.
2787         * tree-diagnostic.c (default_tree_printer): Convert penultimate
2788         param from bool to bool *.
2789         * tree-diagnostic.h (default_tree_printer): Likewise.
2791 2017-11-22  Jeff Law  <law@redhat.com>
2793         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::evrp_range_analyzer)
2794         Initialize vr_values.
2795         (evrp_range_analyzer::try_find_new_range): Call methods attached to
2796         vr_values via vr_values class instance rather than delegators.
2797         (evrp_range_analyzer::record_ranges_from_phis): Likewise.
2798         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
2799         (evrp_range_analyzer::push_value_range): Likewise.
2800         (evrp_range_analyzer::pop_value_range): Likewise.
2801         * gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Remove
2802         most delegators.  Those remaining are exposed as public interfaces.
2803         Make vr_values a pointer and private.
2804         (evrp_range_analyzer::~evrp_range_analyzer): Delete the attached
2805         vr_values.
2806         (evrp_range_analyzer::get_vr_value): New method.
2807         * gimple-ssa-evrp.c (class evrp_folder): Use DISABLE_COPY_AND_ASSIGN.
2808         (evrp_folder::evrp_folder): New ctor to initialize vr_values.
2809         (class evrp_dom_walker): Attach evrp_folder class, initialize
2810         it in the ctor.  Remove temporary delegators.
2811         (evrp_dom_walker::before_dom_children): Call methods in attached
2812         evrp_range_analyzer class via class instance pointer.  Use
2813         free value_range_constant_singleton to remove need for
2814         op_with_constant_singleton_value delegator method.  Do not
2815         create a vrp_prop class instance for every call!  Narrow
2816         scope of a couple variables.
2817         (evrp_dom_walker::cleanup): Call methods in attached
2818         evrp_range_analyzer class via class instance pointer.
2819         * vr-values.h (class vr_values): Privatize many methods and
2820         data members.
2822 2017-11-22  Richard Sandiford  <richard.sandiford@linaro.org>
2824         * tree.def (REDUC_MAX_EXPR, REDUC_MIN_EXPR, REDUC_PLUS_EXPR): Delete.
2825         * cfgexpand.c (expand_debug_expr): Remove handling for them.
2826         * expr.c (expand_expr_real_2): Likewise.
2827         * fold-const.c (const_unop): Likewise.
2828         * optabs-tree.c (optab_for_tree_code): Likewise.
2829         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
2830         * tree-inline.c (estimate_operator_cost): Likewise.
2831         * tree-pretty-print.c (dump_generic_node): Likewise.
2832         (op_code_prio): Likewise.
2833         (op_symbol_code): Likewise.
2834         * internal-fn.def (DEF_INTERNAL_SIGNED_OPTAB_FN): Define.
2835         (IFN_REDUC_PLUS, IFN_REDUC_MAX, IFN_REDUC_MIN): New internal functions.
2836         * internal-fn.c (direct_internal_fn_optab): New function.
2837         (direct_internal_fn_array, direct_internal_fn_supported_p
2838         (internal_fn_expanders): Handle DEF_INTERNAL_SIGNED_OPTAB_FN.
2839         * fold-const-call.c (fold_const_reduction): New function.
2840         (fold_const_call): Handle CFN_REDUC_PLUS, CFN_REDUC_MAX and
2841         CFN_REDUC_MIN.
2842         * tree-vect-loop.c: Include internal-fn.h.
2843         (reduction_code_for_scalar_code): Rename to...
2844         (reduction_fn_for_scalar_code): ...this and return an internal
2845         function.
2846         (vect_model_reduction_cost): Take an internal_fn rather than
2847         a tree_code.
2848         (vect_create_epilog_for_reduction): Likewise.  Build calls rather
2849         than assignments.
2850         (vectorizable_reduction): Use internal functions rather than tree
2851         codes for the reduction operation.  Update calls to the functions
2852         above.
2853         * config/aarch64/aarch64-builtins.c (aarch64_gimple_fold_builtin):
2854         Use calls to internal functions rather than REDUC tree codes.
2855         * config/aarch64/aarch64-simd.md: Update comment accordingly.
2857 2017-11-22  Olivier Hainque  <hainque@adacore.com>
2859         * config/vxworks.c (vxworks_override_options): Pick default
2860         dwarf version from macro value, VXWORKS_DWARF_VERSION_DEFAULT.
2861         * config/vxworks.h: Define VXWORKS_DWARF_VERSION_DEFAULT and
2862         DWARF_GNAT_ENCODINGS_DEFAULT.
2863         * config/vxworksae.h: Likewise.
2865 2017-11-22  Marc Glisse  <marc.glisse@inria.fr>
2867         PR tree-optimization/83104
2868         * vr-values.c (simplify_stmt_using_ranges): Check integral argument,
2869         not result.
2871 2017-11-22  Marek Polacek  <polacek@redhat.com>
2872             H.J. Lu  <hongjiu.lu@intel.com>
2873             Jason Merrill  <jason@redhat.com>
2875         PR c++/60336
2876         PR middle-end/67239
2877         PR target/68355
2878         * calls.c (initialize_argument_information): Call
2879         warn_parameter_passing_abi target hook.
2880         (store_one_arg): Use 0 for empty record size.  Don't push 0 size
2881         argument onto stack.
2882         (must_pass_in_stack_var_size_or_pad): Return false for empty types.
2883         * common.opt: Update -fabi-version description.
2884         * config/i386/i386.c (init_cumulative_args): Set cum->warn_empty.
2885         (ix86_gimplify_va_arg): Call arg_int_size_in_bytes instead of
2886         int_size_in_bytes.
2887         (ix86_is_empty_record): New function.
2888         (ix86_warn_parameter_passing_abi): New function.
2889         (TARGET_EMPTY_RECORD_P): Redefine.
2890         (TARGET_WARN_PARAMETER_PASSING_ABI): Redefine.
2891         * config/i386/i386.h (CUMULATIVE_ARGS): Add warn_empty.
2892         * doc/tm.texi: Regenerated.
2893         * doc/tm.texi.in (TARGET_EMPTY_RECORD_P,
2894         TARGET_WARN_PARAMETER_PASSING_ABI): Add.
2895         * dwarf2out.c (get_ultimate_context): Move to tree.c.
2896         * explow.c (hard_function_value): Call arg_int_size_in_bytes
2897         instead of int_size_in_bytes.
2898         * expr.c (copy_blkmode_to_reg): Likewise.
2899         * function.c (aggregate_value_p): Return 0 for empty types.
2900         (assign_parm_find_entry_rtl): Call warn_parameter_passing_abi
2901         target hook.
2902         (locate_and_pad_parm): Call arg size_in_bytes instead
2903         size_in_bytes.
2904         * lto-streamer-out.c (hash_tree): Hash TYPE_EMPTY_P and DECL_PADDING_P.
2905         * stor-layout.c (finalize_type_size): Set TYPE_EMPTY_P.
2906         * target.def (empty_record_p, warn_parameter_passing_abi): New target
2907         hooks.
2908         * targhooks.c (hook_void_CUMULATIVE_ARGS_tree): New hook.
2909         (std_gimplify_va_arg_expr): Skip empty records.  Call
2910         arg_size_in_bytes instead size_in_bytes.
2911         * targhooks.h (hook_void_CUMULATIVE_ARGS_tree): Declare.
2912         * tree-core.h (tree_type_common): Add empty_flag.
2913         (tree_decl_common): Update comments.
2914         * tree-streamer-in.c (unpack_ts_decl_common_value_fields): Stream
2915         DECL_PADDING_P.
2916         (unpack_ts_type_common_value_fields): Stream TYPE_EMPTY_P.
2917         * tree-streamer-out.c (pack_ts_decl_common_value_fields): Stream
2918         DECL_PADDING_P.
2919         (pack_ts_type_common_value_fields): Stream TYPE_EMPTY_P.
2920         * tree.c (default_is_empty_type): New function.
2921         (default_is_empty_record): New function.
2922         (arg_int_size_in_bytes): New function.
2923         (arg_size_in_bytes): New function.
2924         (get_ultimate_context): New function.
2925         * tree.h: Define TYPE_EMPTY_P, DECL_PADDING_P and
2926         TRANSLATION_UNIT_WARN_EMPTY_P.
2927         (default_is_empty_record, arg_int_size_in_bytes,
2928         arg_size_in_bytes, get_ultimate_context): Declare.
2930 2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
2932         * config/arm/arm.c (cmse_clear_registers): New function.
2933         (cmse_nonsecure_call_clear_caller_saved): Replace register clearing
2934         code by call to cmse_clear_registers.
2935         (cmse_nonsecure_entry_clear_before_return): Likewise.
2937 2017-11-22  Tamar Christina  <tamar.christina@arm.com>
2939         * config/arm/arm_neon.h (vdot_u32, vdotq_u32)
2940         (vdot_s32, vdotq_s32): New.
2941         (vdot_lane_u32, vdotq_lane_u32): New.
2942         (vdot_lane_s32, vdotq_lane_s32): New.
2945 2017-11-22  Richard Sandiford  <richard.sandiford@linaro.org>
2947         PR middle-end/82547
2948         * wide-int.cc (wi::add_large, wi::sub_large): Fix overflow detection
2949         for unsigned values with fewer HWIs than the precision.
2950         (test_overflow): New function.
2951         (wide_int_cc_tests): Call it.
2953 2017-11-22  Richard Sandiford  <richard.sandiford@linaro.org>
2955         * emit-rtl.c (init_derived_machine_modes): Make sure ptr_mode
2956         has the same mode class as Pmode.
2958 2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
2960         * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Get rid of
2961         padding_bits_to_clear_ptr.
2962         (cmse_nonsecure_entry_clear_before_return): Likewise.
2964 2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
2966         * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Use
2967         auto_sbitap instead of integer bitfield to control register needing
2968         clearing.
2970 2017-11-22  Jakub Jelinek  <jakub@redhat.com>
2972         PR tree-optimization/83044
2973         * tree-vrp.c (vrp_prop::check_array_ref): If eltsize is not
2974         INTEGER_CST or is 0, clear up_bound{,_p1} and later ignore tests
2975         that need the upper bound.  Subtract offset from
2976         get_addr_base_and_unit_offset only if positive and subtract it
2977         before division by eltsize rather than after it.
2979         PR debug/83084
2980         * valtrack.c (propagate_for_debug_subst, propagate_for_debug): Reset
2981         debug insns if they would contain UNSPEC_VOLATILE or volatile asm.
2982         (dead_debug_insert_temp): Likewise, but also ignore even non-volatile
2983         asm.
2985         PR middle-end/82875
2986         * optabs.c (expand_doubleword_mult, expand_binop): Before calling
2987         expand_binop with *mul_widen_optab, make sure at least one of the
2988         operands doesn't have VOIDmode.
2990         PR debug/83034
2991         * dwarf2out.c (mem_loc_descriptor): Handle VEC_SERIES.
2993         PR rtl-optimization/82044
2994         PR tree-optimization/82042
2995         * dse.c (record_store): Check for overflow.
2996         (check_mem_read_rtx): Properly check for overflow if width == -1, call
2997         add_wild_read instead of clear_rhs_from_active_local_stores on
2998         overflow and log it into dump_file.
3000 2017-11-22  Richard Biener  <rguenther@suse.de>
3002         * gimple-iterator.c (gimple_find_edge_insert_loc): Ignore
3003         fake edges to exit when looking for a place to insert.
3004         * tree-ssa-pre.c (clear_expression_ids): Inline into callers
3005         and remove.
3006         (insert_into_preds_of_block): Commit edge insertion immediately,
3007         assert that doesn't require new BBs.
3008         (fini_pre): Release expressions.
3009         (pass_pre::execute): Shuffle things around a bit, if the fn
3010         is too large do not compute AVAIL either as this is really the
3011         quadratic bit.
3013 2017-11-22  Richard Biener  <rguenther@suse.de>
3015         PR tree-optimization/83089
3016         * tree-if-conv.c (pass_if_conversion::execute): If anything
3017         changed reset SCEV and free the number of iteration estimates.
3019 2017-11-21  Martin Sebor  <msebor@redhat.com>
3021         PR tree-optimization/82945
3022         * calls.h (warn_nonstring_bound): Remove unused function.
3024 2017-11-21  Martin Sebor  <msebor@redhat.com>
3026         PR tree-optimization/82945
3027         * builtins.c (expand_builtin_strlen): Call maybe_warn_nonstring_arg.
3028         * calls.h (maybe_warn_nonstring_arg): Declare new function.
3029         * calls.c (get_attr_nonstring_decl, maybe_warn_nonstring_arg): New
3030         functions.
3031         (initialize_argument_information): Call maybe_warn_nonstring_arg.
3032         * calls.h (get_attr_nonstring_decl): Declare new function.
3033         * doc/extend.texi (attribute nonstring): Update.
3034         * gimple-fold.c (gimple_fold_builtin_strncpy): Call
3035         get_attr_nonstring_decl and handle it.
3036         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Same.  Improve
3037         detection of nul-termination.
3038         (strlen_to_stridx): Change to a pointer.
3039         (handle_builtin_strlen, handle_builtin_stxncpy): Adjust.
3040         (pass_strlen::execute): Same.
3042 2017-11-21  Sergey Shalnov  <Sergey.Shalnov@intel.com>
3044         * config/i386/i386-opts.h (enum prefer_vector_width): Added new enum
3045         for the new option -mprefer-vector-width=[none|128|256|512].
3046         * config/i386/i386.c (ix86_target_string): remove old style options
3047         -mprefer-avx256 and make -mprefer-avx128 as alias.
3048         (ix86_option_override_internal):  Apply defaults for the
3049         -mprefer-vector-width=[128|256] option.
3050         * config/i386/i386.h (TARGET_PREFER_AVX128, TARGET_PREFER_AVX256):
3051         Implement macros to work with -mprefer-vector-width=.
3052         * config/i386/i386.opt: Implemented option
3053         -mprefer-vector-width=[none|128|256|512].
3054         * doc/invoke.texi: Documentation for
3055         -mprefer-vector-width=[none|128|256|512].
3057 2017-11-21  Pat Haugen  <pthaugen@us.ibm.com>
3059         * config/rs6000/ppc-asm.h (f50, vs50): Fix values.
3061 2017-11-21  Jonathan Wakely  <jwakely@redhat.com>
3063         * doc/invoke.texi (-Wmaybe-uninitialized): Rephrase for clarity.
3065 2017-11-21  Marc Glisse  <marc.glisse@inria.fr>
3067         * doc/generic.texi: Document POINTER_DIFF_EXPR, update
3068         POINTER_PLUS_EXPR.
3069         * cfgexpand.c (expand_debug_expr): Handle POINTER_DIFF_EXPR.
3070         * expr.c (expand_expr_real_2): Likewise.
3071         * fold-const.c (const_binop, fold_addr_of_array_ref_difference,
3072         fold_binary_loc): Likewise.
3073         * match.pd (X-X, P+(Q-P), &D-P, (P+N)-P, P-(P+N), (P+M)-(P+N),
3074         P-Q==0, -(A-B), X-Z<Y-Z, (X-Z)-(Y-Z), Z-X<Z-Y, (Z-X)-(Z-Y),
3075         (A-B)+(C-A)): New transformations for POINTER_DIFF_EXPR, based on
3076         MINUS_EXPR transformations.
3077         * optabs-tree.c (optab_for_tree_code): Handle POINTER_DIFF_EXPR.
3078         * tree-cfg.c (verify_expr, verify_gimple_assign_binary): Likewise.
3079         * tree-inline.c (estimate_operator_cost): Likewise.
3080         * tree-pretty-print.c (dump_generic_node, op_code_prio,
3081         op_symbol_code): Likewise.
3082         * tree-vect-stmts.c (vectorizable_operation): Likewise.
3083         * vr-values.c (extract_range_from_binary_expr): Likewise.
3084         * varasm.c (initializer_constant_valid_p_1): Likewise.
3085         * tree.def: New tree code POINTER_DIFF_EXPR.
3087 2017-11-21  Uros Bizjak  <ubizjak@gmail.com>
3089         * config/i386/i386.md (*bswap<mode>2_movbe): Add
3090         integer suffix to movbe mnemonic.
3091         (*bswaphi2_movbe): Ditto.
3092         (bswaphi_lowpart): Merge with *bswaphi_lowpart_1.
3094 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
3096         PR c++/83045
3097         * tree-cfg.c (pass_warn_function_return::execute): Formatting fix.
3098         Also warn if seen __builtin_unreachable () call with BUILTINS_LOCATION.
3099         Use LOCATION_LOCUS when comparing against UNKNOWN_LOCATION.
3101 2017-11-21  Martin Liska  <mliska@suse.cz>
3103         * tree-inline.c (expand_call_inline): Remove not needed
3104         xstrdup_for_dump.
3106 2017-11-21  James Cowgill  <James.Cowgill@imgtec.com>
3107             Jakub Jelinek  <jakub@redhat.com>
3109         PR target/82880
3110         * config/mips/frame-header-opt.c (mips_register_frame_header_opt):
3111         Remove static keyword from f variable.
3113 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
3115         PR tree-optimization/83086
3116         * gimple-ssa-store-merging.c
3117         (imm_store_chain_info::try_coalesce_bswap): Test this_n.base_addr
3118         rather than n.base_addr.
3120 2017-11-21  Martin Liska  <mliska@suse.cz>
3122         PR rtl-optimization/82044
3123         PR tree-optimization/82042
3124         * dse.c (check_mem_read_rtx): Check for overflow.
3126 2017-11-21  Aldy Hernandez  <aldyh@redhat.com>
3128         * tree-ssa-threadbackward.c (find_jump_threads_backwards): Fix
3129         typo in comment.
3131 2017-11-21  Claudiu Zissulescu  <claziss@synopsys.com>
3133         * cfgrtl.c (force_nonfallthru_and_redirect): Don't split a call
3134         and its corresponding call arg location note.
3136 2017-11-21  Claudiu Zissulescu  <claziss@synopsys.com>
3137             Andrew Burgess  <andrew.burgess@embecosm.com>
3139         * config/arc/arc-protos.h (arc_compute_frame_size): Delete
3140         declaration.
3141         (arc_return_slot_offset): Likewise.
3142         (arc_eh_return_address_location): New declaration.
3143         * config/arc/arc.c (TARGET_BUILTIN_SETJMP_FRAME_VALUE): Define.
3144         (MUST_SAVE_REGISTER): Add exception handler case.
3145         (MUST_SAVE_RETURN_ADDR): Likewise.
3146         (arc_frame_pointer_required): Likewise.
3147         (arc_frame_pointer_needed): New function.
3148         (arc_compute_frame_size): Changed.
3149         (arc_expand_prologue): Likewise.
3150         (arc_expand_epilogue): Likewise.
3151         (arc_initial_elimination_offset): Likewise.
3152         (arc_return_slot_offset): Delete.
3153         (arc_eh_return_address_location): New function.
3154         (arc_builtin_setjmp_frame_value): Likewise.
3155         * config/arc/arc.h (EH_RETURN_DATA_REGNO): Use 2 registers.
3156         (EH_RETURN_STACKADJ_RTX): Define.
3157         (EH_RETURN_HANDLER_RTX): Likewise.
3158         * config/arc/arc.md (eh_return): Delete.
3160 2017-11-21  Aldy Hernandez  <aldyh@redhat.com>
3162         * print-tree.h (debug_vec_tree): Remove prototype.
3163         * gdbinit.in (pvt): Remove macro.
3165 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
3167         PR tree-optimization/83047
3168         * gimple-ssa-store-merging.c
3169         (imm_store_chain_info::output_merged_store): If the loads with the
3170         same vuse are in different basic blocks, for load_gsi pick a load
3171         location that is dominated by the other loads.
3173         PR c++/83059
3174         * config/i386/i386.c (ix86_memmodel_check): Start
3175         -Winvalid-memory-model diagnostics with lowercase letter.
3177         PR debug/82718
3178         * dwarf2out.c (dw_loc_list): If crtl->has_bb_partition, temporarily
3179         set in_cold_section_p to the partition containing loc_list->first.
3180         When seeing loc_list->last_before_switch node, update secname and
3181         perform range_across_switch second partition handling only after that.
3183         PR debug/82933
3184         * run-rtl-passes.c: Include debug.h.
3185         (run_rtl_passes): Call debug_hooks->assembly_start.
3186         * dwarf2out.c (dwarf2out_assembly_start): Return early if invoked
3187         multiple times.
3189         PR target/82981
3190         * internal-fn.c (expand_mul_overflow): Use OPTAB_WIDEN instead of
3191         OPTAB_DIRECT in calls to expand_simple_binop.
3193 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
3195         PR c/81404
3196         * Makefile.in (C_COMMON_OBJS): Add c-family/known-headers.o.
3198 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
3200         PR c++/72786
3201         * spellcheck.h (best_match::blithely_get_best_candidate): New
3202         accessor.
3204 2017-11-20  Jakub Jelinek  <jakub@redhat.com>
3206         * config/i386/i386.c (parse_mtune_ctrl_str): Start diagnostics
3207         with lower case letter.
3209 2017-11-20  Uros Bizjak  <ubizjak@gmail.com>
3211         * config/i386/i386.md (bswaphi2): New expander.
3212         (*bswaphi2_movbe): New insn pattern.
3213         (bswaphi -> rorhi pepehole2): New peephole pattern.
3215 2017-11-20  Jeff Law  <law@redhat.com>
3217         * Makefile.in (OBJS): Add gimple-ssa-evrp-analyze.o.
3218         * gimple-ssa-evrp-analyze.c: New file pulled from gimple-ssa-evrp.c.
3219         * gimple-ssa-evrp-analyze.h: New file pulled from gimple-ssa-evrp.c.
3220         * gimple-ssa-evrp.c: Remove bits moved into new files.  Include
3221         gimple-ssa-evrp-analyze.h.
3223         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Do not
3224         set BB_VISITED here.
3225         (evrp_range_analyzer::enter): Set BB_VISITED here instead.
3227 2017-11-20  Bin Cheng  <bin.cheng@arm.com>
3229         * tree-predcom.c: Add general comment on Store-Store chains.
3230         (split_data_refs_to_components): Postpone clearing eliminate_store_p
3231         flag in component.
3232         (get_chain_last_ref_at): Rename into...
3233         (get_chain_last_write_at): ...this.
3234         (get_chain_last_write_before_load): New function.
3235         (add_ref_to_chain): Promote type of chain from CT_STORE_LOAD to
3236         CT_STORE_STORE when write reference is added.
3237         (determine_roots_comp): Support load ref in CT_STORE_STORE chains.
3238         (is_inv_store_elimination_chain): Update get_chain_last_write_at call.
3239         (initialize_root_vars_store_elim_1): Ditto.
3240         (initialize_root_vars_store_elim_2): Ditto.  Replace rhs once default
3241         definition is created.
3242         (execute_pred_commoning_chain): Support load ref in CT_STORE_STORE
3243         chain by replacing it with dominant stored value.
3245 2017-11-20  Bin Cheng  <bin.cheng@arm.com>
3247         * tree-predcom.c (add_ref_to_chain): Remove check on distance.
3249 2017-11-20  Marc Glisse  <marc.glisse@inria.fr>
3251         * vr-values.c (extract_range_from_binary_expr): Use a full range
3252         for VR_VARYING.
3254 2017-11-20  Thomas Preud'homme  <thomas.preudhomme@arm.com>
3256         * config/arm/arm.md (R4_REGNUM): Define constant.
3257         (nonsecure_call_internal): Remove r4 clobber.
3258         (nonsecure_call_value_internal): Likewise.
3259         * config/arm/thumb1.md (nonsecure_call_reg_thumb1_v5): Remove second
3260         clobber and resequence match_operands.
3261         (nonsecure_call_value_reg_thumb1_v5): Likewise.
3262         * config/arm/thumb2.md (nonsecure_call_reg_thumb2): Likewise.
3263         (nonsecure_call_value_reg_thumb2): Likewise.
3265 2017-11-20  Jakub Jelinek  <jakub@redhat.com>
3267         PR tree-optimization/78821
3268         * gimple-ssa-store-merging.c (find_bswap_or_nop_load): Give up
3269         if base is TARGET_MEM_REF.  If base is not MEM_REF, set base_addr
3270         to the address of the base rather than the base itself.
3271         (find_bswap_or_nop_1): Just use pointer comparison for vuse check.
3272         (find_bswap_or_nop_finalize): New function.
3273         (find_bswap_or_nop): Use it.
3274         (bswap_replace): Return a tree rather than bool, change first
3275         argument from gimple * to gimple_stmt_iterator, allow inserting
3276         into an empty sequence, allow ins_stmt to be NULL - then emit
3277         all stmts into gsi.  Fix up MEM_REF address gimplification.
3278         (pass_optimize_bswap::execute): Adjust bswap_replace caller.
3279         (struct store_immediate_info): Add N and INS_STMT non-static
3280         data members.
3281         (store_immediate_info::store_immediate_info): Initialize them
3282         from newly added ctor args.
3283         (merged_store_group::apply_stores): Formatting fixes.  Sort by
3284         bitpos at the end.
3285         (stmts_may_clobber_ref_p): For stores call also
3286         refs_anti_dependent_p.
3287         (gather_bswap_load_refs): New function.
3288         (imm_store_chain_info::try_coalesce_bswap): New method.
3289         (imm_store_chain_info::coalesce_immediate_stores): Use it.
3290         (split_group): Handle LROTATE_EXPR and NOP_EXPR rhs_code specially.
3291         (imm_store_chain_info::output_merged_store): Fail if number of
3292         new estimated stmts is bigger or equal than old.  Handle LROTATE_EXPR
3293         and NOP_EXPR rhs_code.
3294         (pass_store_merging::process_store): Compute n and ins_stmt, if
3295         ins_stmt is non-NULL and the store rhs is otherwise invalid, use
3296         LROTATE_EXPR rhs_code.  Pass n and ins_stmt to store_immediate_info
3297         ctor.
3298         (pass_store_merging::execute): Calculate dominators.
3300         * tree-ssa-math-opts.c (nop_stats, bswap_stats, struct symbolic_number,
3301         BITS_PER_MARKER, MARKER_MASK, MARKER_BYTE_UNKNOWN, HEAD_MARKER, CMPNOP,
3302         CMPXCHG, do_shift_rotate, verify_symbolic_number_p,
3303         init_symbolic_number, find_bswap_or_nop_load, perform_symbolic_merge,
3304         find_bswap_or_nop_1, find_bswap_or_nop, pass_data_optimize_bswap,
3305         class pass_optimize_bswap, bswap_replace,
3306         pass_optimize_bswap::execute): Moved to ...
3307         * gimple-ssa-store-merging.c: ... this file.
3308         Include optabs-tree.h.
3309         (nop_stats, bswap_stats, do_shift_rotate, verify_symbolic_number_p,
3310         init_symbolic_number, find_bswap_or_nop_load, perform_symbolic_merge,
3311         find_bswap_or_nop_1, find_bswap_or_nop, bswap_replace): Put into
3312         anonymous namespace, remove static keywords.
3313         (pass_optimize_bswap::gate): Test BITS_PER_UNIT == 8 here...
3314         (pass_optimize_bswap::execute): ... rather than here.  Formatting fix.
3316 2017-11-20  Jan Hubicka  <hubicka@ucw.cz>
3318         PR bootstrap/83062
3319         * ipa-inline.c (can_inline_edge_p): Fix typo in previous patch.
3321 2017-11-20  Aldy Hernandez  <aldyh@redhat.com>
3323         * vec.h (debug_helper): New function.
3324         (DEFINE_DEBUG_VEC): New macro.
3325         * hash-set.h (debug_helper): New function.
3326         (DEFINE_DEBUG_HASH_SET): New macro.
3327         * cfg.c (debug_slim (edge)): New function.
3328         Call DEFINE_DEBUG_VEC for edges.
3329         Call DEFINE_DEBUG_HASH_SET for edges.
3330         * cfghooks.c (debug_slim (basic_block)): New function.
3331         Call DEFINE_DEBUG_VEC for basic blocks.
3332         Call DEFINE_DEBUG_HASH_SET for basic blocks.
3333         * print-tree.c (debug_slim): New function to handle trees.
3334         Call DEFINE_DEBUG_VEC for trees.
3335         Call DEFINE_DEBUG_HASH_SET for trees.
3336         (debug (vec<tree, va_gc>) &): Remove.
3337         (debug (<vec<tree, va_gc>) *): Remove.
3338         * print-rtl.c (debug_slim): New function to handle const_rtx.
3339         Call DEFINE_DEBUG_VEC for rtx_def.
3340         Call DEFINE_DEBUG_VEC for rtx_insn.
3341         Call DEFINE_DEBUG_HASH_SET for rtx_def.
3342         Call DEFINE_DEBUG_HASH_SET for rtx_insn.
3343         * sel-sched-dump.c (debug (vec<rtx_insn *> &): Remove.
3344         (debug (vec<rtx_insn *> *ptr): Remove.
3345         (debug_insn_vector): Remove.
3346         * stor-layout.c (debug_rli): Call debug() instead of debug_vec_tree.
3348 2017-11-20  Tom de Vries  <tom@codesourcery.com>
3350         PR rtl-optimization/82020
3351         * simplify-rtx.c (simplify_ternary_operation): Fix comparison mode of
3352         IF_THEN_ELSE condition.
3354 2017-11-19  Jeff Law  <law@redhat.com>
3356         * tree-ssa-dom.c (record_equivalences_from_phis): Fix handling
3357         of degenerates resulting from ignoring an edge.
3359 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
3361         PR ipa/81360
3362         * ipa-inline.c (can_inline_edge_p): Also check that caller is optimized
3364 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
3366         PR ipa/83001
3367         * profile-count.c (profile_count::to_sreal_scale): Fix return value
3368         for uninitialied counts.
3370 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
3372         PR ipa/60243
3373         * tree-inline.c (estimate_num_insns): Set to 1 at least.
3375 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
3377         PR target/82713
3378         * i386.c (ix86_builtin_vectorization_cost): Be ready for insane types.
3380 2017-11-19  Tom de Vries  <tom@codesourcery.com>
3382         * config/arc/arc.h (FUNCTION_PROFILER): Remove semicolon after
3383         "do while (0)".
3385 2017-11-19  Tom de Vries  <tom@codesourcery.com>
3387         * config/phoenix.h (TARGET_OS_CPP_BUILTINS): Remove semicolon after
3388         "do {} while (0)".
3390 2017-11-19  Tom de Vries  <tom@codesourcery.com>
3392         * config/visium/visium.h (ASM_OUTPUT_CASE_END): Remove semicolon after
3393         macro body.
3395 2017-11-19  Tom de Vries  <tom@codesourcery.com>
3397         * config/ft32/ft32.h (REGISTER_TARGET_PRAGMAS): Remove semicolon after
3398         "do {} while (0)".
3399         * config/spu/spu.h (REGISTER_TARGET_PRAGMAS): Same.
3401 2017-11-19  Tom de Vries  <tom@codesourcery.com>
3403         * config/mcore/mcore-elf.h (MCORE_EXPORT_NAME): Remove semicolon after
3404         "do {} while (0)".
3405         * config/mcore/mcore.h (ASM_OUTPUT_ALIGNED_COMMON): After missing
3406         semicolon after MCORE_EXPORT_NAME call.
3408 2017-11-19  Tom de Vries  <tom@codesourcery.com>
3410         PR target/82961
3411         * vmsdbgout.c (vmsdbgout_early_finish): New function.
3412         (vmsdbg_debug_hooks): Set early_finish field to vmsdbgout_early_finish.
3414 2017-11-18  Jan Hubicka  <hubicka@ucw.cz>
3416         * cgraphclones.c (cgraph_edge::clone): Rename gcov_count to prof_count.
3417         (cgraph_edge::clone): Cleanup updating of profile.
3418         * ipa-cp.c (update_profiling_info): Likewise.
3419         * ipa-inline-transform.c (inline_transform): Likewise.
3420         * ipa-inline.c (inline_small_functions): Add missing space to dump.
3421         * ipa-split.c (execute_split_functions): Do not split when function
3422         is cold.
3423         * predict.c (estimate_bb_frequencies): Cleanup updating of profile.
3424         * profile-count.c (profile_count::dump): Add global0.
3425         (profile_count::to_cgraph_frequency): Do not ICE when entry is
3426         undefined.
3427         (profile_count::to_sreal_scale): Likewise.
3428         (profile_count::adjust_for_ipa_scaling): Fix typo in comment.
3429         (profile_count::combine_with_ipa_count): New function.
3430         * profile-count.h (profile_guessed_global0adjusted): New.
3431         (profile_count::adjusted_zero): New.
3432         (profile_count::global0adjusted): New.
3433         (profile_count::combine_with_ipa_count): New.
3434         * tree-inline.c (copy_edges_for_bb): Add NUM/DEN arugment;
3435         correct profile of return block of split functions.
3436         (copy_cfg_body): Remove unused profile_count.
3437         (copy_body): Likewise.
3438         (expand_call_inline): Update.
3439         (tree_function_versioning): Update.
3441 2017-11-18  Aldy Hernandez  <aldyh@redhat.com>
3443         * hash-set.h (hash_set::empty): New.
3444         * tree-ssa-threadbackward.h: Delete.
3445         * tree-ssa-threadbackward.c (class thread_jumps): New.
3446         Move max_threaded_paths into class.
3447         (fsm_find_thread_path): Remove arguments that are now in class.
3448         (profitable_jump_thread_path): Rename to...
3449         (thread_jumps::profitable_jump_thread_path): ...this.
3450         (convert_and_register_jump_thread_path): Rename to...
3451         (thread_jumps::convert_and_register_current_path): ...this.
3452         (check_subpath_and_update_thread_path): Rename to...
3453         (thread_jumps::check_subpath_and_update_thread_path): ...this.
3454         (register_jump_thread_path_if_profitable): Rename to...
3455         (thread_jumps::register_jump_thread_path_if_profitable): ...this.
3456         (handle_phi): Rename to...
3457         (thread_jumps::handle_phi): ...this.
3458         (handle_assignment): Rename to...
3459         (thread_jumps::handle_assignment): ...this.
3460         (fsm_find_control_statement_thread_paths): Rename to...
3461         (thread_jumps::fsm_find_control_statement_thread_paths): ...this.
3462         (find_jump_threads_backwards): Rename to...
3463         (thread_jumps::find_jump_threads_backwards): ...this.
3464         Initialize path local data.
3465         (pass_thread_jumps::execute): Call find_jump_threads_backwards
3466         from within thread_jumps class.
3467         (pass_early_thread_jumps::execute): Same.
3469 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
3471         * cgraph.c (cgraph_node::dump): Do IPA sanity checking on IPA counts.
3473 2017-11-17  Steve Ellcey  <sellcey@cavium.com>
3475         * config/aarch64/aarch64-simd.md (fnma<mode>4): Move neg operator
3476         to canonical location.
3478 2017-11-17  Steve Ellcey  <sellcey@cavium.com>
3480         PR target/81356
3481         * config/aarch64/aarch64.c (aarch64_use_by_pieces_infrastructure_p):
3482         Remove.
3483         (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): Remove define.
3485 2017-11-17  H.J. Lu  <hongjiu.lu@intel.com>
3487         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Use
3488         rcrt1.o%s/grcrt1.o%s for -static-pie.
3490 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
3492         * i386.c (ix86_multiplication_cost, ix86_division_cost,
3493         ix86_shift_rotate_cost): Break out from ...
3494         (ix86_rtx_costs): ... here.
3495         (ix86_add_stmt_cost): Use rtx cost machinery to compute cost of
3496         vector operations.
3498 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
3500         * predict.c (determine_unlikely_bbs): Set cgraph node count to 0
3501         when entry block was promoted unlikely.
3502         (estimate_bb_frequencies): Increase frequency scale.
3503         * profile-count.h (profile_count): Export precision info.
3505 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
3507         * tree-tailcall.c (eliminate_tail_call): Be more careful about not
3508         disturbin profile of entry block.
3510 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
3512         * ipa-fnsummary.c (estimate_node_size_and_time): Be more tolerant for
3513         roundoff errors.
3515 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
3517         * ipa-cp.c (update_profiling_info): Handle conversion to local profile.
3518         * tree-cfg.c (execute_fixup_cfg): Do fixup same way as inliner does.
3520 2017-11-17  Jeff Law  <law@redhat.com>
3522         * gimple-ssa-evrp.c (class evrp_range_analyzer): New class extracted
3523         from evrp_dom_walker class.  Various methods moved into new class.
3524         (evrp_range_analyzer::evrp_range_analyzer): Constructor for new class.
3525         (evrp_range_analyzer::enter): New method.
3526         (evrp_range_analyzer::leave): New method.
3527         (evrp_dom_walker): Remove delegators no longer needed by this class.
3528         Replace vr_values data member with evrp_range_analyzer
3530         * gimple-ssa-evrp.c (evrp_dom_walker::record_ranges_from_phis): New
3531         method extracted from evrp_dom_walker::before_dom_children.
3532         (evrp_dom_walker::record_ranges_from_stmt): Likewise.
3533         (evrp_dom_walker::record_ranges_from_incoming_edge): Likewise.
3535         * gimple-ssa-evrp.c (evrp_dom_walker): Add cleanup method.
3536         Add private copy constructor and move assignment operators.
3537         Privatize methods and class data where trivially possible.
3538         (evrp_dom_walker::cleanup): New function, extracted from
3539         execute_early_vrp.  Simplify access to class data.
3541         * vr-values.h (get_output_for_vrp): Prototype.
3542         * vr-values.c (get_output_for_vrp): New function extracted from
3543         vrp_visit_assignment_or_call and extract_range_from_stmt.
3544         (vrp_visit_assignment_or_call): Use get_output_for_vrp.  Simplify.
3546 2017-11-17  Luis Machado  <luis.machado@linaro.org>
3548         * config/aarch64/aarch64.c
3549         (qdf24xx_prefetch_tune) <default_opt_level>: Set to -1.
3550         (qdf24xx_tunings) <autoprefetcher_model>: Set to
3551         tune_params::AUTOPREFETCHER_WEAK.
3553 2017-11-17  Tamar Christina  <tamar.christina@arm.com>
3555         PR target/82641
3556         * config/arm/arm.c (arm_valid_target_attribute_rec):
3557         Parse "arch=" and "+<ext>".
3558         (arm_valid_target_attribute_tree): Re-init global options.
3559         (arm_option_override): Make non-static.
3560         (arm_options_perform_arch_sanity_checks): Make errors fatal.
3561         * gcc/config/arm/arm-c.c (__ARM_FEATURE_CMSE): Support undef.
3562         (__ARM_FEATURE_CRC32): Support undef.
3563         * config/arm/arm_acle.h (__ARM_FEATURE_CRC32): Replace with pragma.
3564         * doc/extend.texi (ARM Function Attributes): Add pragma and target.
3566 2017-11-17  David Malcolm  <dmalcolm@redhat.com>
3568         * gdbinit.in (break-on-diagnostic): New command.
3570 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
3572         * config/i386/i386.c (ix86_expand_epilogue): Change simple
3573         return to indirect jump for EH return if control-flow
3574         protection is enabled. Change explicit 'false' argument in
3575         pro_epilogue_adjust_stack with a value of
3576         flag_cf_protection.
3577         * config/i386/i386.md (simple_return_indirect_internal):
3578         Remove SImode restriction to support 64-bit.
3580 2017-11-17  Segher Boessenkool  <segher@kernel.crashing.org>
3582         * combine.c (added_notes_insn): New.
3583         (try_combine): Handle added_notes_insn like added_links_insn.
3584         Rewrite return value code.
3585         (distribute_notes): Set added_notes_insn to the earliest insn we added
3586         a note to.
3588 2017-11-17  Segher Boessenkool  <segher@kernel.crashing.org>
3590         PR rtl-optimization/82621
3591         * combine.c (try_combine): Do not split PARALLELs of two SETs if the
3592         dest of one of those SETs is unused.
3594 2017-11-17  Richard Biener  <rguenther@suse.de>
3596         PR fortran/83017
3597         * tree-core.h (enum annot_expr_kind): Add annot_expr_parallel_kind.
3598         * tree-pretty-print.c (dump_generic_node): Handle
3599         annot_expr_parallel_kind.
3600         * tree-cfg.c (replace_loop_annotate_in_block): Likewise.
3601         * gimplify.c (gimple_boolify): Likewise.
3603 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
3605         * config.gcc (extra_headers): Add cet.h for x86 targets.
3606         * config/i386/cet.h: New file.
3607         * doc/install.texi: Add --enable-cet/--disable-cet.
3609 2017-11-17  Richard Biener  <rguenther@suse.de>
3611         PR tree-optimization/83017
3612         * tree-parloops.c (MIN_PER_THREAD): Use --param parloops-min-per-thread.
3613         (gen_parallel_loop): Properly count iterations.
3614         (parallelize_loops): Handle loop->can_be_parallel independent
3615         of flag_loop_parallelize_all.  Make static profitability test match
3616         the runtime one.
3617         * params.def (PARAM_PARLOOPS_MIN_PER_THREAD): New.
3618         * invoke.texi (parloops-min-per-thread): Document.
3620 2017-11-17  Vineet Gupta  <vgupta@synopsys.com>
3622         * config/arc/linux.h: GLIBC_DYNAMIC_LINKER update per glibc
3623         upstreaming review comments.
3625 2017-11-17  Tamar Christina  <tamar.christina@arm.com>
3627         * expr.c (copy_blkmode_to_reg): Fix bitsize for targets
3628         with fast unaligned access.
3629         * doc/sourcebuild.texi (word_mode_no_slow_unalign): New.
3631 2017-11-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>
3633         * config/arm/arm.c (cmse_nonsecure_entry_clear_before_return): Allocate
3634         to_clear_arg_regs_bitmap to the same size as to_clear_bitmap.
3636 2017-11-17  Richard Biener  <rguenther@suse.de>
3638         * tree-ssa-pre.c (phi_translate_1): Remove redundant constant
3639         folding of references.
3641 2017-11-17  Qing Zhao  <qing.zhao@oracle.com>
3643         PR middle-end/78809
3644         * gimple-fold.c (gimple_fold_builtin_string_compare): Add handling
3645         of replacing call to strncmp with corresponding call to strcmp when
3646         meeting conditions.
3648 2017-11-17  Sergey Shalnov  <Sergey.Shalnov@intel.com>
3650         * config/i386/x86-tune.def (X86_TUNE_AVX256_OPTIMAL): Add tuning
3651         option prefer-avx256 for skylake-avx512 configuration.
3652         * config/i386/i386.c (ix86_option_override_internal): Ditto.
3653         (get_builtin_code_for_version): Ditto.
3655 2017-11-17  Chung-Ju Wu  <jasonwucj@gmail.com>
3656             Monk Chiang  <sh.chiang04@gmail.com>
3658         * config/nds32/nds32.h (FIRST_PSEUDO_REGISTER): Modify.
3659         (FIXED_REGISTERS): Reserve more register numbers.
3660         (CALL_USED_REGISTERS): Likewise.
3661         (REG_ALLOC_ORDER): Likewise.
3662         (REG_CLASS_CONTENTS): Likewise.
3663         (REGISTER_NAMES): Likewise.
3665 2017-11-17  Chung-Ju Wu  <jasonwucj@gmail.com>
3666             Kito Cheng  <kito.cheng@gmail.com>
3668         * config/nds32/nds32-modes.def: Add vector mode V4QI V2HI V8QI V4HI
3669         V2SI.
3670         * config/nds32/iterators.md: Add vector mode iterators and attributes.
3672 2017-11-16  Steven Munroe  <munroesj@gcc.gnu.org>
3674         * config/rs6000/mmintrin.h (_mm_add_pi32[_ARCH_PWR]): Correct
3675         parameter list for vec_splats.
3677 2017-11-16  Joseph Myers  <joseph@codesourcery.com>
3679         * doc/invoke.texi (-std=c17): Refer to 2018 expected publication
3680         date of C17.
3681         (-std=c18, -std=iso9899:2018, -std=gnu18): Document option aliases.
3683 2017-11-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
3685         PR bootstrap/82856
3686         * doc/install.texi: Document incompatibility of Perl >=5.6.26
3687         with the required version of automake 1.11.6.
3689 2017-11-16  Pat Haugen  <pthaugen@us.ibm.com>
3691         * rs6000/power9.md (power9fpdiv): New automaton and cpu_unit defined
3692         for it.
3693         (DU_C2_3_power9): Correct reservation combinations.
3694         (FP_DIV_power9, VEC_DIV_power9): New.
3695         (power9-alu): Split out rotate/shift...
3696         (power9-rot): ...to here, correct dispatch resource.
3697         (power9-cracked-alu, power9-mul, power9-mul-compare): Correct dispatch
3698         resource.
3699         (power9-fp): Correct latency.
3700         (power9-sdiv): Add div/sqrt resource.
3701         (power9-ddiv): Correct latency, add div/sqrt resource.
3702         (power9-sqrt, power9-dsqrt): Add div/sqrt resource.
3703         (power9-vecfdiv, power9-vecdiv): Correct latency, add div/sqrt
3704         resource.
3705         (power9-qpdiv, power9-qpmul): Adjust resource usage.
3707 2017-11-15  Michael Meissner  <meissner@linux.vnet.ibm.com>
3709         * config/rs6000/rs6000.c (rs6000_expand_builtin): Do not do the
3710         switch statement mapping KF built-ins to TF built-ins if we don't
3711         have the proper ISA 3.0 assembler support.
3713 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
3715         * tree-emutls.c (lower_emutls_data): Remove unused bb_freq.
3716         (lower_emutls_function_body): Do not compute it.
3718 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
3720         * ipa-split.c (split_bb_info): Turn time to sreal.
3721         (split_point): Likewise.
3722         (dump_split_point): Likewise.
3723         (fine_split_points): Likewise.
3724         (execute_split_functions): Only zero split_bbs; turn time to sreals.
3726 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
3728         * ipa-fnsummary.c (analyze_function_body): Accumulate time consistently
3729         in sreal.
3731 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
3733         * predict.c (combine_predictions_for_bb): Preserve zero predicted
3734         edges.
3735         (expensive_function_p): Remove useless assert.
3736         (determine_unlikely_bbs): Propagate also forward; determine cold blocks
3738 2017-11-16  Martin Sebor  <msebor@redhat.com>
3740         PR tree-optimization/82588
3741         PR tree-optimization/82583
3742         * tree-vrp.c (check_array_ref): Handle flexible array members,
3743         string literals, and inner indices.
3744         (search_for_addr_array): Add detail to diagnostics.
3746 2017-11-16  Nathan Sidwell  <nathan@acm.org>
3748         PR c++/82836
3749         PR c++/82737
3750         * tree.h (COPY_DECL_RTL): Rename parms for clarity.
3751         (SET_DECL_ASSEMBLER_NAME): Forward to
3752         overwrite_decl_assembler_name.
3753         (COPY_DECL_ASSEMBLER_NAME): Rename parms for clarity.
3754         (overwrite_decl_assembler_name): Declare.
3755         * tree.c (overwrite_decl_assembler_name): New.
3756         * langhooks-def.h (lhd_overwrite_decl_assembler_name): Declare.
3757         (LANG_HOOKS_OVERWRITE_DECL_ASSEMBLER_NAME): Provide default.
3758         (LANG_HOOKS_INITIALIZER): Add it.
3759         * langhooks.h (struct lang_hooks): Add overwrite_decl_assembler_name.
3760         * langhooks.c (lhd_set_decl_assembler_name): Use
3761         SET_DECL_ASSEMBLER_NAME.
3762         (lhd_overwrite_decl_assembler_name): Default implementation.
3764 2017-11-16  Wilco Dijkstra  <wdijkstr@arm.com>
3765             Jackson Woodruff  <jackson.woodruff@arm.com>
3767         PR tree-optimization/71026
3768         * match.pd: Canonicalize constant multiplies in division.
3770 2017-11-16  Wilco Dijkstra  <wdijkstr@arm.com>
3772         * opts.c (default_options_table): Add OPT_fomit_frame_pointer entry.
3773         * common/config/alpha/alpha-common.c (TARGET_OPTION_OPTIMIZATION_TABLE):
3774         Remove OPT_fomit_frame_pointer entry.
3775         * common/config/arc/arc-common.c: Likewise.
3776         * common/config/arm/arm-common.c: Likewise.
3777         * common/config/avr/avr-common.c: Likewise.
3778         * common/config/c6x/c6x-common.c: Likewise.
3779         * common/config/cr16/cr16-common.c: Likewise.
3780         * common/config/cris/cris-common.c: Likewise.
3781         * common/config/epiphany/epiphany-common.c: Likewise.
3782         * common/config/fr30/fr30-common.c: Likewise.
3783         * common/config/frv/frv-common.c: Likewise.
3784         * common/config/ia64/ia64-common.c: Likewise.
3785         * common/config/iq2000/iq2000-common.c: Likewise.
3786         * common/config/lm32/lm32-common.c: Likewise.
3787         * common/config/m32r/m32r-common.c: Likewise.
3788         * common/config/mcore/mcore-common.c: Likewise.
3789         * common/config/microblaze/microblaze-common.c: Likewise.
3790         * common/config/mips/mips-common.c: Likewise.
3791         * common/config/mmix/mmix-common.c: Likewise.
3792         * common/config/mn10300/mn10300-common.c: Likewise.
3793         * common/config/nios2/nios2-common.c: Likewise.
3794         * common/config/pa/pa-common.c: Likewise.
3795         * common/config/pdp11/pdp11-common.c: Likewise.
3796         * common/config/powerpcspe/powerpcspe-common.c: Likewise.
3797         * common/config/riscv/riscv-common.c: Likewise.
3798         * common/config/rs6000/rs6000-common.c: Likewise.
3799         * common/config/rx/rx-common.c: Likewise.
3800         * common/config/s390/s390-common.c: Likewise.
3801         * common/config/sh/sh-common.c: Likewise.
3802         * common/config/sparc/sparc-common.c: Likewise.
3803         * common/config/tilegx/tilegx-common.c: Likewise.
3804         * common/config/tilepro/tilepro-common.c: Likewise.
3805         * common/config/v850/v850-common.c: Likewise.
3806         * common/config/visium/visium-common.c: Likewise.
3807         * common/config/xstormy16/xstormy16-common.c: Likewise.
3808         * common/config/xtensa/xtensa-common.c: Likewise.
3809         * invoke.texi (-fomit-frame-pointer): Update documentation.
3811 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
3813         * tree-cfg.c (gimple_find_sub_bbs): Do not compute freq.
3815 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
3817         * cfg.c (scale_bbs_frequencies_int,
3818         cale_bbs_frequencies_gcov_type): Remove.
3819         * cfg.h (scale_bbs_frequencies_int,
3820         cale_bbs_frequencies_gcov_type): Remove.
3822 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
3824         * tree-ssa-loop-manip.c
3825         (scale_dominated_blocks_in_loop): Update to profile counts.
3826         (tree_transform_and_unroll_loop): Likewise.
3828 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
3830         * tree-vect-loop-manip.c (vect_do_peeling): Do not use
3831         scale_bbs_frequencies_int.
3833 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
3835         * final.c (compute_alignments): Use counts rather than frequencies.
3837 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
3839         * cfgloopanal.c: Include sreal.h
3840         (average_num_loop_insns): Use counts and sreal for accounting.
3842 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
3844         * cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
3845         manipulation.
3847 2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
3848             Kito Cheng  <kito.cheng@gmail.com>
3850         * config/nds32/constraints.md: Provide more constraints.
3851         * config/nds32/nds32.h (enum reg_class, REG_CLASS_NAMES,
3852         REG_CLASS_CONTENTS): Define R5_REG, R8_REG, and FRAME_POINTER_REG to
3853         support constraints usage.
3855 2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
3857         * config/nds32/constants.md (UNSPEC_VOLATILE_FUNC_RETURN): Remove.
3859 2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
3860             Kito Cheng  <kito.cheng@gmail.com>
3862         * config/nds32/nds32.opt: Add mext-perf, mext-perf2, mext-string.
3863         * config/nds32/nds32.opt: Refine the layout.
3864         * config/nds32/nds32.c (TARGET_EXT_PERF, TARGET_EXT_PERF2,
3865         TARGET_EXT_STRING): Support new options.
3866         * config/nds32/nds32.h: Likewise.
3867         * config/nds32/nds32.md: Likewise.
3868         * config/nds32/nds32-predicates.c: Likewise.
3869         * config/nds32/constraints.md: Likewise.
3870         * common/config/nds32/nds32-common.c: Likewise.
3872 2017-11-16  Julia Koval  <julia.koval@intel.com>
3874         PR target/82983
3875         * config/i386/gfniintrin.h: Add sse check.
3876         * config/i386/i386.c (ix86_expand_builtin): Fix gfni check.
3878 2017-11-16  Julia Koval  <julia.koval@intel.com>
3880         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VBMI2_SET,
3881         OPTION_MASK_ISA_AVX512VBMI2_UNSET): New.
3882         (ix86_handle_option): Handle -mavx512vbmi2.
3883         * config/i386/cpuid.h: Add bit_AVX512VBMI2.
3884         * config/i386/driver-i386.c (host_detect_local_cpu): Handle new bit.
3885         * config/i386/i386-c.c (__AVX512VBMI2__): New.
3886         * config/i386/i386.c (ix86_target_string): Handle -mavx512vbmi2.
3887         (ix86_valid_target_attribute_inner_p): Ditto.
3888         * config/i386/i386.h (TARGET_AVX512VBMI2, TARGET_AVX512VBMI2_P): New.
3889         * config/i386/i386.opt (mavx512vbmi2): New option.
3890         * doc/invoke.texi: Add new option.
3892 2017-11-16  Julia Koval  <julia.koval@intel.com>
3894         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8, _mm256_gf2p8mul_epi8,
3895         _mm_mask_gf2p8mul_epi8, _mm_maskz_gf2p8mul_epi8,
3896         _mm256_mask_gf2p8mul_epi8, _mm256_maskz_gf2p8mul_epi8,
3897         _mm512_mask_gf2p8mul_epi8, _mm512_maskz_gf2p8mul_epi8,
3898         _mm512_gf2p8mul_epi8): New intrinsics.
3899         * config/i386/i386-builtin-types.def
3900         (V64QI_FTYPE_V64QI_V64QI): New type.
3901         * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8mulb_v64qi,
3902         __builtin_ia32_vgf2p8mulb_v64qi_mask, __builtin_ia32_vgf2p8mulb_v32qi,
3903         __builtin_ia32_vgf2p8mulb_v32qi_mask, __builtin_ia32_vgf2p8mulb_v16qi,
3904         __builtin_ia32_vgf2p8mulb_v16qi_mask): New builtins.
3905         * config/i386/sse.md (vgf2p8mulb_*): New pattern.
3906         * config/i386/i386.c (ix86_expand_args_builtin): Handle new type.
3908 2017-11-15  Uros Bizjak  <ubizjak@gmail.com>
3910         * config/i386/i386.c (x86_print_call_or_nop): Emit 5 byte nop
3911         explicitly as a stream of bytes.
3913 2017-11-15  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
3915         * config/rs6000/altivec.h (vec_xst_be): New #define.
3916         * config/rs6000/altivec.md (altivec_vperm_<mode>_direct): Rename
3917         and externalize from *altivec_vperm_<mode>_internal.
3918         * config/rs6000/rs6000-builtin.def (XL_BE_V16QI): Remove macro
3919         instantiation.
3920         (XL_BE_V8HI): Likewise.
3921         (XL_BE_V4SI): Likewise.
3922         (XL_BE_V4SI): Likewise.
3923         (XL_BE_V2DI): Likewise.
3924         (XL_BE_V4SF): Likewise.
3925         (XL_BE_V2DF): Likewise.
3926         (XST_BE): Add BU_VSX_OVERLOAD_X macro instantiation.
3927         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Correct
3928         all array entries with these keys: VSX_BUILTIN_VEC_XL,
3929         VSX_BUILTIN_VEC_XL_BE, VSX_BUILTIN_VEC_XST.  Add entries for key
3930         VSX_BUILTIN_VEC_XST_BE.
3931         * config/rs6000/rs6000.c (altivec_expand_xl_be_builtin): Remove.
3932         (altivec_expand_builtin): Remove handling for VSX_BUILTIN_XL_BE_*
3933         built-ins.
3934         (altivec_init_builtins): Replace conditional calls to def_builtin
3935         for __builtin_vsx_ld_elemrev_{v8hi,v16qi} and
3936         __builtin_vsx_st_elemrev_{v8hi,v16qi} based on TARGET_P9_VECTOR
3937         with unconditional calls.  Remove calls to def_builtin for
3938         __builtin_vsx_le_be_<mode>.  Add a call to def_builtin for
3939         __builtin_vec_xst_be.
3940         * config/rs6000/vsx.md (vsx_ld_elemrev_v8hi): Convert define_insn
3941         to define_expand, and add alternate RTL generation for P8.
3942         (*vsx_ld_elemrev_v8hi_internal): New define_insn based on
3943         vsx_ld_elemrev_v8hi.
3944         (vsx_ld_elemrev_v16qi): Convert define_insn to define_expand, and
3945         add alternate RTL generation for P8.
3946         (*vsx_ld_elemrev_v16qi_internal): New define_insn based on
3947         vsx_ld_elemrev_v16qi.
3948         (vsx_st_elemrev_v8hi): Convert define_insn
3949         to define_expand, and add alternate RTL generation for P8.
3950         (*vsx_st_elemrev_v8hi_internal): New define_insn based on
3951         vsx_st_elemrev_v8hi.
3952         (vsx_st_elemrev_v16qi): Convert define_insn to define_expand, and
3953         add alternate RTL generation for P8.
3954         (*vsx_st_elemrev_v16qi_internal): New define_insn based on
3955         vsx_st_elemrev_v16qi.
3957 2017-11-15  H.J. Lu  <hongjiu.lu@intel.com>
3959         PR target/82990
3960         * config/i386/i386.c (pass_insert_vzeroupper::gate): Remove
3961         TARGET_AVX512ER check.
3962         (ix86_option_override_internal): Set MASK_VZEROUPPER if
3963         neither -mzeroupper nor -mno-zeroupper is used and
3964         TARGET_EMIT_VZEROUPPER is set.
3965         * config/i386/i386.h (TARGET_EMIT_VZEROUPPER): New.
3966         * config/i386/x86-tune.def: Add X86_TUNE_EMIT_VZEROUPPER.
3968 2017-11-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
3970         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
3971         folding of vector compares.
3972         (fold_build_vec_cmp): New helper function.
3973         (fold_compare_helper): New helper function.
3974         (builtin_function_type): Add compare builtins to the list of functions
3975         having unsigned arguments.  Cosmetic updates to comment indentation.
3976         * config/rs6000/vsx.md (vcmpneb, vcmpneh, vcmpnew): Update to specify
3977         the not+eq combination.
3979 2017-11-15  Bin Cheng  <bin.cheng@arm.com>
3981         PR tree-optimization/82726
3982         PR tree-optimization/70754
3983         * tree-predcom.c (order_drefs_by_pos): New function.
3984         (combine_chains): Move code setting has_max_use_after to...
3985         (try_combine_chains): ...here.  New parameter.  Sort combined chains
3986         according to position information.
3987         (tree_predictive_commoning_loop): Update call to above function.
3988         (update_pos_for_combined_chains, pcom_stmt_dominates_stmt_p): New.
3990 2017-11-15  Bin Cheng  <bin.cheng@arm.com>
3992         PR tree-optimization/82726
3993         Revert
3994         2017-01-23  Bin Cheng  <bin.cheng@arm.com>
3996         PR tree-optimization/70754
3997         * tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
3998         (reassociate_to_the_same_stmt): New parameter INSERT_BEFORE.  Insert
3999         combined stmt before it if not NULL.
4000         (combine_chains): Process refs reversely and compute dominance point
4001         for root ref.
4003         Revert
4004         2017-02-23  Bin Cheng  <bin.cheng@arm.com>
4006         PR tree-optimization/79663
4007         * tree-predcom.c (combine_chains): Process refs in reverse order
4008         only for ZERO length chains, and add explaining comment.
4010 2017-11-15  Tamar Christina  <tamar.christina@arm.com>
4012         * config/arm/arm-cpus.in (armv8_3, ARMv8_3a, armv8.3-a): New
4013         * config/arm/arm-tables.opt (armv8.3-a): Regenerated.
4014         * doc/invoke.texi (ARM Options): Add armv8.3-a.
4016 2017-11-15  Tamar Christina  <tamar.christina@arm.com>
4018         * config/arm/arm.h (TARGET_DOTPROD): Add arm_arch8_2.
4020 2017-11-15  Martin Liska  <mliska@suse.cz>
4022         * tree-cfg.c (pass_warn_function_return::execute):
4023         Compare warn_return_type for greater than zero.
4025 2017-11-15  Sebastian Peryt  <sebastian.peryt@intel.com>
4027         PR target/82941
4028         PR target/82942
4029         * config/i386/i386.c (pass_insert_vzeroupper): Modify gate condition
4030         to return true on Xeon and not on Xeon Phi.
4031         (ix86_check_avx256_register): Changed to ...
4032         (ix86_check_avx_upper_register): ... this. Add extra check for
4033         VALID_AVX512F_REG_OR_XI_MODE.
4034         (ix86_avx_u128_mode_needed): Changed
4035         ix86_check_avx256_register to ix86_check_avx_upper_register.
4036         (ix86_check_avx256_stores): Changed to ...
4037         (ix86_check_avx_upper_stores): ... this. Changed
4038         ix86_check_avx256_register to ix86_check_avx_upper_register.
4039         (ix86_avx_u128_mode_after): Changed
4040         avx_reg256_found to avx_upper_reg_found. Changed
4041         ix86_check_avx256_stores to ix86_check_avx_upper_stores.
4042         (ix86_avx_u128_mode_entry): Changed
4043         ix86_check_avx256_register to ix86_check_avx_upper_register.
4044         (ix86_avx_u128_mode_exit): Ditto.
4045         * config/i386/i386.h: (host_detect_local_cpu): New define.
4047 2017-11-15  Dominik Infuehr  <dominik.infuehr@theobroma-systems.com>
4049         * config/arm/xgene1.md (xgene1): Split into automatons
4050         xgene1_main, xgene1_decoder, xgene1_div, xgene1_simd.
4051         (xgene1_f_load): Adjust reservations and/or types.
4052         (xgene1_f_store): Likewise.
4053         (xgene1_load_pair): Likewise.
4054         (xgene1_store_pair): Likewise.
4055         (xgene1_fp_load1): Likewise.
4056         (xgene1_load1): Likewise.
4057         (xgene1_store1): Likewise.
4058         (xgene1_move): Likewise.
4059         (xgene1_alu): Likewise.
4060         (xgene1_simd): Likewise.
4061         (xgene1_bfm): Likewise.
4062         (xgene1_neon_load1): Likewise.
4063         (xgene1_neon_store1): Likewise.
4064         (xgene1_neon_logic): Likewise.
4065         (xgene1_neon_st1): Likewise.
4066         (xgene1_neon_ld1r): Likewise.
4067         (xgene1_alu_cond): Added.
4068         (xgene1_shift_reg): Likwise.
4069         (xgene1_bfx): Likewise.
4070         (xgene1_mul): Split into xgene1_mul32, xgene1_mul64.
4072 2017-11-15  Jakub Jelinek  <jakub@redhat.com>
4074         PR target/82981
4075         * internal-fn.c: Include gimple-ssa.h, tree-phinodes.h and
4076         ssa-iterators.h.
4077         (can_widen_mult_without_libcall): New function.
4078         (expand_mul_overflow): If only checking unsigned mul overflow,
4079         not result, and can do efficiently MULT_HIGHPART_EXPR, emit that.
4080         Don't use WIDEN_MULT_EXPR if it would involve a libcall, unless
4081         no other way works.  Add MULT_HIGHPART_EXPR + MULT_EXPR support.
4082         (expand_DIVMOD): Formatting fix.
4083         * expmed.h (expand_mult): Add NO_LIBCALL argument.
4084         * expmed.c (expand_mult): Likewise.  Use OPTAB_WIDEN rather
4085         than OPTAB_LIB_WIDEN if NO_LIBCALL is true, and allow it to fail.
4087         PR tree-optimization/82977
4088         * tree-ssa-strlen.c (strlen_optimize_stmt): Pass a reference to a copy
4089         constructed temporary to strlen_to_stridx.put.
4091 2017-11-15  Martin Liska  <mliska@suse.cz>
4093         * configure.ac: Remove -fkeep-inline-functions from coverage_flags.
4094         * configure: Regenerate.
4096 2017-11-15  Martin Liska  <mliska@suse.cz>
4098         PR target/82927
4099         * config/sh/sh-mem.cc: Use proper probability for
4100         REG_BR_PROB_NOTE.
4102 2017-11-14  Jeff Law  <law@redhat.com>
4104         * explow.c (anti_adjust_stack_and_probe_stack_clash): Avoid probing
4105         the red zone for stack_clash_protection_final_dynamic_probe targets
4106         when the total dynamic stack size is zero bytes.
4108         * tree-ssa-threadupdate.c (thread_through_all_blocks): Thread
4109         blocks is post order.
4111 2017-11-15  Alexandre Oliva  <aoliva@redhat.com>
4113         * dumpfile.h (TDF_COMPARE_DEBUG): New.
4114         * final.c (rest_of_clean_state): Set it for the
4115         -fcompare-debug dump.
4116         * tree-pretty-print.c (dump_generic_node): Omit OBJ_TYPE_REF
4117         class when TDF_COMPARE_DEBUG is set.
4119         * dwarf2out.c (gen_producer_string): Discard
4120         OPT_fcompare_debug.
4122 2017-11-15  Joseph Myers  <joseph@codesourcery.com>
4124         PR c/81156
4125         * doc/extend.texi (Other Builtins): Document __builtin_tgmath.
4126         * ginclude/tgmath.h (__tg_cplx, __tg_ldbl, __tg_dbl, __tg_choose)
4127         (__tg_choose_2, __tg_choose_3, __TGMATH_REAL_1_2)
4128         (__TGMATH_REAL_2_3): Remove macros.
4129         (__TGMATH_CPLX, __TGMATH_CPLX_2, __TGMATH_REAL, __TGMATH_REAL_2)
4130         (__TGMATH_REAL_3, __TGMATH_CPLX_ONLY): Define using
4131         __builtin_tgmath.
4132         (frexp, ldexp, nexttoward, scalbn, scalbln): Define using
4133         __TGMATH_REAL_2.
4134         (remquo): Define using __TGMATH_REAL_3.
4136 2017-11-14  Jeff Law  <law@redhat.com>
4138         * vr-values.c: New file with contents extracted from tree-vrp.c.
4139         * Makefile.in (OBJS): Add vr-values.o
4140         * tree-vrp.h (set_value_range_to_nonnull): Prototype.
4141         (set_value_range, set_and_canonicalize_value_range): Likewise.
4142         (vrp_bitmap_equal_p, range_is_nonnull): Likewise.
4143         (value_range_constant_singleton, symbolic_range_p): Likewise.
4144         (compare_values, compare_values_warnv, vrp_val_is_min): Likewise.
4145         (vrp_val_is_max, copy_value_range, set_value_range_to_value): Likewise.
4146         (extract_range_from_binary_expr_1, vrp_val_min, vrp_val_max): Likewise.
4147         (set_value_range_to_null, range_int_cst_p, opreand_less_p): Likewise.
4148         (find_case_label_range, find_case_label_index): Likewise.
4149         (zero_nonzero_bits_from_vr, overflow_comparison_p): Likewise.
4150         (range_int_cst_singleton_p, value_inside_range): Likewise.
4151         (get_single_symbol): Likewise.
4152         (switch_update): Move structure definition here.
4153         (to_remove_edges, to_update_switch_stmts): Provide externs.
4154         * tree-vrp.c: Move all methods for vr-values class to vr-values.c
4155         (vrp_val_max, vrp_val_min, vrp_val_is_max): Make externally visible.
4156         (vrp_val_is_min, set_value_range): Likewise.
4157         (set_and_canonicalize_value_range, copy_value_range): Likewise.
4158         (set_value_range_to_value, set_value_range_to_nonnull): Likewise.
4159         (set_value_range_to_null, vrp_bitmap_equal_p): Likewise.
4160         (range_is_nonnull, range_int_cst_p): Likewwise.
4161         (range_int_cst_singleton_p, symbolic_range_p): Likewise.
4162         (get_single_symbol, operand_less_p): Likewise
4163         (compare_values_warnv, compare_values): Likewise.
4164         (value_inside_range, value_range_constant_singleton): Likewise.
4165         (zero_nonzero_bitgs_from_vr): Likewise.
4166         (extract_range_from_binary_expr_1): Likewise.
4167         (overflow_comparison_p): Likewise.
4168         (to_remove_edges, to_update_switch_stmts): Likewise.
4169         (find_case_label-index, find_case_label_range): Likewise.
4170         (switch_update, set_value_range_to_nonnegative): Remove.
4171         (set_value_range_to_truthvalue): Likewise.
4172         (symbolic_range_based_on_p, gimple_assign_nonzero_p): Likewise.
4173         (gimple_stmt_nonzero_p, compare_ranges): Likewise.
4174         (compare_range_with_value, vrp_valueize, vrp_valueize_1): Likewise.
4175         (find_case_label_ranges, test_for_singularity): Likewise.
4176         (range_fits_type_p, simplify_conversion_using_ranges): LIkewise.
4177         (x_vr_values): Move to its remaining use site.
4179 2017-11-10  Jeff Law  <law@redhat.com>
4181         * vr-values.h (VR_INITIALIZER): Move #define here.
4182         * gimple-ssa-evrp.c: New file with contents extracted from tree-vrp.c
4183         * Makefile.in (OBJS): Add tree-evrp.o
4184         * tree-vrp.h (assert_info): Move structure definition here.
4185         (set_value_range_to_varying): Prototype.
4186         (vrp_operand_equal_p, range_includes_zero_p): Likewise.
4187         (infer_value_range, register_edge_assert_for): Likewise.
4188         (stmt_interesting_for_vrp): Likewise.
4189         * tree-vrp.c: Move all methods for evrp class into gimple-ssa-evrp.c.
4190         (set_value_range_to_varying): No longer static.
4191         (vrp_operand_equal_p, range_includes_zero_p): Likewise.
4192         (infer_value_range, register_edge_assert_for): Likewise.
4194 2017-11-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
4196         * config/rs6000/rs6000.md (bswapdi2): On 32-bit ISA 3.0, don't
4197         generate the XXBRD instruction.
4199         * config/rs6000/rs6000-c.c (is_float128_p): New helper function.
4200         (rs6000_builtin_type_compatible): Treat _Float128 and long double
4201         as being compatible if -mabi=ieeelongdouble.
4202         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_HW_1): New macros
4203         to setup float128 built-ins with hardware support.
4204         (BU_FLOAT128_HW_2): Likewise.
4205         (BU_FLOAT128_HW_3): Likewise.
4206         (BU_FLOAT128_HW_VSX_1): Likewise.
4207         (BU_FLOAT128_HW_VSX_2): Likewise.
4208         (scalar_extract_expq): Change float128 built-in functions to
4209         accommodate having both KFmode and TFmode functions.  Use the
4210         KFmode variant as the default.
4211         (scalar_extract_sigq): Likewise.
4212         (scalar_test_neg_qp): Likewise.
4213         (scalar_insert_exp_q): Likewise.
4214         (scalar_insert_exp_qp): Likewise.
4215         (scalar_test_data_class_qp): Likewise.
4216         (sqrtf128_round_to_odd): Delete processing the round to odd
4217         built-in functions as special built-in functions, and define them
4218         as float128 built-ins.  Use the KFmode variant as the default.
4219         (truncf128_round_to_odd): Likewise.
4220         (addf128_round_to_odd): Likewise.
4221         (subf128_round_to_odd): Likewise.
4222         (mulf128_round_to_odd): Likewise.
4223         (divf128_round_to_odd): Likewise.
4224         (fmaf128_round_to_odd): Likewise.
4225         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
4226         support for KFmode and TFmode xststdcqp calls.
4227         (rs6000_expand_builtin): If long double is IEEE 128-bit floating
4228         point, switch the built-in handlers for the get/set float128
4229         exponent, get float128 mantissa, float128 test built-ins, and the
4230         float128 round to odd built-in functions.  Eliminate creating the
4231         float128 round to odd built-in functions as special built-ins.
4232         (rs6000_init_builtins): Eliminate special creation of the float128
4233         round to odd built-in functions.
4234         * config/rs6000/vsx.md (xsxexpqp_<mode>): Change float128 built-in
4235         function insns to support both TFmode and KFmode variants.
4236         (xsxsigqp_<mode>): Likewise.
4237         (xsiexpqpf_<mode>): Likewise.
4238         (xsiexpqp_<mode>): Likewise.
4239         (xststdcqp_<mode>): Likewise.
4240         (xststdcnegqp_<mode>): Likewise.
4241         (xststdcqp_<mode>): Likewise.
4243 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
4245         * tree-ssa-threadupdate.c (compute_path_counts): Remove
4246         unused path_in_freq_ptr parameter.
4247         (ssa_fix_duplicate_block_edges): Do not pass around path_in_freq
4249 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
4251         * ipa-inline.c (edge_badness): Dump sreal frequency.
4252         (compute_inlined_call_time): Match natural implementaiton ...
4253         * ipa-fnsummary.c (estimate_edge_size_and_time): ... here; remove
4254         forgotten division by CGRAPH_FREQ_BASE.
4256 2017-11-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4258         * config.gcc (*-*-solaris2*): Enable default_use_cxa_atexit since
4259         Solaris 11.  Update comment.
4260         * configure.ac (gcc_cv_ld_pid): Adapt comment for Solaris 12
4261         renaming.
4262         * config/sol2.h (STARTFILE_SPEC): Likewise.
4263         * configure: Regenerate.
4265 2017-11-14  Carl Love  <cel@us.ibm.com>
4267         * config/rs6000/rs6000.c (swap_endian_selector_for_mode): Remove
4268         le_ and be_ prefixes to swap* variables.  Remove
4269         if (VECTOR_ELT_ORDER_BIG) statement. Remove E_V16QImode case
4270         statements.
4272 2017-11-14  Jason Merrill  <jason@redhat.com>
4274         Support GTY((cache)) on hash_map.
4275         * hash-traits.h (ggc_remove): Add ggc_maybe_mx member function.
4276         (ggc_cache_remove): Override it instead of ggc_mx.
4277         * hash-table.h (gt_ggc_mx): Call it instead of ggc_mx.
4278         (gt_cleare_cache): Call ggc_mx instead of gt_ggc_mx.
4279         * hash-map-traits.h (simple_hashmap_traits): Add maybe_mx member.
4280         (simple_cache_map_traits): Override maybe_mx.
4281         * hash-map.h (hash_entry): Add ggc_maybe_mx and keep_cache_entry.
4282         (hash_map): Friend gt_cleare_cache.
4283         (gt_cleare_cache): New.
4284         * tree.h (tree_cache_traits): New hash_map traits class.
4285         (tree_cache_map): New typedef.
4287 2017-11-14  Richard Biener  <rguenther@suse.de>
4289         * tree-cfgcleanup.c (cleanup_control_expr_graph): Remove first_p
4290         paramter and handling.
4291         (cleanup_control_flow_bb): Likewise.
4292         (cleanup_control_flow_pre): New helper performing a DFS walk
4293         to call cleanup_control_flow_bb in PRE order.
4294         (cleanup_tree_cfg_1): Do the first phase of cleanup_control_flow_bb
4295         via cleanup_control_flow_pre.
4297 2017-11-14  James Greenhalgh  <james.greenhalgh@arm.com>
4299         * config/aarch64/aarch64-simd.md
4300         (aarch64_simd_bsl<mode>_internal): Remove DImode.
4301         (*aarch64_simd_bsl<mode>_alt): Likewise.
4302         (aarch64_simd_bsldi_internal): New.
4303         (aarch64_simd_bsldi_alt): Likewise.
4305 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
4307         * tracer.c (better_p): Do not compare frequencies.
4308         * reg-stack.c (better_edge): Likewise.
4309         * shrink-wrap.c (try_shrink_wrapping): Do not convert to gcov counts
4310         and back.
4312 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
4314         * auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
4315         * cgraphunit.c (cgraph_node::expand_thunk): Use update_max_bb_count.
4316         * ipa-utils.c (ipa_merge_profiles): Use update_max_bb_count.
4317         * lto-streamer-in.c (input_function): Use update_max_bb_count.
4318         * omp-expand.c (expand_omp_taskreg): Use update_max_bb_count.
4319         * predict.c (maybe_hot_frequency_p): Inline to ...
4320         (maybe_hot_count_p): ... here; rewrite to counts.
4321         (counts_to_freqs): Rename to ...
4322         (update_max_bb_count): ... this one.
4323         (expensive_function_p): Use counts.
4324         (estimate_bb_frequencies): Update.
4325         (rebuild_frequencies): Update.
4326         * predict.h (counts_to_freqs): Rename to ...
4327         (update_max_bb_count): ... this one.
4328         * profile.c (compute_branch_probabilities): Add debug info
4329         * tree-inline.c (expand_call_inline): Update debug info.
4330         (optimize_inline_calls): Use update_max_bb_count..
4331         (tree_function_versioning): Use update_max_bb_count..
4332         * value-prof.c (gimple_value_profile_transformations):
4333         Do not use update_max_bb_count.
4335 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
4337         * ipa-inline.c (compute_uninlined_call_time, compute_inlined_call_time):
4338         always use frequencies.
4340 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
4342         * bb-reorder.c: Remove frequencies from comments.
4343         (better_edge_p): Use profile counts.
4344         (find_traces): Dump profile counts.
4345         (rotate_loop): Use profile counts.
4346         (find_traces_1_round): Likewise.
4347         (connect_better_edge_p): Use counts instead of probabilities for
4348         reverse walk.
4349         (copy_bb_p): Drop early check for non-0 frequency.
4350         (sanitize_hot_paths): Update comments.
4352 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
4354         * ipa-split.c (struct split_point): Add count.
4355         (consider_split): Do not compute incoming frequency; compute incoming
4356         count and store it to split_point.
4357         (split_function): Set count of the call to split part correctly.
4359 2017-11-13  Carl Love  <cel@us.ibm.com>
4361         * config/rs6000/altivec.md (altivec_vsumsws_be): Add define_expand.
4363 2017-11-13  Tom Tromey  <tom@tromey.com>
4365         * doc/cpp.texi (Variadic Macros): Document __VA_OPT__.
4367 2017-11-13  Carl Love  <cel@us.ibm.com>
4369         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins):
4370         Add support for builtins:
4371         unsigned int vec_first_{,miss}_match_{,or_eos}index,
4372         vector {un,}signed {char,int,short},
4373         vector {un,}signed {char,int,short}) arguments.
4374         * config/rs6000/rs6000-builtin.def (VFIRSTMATCHINDEX,
4375         VFIRSTMATCHOREOSINDEX, VFIRSTMISMATCHINDEX, VFIRSTMISMATCHOREOSINDEX):
4376         Add BU_P9V_AV_2 expansions for the builtins.
4377         * config/rs6000/altivec.h (vec_first_match_index,
4378         vec_first_mismatch_index, vec_first_match_or_eos_index,
4379         vec_first_mismatch_or_eos_index): Add #defines for the builtins.
4380         * config/rs6000/rs6000-protos.h (bytes_in_mode): Add
4381         new extern declaration.
4382         * config/rs6000/rs6000.c (bytes_in_mode): Add new function.
4383         * config/rs6000/vsx.md (first_match_index_<mode>,
4384         first_match_or_eos_index_<mode>, first_mismatch_index_<mode>,
4385         first_mismatch_or_eos_index_<mode>): Add define expand.
4386         (vctzlsbb_<mode>): Add mode field to define_insn for vctzlsbb.
4387         * doc/extend.texi: Update the built-in documenation file for the new
4388         built-in functions.
4390 2017-11-13  Michael Meissner  <meissner@linux.vnet.ibm.com>
4392         * match.pd: Convert fminf<N>, fminf<N>x, fmax<N>, and fmax<N>x
4393         into the min/max operations for _Float<N> and _Float<N>X types.
4395 2017-11-13  Eric Botcazou  <ebotcazou@adacore.com>
4397         PR lto/81351
4398         * dwarf2out.c (do_eh_frame): New static variable.
4399         (dwarf2out_begin_prologue): Set it.
4400         (dwarf2out_frame_finish): Test it instead of dwarf2out_do_eh_frame.
4402 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
4404         * tree-ssa-coalesce.c (coalesce_cost): Fix formating.
4406         * tree-ssa-sink.c (select_best_block): Do not use frequencies.
4408 2017-11-13  Eric Botcazou  <ebotcazou@adacore.com>
4410         PR lto/81351
4411         * debug.h (dwarf2out_do_eh_frame): Declare.
4412         * dwarf2cfi.c (dwarf2out_do_eh_frame): New predicate.
4413         (dwarf2out_do_frame): Use it.
4414         (dwarf2out_do_cfi_asm): Likewise.
4415         * dwarf2out.c (dwarf2out_frame_finish): Likewise.
4416         (dwarf2out_assembly_start): Likewise.
4417         (dwarf2out_begin_prologue): Fix comment.
4418         * toplev.c (compile_file): Always call dwarf2out_frame_finish
4419         if the target needs either debug or unwind DWARF2 info.
4420         * lto-opts.c (lto_write_options): Do not save -fexceptions,
4421         -fnon-call-exceptions, -ffp-contract, -fmath-errno, -fsigned-zeros,
4422         -ftrapping-math, -ftrapv and -fwrapv.
4424 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
4426         * cgraph.c (cgraph_edge::sreal_frequency): New function.
4427         * cgraph.h (cgraph_edge::sreal_frequency): Declare.
4428         * ipa-fnsummary.c (dump_ipa_call_summary): Use sreal_frequency.
4429         (estimate_edge_size_and_time): Likewise.
4430         (ipa_merge_fn_summary_after_inlining): Likewise.
4431         * ipa-inline.c (cgraph_freq_base_rec): Remove.
4432         (compute_uninlined_call_time): Use sreal_frequency.
4433         (compute_inlined_call_time): Likewise.
4434         (ipa_inline): Do not initialize cgraph_freq_base_rec.
4435         * profile-count.c: Include sreal.h.
4436         (profile_count::to_sreal_scale): New.
4437         * profile-count.h: Forward declare sreal.
4438         (profile_count::to_sreal_scale): Declare.
4440 2017-11-13  Nathan Sidwell  <nathan@acm.org>
4442         * diagnostic.c (maybe_line_and_column): New.
4443         (diagnostic_get_location_text): Use it.
4444         (diagnostic_report_current_module): Likewise.
4445         (test_diagnostic_get_location_text): Add tests.
4447 2017-11-13  Luis Machado  <luis.machado@linaro.org>
4449         * doc/md.texi (Specifying processor pipeline description): Fix
4450         incorrect latency for the div instruction example.
4452 2017-11-13  Jakub Jelinek  <jakub@redhat.com>
4454         PR tree-optimization/78821
4455         * gimple-ssa-store-merging.c (compatible_load_p): Don't require
4456         that bit_not_p is the same.
4457         (imm_store_chain_info::coalesce_immediate_stores): Likewise.
4458         (split_group): Count precisely bit_not_p bits in each statement.
4459         (invert_op): New function.
4460         (imm_store_chain_info::output_merged_store): Use invert_op to
4461         emit BIT_XOR_EXPR with a xor_mask instead of BIT_NOT_EXPR if some
4462         but not all orig_stores have BIT_NOT_EXPR in the corresponding spots.
4464 2017-11-13  Martin Liska  <mliska@suse.cz>
4466         * gcov.c (struct coverage_info): Remove typedef of coverage_t.
4467         (struct source_info): Likewise.
4468         (add_branch_counts): Likewise.
4469         (add_line_counts): Likewise.
4470         (function_summary): Likewise.
4471         (output_intermediate_line): Likewise.
4472         (generate_results): Likewise.
4474 2017-11-13  Martin Liska  <mliska@suse.cz>
4476         * gcov.c (struct block_info): Remove typedef for block_t.
4477         (struct line_info): Likewise.
4478         (line_info::has_block): Likewise.
4479         (EXIT_BLOCK): Likewise.
4480         (unblock): Likewise.
4481         (circuit): Likewise.
4482         (get_cycles_count): Likewise.
4483         (process_file): Likewise.
4484         (read_graph_file): Likewise.
4485         (solve_flow_graph): Likewise.
4486         (find_exception_blocks): Likewise.
4487         (add_line_counts): Likewise.
4488         (accumulate_line_info): Likewise.
4489         (output_line_details): Likewise.
4491 2017-11-13  Martin Liska  <mliska@suse.cz>
4493         * gcov.c (struct arc_info): Remove typedef for arc_t.
4494         (struct line_info): Likewise.
4495         (add_branch_counts): Likewise.
4496         (output_branch_count): Likewise.
4497         (function_info::~function_info): Likewise.
4498         (circuit): Likewise.
4499         (output_intermediate_line): Likewise.
4500         (read_graph_file): Likewise.
4501         (solve_flow_graph): Likewise.
4502         (find_exception_blocks): Likewise.
4503         (add_line_counts): Likewise.
4504         (accumulate_line_info): Likewise.
4505         (output_line_details): Likewise.
4506         (output_function_details): Likewise.
4508 2017-11-13  Martin Liska  <mliska@suse.cz>
4510         * gcov.c (struct function_info): Remove typedef for function_t.
4511         (struct source_info): Likewise.
4512         (source_info::get_functions_at_location): Likewise.
4513         (solve_flow_graph): Likewise.
4514         (find_exception_blocks): Likewise.
4515         (add_line_counts): Likewise.
4516         (output_intermediate_file): Likewise.
4517         (process_file): Likewise.
4518         (generate_results): Likewise.
4519         (release_structures): Likewise.
4520         (read_graph_file): Likewise.
4521         (read_count_file): Likewise.
4522         (accumulate_line_counts): Likewise.
4523         (output_lines): Likewise.
4525 2017-11-13  Martin Liska  <mliska@suse.cz>
4527         * gcov.c (function_info::function_info): Remove num_counts
4528         and add vector<gcov_type>.
4529         (function_info::~function_info): Use the vector.
4530         (process_file): Likewise.
4531         (read_graph_file): Likewise.
4532         (read_count_file): Likewise.
4533         (solve_flow_graph): Likewise.
4535 2017-11-13  Martin Liska  <mliska@suse.cz>
4537         * gcov.c (function_info::is_artificial): New function.
4538         (process_file): Erase all artificial early.
4539         (generate_results): Skip as all artificial are already
4540         removed.
4542 2017-11-13  Martin Liska  <mliska@suse.cz>
4544         * gcov.c (read_graph_file): Store to global vector of functions.
4545         (read_count_file): Iterate the vector.
4546         (process_file): Likewise.
4547         (generate_results): Likewise.
4548         (release_structures): Likewise.
4550 2017-11-13  Jakub Jelinek  <jakub@redhat.com>
4552         PR tree-optimization/82954
4553         * gimple-ssa-store-merging.c
4554         (imm_store_chain_info::coalesce_immediate_stores): If
4555         !infof->ops[N].base_addr, split group if info->ops[N].base_addr.
4557 2017-11-13  Richard Sandiford  <richard.sandiford@linaro.org>
4559         * config/aarch64/aarch64-simd.md (aarch64_store_lane0<mode>):
4560         Upddate call to ENDIAN_LANE_N.
4561         (aarch64_<sur>dot_lane<vsi2qi>): Use aarch64_endian_lane_rtx.
4562         (aarch64_<sur>dot_laneq<vsi2qi>): Likewise.
4563         (*aarch64_simd_vec_copy_lane<mode>): Update calls to ENDIAN_LANE_N
4564         and use aarch64_endian_lane_rtx.
4565         (*aarch64_simd_vec_copy_lane_<vswap_width_name><mode>): Likewise.
4567 2017-11-12  Tom de Vries  <tom@codesourcery.com>
4569         * config/riscv/riscv.h (ASM_OUTPUT_LABELREF): Wrap in do {} while (0).
4571 2017-11-12  Tom de Vries  <tom@codesourcery.com>
4573         * config/elfos.h (ASM_OUTPUT_ASCII): Remove semicolon after macro body.
4575 2017-11-12  Tom de Vries  <tom@codesourcery.com>
4577         * config/cr16/cr16.h (ASM_OUTPUT_LABELREF): Remove semicolon after macro
4578         body.
4579         * config/powerpcspe/xcoff.h (ASM_OUTPUT_LABELREF): Same.
4580         * config/rs6000/xcoff.h (ASM_OUTPUT_LABELREF): Same.
4581         * defaults.h (ASM_OUTPUT_LABELREF): Same.
4583 2017-11-11  Martin Sebor  <msebor@redhat.com>
4585         PR c/81117
4586         * doc/extend.texi (attribute nonstring): Remove spurious argument.
4588         PR bootstrap/82948
4589         * prefic.c (translate_name): Replace strncpy with memcpy to
4590         avoid -Wstringop-truncation.
4592 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
4594         * tree-ssa-loop-im.c (execute_sm_if_changed): Do not compute freq_sum.
4596 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
4598         * predict.c (maybe_hot_frequency_p): Do not use cfun.
4600 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
4602         * tree-ssa-tail-merge.c (replace_block_by): Fix and re-enable profile
4603         merging.
4605 2017-11-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
4607         * config/rs6000/rs6000.md (bswaphi2_reg): On ISA 3.0 systems,
4608         enable generating XXBRH if the value is in a vector register.
4609         (bswapsi2_reg): On ISA 3.0 systems, enable generating XXBRW if the
4610         value is in a vector register.
4611         (bswapdi2_reg): On ISA 3.0 systems, always use XXBRD to do
4612         register to register bswap64's instead of doing the GPR sequence
4613         used on previous machines.
4614         (bswapdi2_xxbrd): New insn.
4615         (bswapdi2_reg): Disallow on ISA 3.0.
4616         (register to register bswap64 splitter): Do not split the insn on
4617         ISA 3.0 systems that use XXBRD.
4619 2017-11-10  Martin Sebor  <msebor@redhat.com>
4621         PR c/81117
4622         * config/darwin-c.c (framework_construct_pathname): Replace strncpy
4623         with memcpy.
4624         (find_subframework_file): Same.
4626 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
4628         * auto-profile.c (afdo_indirect_call): Drop frequency.
4629         * cgraph.c (symbol_table::create_edge): Drop frequency argument.
4630         (cgraph_node::create_edge): Drop frequency argument.
4631         (cgraph_node::create_indirect_edge): Drop frequency argument.
4632         (cgraph_edge::make_speculative): Drop frequency arguments.
4633         (cgraph_edge::resolve_speculation): Do not update frequencies
4634         (cgraph_edge::dump_edge_flags): Do not dump frequency.
4635         (cgraph_node::dump): Check consistency in IPA mode.
4636         (cgraph_edge::maybe_hot_p): Use IPA counter.
4637         (cgraph_edge::verify_count_and_frequency): Rename to ...
4638         (cgraph_edge::verify_count): ... this one; drop frequency checking.
4639         (cgraph_node::verify_node): Update.
4640         * cgraph.h (struct cgraph_edge): Drop frequency.
4641         (cgraph_edge::frequency): New function.
4642         * cgraphbuild.c (pass_build_cgraph_edges::execute): Donot pass
4643         frequencies.
4644         (cgraph_edge::rebuild_edges): Likewise.
4645         * cgraphclones.c (cgraph_edge::clone): Scale only counts.
4646         (duplicate_thunk_for_node): Do not pass frequency.
4647         (cgraph_node::create_clone): Scale only counts.
4648         (cgraph_node::create_virtual_clone): Do not pass frequency.
4649         (cgraph_node::create_edge_including_clones): Do not pass frequency.
4650         (cgraph_node::create_version_clone): Do not pass frequency.
4651         * cgraphunit.c (cgraph_node::analyze): Do not pass frequency.
4652         (cgraph_node::expand_thunk): Do not pass frequency.
4653         (cgraph_node::create_wrapper): Do not pass frequency.
4654         * gimple-iterator.c (update_call_edge_frequencies): Do not pass
4655         frequency.
4656         * gimple-streamer-in.c (input_bb): Scale only IPA counts.
4657         * ipa-chkp.c (chkp_produce_thunks): Do not pass frequency.
4658         * ipa-cp.c (ipcp_lattice::print): Use frequency function.
4659         (gather_caller_stats): Use frequency function.
4660         (ipcp_cloning_candidate_p): Use frequency function.
4661         (ipcp_propagate_stage): Use frequency function.
4662         (get_info_about_necessary_edges): Use frequency function.
4663         (update_profiling_info): Update only IPA profile.
4664         (update_specialized_profile): Use frequency functoin.
4665         (perhaps_add_new_callers): Update only IPA profile.
4666         * ipa-devirt.c (ipa_devirt): Use IPA profile.
4667         * ipa-fnsummary.c (redirect_to_unreachable): Do not set frequrency.
4668         (dump_ipa_call_summary): Use frequency function.
4669         (estimate_edge_size_and_time): Use frequency function.
4670         (ipa_merge_fn_summary_after_inlining): Use frequency function.
4671         * ipa-inline-analysis.c (do_estimate_edge_time): Use IPA profile.
4672         * ipa-inline-transform.c (update_noncloned_frequencies): Rename to ..
4673         (update_noncloned_counts): ... ths one; scale counts only.
4674         (clone_inlined_nodes): Do not scale frequency.
4675         (inline_call): Do not pass frequency.
4676         * ipa-inline.c (compute_uninlined_call_time): Use IPA profile.
4677         (compute_inlined_call_time): Use IPA profile.
4678         (want_inline_small_function_p): Use IPA profile.
4679         (want_inline_self_recursive_call_p): Use IPA profile.
4680         (edge_badness): Use IPA profile.
4681         (lookup_recursive_calls): Use IPA profile.
4682         (recursive_inlining): Do not pass frequency.
4683         (resolve_noninline_speculation): Do not update frequency.
4684         (inline_small_functions): Collect max of IPA profile.
4685         (dump_overall_stats): Dump IPA porfile.
4686         (dump_inline_stats): Dump IPA porfile.
4687         (ipa_inline): Collect IPA stats.
4688         * ipa-inline.h (clone_inlined_nodes): Update prototype.
4689         * ipa-profile.c (ipa_propagate_frequency_1): Use frequency function.
4690         (ipa_propagate_frequency): Use frequency function.
4691         (ipa_profile): Cleanup.
4692         * ipa-prop.c (ipa_make_edge_direct_to_target): Do not pass frequency
4693         * ipa-utils.c (ipa_merge_profiles): Merge all profiles.
4694         * lto-cgraph.c (lto_output_edge): Do not stream frequency.
4695         (input_node): Do not stream frequency.
4696         (input_edge): Do not stream frequency.
4697         (merge_profile_summaries): Scale only IPA profiles.
4698         * omp-simd-clone.c (simd_clone_adjust): Do not pass frequency.
4699         * predict.c (drop_profile): Do not recompute frequency.
4700         * trans-mem.c (ipa_tm_insert_irr_call): Do not pass frequency.
4701         (ipa_tm_insert_gettmclone_call): Do not pass frequency.
4702         * tree-cfg.c (execute_fixup_cfg): Drop profile to global0 if needed.
4703         * tree-chkp.c (chkp_copy_bounds_for_assign): Do not pass frequency.
4704         * tree-emutls.c (gen_emutls_addr): Do not pass frequency.
4705         * tree-inline.c (copy_bb): Do not scale frequency.
4706         (expand_call_inline): Do not scale frequency.
4707         (tree_function_versioning): Do not scale frequency.
4708         * ubsan.c (ubsan_create_edge): Do not pass frequency.
4710 2017-11-10  Julia Koval  <julia.koval@intel.com>
4712         * config/i386/gfniintrin.h (_mm_gf2p8affine_epi64_epi8)
4713         (_mm256_gf2p8affine_epi64_epi8, _mm_mask_gf2p8affine_epi64_epi8)
4714         (_mm_maskz_gf2p8affine_epi64_epi8, _mm256_mask_gf2p8affine_epi64_epi8)
4715         (_mm256_maskz_gf2p8affine_epi64_epi8)
4716         (_mm512_mask_gf2p8affine_epi64_epi8, _mm512_gf2p8affine_epi64_epi8)
4717         (_mm512_maskz_gf2p8affine_epi64_epi8): New intrinsics.
4718         * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8affineqb_v64qi)
4719         (__builtin_ia32_vgf2p8affineqb_v32qi)
4720         (__builtin_ia32_vgf2p8affineqb_v16qi): New builtins.
4721         * config/i386/sse.md (vgf2p8affineqb_<mode><mask_name>): New pattern.
4723 2017-11-10  Tamar Christina  <tamar.christina@arm.com>
4725         PR target/82641
4726         * config/arm/arm.c
4727         (arm_option_override): Refactor.
4728         (arm_option_reconfigure_globals): New.
4729         (arm_options_perform_arch_sanity_checks): New.
4730         * config/arm/arm-protos.h (arm_option_reconfigure_globals):
4731         New prototype.
4732         (arm_options_perform_arch_sanity_checks): Likewise
4734 2017-11-10  Pat Haugen  <pthaugen@us.ibm.com>
4736         * rs6000/power9.md (power9-qpdiv): Correct DFU pipe usage.
4737         (power9-qpmul): New.
4738         * rs6000/rs6000.md ("type" attr): Add qmul.
4739         (mul<mode>3, fma<mode>4_hw, *fms<mode>4_hw, *nfma<mode>4_hw,
4740         *nfms<mode>4_hw, mul<mode>3_odd, fma<mode>4_odd, *fms<mode>4_odd,
4741         *nfma<mode>4_odd, *nfms<mode>4_odd): Change type to qmul.
4743 2017-11-10  Martin Sebor  <msebor@redhat.com>
4745         PR c/81117
4746         * builtins.c (compute_objsize): Handle arrays that
4747         compute_builtin_object_size likes to fail for.  Make extern.
4748         * builtins.h (compute_objsize): Declare.
4749         (check_strncpy_sizes): New function.
4750         (expand_builtin_strncpy): Call check_strncpy_sizes.
4751         * gimple-fold.c (gimple_fold_builtin_strncpy): Implement
4752         -Wstringop-truncation.
4753         (gimple_fold_builtin_strncat): Same.
4754         * gimple.c (gimple_build_call_from_tree): Set call location.
4755         * tree-ssa-strlen.c (strlen_to_stridx): New global variable.
4756         (maybe_diag_bound_equal_length, is_strlen_related_p): New functions.
4757         (handle_builtin_stxncpy, handle_builtin_strncat): Same.
4758         (handle_builtin_strlen): Use strlen_to_stridx.
4759         (strlen_optimize_stmt): Handle flavors of strncat, strncpy, and
4760         stpncpy.
4761         Use strlen_to_stridx.
4762         (pass_strlen::execute): Release strlen_to_stridx.
4763         * doc/invoke.texi (-Wsizeof-pointer-memaccess): Document enhancement.
4764         (-Wstringop-truncation): Document new option.
4766 2017-11-10  Martin Liska  <mliska@suse.cz>
4768         PR gcov-profile/82702
4769         * gcov.c (main): Handle intermediate files in a different
4770         way.
4771         (get_gcov_intermediate_filename): New function.
4772         (output_gcov_file): Remove support of intermediate files.
4773         (generate_results): Allocate intermediate file.
4774         (release_structures): Clean-up properly fn_end.
4775         (output_intermediate_file): Start iterating with line 1.
4777 2017-11-10  Jakub Jelinek  <jakub@redhat.com>
4779         PR tree-optimization/82929
4780         * gimple-ssa-store-merging.c (struct store_immediate_info): Add
4781         ops_swapped_p non-static data member.
4782         (store_immediate_info::store_immediate_info): Clear it.
4783         (imm_store_chain_info::coalesce_immediate_stores): If swapping
4784         ops set ops_swapped_p.
4785         (count_multiple_uses): Handle ops_swapped_p.
4787 2017-11-10  Martin Liska  <mliska@suse.cz>
4789         * coverage.c (coverage_init): Stream information about
4790         support of has_unexecuted_blocks.
4791         * doc/gcov.texi: Document that.
4792         * gcov-dump.c (dump_gcov_file): Support it in gcov_dump tool.
4793         * gcov.c (read_graph_file): Likewise.
4794         (output_line_beginning): Fix a small issue with
4795         color output.
4797 2017-11-10  Bin Cheng  <bin.cheng@arm.com>
4799         * tree-predcom.c (determine_roots_comp): Avoid memory leak by freeing
4800         reference of trivial component.
4802 2017-11-10  Jakub Jelinek  <jakub@redhat.com>
4804         PR bootstrap/82916
4805         * gimple-ssa-store-merging.c
4806         (pass_store_merging::terminate_all_aliasing_chains): For
4807         gimple_store_p stmts also call refs_output_dependent_p.
4809         PR rtl-optimization/82913
4810         * compare-elim.c (try_merge_compare): Punt if def_insn is not
4811         single set.
4813 2017-11-09  Jeff Law  <law@redhat.com>
4815         * vr-values.h: New file with vr_values class.
4816         * tree-vrp.c: Include vr-values.h
4817         (vrp_value_range_pool, vrp_equiv_obstack, num_vr_values): Move static
4818         data objects into the vr_values class.
4819         (vr_value, values_propagated, vr_phi_edge_counts): Likewise.
4820         (get_value_range): Make it a member function within vr_values class.
4821         (set_defs_to_varying, update_value_range, add_equivalence): Likewise.
4822         (vrp_stmt_computes_nonzero_p, op_with_boolean_value_range_p): Likewise.
4823         (op_with_constant_singleton_value_range): Likewise.
4824         (extract_range_for_var_from_comparison_expr): Likewise.
4825         (extract_range_from_assert, extract_range_from_ssa_name): Likewise.
4826         (extract_range_from_binary_expr): Likewise.
4827         (extract_range_from_unary_expr): Likewise.
4828         (extract_range_from_cond_expr, extrat_range_from_comparison): Likewise.
4829         (check_for_binary_op_overflow, extract_range_basic): Likewise.
4830         (extract_range_from_assignment, adjust_range_with_scev): Likewise.
4831         (dump_all_value_ranges, get_vr_for_comparison): Likewise.
4832         (compare_name_with_value, compare_names): Likewise.
4833         (vrp_evaluate_conditional_warnv_with_ops_using_ranges): Likewise.
4834         (vrp_evaluate_conditional_warnv_with_ops): Likewise.  Remove prototype.
4835         (vrp_evaluate_conditional, vrp_visit_cond_stmt): Likewise.
4836         (vrp_visit_switch_stmt, extract_range_from_stmt): Likewise.
4837         (extract_range_from_phi_node): Likewise.
4838         (simplify_truth_ops_using_ranges): Likewise.
4839         (simplify_div_or_mod_using_ranges): Likewise.
4840         (simplify_min_or_max_using_ranges, simplify_abs_using_ranges): Likewise.
4841         (simplify_bit_ops_using_ranges, simplify_cond_using_ranges_1): Likewise.
4842         (simplify_cond_using_ranges_2, simplify_switch_using_ranges): Likewise.
4843         (simplify_float_conversion_using_ranges): Likewise.
4844         (simplify_internal_call_using_ranges): Likewise.
4845         (two_valued_val_range_p, simplify_stmt_using_ranges): Likewise.
4846         (vrp_visit_assignment_or_call): Likewise.  Smuggle class instance
4847         poitner via x_vr_values for calls into gimple folder.
4848         (vrp_initialize_lattice): Make this the vr_values ctor.
4849         (vrp_free_lattice): Make this the vr_values dtor.
4850         (set_vr_value): New function.
4851         (class vrp_prop): Add vr_values data member.  Add various member
4852         functions as well as member functions that delegate to vr_values.
4853         (check_array_ref): Make a member function within vrp_prop class.
4854         (search_for_addr_array, vrp_initialize): Likewise.
4855         (vrp_finalize): Likewise.  Revamp to avoid direct access to
4856         vr_value, values_propagated, etc.
4857         (check_array_bounds): Extract vrp_prop class instance pointer from
4858         walk info structure.  Use it to call member functions.
4859         (check_all_array_refs): Make a member function within vrp_prop class.
4860         Smuggle class instance pointer via walk info structure.
4861         (x_vr_values): New local static.
4862         (vrp_valueize): Use x_vr_values to get class instance.
4863         (vr_valueize_1): Likewise.
4864         (class vrp_folder): Add vr_values data member.  Add various member
4865         functions as well as member functions that delegate to vr_values.
4866         (fold_predicate_in): Make a mber fucntion within vrp_folder class.
4867         (simplify_stmt_for_jump_threading): Extract smuggled vr_values
4868         class instance from vr_values.  Use it to call member functions.
4869         (vrp_dom_walker): Add vr_values data member.
4870         (vrp_dom_walker::after_dom_children): Smuggle vr_values class
4871         instance via x_vr_values.
4872         (identify_jump_threads): Accept vr_values as argument.  Store
4873         it into the walker structure.
4874         (evrp_dom_walker): Add vr_values class data member.  Add various
4875         delegators.
4876         (evrp_dom_walker::try_find_new_range): Use vr_values data
4877         member to access the memory allocator.
4878         (evrp_dom_walker::before_dom_children): Store vr_values class
4879         instance into the vrp_folder class.
4880         (evrp_dom_walker::push_value_range): Rework to avoid direct
4881         access to num_vr_values and vr_value.
4882         (evrp_dom_walker::pop_value_range): Likewise.
4883         (execute_early_vrp): Remove call to vrp_initialize_lattice.
4884         Use vr_values to get to dump_all_value_ranges member function.
4885         Remove call to vrp_free_lattice.  Call vrp_initialize, vrp_finalize,
4886         and simplify_cond_using_ranges_2 via vrp_prop class instance.
4887         Pass vr_values class instance down to identify_jump_threads.
4888         Remove call to vrp_free_lattice.
4889         (debug_all_value_ranges): Remove.
4891         * tree-vrp.c (vrp_prop): Move class to earlier point in the file.
4892         (vrp_folder): Likewise.
4894         * tree-vrp.c (set_value_range): Do not reference vrp_equiv_obstack.
4895         Get it from the existing bitmap instead.
4896         (vrp_intersect_ranges_1): Likewise.
4898 2017-11-09  Jakub Jelinek  <jakub@redhat.com>
4900         * gimple-ssa-store-merging.c (struct store_immediate_info): Add
4901         bit_not_p field.
4902         (store_immediate_info::store_immediate_info): Add bitnotp argument,
4903         set bit_not_p to it.
4904         (imm_store_chain_info::coalesce_immediate_stores): Break group
4905         if bit_not_p is different.
4906         (count_multiple_uses, split_group,
4907         imm_store_chain_info::output_merged_store): Handle info->bit_not_p.
4908         (handled_load): Avoid multiple chained BIT_NOT_EXPRs.
4909         (pass_store_merging::process_store): Handle BIT_{AND,IOR,XOR}_EXPR
4910         result inverted using BIT_NOT_EXPR, compute bit_not_p, pass it
4911         to store_immediate_info ctor.
4913 2017-11-09  Jim Wilson  <jimw@sifive.com>
4915         * collect2.c (OBJECT_FORMAT_COFF): Remove EXTENDED_COFF support.
4916         (scan_prog_file): Likewise.
4918 2017-11-09  Jan Hubicka  <hubicka@ucw.cz>
4920         * bb-reorder.c (max_entry_frequency): Remove.
4921         (find_traces, rotate_loop, mark_bb_visited, connect_better_edge_p,
4922         connect_traces, push_to_next_round_p): Remove prototypes.
4923         (find_traces_1_round): Use counts only.
4924         (push_to_next_round_p): Likewise.
4925         (find_traces): Likewise.
4926         (rotate_loop): Likewise.
4927         (find_traces_1_round): Likewise.
4928         (connect_traces): Likewise.
4929         (edge_order): Likewise.
4931 2017-11-09  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4933         * config/arm/arm.c (output_return_instruction): Add comments to
4934         indicate requirement for cmse_nonsecure_entry return to account
4935         for the size of clearing instruction output here.
4936         (thumb_exit): Likewise.
4937         * config/arm/thumb2.md (thumb2_cmse_entry_return): Fix length for
4938         return in hardfloat mode.
4940 2017-11-09  Segher Boessenkool  <segher@kernel.crashing.org>
4942         * config/rs6000/rs6000.c (machine_function): Add a bool,
4943         "toc_is_wrapped_separately".
4944         (rs6000_option_override_internal): Enable OPTION_MASK_SAVE_TOC_INDIRECT
4945         if it wasn't explicitly set or unset, we are optimizing for speed, and
4946         doing separate shrink-wrapping.
4947         (rs6000_get_separate_components): Enable the TOC component if
4948         saving the TOC register in the prologue.
4949         (rs6000_components_for_bb): Handle the TOC component.
4950         (rs6000_emit_prologue_components): Store the TOC register where needed.
4951         (rs6000_set_handled_components): Mark TOC as handled, if handled.
4952         (rs6000_emit_prologue): Don't save the TOC if that is already done.
4954 2017-11-09  Martin Jambor  <mjambor@suse.cz>
4956         * ipa-param-manipulation.c: New file.
4957         * ipa-param-manipulation.h: Likewise.
4958         * Makefile.in (OBJS): Add ipa-param-manipulation.o.
4959         (PLUGIN_HEADERS): Addded ipa-param-manipulation.h
4960         * ipa-param.h (ipa_parm_op): Moved to ipa-param-manipulation.h.
4961         (ipa_parm_adjustment): Likewise.
4962         (ipa_parm_adjustment_vec): Likewise.
4963         (ipa_get_vector_of_formal_parms): Moved declaration to
4964         ipa-param-manipulation.h.
4965         (ipa_get_vector_of_formal_parm_types): Likewise.
4966         (ipa_modify_formal_parameters): Likewise.
4967         (ipa_modify_call_arguments): Likewise.
4968         (ipa_combine_adjustments): Likewise.
4969         (ipa_dump_param_adjustments): Likewise.
4970         (ipa_modify_expr): Likewise.
4971         (ipa_get_adjustment_candidate): Likewise.
4972         * ipa-prop.c (ipa_get_vector_of_formal_parms): Moved to
4973         ipa-param-manipulation.c.
4974         (ipa_get_vector_of_formal_parm_types): Likewise.
4975         (ipa_modify_formal_parameters): Likewise.
4976         (ipa_modify_call_arguments): Likewise.
4977         (ipa_modify_expr): Likewise.
4978         (get_ssa_base_param): Likewise.
4979         (ipa_get_adjustment_candidate): Likewise.
4980         (index_in_adjustments_multiple_times_p): Likewise.
4981         (ipa_combine_adjustments): Likewise.
4982         (ipa_dump_param_adjustments): Likewise.
4983         * tree-sra.c: Also include ipa-param-manipulation.h
4984         * omp-simd-clone.c: Include ipa-param-manipulation.h instead of
4985         ipa-param.h.
4987 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
4988             Alan Hayward  <alan.hayward@arm.com>
4989             David Sherwood  <david.sherwood@arm.com>
4991         * doc/sourcebuild.texi (vect_masked_store): Document.
4993 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
4994             Alan Hayward  <alan.hayward@arm.com>
4995             David Sherwood  <david.sherwood@arm.com>
4997         * doc/sourcebuild.texi (vect_align_stack_vars): Document.
4999 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
5000             Alan Hayward  <alan.hayward@arm.com>
5001             David Sherwood  <david.sherwood@arm.com>
5003         * doc/sourcebuild.texi (vect_variable_length): Document.
5005 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
5006             Alan Hayward  <alan.hayward@arm.com>
5007             David Sherwood  <david.sherwood@arm.com>
5009         * doc/sourcebuild.texi (vect_unaligned_possible): Document.
5011 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
5012             Alan Hayward  <alan.hayward@arm.com>
5013             David Sherwood  <david.sherwood@arm.com>
5015         * doc/sourcebuild.texi (vect_element_align_preferred): Document.
5017 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
5018             Alan Hayward  <alan.hayward@arm.com>
5019             David Sherwood  <david.sherwood@arm.com>
5021         * doc/sourcebuild.texi (vect_perm_short, vect_perm_byte): Document
5022         previously undocumented selectors.
5023         (vect_perm3_byte, vect_perm3_short, vect_perm3_int): Document.
5025 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
5027         * doc/rtl.texi (const_vector): Say that elements can be
5028         const_wide_ints too.
5029         * emit-rtl.h (valid_for_const_vec_duplicate_p): Declare.
5030         * emit-rtl.c (valid_for_const_vec_duplicate_p): New function.
5031         (gen_vec_duplicate): Use it instead of CONSTANT_P.
5032         * optabs.c (expand_vector_broadcast): Likewise.
5034 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
5035             Alan Hayward  <alan.hayward@arm.com>
5036             David Sherwood  <david.sherwood@arm.com>
5038         * tree-ssa-loop-ivopts.c (get_address_cost): Try using a
5039         scaled index even if the unscaled address was invalid.
5040         Don't increase the complexity of using a scale in that case.
5042 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
5043             Alan Hayward  <alan.hayward@arm.com>
5044             David Sherwood  <david.sherwood@arm.com>
5046         * doc/rtl.texi: Rewrite the subreg rules so that they partition
5047         the inner register into REGMODE_NATURAL_SIZE bytes rather than
5048         UNITS_PER_WORD bytes.
5049         * emit-rtl.c (validate_subreg): Divide subregs into blocks
5050         based on REGMODE_NATURAL_SIZE of the inner mode.
5051         (gen_lowpart_common): Split the SCALAR_FLOAT_MODE_P and
5052         !SCALAR_FLOAT_MODE_P cases.  Use REGMODE_NATURAL_SIZE for the latter.
5053         * expmed.c (lowpart_bit_field_p): Divide the value up into
5054         chunks of REGMODE_NATURAL_SIZE rather than UNITS_PER_WORD.
5055         * expr.c (store_constructor): Use REGMODE_NATURAL_SIZE to test
5056         whether something is likely to occupy more than one register.
5058 2017-11-09  Jan Hubicka  <hubicka@ucw.cz>
5060         PR ipa/82879
5061         * ipa-inline-transform.c (update_noncloned_frequencies): Use
5062         profile_count::adjust_for_ipa_scaling.
5063         * tree-inline.c (copy_bb, copy_cfg_body): Likewise.
5064         * profile-count.c (profile_count::adjust_for_ipa_scaling): New member
5065         function.
5066         * profile-count.h (profile_count::adjust_for_ipa_scaling): Declare.
5068 2017-11-09  Jakub Jelinek  <jakub@redhat.com>
5070         * gimple-ssa-store-merging.c (count_multiple_uses): New function.
5071         (split_group): Add total_orig and total_new arguments, estimate the
5072         number of statements related to the store group without store merging
5073         and with store merging.
5074         (imm_store_chain_info::output_merged_store): Adjust split_group
5075         callers, punt if estimated number of statements with store merging
5076         is not smaller than estimated number of statements without it.
5077         Formatting fix.
5078         (handled_load): Remove has_single_use checks.
5079         (pass_store_merging::process_store): Likewise.
5081 2017-11-09  Richard Biener  <rguenther@suse.de>
5083         PR tree-optimization/82902
5084         * tree-ssa-phiprop.c (propagate_with_phi): Test proper type.
5086 2017-11-09  Martin Liska  <mliska@suse.cz>
5088         PR target/82863
5089         * emit-rtl.c (init_emit_regs): Initialize split_branch_probability to
5090         uninitialized.
5092 2017-11-09  Martin Liska  <mliska@suse.cz>
5094         PR tree-optimization/82669
5095         * sbitmap.h (bmp_iter_set_init): Remove non needed check.
5097 2017-11-09  Martin Liska  <mliska@suse.cz>
5099         PR gcov-profile/48463
5100         * coverage.c (coverage_begin_function): Output also end locus
5101         of a function and information whether the function is
5102         artificial.
5103         * gcov-dump.c (tag_function): Parse and print the information.
5104         * gcov.c (INCLUDE_MAP): Add include.
5105         (INCLUDE_SET): Likewise.
5106         (struct line_info): Move earlier in the source file because
5107         of vector<line_info> in function_info structure.
5108         (line_info::line_info): Likewise.
5109         (line_info::has_block): Likewise.
5110         (struct source_info): Add new member index.
5111         (source_info::get_functions_at_location): New function.
5112         (function_info::group_line_p): New function.
5113         (output_intermediate_line): New function.
5114         (output_intermediate_file): Use the mentioned function.
5115         (struct function_start): New.
5116         (struct function_start_pair_hash): Likewise.
5117         (process_file): Add code that identifies group functions.
5118         Assign lines either to global or function scope.
5119         (generate_results): Skip artificial functions.
5120         (find_source): Assign index for each source file.
5121         (read_graph_file): Read new flag artificial and end_line.
5122         (add_line_counts): Assign it either to global of function scope.
5123         (accumulate_line_counts): Isolate core of the function to
5124         accumulate_line_info and call it for both function and global
5125         scope lines.
5126         (accumulate_line_info): New function.
5127         (output_line_beginning): Fix GNU coding style.
5128         (print_source_line): New function.
5129         (output_line_details): Likewise.
5130         (output_function_details): Likewise.
5131         (output_lines): Iterate both source (global) scope and function
5132         scope.
5133         (struct function_line_start_cmp): New class.
5134         * doc/gcov.texi: Reflect changes in documentation.
5136 2017-11-09  Jakub Jelinek  <jakub@redhat.com>
5138         PR debug/82837
5139         * dwarf2out.c (const_ok_for_output_1): Reject NEG in addition to NOT.
5140         (mem_loc_descriptor): Handle (const (neg (...))) as (neg (const (...)))
5141         and similarly for not instead of neg.
5143 2017-11-08  Andi Kleen  <ak@linux.intel.com>
5145         * config/i386/i386.opt: Add -mforce-indirect-call.
5146         * config/i386/predicates.md: Check for flag_force_indirect_call.
5147         * doc/invoke.texi: Document -mforce-indirect-call
5149 2017-11-08  Kito Cheng  <kito.cheng@gmail.com>
5151         * config/riscv/riscv-protos.h (riscv_slow_unaligned_access_p):
5152         New extern.
5153         (MOVE_RATIO): Use riscv_slow_unaligned_access_p.
5154         config/riscv/riscv.c (predict.h): New include.
5155         (riscv_slow_unaligned_access_p): No longer static.
5156         (riscv_block_move_straight): Add require.
5157         * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): Delete.
5159 2017-11-08  Jakub Jelinek  <jakub@redhat.com>
5161         PR target/82855
5162         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>,
5163         <avx512>_eq<mode>3<mask_scalar_merge_name>_1): Use
5164         nonimmediate_operand predicate for operand 1 instead of
5165         register_operand.
5167 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5169         * config/aarch64/aarch64-simd.md (store_pair_lanes<mode>):
5170         New pattern.
5171         * config/aarch64/constraints.md (Uml): New constraint.
5172         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): New
5173         predicate.
5175 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5177         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
5178         of two vec_duplicates into a vec_concat.
5180 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5182         * simplify-rtx.c (simplify_ternary_operation, VEC_MERGE):
5183         Simplify vec_merge of vec_duplicate and vec_concat.
5184         * config/aarch64/constraints.md (Utq): New constraint.
5185         * config/aarch64/aarch64-simd.md (load_pair_lanes<mode>): New
5186         define_insn.
5188 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5190         * simplify-rtx.c (simplify_ternary_operation, VEC_MERGE):
5191         Simplify vec_merge of vec_duplicate and const_vector.
5192         * config/aarch64/predicates.md (aarch64_simd_or_scalar_imm_zero):
5193         New predicate.
5194         * config/aarch64/aarch64-simd.md (*aarch64_combinez<mode>): Use VDC
5195         mode iterator.  Update predicate on operand 1 to
5196         handle non-const_vec constants.  Delete constraints.
5197         (*aarch64_combinez_be<mode>): Likewise for operand 2.
5199 2017-11-08  Jakub Jelinek  <jakub@redhat.com>
5201         PR tree-optimization/78821
5202         * gimple-ssa-store-merging.c (struct store_operand_info): Add bit_not_p
5203         data member.
5204         (store_operand_info::store_operand_info): Initialize it to false.
5205         (pass_store_merging::terminate_all_aliasing_chains): Rewritten to use
5206         ref_maybe_used_by_stmt_p and stmt_may_clobber_ref_p on lhs of each
5207         store in the group, and if chain_info is non-NULL, to ignore altogether
5208         that chain.
5209         (compatible_load_p): Fail if bit_not_p does not match.
5210         (imm_store_chain_info::output_merged_store): Handle bit_not_p loads.
5211         (handled_load): Fill in bit_not_p.  Handle BIT_NOT_EXPR.
5212         (pass_store_merging::process_store): Adjust
5213         terminate_all_aliasing_chains calls to pass NULL in all current spots,
5214         call terminate_all_aliasing_chains newly when adding a store into
5215         a chain with non-NULL chain_info.
5217 2017-11-08  Wilco Dijkstra  <wdijkstr@arm.com>
5219         * config/aarch64/aarch64.c (aarch64_can_eliminate): Simplify logic.
5221 2017-11-08  Wilco Dijkstra  <wdijkstr@arm.com>
5223         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
5224         Remove.
5225         (aarch64_layout_frame): Initialise emit_frame_chain.
5226         (aarch64_can_eliminate): Remove omit leaf frame pointer code.
5227         (TARGET_FRAME_POINTER_REQUIRED): Remove define.
5229 2017-11-08  Martin Liska  <mliska@suse.cz>
5231         * gimplify.c (expand_FALLTHROUGH_r): Simplify usage
5232         of gimple_call_internal_p.
5234 2017-11-07  Tom de Vries  <tom@codesourcery.com>
5236         * config/mips/mips.h (ASM_OUTPUT_LABELREF): Wrap in "do {} while (0)".
5238 2017-11-07  Tom de Vries  <tom@codesourcery.com>
5240         * config/mips/mips.h (ASM_OUTPUT_CASE_END): Remove semicolon after
5241         "do {} while (0)".
5243 2017-11-08  Martin Liska  <mliska@suse.cz>
5245         PR sanitizer/82792
5246         * gimplify.c (expand_FALLTHROUGH_r): Skip IFN_ASAN_MARK.
5248 2017-11-07  Eric Botcazou  <ebotcazou@adacore.com>
5250         * gimple-pretty-print.c (dump_profile): Return "" instead of NULL.
5252 2017-11-07  Jakub Jelinek  <jakub@redhat.com>
5254         PR target/82855
5255         * config/i386/i386.md (SWI1248_AVX512BWDQ2_64): New mode iterator.
5256         (*cmp<mode>_ccz_1): New insn with $k alternative.
5258         PR target/82855
5259         * config/i386/i386.c (ix86_swap_binary_operands_p): Treat
5260         RTX_COMM_COMPARE as commutative as well.
5261         (ix86_binary_operator_ok): Formatting fix.
5262         * config/i386/sse.md (*mul<mode>3<mask_name><round_name>,
5263         *<code><mode>3<mask_name><round_saeonly_name>,
5264         *<code><mode>3<mask_name>, *<code>tf3, *mul<mode>3<mask_name>,
5265         *<s>mul<mode>3_highpart<mask_name>,
5266         *vec_widen_umult_even_v16si<mask_name>,
5267         *vec_widen_umult_even_v8si<mask_name>,
5268         *vec_widen_umult_even_v4si<mask_name>,
5269         *vec_widen_smult_even_v16si<mask_name>,
5270         *vec_widen_smult_even_v8si<mask_name>, *sse4_1_mulv2siv2di3<mask_name>,
5271         *avx2_pmaddwd, *sse2_pmaddwd, *<sse4_1_avx2>_mul<mode>3<mask_name>,
5272         *avx2_<code><mode>3, *avx512f_<code><mode>3<mask_name>,
5273         *sse4_1_<code><mode>3<mask_name>, *<code>v8hi3,
5274         *sse4_1_<code><mode>3<mask_name>, *<code>v16qi3, *avx2_eq<mode>3,
5275         <avx512>_eq<mode>3<mask_scalar_merge_name>_1, *sse4_1_eqv2di3,
5276         *sse2_eq<mode>3, <mask_codefor><code><mode>3<mask_name>,
5277         *<code><mode>3, *<sse2_avx2>_uavg<mode>3<mask_name>,
5278         *<ssse3_avx2>_pmulhrsw<mode>3<mask_name>, *ssse3_pmulhrswv4hi3): Use
5279         !(MEM_P (operands[1]) && MEM_P (operands[2])) condition instead of
5280         ix86_binary_operator_ok.  Formatting fixes.
5281         (*<plusminus_insn><mode>3<mask_name><round_name>,
5282         *<plusminus_insn><mode>3, *<plusminus_insn><mode>3_m): Formatting
5283         fixes.
5285 2017-11-07  Segher Boessenkool  <segher@kernel.crashing.org>
5287         * config/rs6000/rs6000.md (GPR2): New mode_iterator.
5288         ("cstore<mode>4"): Don't always expand with rs6000_emit_int_cmove for
5289         eq and ne if TARGET_ISEL.
5290         (cmp): New code_iterator.
5291         (UNS, UNSU_, UNSIK): New code_attrs.
5292         (<code><GPR:mode><GPR2:mode>2_isel): New define_insn_and_split.
5293         ("eq<mode>3"): New define_expand, rename the define_insn_and_split
5294         to...
5295         ("eq<mode>3"): ... this.
5296         ("ne<mode>3"): New define_expand, rename the define_insn_and_split
5297         to...
5298         ("ne<mode>3"): ... this.
5300 2017-11-07  Julia Koval  <julia.koval@intel.com>
5302         PR target/82812
5303         * common/config/i386/i386-common.c
5304         (OPTION_MASK_ISA_GENERAL_REGS_ONLY_UNSET): Remove MPX from flag.
5305         (ix86_handle_option): Move MPX to isa_flags2 and GFNI to isa_flags.
5306         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto.
5307         * config/i386/i386.opt: Ditto.
5308         * config/i386/i386.c (ix86_target_string): Ditto.
5309         (ix86_option_override_internal): Ditto.
5310         (ix86_init_mpx_builtins): Move MPX to args2.
5311         (ix86_expand_builtin): Special handling for OPTION_MASK_ISA_GFNI.
5312         * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8affineinvqb_v64qi,
5313         __builtin_ia32_vgf2p8affineinvqb_v64qi_mask,
5314         __builtin_ia32_vgf2p8affineinvqb_v32qi,
5315         __builtin_ia32_vgf2p8affineinvqb_v32qi_mask,
5316         __builtin_ia32_vgf2p8affineinvqb_v16qi,
5317         __builtin_ia32_vgf2p8affineinvqb_v16qi_mask): Move to ARGS array.
5319 2017-11-07  Uros Bizjak  <ubizjak@gmail.com>
5321         PR target/80425
5322         * config/i386.i386.md (*zero_extendsidi2): Change (?r,*Yj), (?*Yi,r)
5323         and (*x,m) to ($r,Yj), ($Yi,r) and ($x,m).
5324         (zero-extendsidi peephole2): Remove peephole.
5326 2017-11-07  Eric Botcazou  <ebotcazou@adacore.com>
5328         PR c/53037
5329         * stor-layout.c: Include attribs.h.
5330         (handle_warn_if_not_align): Replace test on TYPE_USER_ALIGN with
5331         explicit lookup of "aligned" attribute.
5333 2017-11-07  Andrew Waterman  <andrew@sifive.com>
5335         * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): New prototype.
5336         (riscv_expand_block_move): Likewise.
5337         * config/riscv/riscv.h (MOVE_RATIO): Tune cost to movmemsi
5338         implementation.
5339         (RISCV_MAX_MOVE_BYTES_PER_LOOP_ITER): New define.
5340         (RISCV_MAX_MOVE_BYTES_STRAIGHT): New define.
5341         * config/riscv/riscv.c (riscv_block_move_straight): New function.
5342         (riscv_adjust_block_mem): Likewise.
5343         (riscv_block_move_loop): Likewise.
5344         (riscv_expand_block_move): Likewise.
5345         * config/riscv/riscv.md (movmemsi): New pattern.
5347 2017-11-07  Michael Clark  <michaeljclark@mac.com>
5349         * config/riscv/linux.h (MUSL_ABI_SUFFIX): New define.
5350         (MUSL_DYNAMIC_LINKER): Likewise.
5352 2017-11-07  Richard Sandiford  <richard.sandiford@linaro.org>
5354         * config/aarch64/aarch64.md (ashl<mode>3, ashr<mode>3, lshr<mode>3)
5355         (rotr<mode>3, rotl<mode>3): Use aarch64_reg_or_imm instead of
5356         nonmmory_operand.
5358 2017-11-07  Richard Biener  <rguenther@suse.de>
5360         * match.pd: Fix build.
5362 2017-11-07  Wilco Dijkstra  <wdijkstr@arm.com>
5363             Jackson Woodruff  <jackson.woodruff@arm.com>
5365         PR tree-optimization/71026
5366         * match.pd: Canonicalize negate in division.
5368 2017-11-07  Sudakshina Das  <sudi.das@arm.com>
5370         PR middle-end/80131
5371         * match.pd: Simplify 1 << (C - x) where C = precision (x) - 1.
5373 2017-11-07  Marc Glisse  <marc.glisse@inria.fr>
5375         * match.pd ((a&~b)|(a^b),(a&~b)^~a,(a|b)&~(a^b),a|~(a^b),
5376         (a|b)|(a&^b),(a&b)|~(a^b),~(~a&b),~X^Y): New transformations.
5378 2017-11-07  Marc Glisse  <marc.glisse@inria.fr>
5380         * fold-const.c (negate_expr_p) [PLUS_EXPR, MINUS_EXPR]: Handle
5381         non-scalar integral types.
5382         * match.pd (negate_expr_p): Handle MINUS_EXPR.
5383         (-(A-B), -(~A)): New transformations.
5385 2017-11-07  Tom de Vries  <tom@codesourcery.com>
5387         * config/powerpcspe/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Remove
5388         semicolon after "do {} while (0)".
5389         * config/powerpcspe/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
5390         * config/powerpcspe/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
5391         * config/powerpcspe/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
5392         * config/powerpcspe/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
5393         * config/powerpcspe/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
5395 2017-11-07  Tom de Vries  <tom@codesourcery.com>
5397         * config/rs6000/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Remove semicolon
5398         after "do {} while (0)".
5399         * config/rs6000/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
5400         * config/rs6000/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
5401         * config/rs6000/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
5402         * config/rs6000/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
5403         * config/rs6000/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
5405 2017-11-07  Tom de Vries  <tom@codesourcery.com>
5407         PR other/82784
5408         * config/arm/arm.c (HANDLE_NARROW_SHIFT_ARITH): Remove semicolon after
5409         "while {} do (0)".
5410         (arm_rtx_costs_internal): Add missing semicolon after
5411         HANDLE_NARROW_SHIFT_ARITH call.
5413 2017-11-06  Segher Boessenkool  <segher@kernel.crashing.org>
5415         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
5416         disable isel if it was not set explicitly.
5418 2017-11-06  James Bowman  <james.bowman@ftdichip.com>
5420         * gcc/dwarf2out.c (modified_type_die): Retain ADDR_SPACE qualifiers.
5421         (add_type_attribute) likewise.
5423 2017-11-06  H.J. Lu  <hongjiu.lu@intel.com>
5425         * config/i386/i386.c (ix86_can_use_return_insn_p): Use reference
5426         of struct ix86_frame.
5427         (ix86_initial_elimination_offset): Likewise.
5428         (ix86_expand_split_stack_prologue): Likewise.
5430 2017-11-06  Marc Glisse  <marc.glisse@inria.fr>
5432         * tree-vrp.h (enum value_range_type): Update stale comment.
5434 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
5435             Alan Hayward  <alan.hayward@arm.com>
5436             David Sherwood  <david.sherwood@arm.com>
5438         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm)
5439         (aarch64_expand_vec_perm_const): Take the number of units too.
5440         * config/aarch64/aarch64.c (aarch64_expand_vec_perm)
5441         (aarch64_expand_vec_perm_const): Likewise.
5442         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>)
5443         (vec_perm<mode>): Update accordingly.
5445 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
5446             Alan Hayward  <alan.hayward@arm.com>
5447             David Sherwood  <david.sherwood@arm.com>
5449         * config/aarch64/aarch64-protos.h (aarch64_simd_vect_par_cnst_half):
5450         Take the number of units too.
5451         * config/aarch64/aarch64.c (aarch64_simd_vect_par_cnst_half): Likewise.
5452         (aarch64_simd_check_vect_par_cnst_half): Update call accordingly,
5453         but check for a vector mode before rather than after the call.
5454         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
5455         (move_hi_quad_<mode>, vec_unpack<su>_hi_<mode>)
5456         (vec_unpack<su>_lo_<mode, vec_widen_<su>mult_lo_<mode>)
5457         (vec_widen_<su>mult_hi_<mode>, vec_unpacks_lo_<mode>)
5458         (vec_unpacks_hi_<mode>, aarch64_saddl2<mode>, aarch64_uaddl2<mode>)
5459         (aarch64_ssubl2<mode>, aarch64_usubl2<mode>, widen_ssum<mode>3)
5460         (widen_usum<mode>3, aarch64_saddw2<mode>, aarch64_uaddw2<mode>)
5461         (aarch64_ssubw2<mode>, aarch64_usubw2<mode>, aarch64_sqdmlal2<mode>)
5462         (aarch64_sqdmlsl2<mode>, aarch64_sqdmlal2_lane<mode>)
5463         (aarch64_sqdmlal2_laneq<mode>, aarch64_sqdmlsl2_lane<mode>)
5464         (aarch64_sqdmlsl2_laneq<mode>, aarch64_sqdmlal2_n<mode>)
5465         (aarch64_sqdmlsl2_n<mode>, aarch64_sqdmull2<mode>)
5466         (aarch64_sqdmull2_lane<mode>, aarch64_sqdmull2_laneq<mode>)
5467         (aarch64_sqdmull2_n<mode>): Update accordingly.
5469 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
5470             Alan Hayward  <alan.hayward@arm.com>
5471             David Sherwood  <david.sherwood@arm.com>
5473         * config/aarch64/aarch64-protos.h (aarch64_reverse_mask): Take
5474         the number of units too.
5475         * config/aarch64/aarch64.c (aarch64_reverse_mask): Likewise.
5476         * config/aarch64/aarch64-simd.md (vec_load_lanesoi<mode>)
5477         (vec_store_lanesoi<mode>, vec_load_lanesci<mode>)
5478         (vec_store_lanesci<mode>, vec_load_lanesxi<mode>)
5479         (vec_store_lanesxi<mode>): Update accordingly.
5481 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
5482             Alan Hayward  <alan.hayward@arm.com>
5483             David Sherwood  <david.sherwood@arm.com>
5485         * config/aarch64/aarch64-protos.h (aarch64_endian_lane_rtx): Declare.
5486         * config/aarch64/aarch64.c (aarch64_endian_lane_rtx): New function.
5487         * config/aarch64/aarch64.h (ENDIAN_LANE_N): Take the number
5488         of units rather than the mode.
5489         * config/aarch64/iterators.md (nunits): New mode attribute.
5490         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args):
5491         Use aarch64_endian_lane_rtx instead of GEN_INT (ENDIAN_LANE_N ...).
5492         * config/aarch64/aarch64-simd.md (aarch64_dup_lane<mode>)
5493         (aarch64_dup_lane_<vswap_width_name><mode>, *aarch64_mul3_elt<mode>)
5494         (*aarch64_mul3_elt_<vswap_width_name><mode>): Likewise.
5495         (*aarch64_mul3_elt_to_64v2df, *aarch64_mla_elt<mode>): Likewise.
5496         (*aarch64_mla_elt_<vswap_width_name><mode>, *aarch64_mls_elt<mode>)
5497         (*aarch64_mls_elt_<vswap_width_name><mode>, *aarch64_fma4_elt<mode>)
5498         (*aarch64_fma4_elt_<vswap_width_name><mode>):: Likewise.
5499         (*aarch64_fma4_elt_to_64v2df, *aarch64_fnma4_elt<mode>): Likewise.
5500         (*aarch64_fnma4_elt_<vswap_width_name><mode>): Likewise.
5501         (*aarch64_fnma4_elt_to_64v2df, reduc_plus_scal_<mode>): Likewise.
5502         (reduc_plus_scal_v4sf, reduc_<maxmin_uns>_scal_<mode>): Likewise.
5503         (reduc_<maxmin_uns>_scal_<mode>): Likewise.
5504         (*aarch64_get_lane_extend<GPI:mode><VDQQH:mode>): Likewise.
5505         (*aarch64_get_lane_zero_extendsi<mode>): Likewise.
5506         (aarch64_get_lane<mode>, *aarch64_mulx_elt_<vswap_width_name><mode>)
5507         (*aarch64_mulx_elt<mode>, *aarch64_vgetfmulx<mode>): Likewise.
5508         (aarch64_sq<r>dmulh_lane<mode>, aarch64_sq<r>dmulh_laneq<mode>)
5509         (aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_lane<mode>): Likewise.
5510         (aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_laneq<mode>): Likewise.
5511         (aarch64_sqdml<SBINQOPS:as>l_lane<mode>): Likewise.
5512         (aarch64_sqdml<SBINQOPS:as>l_laneq<mode>): Likewise.
5513         (aarch64_sqdml<SBINQOPS:as>l2_lane<mode>_internal): Likewise.
5514         (aarch64_sqdml<SBINQOPS:as>l2_laneq<mode>_internal): Likewise.
5515         (aarch64_sqdmull_lane<mode>, aarch64_sqdmull_laneq<mode>): Likewise.
5516         (aarch64_sqdmull2_lane<mode>_internal): Likewise.
5517         (aarch64_sqdmull2_laneq<mode>_internal): Likewise.
5518         (aarch64_vec_load_lanesoi_lane<mode>): Likewise.
5519         (aarch64_vec_store_lanesoi_lane<mode>): Likewise.
5520         (aarch64_vec_load_lanesci_lane<mode>): Likewise.
5521         (aarch64_vec_store_lanesci_lane<mode>): Likewise.
5522         (aarch64_vec_load_lanesxi_lane<mode>): Likewise.
5523         (aarch64_vec_store_lanesxi_lane<mode>): Likewise.
5524         (aarch64_simd_vec_set<mode>): Update use of ENDIAN_LANE_N.
5525         (aarch64_simd_vec_setv2di): Likewise.
5527 2017-11-06  Carl Love  <cel@us.ibm.com>
5529         * config/rs6000/rs6000-c.c (P8V_BUILTIN_VEC_REVB): Add power 8
5530         definitions.
5531         (P9V_BUILTIN_VEC_REVB): Remove the power 9 instance definitions.
5532         * config/rs6000/altivec.h (vec_revb): Change the #define from power 9
5533         to power 8.
5534         * config/rs6000/r6000-protos.h (swap_endian_selector_for_mode): Add new
5535         extern declaration.
5536         * config/rs6000/rs6000.c (swap_endian_selector_for_mode): Add function.
5537         * config/rs6000/rs6000-builtin.def (BU_P8V_VSX_1, BU_P8V_OVERLOAD_1):
5538         Add power 8 macro expansions.
5539         (BU_P9V_OVERLOAD_1): Remove power 9 overload expansion.
5540         * config/rs6000/vsx.md (revb_<mode>): Add define_expand to generate
5541         power 8 instructions.  (VSX_XXBR): Add iterator.
5543 2017-11-06  Wilco Dijkstra  <wdijkstr@arm.com>
5545         * config/arm/arm.md (predicable_short_it): Change default to "no",
5546         improve documentation, remove uses that are identical to the default.
5547         (enabled_for_depr_it): Rename to enabled_for_short_it.
5548         * gcc/config/arm/arm-fixed.md (predicable_short_it):
5549         Remove default uses.
5550         * gcc/config/arm/ldmstm.md (predicable_short_it): Likewise.
5551         * gcc/config/arm/sync.md (predicable_short_it): Likewise.
5552         * gcc/config/arm/thumb2.md (predicable_short_it): Likewise.
5553         * gcc/config/arm/vfp.md (predicable_short_it): Likewise.
5555 2017-11-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
5557         PR target/82748
5558         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_1): Delete
5559         float128 helper macros, which are no longer used after deleting
5560         the old 'q' built-in functions, and moving the round to odd
5561         built-in functions to being special built-in functions.
5562         (BU_FLOAT128_2): Likewise.
5563         (BU_FLOAT128_1_HW): Likewise.
5564         (BU_FLOAT128_2_HW): Likewise.
5565         (BU_FLOAT128_3_HW): Likewise.
5566         (FABSQ): Delete old 'q' built-in functions.
5567         (COPYSIGNQ): Likewise.
5568         (SQRTF128_ODD): Move round to odd built-in functions to be
5569         special built-in functions, so that we can handle
5570         -mabi=ieeelongdouble.
5571         (TRUNCF128_ODD): Likewise.
5572         (ADDF128_ODD): Likewise.
5573         (SUBF128_ODD): Likewise.
5574         (MULF128_ODD): Likewise.
5575         (DIVF128_ODD): Likewise.
5576         (FMAF128_ODD): Likewise.
5577         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Map old 'q'
5578         built-in names to 'f128'.
5579         * config/rs6000/rs6000.c (rs6000_fold_builtin): Remove folding the
5580         old 'q' built-in functions, as the machine independent code for
5581         'f128' built-in functions handles this.
5582         (rs6000_expand_builtin): Add expansion for float128 round to odd
5583         functions, keying off on -mabi=ieeelongdouble of whether to use
5584         the KFmode or TFmode variant.
5585         (rs6000_init_builtins): Initialize the _Float128 round to odd
5586         built-in functions.
5587         * doc/extend.texi (PowerPC Built-in Functions): Document the old
5588         _Float128 'q' built-in functions are now mapped into the new
5589         'f128' built-in functions.
5591 2017-11-06  David Edelsohn  <dje.gcc@gmail.com>
5593         * collect2.c (add_lto_object): Compile for OBJECT_COFF.
5594         (scan_prog_file): Don't skip PASS_LTOINFO. Scan for LTO objects.
5596 2017-11-06  David Malcolm  <dmalcolm@redhat.com>
5598         PR jit/82826
5599         * ipa-fnsummary.c (ipa_fnsummary_c_finalize): New function.
5600         * ipa-fnsummary.h (ipa_fnsummary_c_finalize): New decl.
5601         * toplev.c: Include "ipa-fnsummary.h".
5602         (toplev::finalize): Call ipa_fnsummary_c_finalize.
5604 2017-11-06  Jakub Jelinek  <jakub@redhat.com>
5606         PR tree-optimization/82838
5607         * gimple-ssa-store-merging.c
5608         (imm_store_chain_info::output_merged_store): Call force_gimple_operand_1
5609         on a separate gimple_seq which is then appended to seq.
5611 2017-11-06  Jeff Law  <law@redhat.com>
5613         PR target/82788
5614         * config/i386/i386.c (PROBE_INTERVAL): Remove.
5615         (get_probe_interval): New functions.
5616         (ix86_adjust_stack_and_probe_stack_clash): Use get_probe_interval.
5617         (ix86_adjust_stack_and_probe): Likewise.
5618         (output_adjust_stack_and_probe): Likewise.
5619         (ix86_emit_probe_stack_range): Likewise.
5620         (ix86_expand_prologue): Likewise.
5622 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
5624         PR tree-optimization/82816
5625         * tree-ssa-math-opts.c (convert_mult_to_widen): Return false
5626         if the modes of the two types are the same.
5627         (convert_plusminus_to_widen): Likewise.
5629 2017-11-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
5631         * config/rs6000/altivec.md (*p9_vadu<mode>3) Rename to
5632         p9_vadu<mode>3.
5633         (usadv16qi): New define_expand.
5634         (usadv8hi): New define_expand.
5636 2017-11-06  Jan Hubicka  <hubicka@ucw.cz>
5638         PR bootstrap/82832
5639         * ipa-inline-transform.c (update_noncloned_frequencies): Always
5640         scale.
5641         (inline_transform): Likewise.
5642         * predict.c (counts_to_freqs): Remove useless conditional.
5643         * profile-count.h (profile_count::apply_scale): Move sanity check.
5644         * tree-inline.c (copy_bb): Always scale.
5645         (copy_cfg_body): Likewise.
5647 2017-11-06  Christophe Lyon  <christophe.lyon@linaro.org>
5649         PR target/67591
5650         * config/arm/arm.md (*sub_shiftsi): Add predicable_short_it
5651         attribute.
5652         (*cmp_ite0): Add enabled_for_depr_it attribute.
5653         (*cmp_ite1): Likewise.
5655 2017-11-06  Segher Boessenkool  <segher@kernel.crashing.org>
5657         * config/rs6000/rs6000.c (rs6000_insn_cost): Handle TYPE_MFCR and
5658         TYPE_MFCRF.
5660 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
5662         * tree-vrp.c (vrp_int_const_binop): Return true on success and
5663         return the value by pointer.
5664         (extract_range_from_multiplicative_op_1): Update accordingly.
5665         Return as soon as an operation fails.
5667 2017-11-05  Tom de Vries  <tom@codesourcery.com>
5669         PR other/82784
5670         * asan.c (DEF_SANITIZER_BUILTIN_1): Factor out of ...
5671         (DEF_SANITIZER_BUILTIN): ... here.
5672         (initialize_sanitizer_builtins): Use DEF_SANITIZER_BUILTIN_1 instead of
5673         DEF_SANITIZER_BUILTIN in if stmt.  Add missing semicolon.
5675 2017-11-05  Tom de Vries  <tom@codesourcery.com>
5677         PR other/82784
5678         * config/elfos.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove semicolon after
5679         macro body.
5680         (ASM_OUTPUT_CASE_LABEL): Add semicolon after
5681         ASM_OUTPUT_BEFORE_CASE_LABEL call.
5682         * config/arc/arc.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove semicolon
5683         after macro body.
5684         * config/m68k/m68kelf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
5685         * config/mips/mips.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
5686         * config/v850/v850.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
5688 2017-11-05  Tom de Vries  <tom@codesourcery.com>
5690         PR other/82784
5691         * graphite-scop-detection.c (DEBUG_PRINT): Remove semicolon after
5692         "do {} while (0)".
5694 2017-11-04  Michael Clark  <michaeljclark@mac.com>
5696         * config/riscv/riscv.c (riscv_print_operand): Add a 'i' format.
5697         config/riscv/riscv.md (addsi3): Use 'i' for immediates.
5698         (adddi3): Likewise.
5699         (*addsi3_extended): Likewise.
5700         (*addsi3_extended2): Likewise.
5701         (<optab>si3): Likewise.
5702         (<optab>di3): Likewise.
5703         (<optab><mode>3): Likewise.
5704         (<*optabe>si3_internal): Likewise.
5705         (zero_extendqi<SUPERQI:mode>2): Likewise.
5706         (*add<mode>hi3): Likewise.
5707         (*xor<mode>hi3): Likewise.
5708         (<optab>di3): Likewise.
5709         (*<optab>si3_extend): Likewise.
5710         (*sge<u>_<X:mode><GPR:mode>): Likewise.
5711         (*slt<u>_<X:mode><GPR:mode>): Likewise.
5712         (*sle<u>_<X:mode><GPR:mode>): Likewise.
5714 2017-11-04  Andrew Waterman  <andrew@sifive.com>
5716         * config/riscv/riscv.c (riscv_option_override): Conditionally set
5717         TARGET_STRICT_ALIGN based upon -mtune argument.
5719 2017-11-04  Andrew Waterman  <andrew@sifive.com>
5721         * config/riscv/riscv.h (SLOW_BYTE_ACCESS): Change to 1.
5723 2017-11-04  Daniel Santos  <daniel.santos@pobox.com>
5725         * config/i386/i386.c (choose_basereg): Use optional scratch
5726         register and add assertion.
5727         (x86_emit_outlined_ms2sysv_save): Use scratch register when
5728         needed, and don't allocate stack.
5729         (ix86_expand_prologue): Rearrange where SSE saves/stub call is
5730         emitted, correct wrong allocation with -mcall-ms2sysv-xlogues.
5731         (ix86_emit_outlined_ms2sysv_restore): Fix non-immediate offsets.
5733 2017-11-03  Jeff Law  <law@redhat.com>
5735         * config/i386/i386.c (ix86_emit_restore_reg_using_pop): Prototype.
5736         (ix86_adjust_stack_and_probe_stack_clash): Use a push/pop sequence
5737         to probe at the start of a noreturn function.
5739 2017-11-03  Jakub Jelinek  <jakub@redhat.com>
5741         PR tree-optimization/78821
5742         * gimple-ssa-store-merging.c: Update the file comment.
5743         (MAX_STORE_ALIAS_CHECKS): Define.
5744         (struct store_operand_info): New type.
5745         (store_operand_info::store_operand_info): New constructor.
5746         (struct store_immediate_info): Add rhs_code and ops data members.
5747         (store_immediate_info::store_immediate_info): Add rhscode, op0r
5748         and op1r arguments to the ctor, initialize corresponding data members.
5749         (struct merged_store_group): Add load_align_base and load_align
5750         data members.
5751         (merged_store_group::merged_store_group): Initialize them.
5752         (merged_store_group::do_merge): Update them.
5753         (merged_store_group::apply_stores): Pick the constant for
5754         encode_tree_to_bitpos from one of the two operands, or skip
5755         encode_tree_to_bitpos if neither operand is a constant.
5756         (class pass_store_merging): Add process_store method decl.  Remove
5757         bool argument from terminate_all_aliasing_chains method decl.
5758         (pass_store_merging::terminate_all_aliasing_chains): Remove
5759         var_offset_p argument and corresponding handling.
5760         (stmts_may_clobber_ref_p): New function.
5761         (compatible_load_p): New function.
5762         (imm_store_chain_info::coalesce_immediate_stores): Terminate group
5763         if there is overlap and rhs_code is not INTEGER_CST.  For
5764         non-overlapping stores terminate group if rhs is not mergeable.
5765         (get_alias_type_for_stmts): Change first argument from
5766         auto_vec<gimple *> & to vec<gimple *> &.  Add IS_LOAD, CLIQUEP and
5767         BASEP arguments.  If IS_LOAD is true, look at rhs1 of the stmts
5768         instead of lhs.  Compute *CLIQUEP and *BASEP in addition to the
5769         alias type.
5770         (get_location_for_stmts): Change first argument from
5771         auto_vec<gimple *> & to vec<gimple *> &.
5772         (struct split_store): Remove orig_stmts data member, add orig_stores.
5773         (split_store::split_store): Create orig_stores rather than orig_stmts.
5774         (find_constituent_stmts): Renamed to ...
5775         (find_constituent_stores): ... this.  Change second argument from
5776         vec<gimple *> * to vec<store_immediate_info *> *, push pointers
5777         to info structures rather than the statements.
5778         (split_group): Rename ALLOW_UNALIGNED argument to
5779         ALLOW_UNALIGNED_STORE, add ALLOW_UNALIGNED_LOAD argument and handle
5780         it.  Adjust find_constituent_stores caller.
5781         (imm_store_chain_info::output_merged_store): Handle rhs_code other
5782         than INTEGER_CST, adjust split_group, get_alias_type_for_stmts and
5783         get_location_for_stmts callers.  Set MR_DEPENDENCE_CLIQUE and
5784         MR_DEPENDENCE_BASE on the MEM_REFs if they are the same in all stores.
5785         (mem_valid_for_store_merging): New function.
5786         (handled_load): New function.
5787         (pass_store_merging::process_store): New method.
5788         (pass_store_merging::execute): Use process_store method.  Adjust
5789         terminate_all_aliasing_chains caller.
5791 2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>
5793         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
5794         Return true for more constants, symbols and label references.
5795         (aarch64_valid_floating_const): Remove unused function.
5797 2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>
5799         PR target/82786
5800         * config/aarch64/aarch64.c (aarch64_layout_frame):
5801         Undo forcing of LR at bottom of frame.
5803 2017-11-03  Jeff Law  <law@redhat.com>
5805         PR target/82823
5806         * config/i386/i386.c (ix86_expand_prologue): Tighten assert
5807         for int_registers_saved.
5809         * cfganal.c (single_pred_edge_ignoring_loop_edges): New function
5810         extracted from tree-ssa-dom.c.
5811         * cfganal.h (single_pred_edge_ignoring_loop_edges): Prototype.
5812         * tree-ssa-dom.c (single_incoming_edge_ignoring_loop_edges): Remove.
5813         (record_equivalences_from_incoming_edge): Add additional argument
5814         to single_pred_edge_ignoring_loop_edges call.
5815         * tree-ssa-uncprop.c (single_incoming_edge_ignoring_loop_edges): Remove.
5816         (uncprop_dom_walker::before_dom_children): Add additional argument
5817         to single_pred_edge_ignoring_loop_edges call.
5818         * tree-ssa-sccvn.c (sccvn_dom_walker::before_dom_children): Use
5819         single_pred_edge_ignoring_loop_edges rather than open coding.
5820         * tree-vrp.c (evrp_dom_walker::before_dom_children): Similarly.
5822 2017-11-03  Marc Glisse  <marc.glisse@inria.fr>
5824         * match.pd (-(-A)): Rewrite.
5826 2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>
5828         * config/rs6000/rs60000-protos.h (rs6000_emit_sISEL): Delete.
5829         (rs6000_emit_int_cmove): New declaration.
5830         * config/rs6000/rs6000.c (rs6000_emit_int_cmove): Delete declaration.
5831         (rs6000_emit_sISEL): Delete.
5832         (rs6000_emit_int_cmove): Make non-static.
5833         * config/rs6000/rs6000.md (cstore<mode>4): Use rs6000_emit_int_cmove
5834         instead of rs6000_emit_sISEL.
5836 2017-11-03  Jan Hubicka  <hubicka@ucw.cz>
5838         * asan.c (create_cond_insert_point): Maintain profile.
5839         * ipa-utils.c (ipa_merge_profiles): Be sure only IPA profiles are
5840         merged.
5841         * basic-block.h (struct basic_block_def): Remove frequency.
5842         (EDGE_FREQUENCY): Use to_frequency
5843         * bb-reorder.c (push_to_next_round_p): Use only IPA counts for global
5844         heuristics.
5845         (find_traces): Update to use to_frequency.
5846         (find_traces_1_round): Likewise; use only IPA counts.
5847         (bb_to_key): Likewise.
5848         (connect_traces): Use IPA counts only.
5849         (copy_bb_p): Update to use to_frequency.
5850         (fix_up_crossing_landing_pad): Likewise.
5851         (sanitize_hot_paths): Likewise.
5852         * bt-load.c (basic_block_freq): Likewise.
5853         * cfg.c (init_flow): Set count_max to uninitialized.
5854         (check_bb_profile): Remove frequencies; check counts.
5855         (dump_bb_info): Do not dump frequencies.
5856         (update_bb_profile_for_threading): Update counts only.
5857         (scale_bbs_frequencies_int): Likewise.
5858         (MAX_SAFE_MULTIPLIER): Remove.
5859         (scale_bbs_frequencies_gcov_type): Update counts only.
5860         (scale_bbs_frequencies_profile_count): Update counts only.
5861         (scale_bbs_frequencies): Update counts only.
5862         * cfg.h (struct control_flow_graph): Add count-max.
5863         (update_bb_profile_for_threading): Update prototype.
5864         * cfgbuild.c (find_bb_boundaries): Do not update frequencies.
5865         (find_many_sub_basic_blocks): Likewise.
5866         * cfgcleanup.c (try_forward_edges): Likewise.
5867         (try_crossjump_to_edge): Likewise.
5868         * cfgexpand.c (expand_gimple_cond): Likewise.
5869         (expand_gimple_tailcall): Likewise.
5870         (construct_init_block): Likewise.
5871         (construct_exit_block): Likewise.
5872         * cfghooks.c (verify_flow_info): Check consistency of counts.
5873         (dump_bb_for_graph): Do not dump frequencies.
5874         (split_block_1): Do not update frequencies.
5875         (split_edge): Do not update frequencies.
5876         (make_forwarder_block): Do not update frequencies.
5877         (duplicate_block): Do not update frequencies.
5878         (account_profile_record): Do not update frequencies.
5879         * cfgloop.c (find_subloop_latch_edge_by_profile): Use IPA counts
5880         for global heuristics.
5881         * cfgloopanal.c (average_num_loop_insns): Update to use to_frequency.
5882         (expected_loop_iterations_unbounded): Use counts only.
5883         * cfgloopmanip.c (scale_loop_profile): Simplify.
5884         (create_empty_loop_on_edge): Simplify
5885         (loopify): Simplify
5886         (duplicate_loop_to_header_edge): Simplify
5887         * cfgrtl.c (force_nonfallthru_and_redirect): Update profile.
5888         (update_br_prob_note): Take care of removing note when profile
5889         becomes undefined.
5890         (relink_block_chain): Do not dump frequency.
5891         (rtl_account_profile_record): Use to_frequency.
5892         * cgraph.c (symbol_table::create_edge): Convert count to ipa count.
5893         (cgraph_edge::redirect_call_stmt_to_calle): Conver tcount to ipa count.
5894         (cgraph_update_edges_for_call_stmt_node): Likewise.
5895         (cgraph_edge::verify_count_and_frequency): Update.
5896         (cgraph_node::verify_node): Temporarily disable frequency verification.
5897         * cgraphbuild.c (compute_call_stmt_bb_frequency): Use
5898         to_cgraph_frequency.
5899         (cgraph_edge::rebuild_edges): Convert to ipa counts.
5900         * cgraphunit.c (init_lowered_empty_function): Do not initialize
5901         frequencies.
5902         (cgraph_node::expand_thunk): Update profile.
5903         * except.c (dw2_build_landing_pads): Do not update frequency.
5904         * final.c (compute_alignments): Use to_frequency.
5905         (dump_basic_block_info): Do not dump frequency.
5906         * gimple-pretty-print.c (dump_profile): Do not dump frequency.
5907         (dump_gimple_bb_header): Do not dump frequency.
5908         * gimple-ssa-isolate-paths.c (isolate_path): Do not update frequency;
5909         do update count.
5910         * gimple-streamer-in.c (input_bb): Do not stream frequency.
5911         * gimple-streamer-out.c (output_bb): Do not stream frequency.
5912         * haifa-sched.c (sched_pressure_start_bb): Use to_freuqency.
5913         (init_before_recovery): Do not update frequency.
5914         (sched_create_recovery_edges): Do not update frequency.
5915         * hsa-gen.c (convert_switch_statements): Do not update frequency.
5916         * ipa-cp.c (ipcp_propagate_stage): Update search for max_count.
5917         (ipa_cp_c_finalize): Set max_count to uninitialized.
5918         * ipa-fnsummary.c (get_minimal_bb): Use counts.
5919         (param_change_prob): Use counts.
5920         * ipa-profile.c (ipa_profile_generate_summary): Do not summarize
5921         local profiles.
5922         * ipa-split.c (consider_split): Use to_frequency.
5923         (split_function): Use to_frequency.
5924         * ira-build.c (loop_compare_func): Likewise.
5925         (mark_loops_for_removal): Likewise.
5926         (mark_all_loops_for_removal): Likewise.
5927         * loop-doloop.c (doloop_modify): Do not update frequency.
5928         * loop-unroll.c (unroll_loop_runtime_iterations): Do not update
5929         frequency.
5930         * lto-streamer-in.c (input_function): Update count_max.
5931         * omp-expand.c (expand_omp_taskreg): Update count_max.
5932         * omp-simd-clone.c (simd_clone_adjust): Update profile.
5933         * predict.c (maybe_hot_frequency_p): Use to_frequency.
5934         (maybe_hot_count_p): Use ipa counts only.
5935         (maybe_hot_bb_p): Simplify.
5936         (maybe_hot_edge_p): Simplify.
5937         (probably_never_executed): Do not take frequency argument.
5938         (probably_never_executed_bb_p): Do not pass frequency.
5939         (probably_never_executed_edge_p): Likewise.
5940         (combine_predictions_for_bb): Check that profile is nonzero.
5941         (propagate_freq): Do not set frequency.
5942         (drop_profile): Simplify.
5943         (counts_to_freqs): Simplify.
5944         (expensive_function_p): Use to_frequency.
5945         (propagate_unlikely_bbs_forward): Simplify.
5946         (determine_unlikely_bbs): Simplify.
5947         (estimate_bb_frequencies): Add hack to silence graphite issues.
5948         (compute_function_frequency): Use ipa counts.
5949         (pass_profile::execute): Update.
5950         (rebuild_frequencies): Use counts only.
5951         (force_edge_cold): Use counts only.
5952         * profile-count.c (profile_count::dump): Dump new count types.
5953         (profile_count::differs_from_p): Check compatiblity.
5954         (profile_count::to_frequency): New function.
5955         (profile_count::to_cgraph_frequency): New function.
5956         * profile-count.h (struct function): Declare.
5957         (enum profile_quality): Add profile_guessed_local and
5958         profile_guessed_global0.
5959         (class profile_proability): Decrease number of bits to 29;
5960         update from_reg_br_prob_note and to_reg_br_prob_note.
5961         (class profile_count: Update comment; decrease number of bits
5962         to 61. Check compatibility.
5963         (profile_count::compatible_p): New private member function.
5964         (profile_count::ipa_p): New member function.
5965         (profile_count::operator<): Handle global zero correctly.
5966         (profile_count::operator>): Handle global zero correctly.
5967         (profile_count::operator<=): Handle global zero correctly.
5968         (profile_count::operator>=): Handle global zero correctly.
5969         (profile_count::nonzero_p): New member function.
5970         (profile_count::force_nonzero): New member function.
5971         (profile_count::max): New member function.
5972         (profile_count::apply_scale): Handle IPA scalling.
5973         (profile_count::guessed_local): New member function.
5974         (profile_count::global0): New member function.
5975         (profile_count::ipa): New member function.
5976         (profile_count::to_frequency): Declare.
5977         (profile_count::to_cgraph_frequency): Declare.
5978         * profile.c (OVERLAP_BASE): Delete.
5979         (compute_frequency_overlap): Delete.
5980         (compute_branch_probabilities): Do not use compute_frequency_overlap.
5981         * regs.h (REG_FREQ_FROM_BB): Use to_frequency.
5982         * sched-ebb.c (rank): Use counts only.
5983         * shrink-wrap.c (handle_simple_exit): Use counts only.
5984         (try_shrink_wrapping): Use counts only.
5985         (place_prologue_for_one_component): Use counts only.
5986         * tracer.c (find_best_predecessor): Use to_frequency.
5987         (find_trace): Use to_frequency.
5988         (tail_duplicate): Use to_frequency.
5989         * trans-mem.c (expand_transaction): Do not update frequency.
5990         * tree-call-cdce.c: Do not update frequency.
5991         * tree-cfg.c (gimple_find_sub_bbs): Likewise.
5992         (gimple_merge_blocks): Likewise.
5993         (gimple_split_edge): Likewise.
5994         (gimple_duplicate_sese_region): Likewise.
5995         (gimple_duplicate_sese_tail): Likewise.
5996         (move_sese_region_to_fn): Likewise.
5997         (gimple_account_profile_record): Likewise.
5998         (insert_cond_bb): Likewise.
5999         * tree-complex.c (expand_complex_div_wide): Likewise.
6000         * tree-eh.c (lower_resx): Update profile.
6001         * tree-inline.c (copy_bb): Simplify count scaling; do not scale
6002         frequencies.
6003         (initialize_cfun): Do not initialize frequencies
6004         (freqs_to_counts): Delete.
6005         (copy_cfg_body): Ignore count parameter.
6006         (copy_body): Update.
6007         (expand_call_inline): Update count_max.
6008         (optimize_inline_calls): Update count_max.
6009         (tree_function_versioning): Update count_max.
6010         * tree-ssa-coalesce.c (coalesce_cost_bb): Use to_frequency.
6011         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Do not update
6012         frequency.
6013         * tree-ssa-loop-im.c (execute_sm_if_changed): Use counts only.
6014         * tree-ssa-loop-ivcanon.c (unloop_loops): Do not update freuqency.
6015         (try_peel_loop): Likewise.
6016         * tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Use
6017         to_frequency.
6018         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): Pass -1.
6019         (tree_transform_and_unroll_loop): Do not use frequencies
6020         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations):
6021         Use reliable prediction only.
6022         * tree-ssa-loop-unswitch.c (hoist_guard): Do not use frequencies.
6023         * tree-ssa-sink.c (select_best_block): Use to_frequency.
6024         * tree-ssa-tail-merge.c (replace_block_by): Temporarily disable
6025         probability scaling.
6026         * tree-ssa-threadupdate.c (create_block_for_threading): Do
6027         not update frequency
6028         (any_remaining_duplicated_blocks): Likewise.
6029         (update_profile): Likewise.
6030         (estimated_freqs_path): Delete.
6031         (freqs_to_counts_path): Delete.
6032         (clear_counts_path): Delete.
6033         (ssa_fix_duplicate_block_edges): Likewise.
6034         (duplicate_thread_path): Likewise.
6035         * tree-switch-conversion.c (gen_inbound_check): Use counts.
6036         * tree-tailcall.c (decrease_profile): Do not update frequency.
6037         (eliminate_tail_call): Likewise.
6038         * tree-vect-loop-manip.c (vect_do_peeling): Likewise.
6039         * tree-vect-loop.c (scale_profile_for_vect_loop): Likewise.
6040         (optimize_mask_stores): Likewise.
6041         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
6042         * ubsan.c (ubsan_expand_null_ifn): Update profile.
6043         (ubsan_expand_ptr_ifn): Update profile.
6044         * value-prof.c (gimple_ic): Simplify.
6045         * value-prof.h (gimple_ic): Update prototype.
6046         * ipa-inline-transform.c (inline_transform): Fix scaling conditoins.
6047         * ipa-inline.c (compute_uninlined_call_time): Be sure that
6048         counts are nonzero.
6049         (want_inline_self_recursive_call_p): Likewise.
6050         (resolve_noninline_speculation): Only cummulate defined counts.
6051         (inline_small_functions): Use nonzero_p.
6052         (ipa_inline): Do not access freed node.
6054 2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>
6056         * config/aarch64/aarch64.c (aarch64_override_options_internal):
6057         Set PARAM_SCHED_PRESSURE_ALGORITHM to SCHED_PRESSURE_MODEL.
6059 2017-11-03  Kito Cheng  <kito.cheng@gmail.com>
6061         * config/riscv/riscv.c (riscv_legitimize_move): Handle
6062         non-legitimate address.
6064 2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>
6066         * config/rs6000/rs6000.md (*lt0_disi): Delete.
6067         (*lt0_<mode>di, *lt0_<mode>si): New.
6069 2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>
6071         * config/rs6000/rs6000.md (move_from_CR_ov_bit): Change condition to
6072         TARGET_PAIRED_FLOAT.
6074 2017-11-03  Siddhesh Poyarekar  <siddhesh.poyarekar@linaro.org>
6075             Jim Wilson  <jim.wilson@linaro.org>
6077         * config/aarch64/aarch64-cores.def (saphira): New CPU.
6078         * config/aarch64/aarch64-tune.md: Regenerated.
6079         * doc/invoke.texi (AArch64 Options/-mtune): Add "saphira".
6080         * gcc/config/aarch64/aarch64.c (saphira_tunings): New tuning table.
6082 2017-11-03  Cupertino Miranda  <cmiranda@synopsys.com>
6084         * config/arc/arc.c (arc_save_restore): Corrected CFA note.
6085         (arc_expand_prologue): Restore blink for millicode.
6086         * config/arc/linux.h (LINK_EH_SPEC): Defined.
6088 2017-11-03  Richard Sandiford  <richard.sandiford@linaro.org>
6090         PR target/82809
6091         * config/i386/i386.c (ix86_vector_duplicate_value): Use
6092         gen_vec_duplicate after forcing the scalar into a register.
6094 2017-11-02  Segher Boessenkool  <segher@kernel.crashing.org>
6096         * combine (try_combine): Print the insns input to try_combine to the
6097         dump file.
6099 2017-11-02  Steve Ellcey  <sellcey@cavium.com>
6101         PR target/79868
6102         * config/aarch64/aarch64-c.c (aarch64_pragma_target_parse):
6103         Remove second argument from aarch64_process_target_attr call.
6104         * config/aarch64/aarch64-protos.h (aarch64_process_target_attr):
6105         Ditto.
6106         * config/aarch64/aarch64.c (aarch64_attribute_info): Change
6107         field type.
6108         (aarch64_handle_attr_arch): Remove second argument.
6109         (aarch64_handle_attr_cpu): Ditto.
6110         (aarch64_handle_attr_tune): Ditto.
6111         (aarch64_handle_attr_isa_flags): Ditto.
6112         (aarch64_process_one_target_attr): Ditto.
6113         (aarch64_process_target_attr): Ditto.
6114         (aarch64_option_valid_attribute_p): Remove second argument.
6115         on aarch64_process_target_attr call.
6117 2017-11-02  David Malcolm  <dmalcolm@redhat.com>
6119         * diagnostic.c: Include "selftest-diagnostic.h".
6120         (selftest::assert_location_text): New function.
6121         (selftest::test_diagnostic_get_location_text): New function.
6122         (selftest::diagnostic_c_tests): Call it.
6124 2017-11-02  David Malcolm  <dmalcolm@redhat.com>
6126         * Makefile.in (OBJS-libcommon): Add selftest-diagnostic.o.
6127         * diagnostic-show-locus.c: Include "selftest-diagnostic.h".
6128         (class selftest::test_diagnostic_context): Move to...
6129         * selftest-diagnostic.c: New file.
6130         * selftest-diagnostic.h: New file.
6132 2017-11-02  James Bowman  <james.bowman@ftdichip.com>
6134         * config/ft32/ft32.c (ft32_addr_space_legitimate_address_p): increase
6135         offset range for FT32B.
6136         * config/ft32/ft32.h: option "mcompress" enables relaxation.
6137         * config/ft32/ft32.md: Add TARGET_NOPM.
6138         * config/ft32/ft32.opt: Add mft32b, mcompress, mnopm.
6139         * gcc/doc/invoke.texi: Add mft32b, mcompress, mnopm.
6141 2017-11-02  Wilco Dijkstra  <wdijkstr@arm.com>
6143         * config/aarch64/aarch64.h (MALLOC_ABI_ALIGNMENT): New define.
6145 2017-11-02  Jeff Law  <law@redhat.com>
6147         * gimple-ssa-sprintf.c (sprintf_dom_walker): Remove
6148         virtual keyword on FINAL OVERRIDE members.
6150         * tree-ssa-propagate.h (ssa_propagation_engine): Group
6151         virtuals together.  Add virtual destructor.
6152         (substitute_and_fold_engine): Similarly.
6154 2017-11-02  Jan Hubicka  <hubicka@ucw.cz>
6156         * x86-tune.def (X86_TUNE_USE_INCDEC): Enable for Haswell+.
6158 2017-11-02  Richard Biener  <rguenther@suse.de>
6160         PR tree-optimization/82795
6161         * tree-if-conv.c (predicate_mem_writes): Remove bogus assert.
6163 2017-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6165         * acinclude.m4 (gcc_AC_INITFINI_ARRAY): Don't require
6166         gcc_SUN_LD_VERSION.
6167         (gcc_GAS_CHECK_FEATURE): Remove.
6168         * configure.ac (ld_vers) <*-*-solaris2*>: Move comments from
6169         gcc_AC_INITFINI_ARRAY here.  Update for Solaris 11.4 changes.
6170         * configure: Regenerate.
6172 2017-11-02  Claudiu Zissulescu <claziss@synopsys.com>
6174         * config/arc/arc.c (hwloop_optimize): Account for empty
6175         body loops.
6177 2017-11-02  Richard Biener  <rguenther@suse.de>
6179         PR middle-end/82765
6180         * varasm.c (decode_addr_const): Make offset HOST_WIDE_INT.
6181         Truncate ARRAY_REF index and element size.
6183 2017-11-01  Palmer Dabbelt  <palmer@dabbelt.com>
6185         * doc/invoke.texi (RISC-V Options): Use "@minus{}2 GB", not "-2 GB".
6187 2017-11-01  Jeff Law  <law@redhat.com>
6189         * tree-ssa-ccp.c (ccp_folder): New class derived from
6190         substitute_and_fold_engine.
6191         (ccp_folder::get_value): New member function.
6192         (ccp_folder::fold_stmt): Renamed from ccp_fold_stmt.
6193         (ccp_fold_stmt): Remove prototype.
6194         (ccp_finalize): Call substitute_and_fold from the ccp_class.
6195         * tree-ssa-copy.c (copy_folder): New class derived from
6196         substitute_and_fold_engine.
6197         (copy_folder::get_value): Renamed from get_value.
6198         (fini_copy_prop): Call substitute_and_fold from copy_folder class.
6199         * tree-vrp.c (vrp_folder): New class derived from
6200         substitute_and_fold_engine.
6201         (vrp_folder::fold_stmt): Renamed from vrp_fold_stmt.
6202         (vrp_folder::get_value): New member function.
6203         (vrp_finalize): Call substitute_and_fold from vrp_folder class.
6204         (evrp_dom_walker::before_dom_children): Similarly for replace_uses_in.
6205         * tree-ssa-propagate.h (substitute_and_fold_engine): New class to
6206         provide a class interface to folder/substitute routines.
6207         (ssa_prop_fold_stmt_fn): Remove typedef.
6208         (ssa_prop_get_value_fn): Likewise.
6209         (subsitute_and_fold): Remove prototype.
6210         (replace_uses_in): Likewise.
6211         * tree-ssa-propagate.c (substitute_and_fold_engine::replace_uses_in):
6212         Renamed from replace_uses_in.  Call the virtual member function
6213         (substitute_and_fold_engine::replace_phi_args_in): Similarly.
6214         (substitute_and_fold_dom_walker): Remove initialization of
6215         data member entries for calbacks.  Add substitute_and_fold_engine
6216         member and initialize it.
6217         (substitute_and_fold_dom_walker::before_dom_children0: Use the
6218         member functions for get_value, replace_phi_args_in c
6219         replace_uses_in, and fold_stmt calls.
6220         (substitute_and_fold_engine::substitute_and_fold): Renamed from
6221         substitute_and_fold.  Remove assert.   Update ctor call.
6223         * tree-ssa-propagate.h (ssa_prop_visit_stmt_fn): Remove typedef.
6224         (ssa_prop_visit_phi_fn): Likewise.
6225         (class ssa_propagation_engine): New class to provide an interface
6226         into ssa_propagate.
6227         * tree-ssa-propagate.c (ssa_prop_visit_stmt): Remove file scoped
6228         variable.
6229         (ssa_prop_visit_phi): Likewise.
6230         (ssa_propagation_engine::simulate_stmt): Moved into class.
6231         Call visit_phi/visit_stmt from the class rather than via
6232         file scoped static variables.
6233         (ssa_propagation_engine::simulate_block): Moved into class.
6234         (ssa_propagation_engine::process_ssa_edge_worklist): Similarly.
6235         (ssa_propagation_engine::ssa_propagate): Similarly.  No longer
6236         set file scoped statics for the visit_stmt/visit_phi callbacks.
6237         * tree-complex.c (complex_propagate): New class derived from
6238         ssa_propagation_engine.
6239         (complex_propagate::visit_stmt): Renamed from complex_visit_stmt.
6240         (complex_propagate::visit_phi): Renamed from complex_visit_phi.
6241         (tree_lower_complex): Call ssa_propagate via the complex_propagate
6242         class.
6243         * tree-ssa-ccp.c: (ccp_propagate): New class derived from
6244         ssa_propagation_engine.
6245         (ccp_propagate::visit_phi): Renamed from ccp_visit_phi_node.
6246         (ccp_propagate::visit_stmt): Renamed from ccp_visit_stmt.
6247         (do_ssa_ccp): Call ssa_propagate from the ccp_propagate class.
6248         * tree-ssa-copy.c (copy_prop): New class derived from
6249         ssa_propagation_engine.
6250         (copy_prop::visit_stmt): Renamed from copy_prop_visit_stmt.
6251         (copy_prop::visit_phi): Renamed from copy_prop_visit_phi_node.
6252         (execute_copy_prop): Call ssa_propagate from the copy_prop class.
6253         * tree-vrp.c (vrp_prop): New class derived from ssa_propagation_engine.
6254         (vrp_prop::visit_stmt): Renamed from vrp_visit_stmt.
6255         (vrp_prop::visit_phi): Renamed from vrp_visit_phi_node.
6256         (execute_vrp): Call ssa_propagate from the vrp_prop class.
6258 2017-11-01  Jakub Jelinek  <jakub@redhat.com>
6260         PR rtl-optimization/82778
6261         PR rtl-optimization/82597
6262         * compare-elim.c (struct comparison): Add in_a_setter field.
6263         (find_comparison_dom_walker::before_dom_children): Remove killed
6264         bitmap and df_simulate_find_defs call, instead walk the defs.
6265         Compute last_setter and initialize in_a_setter.  Merge definitions
6266         with first initialization for a few variables.
6267         (try_validate_parallel): Use insn_invalid_p instead of
6268         recog_memoized.  Return insn rather than just the pattern.
6269         (try_merge_compare): Fix up comment.  Don't uselessly test if
6270         in_a is a REG_P.  Use cmp->in_a_setter instead of walking UD
6271         chains.
6272         (execute_compare_elim_after_reload): Remove df_chain_add_problem
6273         call.
6275 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
6276             Alan Hayward  <alan.hayward@arm.com>
6277             David Sherwood  <david.sherwood@arm.com>
6279         * config/aarch64/aarch64.c (aarch64_rtx_costs): Use
6280         aarch64_hard_regno_nregs to get the number of registers
6281         in a mode.
6283 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
6284             Alan Hayward  <alan.hayward@arm.com>
6285             David Sherwood  <david.sherwood@arm.com>
6287         * config/aarch64/constraints.md (Upl): Rename to...
6288         (Uaa): ...this.
6289         * config/aarch64/aarch64.md
6290         (*zero_extend<SHORT:mode><GPI:mode>2_aarch64, *addsi3_aarch64_uxtw):
6291         Update accordingly.
6293 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
6294             Alan Hayward  <alan.hayward@arm.com>
6295             David Sherwood  <david.sherwood@arm.com>
6297         * config/aarch64/aarch64.c (aarch64_add_constant_internal)
6298         (aarch64_add_constant, aarch64_add_sp, aarch64_sub_sp): Move
6299         earlier in file.
6301 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
6302             Alan Hayward  <alan.hayward@arm.com>
6303             David Sherwood  <david.sherwood@arm.com>
6305         * config/aarch64/aarch64.c (aarch64_evpc_trn, aarch64_evpc_uzp)
6306         (aarch64_evpc_zip, aarch64_evpc_ext, aarch64_evpc_rev)
6307         (aarch64_evpc_dup): Generate rtl direcly, rather than using
6308         named expanders.
6309         (aarch64_expand_vec_perm_const_1): Explicitly check for permutes
6310         of a single element.
6311         * config/aarch64/iterators.md: Add a comment above the permute
6312         unspecs to say that they are generated directly by
6313         aarch64_expand_vec_perm_const.
6314         * config/aarch64/aarch64-simd.md: Likewise the permute instructions.
6316 2017-11-01  Nathan Sidwell  <nathan@acm.org>
6318         * tree-dump.c (dequeue_and_dump): Use HAS_DECL_ASSEMBLER_NAME_P.
6320 2017-11-01  Palmer Dabbelt  <palmer@dabbelt.com>
6322         * doc/invoke.texi (RISC-V Options): Explicitly name the medlow
6323         and medany code models, and describe what they do.
6325 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
6327         Revert accidental duplicate:
6329         * combine.c (can_change_dest_mode): Reject changes in
6330         REGMODE_NATURAL_SIZE.
6332 2017-11-01  Segher Boessenkool  <segher@kernel.crashing.org>
6334         PR rtl-optimization/64682
6335         PR rtl-optimization/69567
6336         PR rtl-optimization/69737
6337         PR rtl-optimization/82683
6338         * combine.c (distribute_notes) <REG_DEAD>: If the new I2 sets the same
6339         register mentioned in the note, drop the note, unless it came from I3,
6340         in which case it should go to I3 again.
6342 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
6344         * tree-ssa-dse.c (normalize_ref): Check whether the ranges overlap
6345         and return false if not.
6346         (clear_bytes_written_by, live_bytes_read): Update accordingly.
6348 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
6350         * tree-ssa-alias.h (ranges_overlap_p): Return false if either
6351         range is known to be empty.
6353 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
6354             Alan Hayward  <alan.hayward@arm.com>
6355             David Sherwood  <david.sherwood@arm.com>
6357         * simplify-rtx.c (simplify_const_unary_operation): Use GET_MODE_NUNITS
6358         and CONST_VECTOR_NUNITS instead of computing the number of units from
6359         the byte sizes of the vector and element.
6360         (simplify_binary_operation_1): Likewise.
6361         (simplify_const_binary_operation): Likewise.
6362         (simplify_ternary_operation): Likewise.
6364 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
6365             Alan Hayward  <alan.hayward@arm.com>
6366             David Sherwood  <david.sherwood@arm.com>
6368         * var-tracking.c (INT_MEM_OFFSET): Replace with...
6369         (int_mem_offset): ...this new function.
6370         (var_mem_set, var_mem_delete_and_set, var_mem_delete)
6371         (find_mem_expr_in_1pdv, dataflow_set_preserve_mem_locs)
6372         (same_variable_part_p, use_type, add_stores, vt_get_decl_and_offset):
6373         Update accordingly.
6375 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
6376             Alan Hayward  <alan.hayward@arm.com>
6377             David Sherwood  <david.sherwood@arm.com>
6379         * lower-subreg.c (interesting_mode_p): New function.
6380         (compute_costs, find_decomposable_subregs, decompose_register)
6381         (simplify_subreg_concatn, can_decompose_p, resolve_simple_move)
6382         (resolve_clobber, dump_choices): Use it.
6384 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
6385             Alan Hayward  <alan.hayward@arm.com>
6386             David Sherwood  <david.sherwood@arm.com>
6388         * rtlhash.c (add_rtx): Use add_hwi for 'w' and add_int for 'i'.
6390 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
6391             Alan Hayward  <alan.hayward@arm.com>
6392             David Sherwood  <david.sherwood@arm.com>
6394         * alias.c (find_base_value, find_base_term): Only process integer
6395         truncations.  Check the precision rather than the size.
6397 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
6398             Alan Hayward  <alan.hayward@arm.com>
6399             David Sherwood  <david.sherwood@arm.com>
6401         * machmode.h (is_narrower_int_mode): New function
6402         * optabs.c (expand_float, expand_fix): Use it.
6403         * dwarf2out.c (rotate_loc_descriptor): Likewise.
6405 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
6406             Alan Hayward  <alan.hayward@arm.com>
6407             David Sherwood  <david.sherwood@arm.com>
6409         * rtl.h (narrower_subreg_mode): New function.
6410         * ira-color.c (update_costs_from_allocno): Use it.
6412 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
6413             Alan Hayward  <alan.hayward@arm.com>
6414             David Sherwood  <david.sherwood@arm.com>
6416         * optabs-query.h (convert_optab_p): New function, split out from...
6417         (convert_optab_handler): ...here.
6418         (widening_optab_handler): Delete.
6419         (find_widening_optab_handler): Remove permit_non_widening parameter.
6420         (find_widening_optab_handler_and_mode): Likewise.  Provide an
6421         override that operates on mode class wrappers.
6422         * optabs-query.c (widening_optab_handler): Delete.
6423         (find_widening_optab_handler_and_mode): Remove permit_non_widening
6424         parameter.  Assert that the two modes are the same class and that
6425         the "from" mode is narrower than the "to" mode.  Use
6426         convert_optab_handler instead of widening_optab_handler.
6427         * expmed.c (expmed_mult_highpart_optab): Use convert_optab_handler
6428         instead of widening_optab_handler.
6429         * expr.c (expand_expr_real_2): Update calls to
6430         find_widening_optab_handler.
6431         * optabs.c (expand_widen_pattern_expr): Likewise.
6432         (expand_binop_directly): Take the insn_code as a parameter.
6433         (expand_binop): Only call find_widening_optab_handler for
6434         conversion optabs; use optab_handler otherwise.  Update calls
6435         to find_widening_optab_handler and expand_binop_directly.
6436         Use convert_optab_handler instead of widening_optab_handler.
6437         * tree-ssa-math-opts.c (convert_mult_to_widen): Update calls to
6438         find_widening_optab_handler and use scalar_mode rather than
6439         machine_mode.
6440         (convert_plusminus_to_widen): Likewise.
6442 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
6443             Alan Hayward  <alan.hayward@arm.com>
6444             David Sherwood  <david.sherwood@arm.com>
6446         * machmode.h (fixed_size_mode): New class.
6447         * rtl.h (get_pool_mode): Return fixed_size_mode.
6448         * gengtype.c (main): Add fixed_size_mode.
6449         * target.def (get_raw_result_mode): Return a fixed_size_mode.
6450         (get_raw_arg_mode): Likewise.
6451         * doc/tm.texi: Regenerate.
6452         * targhooks.h (default_get_reg_raw_mode): Return a fixed_size_mode.
6453         * targhooks.c (default_get_reg_raw_mode): Likewise.
6454         * config/ia64/ia64.c (ia64_get_reg_raw_mode): Likewise.
6455         * config/mips/mips.c (mips_get_reg_raw_mode): Likewise.
6456         * config/msp430/msp430.c (msp430_get_raw_arg_mode): Likewise.
6457         (msp430_get_raw_result_mode): Likewise.
6458         * config/avr/avr-protos.h (regmask): Use as_a <fixed_side_mode>
6459         * dbxout.c (dbxout_parms): Require fixed-size modes.
6460         * expr.c (copy_blkmode_from_reg, copy_blkmode_to_reg): Likewise.
6461         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Likewise.
6462         * omp-low.c (lower_oacc_reductions): Likewise.
6463         * simplify-rtx.c (simplify_immed_subreg): Take fixed_size_modes.
6464         (simplify_subreg): Update accordingly.
6465         * varasm.c (constant_descriptor_rtx::mode): Change to fixed_size_mode.
6466         (force_const_mem): Update accordingly.  Return NULL_RTX for modes
6467         that aren't fixed-size.
6468         (get_pool_mode): Return a fixed_size_mode.
6469         (output_constant_pool_2): Take a fixed_size_mode.
6471 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
6472             Alan Hayward  <alan.hayward@arm.com>
6473             David Sherwood  <david.sherwood@arm.com>
6475         * doc/rtl.texi (vec_series): Document.
6476         (const): Say that the operand can be a vec_series.
6477         * rtl.def (VEC_SERIES): New rtx code.
6478         * rtl.h (const_vec_series_p_1): Declare.
6479         (const_vec_series_p): New function.
6480         * emit-rtl.h (gen_const_vec_series): Declare.
6481         (gen_vec_series): Likewise.
6482         * emit-rtl.c (const_vec_series_p_1, gen_const_vec_series)
6483         (gen_vec_series): Likewise.
6484         * optabs.c (expand_mult_highpart): Use gen_const_vec_series.
6485         * simplify-rtx.c (simplify_unary_operation): Handle negations
6486         of vector series.
6487         (simplify_binary_operation_series): New function.
6488         (simplify_binary_operation_1): Use it.  Handle VEC_SERIES.
6489         (test_vector_ops_series): New function.
6490         (test_vector_ops): Call it.
6491         * config/powerpcspe/altivec.md (altivec_lvsl): Use
6492         gen_const_vec_series.
6493         (altivec_lvsr): Likewise.
6494         * config/rs6000/altivec.md (altivec_lvsl, altivec_lvsr): Likewise.
6496 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
6497             Alan Hayward  <alan.hayward@arm.com>
6498             David Sherwood  <david.sherwood@arm.com>
6500         * doc/rtl.texi (const): Update description of address constants.
6501         Say that vector constants are allowed too.
6502         * common.md (E, F): Use CONSTANT_P instead of checking for
6503         CONST_VECTOR.
6504         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
6505         checking for CONST_VECTOR.
6506         * expmed.c (make_tree): Use build_vector_from_val for a CONST
6507         VEC_DUPLICATE.
6508         * expr.c (expand_expr_real_2): Check for vector modes instead
6509         of checking for CONST_VECTOR.
6510         * rtl.h (const_vec_p): New function.
6511         (const_vec_duplicate_p): Check for a CONST VEC_DUPLICATE.
6512         (unwrap_const_vec_duplicate): Handle them here too.
6514 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
6515             David Malcolm  <dmalcolm@redhat.com>
6516             Alan Hayward  <alan.hayward@arm.com>
6517             David Sherwood  <david.sherwood@arm.com>
6519         * rtl.h (vec_duplicate_p): New function.
6520         * selftest-rtl.c (assert_rtx_eq_at): New function.
6521         * selftest-rtl.h (ASSERT_RTX_EQ): New macro.
6522         (assert_rtx_eq_at): Declare.
6523         * selftest.h (selftest::simplify_rtx_c_tests): Declare.
6524         * selftest-run-tests.c (selftest::run_tests): Call it.
6525         * simplify-rtx.c: Include selftest.h and selftest-rtl.h.
6526         (simplify_unary_operation_1): Recursively handle vector duplicates.
6527         (simplify_binary_operation_1): Likewise.  Handle VEC_SELECTs of
6528         vector duplicates.
6529         (simplify_subreg): Handle subregs of vector duplicates.
6530         (make_test_reg, test_vector_ops_duplicate, test_vector_ops)
6531         (selftest::simplify_rtx_c_tests): New functions.
6533 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
6534             Alan Hayward  <alan.hayward@arm.com>
6535             David Sherwood  <david.sherwood@arm.com>
6537         * emit-rtl.h (gen_const_vec_duplicate): Declare.
6538         (gen_vec_duplicate): Likewise.
6539         * emit-rtl.c (gen_const_vec_duplicate_1): New function, split
6540         out from...
6541         (gen_const_vector): ...here.
6542         (gen_const_vec_duplicate, gen_vec_duplicate): New functions.
6543         (gen_rtx_CONST_VECTOR): Use gen_const_vec_duplicate for constants
6544         whose elements are all equal.
6545         * optabs.c (expand_vector_broadcast): Use gen_const_vec_duplicate.
6546         * simplify-rtx.c (simplify_const_unary_operation): Likewise.
6547         (simplify_relational_operation): Likewise.
6548         * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup):
6549         Likewise.
6550         (aarch64_simd_dup_constant): Use gen_vec_duplicate.
6551         (aarch64_expand_vector_init): Likewise.
6552         * config/arm/arm.c (neon_vdup_constant): Likewise.
6553         (neon_expand_vector_init): Likewise.
6554         (arm_expand_vec_perm): Use gen_const_vec_duplicate.
6555         (arm_block_set_unaligned_vect): Likewise.
6556         (arm_block_set_aligned_vect): Likewise.
6557         * config/arm/neon.md (neon_copysignf<mode>): Likewise.
6558         * config/i386/i386.c (ix86_expand_vec_perm): Likewise.
6559         (expand_vec_perm_even_odd_pack): Likewise.
6560         (ix86_vector_duplicate_value): Use gen_vec_duplicate.
6561         * config/i386/sse.md (one_cmpl<mode>2): Use CONSTM1_RTX.
6562         * config/ia64/ia64.c (ia64_expand_vecint_compare): Use
6563         gen_const_vec_duplicate.
6564         * config/ia64/vect.md (addv2sf3, subv2sf3): Use CONST1_RTX.
6565         * config/mips/mips.c (mips_gen_const_int_vector): Use
6566         gen_const_vec_duplicate.
6567         (mips_expand_vector_init): Use CONST0_RTX.
6568         * config/powerpcspe/altivec.md (abs<mode>2, nabs<mode>2): Likewise.
6569         (define_split): Use gen_const_vec_duplicate.
6570         * config/rs6000/altivec.md (abs<mode>2, nabs<mode>2): Use CONST0_RTX.
6571         (define_split): Use gen_const_vec_duplicate.
6572         * config/s390/vx-builtins.md (vec_genmask<mode>): Likewise.
6573         (vec_ctd_s64, vec_ctd_u64, vec_ctsl, vec_ctul): Likewise.
6574         * config/spu/spu.c (spu_const): Likewise.
6576 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
6577             Alan Hayward  <alan.hayward@arm.com>
6578             David Sherwood  <david.sherwood@arm.com>
6580         * combine.c (can_change_dest_mode): Reject changes in
6581         REGMODE_NATURAL_SIZE.
6583 2017-10-31  Sandra Loosemore  <sandra@codesourcery.com>
6585         * configure.ac (--enable-libssp): New.
6586         (gcc_cv_libc_provides_ssp): Check for explicit setting before
6587         trying to determine target-specific default.  Adjust indentation.
6588         * configure: Regenerated.
6589         * doc/install.texi (Configuration): Expand --disable-libssp
6590         documentation.
6592 2017-10-31  Daniel Santos  <daniel.santos@pobox.com>
6594         config/i386/i386.c (ix86_expand_epilogue): Correct stack
6595         calculation.
6597 2017-10-31  Martin Jambor  <mjambor@suse.cz>
6599         PR c++/81702
6600         * gimple-fold.c (gimple_get_virt_method_for_vtable): Remove assert.
6602 2017-10-31  David Malcolm  <dmalcolm@redhat.com>
6604         * auto-profile.c (autofdo_source_profile::read): Use
6605         UNKNOWN_LOCATION rather than 0.
6606         * diagnostic-core.h (warning_at_rich_loc): Rename to...
6607         (warning_at): ...this overload.
6608         (warning_at_rich_loc_n): Rename to...
6609         (warning_n): ...this overload.
6610         (error_at_rich_loc): Rename to...
6611         (error_at): ...this overload.
6612         (pedwarn_at_rich_loc): Rename to...
6613         (pedwarn): ...this overload.
6614         (permerror_at_rich_loc): Rename to...
6615         (permerror): ...this overload.
6616         (inform_at_rich_loc): Rename to...
6617         (inform): ...this overload.
6618         * diagnostic.c: (diagnostic_n_impl): Delete location_t-based decl.
6619         (diagnostic_n_impl_richloc): Rename to...
6620         (diagnostic_n_impl): ...this rich_location *-based decl.
6621         (inform_at_rich_loc): Rename to...
6622         (inform): ...this, and add an assertion.
6623         (inform_n): Update for removal of location_t-based diagnostic_n_impl.
6624         (warning_at_rich_loc): Rename to...
6625         (warning_at): ...this, and add an assertion.
6626         (warning_at_rich_loc_n): Rename to...
6627         (warning_n): ...this, and add an assertion.
6628         (warning_n): Update location_t-based implementation for removal of
6629         location_t-based diagnostic_n_impl.
6630         (pedwarn_at_rich_loc): Rename to...
6631         (pedwarn): ...this, and add an assertion.
6632         (permerror_at_rich_loc): Rename to...
6633         (permerror): ...this, and add an assertion.
6634         (error_n): Update for removal of location_t-based diagnostic_n_impl.
6635         (error_at_rich_loc): Rename to...
6636         (error_at): ...this, and add an assertion.
6637         * gcc.c (do_spec_1): Use UNKNOWN_LOCATION rather than 0.
6638         (driver::do_spec_on_infiles): Likewise.
6639         * substring-locations.c (format_warning_va): Update for renaming
6640         of inform_at_rich_loc.
6642 2017-10-31  Michael Meissner  <meissner@linux.vnet.ibm.com>
6644         * builtins.def (DEF_FLOATN_BUILTIN): Change most _Float<N> and
6645         _Float<N>X built-in functions so that the variant without the
6646         "__builtin_" prefix is only enabled for the GNU C and Objective C
6647         languages when they are in non-strict ANSI/ISO mode.
6648         (DEF_EXT_LIB_FLOATN_NX_BUILTINS): Likewise.
6649         * target.def (floatn_builtin_p): Add a target hook to control
6650         whether _Float<N> and _Float<N>X built-in functions without the
6651         "__builtin_" prefix are enabled, and return true for C and
6652         Objective C in the default hook.  Include langhooks.h in
6653         targhooks.c.
6654         * targhooks.h (default_floatn_builtin_p): Likewise.
6655         * targhooks.c (default_floatn_builtin_p): Likewise.
6656         * doc/tm.texi.in (TARGET_FLOATN_BUILTIN_P): Document the
6657         floatn_builtin_p target hook.
6658         * doc/tm.texi (TARGET_FLOATN_BUILTIN_P): Likewise.
6660 2017-10-31  Matthew Fortune  <matthew.fortune@imgtec.com>
6661             Eric Botcazou  <ebotcazou@adacore.com>
6663         PR rtl-optimization/81803
6664         * lra-constraints.c (curr_insn_transform): Also reload the whole
6665         register for a strict subreg no wider than a word if this is for
6666         a WORD_REGISTER_OPERATIONS target.
6668 2017-10-31  Jason Merrill  <jason@redhat.com>
6670         * gdbinit.in: Skip over inlines from timevar.h.
6672 2017-10-31  Martin Liska  <mliska@suse.cz>
6674         * doc/gcov.texi: Document new option.
6675         * gcov.c (print_usage): Likewise print it.
6676         (process_args): Support the argument.
6677         (format_count): New function.
6678         (format_gcov): Use the function.
6680 2017-10-31  Martin Liska  <mliska@suse.cz>
6682         * gcov.c (struct name_map): do not use typedef.
6683         Define operator== and operator<.
6684         (name_search): Remove.
6685         (name_sort): Remove.
6686         (main): Do not allocate names.
6687         (process_file): Add vertical space.
6688         (generate_results): Use std::find.
6689         (release_structures): Do not release memory.
6690         (find_source): Use std::find.
6692 2017-10-31  Martin Liska  <mliska@suse.cz>
6694         * gcov.c (struct line_info): Remove it's typedef.
6695         (line_info::line_info): Add proper ctor.
6696         (line_info::has_block): Do not use a typedef.
6697         (struct source_info): Do not use typedef.
6698         (circuit): Likewise.
6699         (get_cycles_count): Likewise.
6700         (output_intermediate_file): Iterate via vector iterator.
6701         (add_line_counts): Use std::vector methods.
6702         (accumulate_line_counts): Likewise.
6703         (output_lines): Likewise.
6705 2017-10-31  Martin Liska  <mliska@suse.cz>
6707         * gcov.c (struct source_info): Remove typedef.
6708         (source_info::source_info): Add proper ctor.
6709         (accumulate_line_counts): Use struct, not it's typedef.
6710         (output_gcov_file): Likewise.
6711         (output_lines): Likewise.
6712         (main): Do not allocate an array.
6713         (output_intermediate_file): Use size of vector container.
6714         (process_file): Resize the vector.
6715         (generate_results): Do not preallocate, use newly added vector
6716         lines.
6717         (release_structures): Do not release sources.
6718         (find_source): Use vector methods.
6719         (add_line_counts): Do not use typedef.
6721 2017-10-31  Martin Liska  <mliska@suse.cz>
6723         * doc/gcov.texi: Document that.
6724         * gcov.c (add_line_counts): Mark lines with a non-executed
6725         statement.
6726         (output_line_beginning): Handle such lines.
6727         (output_lines): Pass new argument.
6728         (output_intermediate_file): Print it in intermediate format.
6730 2017-10-31  Martin Liska  <mliska@suse.cz>
6732         * color-macros.h: New file.
6733         * diagnostic-color.c: Factor out color related to macros to
6734         color-macros.h.
6735         * doc/gcov.texi: Document -k option.
6736         * gcov.c (INCLUDE_STRING): Include string.h.
6737         (print_usage): Add -k option.
6738         (process_args): Parse it.
6739         (pad_count_string): New function.
6740         (output_line_beginning): Likewise.
6741         (DEFAULT_LINE_START): New macro.
6742         (output_lines): Support color output.
6744 2017-10-31  Martin Liska  <mliska@suse.cz>
6746         PR gcov-profile/82633
6747         * doc/gcov.texi: Document -fkeep-{static,inline}-functions and
6748         their interaction with GCOV infrastructure.
6749         * configure.ac: Add -fkeep-{inline,static}-functions to
6750         coverage_flags.
6751         * configure: Regenerate.
6753 2017-10-31  Uros Bizjak  <ubizjak@gmail.com>
6755         PR target/82772
6756         * config/alpha/sync.md (fetchop_constr) <and>: Change to "rINM".
6758 2017-10-31  Segher Boessenkool  <segher@kernel.crashing.org>
6760         PR target/82674
6761         * config/rs6000/rs6000.md (allocate_stack): Force update interval
6762         into a register if it does not fit into an immediate offset field.
6764 2017-10-31  Olivier Hainque  <hainque@adacore.com>
6766         * gcc/Makefile.in (FLAGS_TO_PASS): Pass libsubdir as well.
6768 2017-10-31  Julia Koval  <julia.koval@intel.com>
6770         * config.gcc: Add gfniintrin.h.
6771         * config/i386/gfniintrin.h: New.
6772         * config/i386/i386-builtin-types.def
6773         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
6774         __builtin_ia32_vgf2p8affineinvqb_v64qi_mask,
6775         __builtin_ia32_vgf2p8affineinvqb_v32qi,
6776         __builtin_ia32_vgf2p8affineinvqb_v32qi_mask,
6777         __builtin_ia32_vgf2p8affineinvqb_v16qi,
6778         __builtin_ia32_vgf2p8affineinvqb_v16qi_mask): New builtins.
6779         * config/i386/i386-builtin.def (V64QI_FTYPE_V64QI_V64QI_INT_V64QI_UDI,
6780         V32QI_FTYPE_V32QI_V32QI_INT_V32QI_USI,
6781         V16QI_FTYPE_V16QI_V16QI_INT_V16QI_UHI,
6782         V64QI_FTYPE_V64QI_V64QI_INT): New types.
6783         * config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
6784         * config/i386/immintrin.h: Include gfniintrin.h.
6785         * config/i386/sse.md (vgf2p8affineinvqb_*) New pattern.
6787 2017-10-30  Eric Botcazou  <ebotcazou@adacore.com>
6789         * gcc.c (HAVE_TARGET_EXECUTABLE_SUFFIX): Remove old kludge.
6791 2017-10-30  Wilco Dijkstra  <wdijkstr@arm.com>
6793         * config/arm/arm.md (ashldi3): Remove shift by 1 expansion.
6794         (arm_ashldi3_1bit): Remove pattern.
6795         (ashrdi3): Remove shift by 1 expansion.
6796         (arm_ashrdi3_1bit): Remove pattern.
6797         (lshrdi3): Remove shift by 1 expansion.
6798         (arm_lshrdi3_1bit): Remove pattern.
6799         * config/arm/arm.c (arm_rtx_costs_internal): Slightly increase
6800         cost of ashldi3 by 1.
6801         * config/arm/neon.md (ashldi3_neon): Remove shift by 1 expansion.
6802         (<shift>di3_neon): Likewise.
6804 2017-10-30  Dominik Infuehr  <dominik.infuehr@theobroma-systems.com>
6806         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov): Rename
6807         both identically named patterns to (*aarch64_simd_mov<VD:mode>)
6808         and (*aarch64_simd_mov<VQ:mode>).
6809         (*aarch64_simd_mov<VD:mode>): Change type attribute to match
6810         pattern alternative.
6811         (*aarch64_simd_mov<VQ:mode>): Re-order and change type
6812         attributes to match pattern alternative.
6814 2017-10-30  Steven Munroe  <munroesj@gcc.gnu.org>
6816         * config.gcc (powerpc*-*-*): Add emmintrin.h.
6817         * config/rs6000/emmintrin.h: New file.
6818         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include emmintrin.h.
6820 2017-10-30  Wilco Dijkstra  <wdijkstr@arm.com>
6822         * config/arm/vfp.md (movdi_vfp): Merge changes from movdi_vfp_cortexa8.
6823         * (movdi_vfp_cortexa8): Remove pattern.
6825 2017-10-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6827         * doc/install.texi (Specific, alpha*-*-*): Remove DEC OSF/1
6828         etc. reference.
6829         (Specific, alpha*-dec-osf5.1): Remove.
6830         (Specific, mips-sgi-irix5): Remove.
6831         (Specific, mips-sgi-irix6): Remove.
6833 2017-10-30  Jakub Jelinek  <jakub@redhat.com>
6835         PR middle-end/22141
6836         * gimple-ssa-store-merging.c (merged_store_group::apply_stores): Fix
6837         arguments to clear_bit_region_be.
6839 2017-10-30  Jim Wilson  <wilson@tuliptree.org>
6841         * gimplify.c: Include memmodel.h.
6843 2017-10-30  Martin Jambor  <mjambor@suse.cz>
6845         * omp-grid.c (grid_attempt_target_gridification): Also insert a
6846         condition whether loop should be executed at all.
6848 2017-10-30  Will Schmidt  <will_schmidt@vnet.ibm.com>
6850         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
6851         gimple folding of vec_madd() intrinsics.
6852         * config/rs6000/altivec.md (mulv8hi3): Rename altivec_vmladduhm to
6853         fmav8hi4.  (altivec_vmladduhm): Rename to fmav8hi4.
6854         * config/rs6000/rs6000-builtin.def: Rename vmladduhm to fmav8hi4
6856 2017-10-30  Richard Biener  <rguenther@suse.de>
6858         PR tree-optimization/82762
6859         Revert
6860         2017-10-23  Richard Biener  <rguenther@suse.de>
6862         PR tree-optimization/82129
6863         Revert
6864         2017-08-01  Richard Biener  <rguenther@suse.de>
6866         PR tree-optimization/81181
6867         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
6868         (compute_antic): ... end of iteration here.
6870 2017-10-30  Joseph Myers  <joseph@codesourcery.com>
6872         * doc/invoke.texi (C Dialect Options): Document -std=c17,
6873         -std=iso9899:2017 and -std=gnu17.
6874         * doc/standards.texi (C Language): Document C17 support.
6875         * doc/cpp.texi (Overview): Mention -std=c17.
6876         (Standard Predefined Macros): Document C11 and C17 values of
6877         __STDC_VERSION__.  Do not refer to C99 support as incomplete.
6878         * doc/extend.texi (Inline): Do not list individual options for
6879         standards newer than C99.
6880         * dwarf2out.c (highest_c_language, gen_compile_unit_die): Handle
6881         "GNU C17".
6882         * config/rl78/rl78.c (rl78_option_override): Handle "GNU C17"
6883         language name.
6885 2017-10-30  Maxim Ostapenko  <m.ostapenko@samsung.com>
6887         * asan.c (asan_finish_file): Align asan globals array by shadow
6888         granularity.
6890 2017-10-30  Jakub Jelinek  <jakub@redhat.com>
6892         PR middle-end/22141
6893         * gimple-ssa-store-merging.c: Include rtl.h and expr.h.
6894         (struct store_immediate_info): Add bitregion_start and bitregion_end
6895         fields.
6896         (store_immediate_info::store_immediate_info): Add brs and bre
6897         arguments and initialize bitregion_{start,end} from those.
6898         (struct merged_store_group): Add bitregion_start, bitregion_end,
6899         align_base and mask fields.  Drop unnecessary struct keyword from
6900         struct store_immediate_info.  Add do_merge method.
6901         (clear_bit_region_be): Use memset instead of loop storing zeros.
6902         (merged_store_group::do_merge): New method.
6903         (merged_store_group::merge_into): Use do_merge.  Allow gaps in between
6904         stores as long as the surrounding bitregions have no gaps.
6905         (merged_store_group::merge_overlapping): Use do_merge.
6906         (merged_store_group::apply_stores): Test that bitregion_{start,end}
6907         is byte aligned, rather than requiring that start and width are
6908         byte aligned.  Drop unnecessary struct keyword from
6909         struct store_immediate_info.  Allocate and populate also mask array.
6910         Make start of the arrays relative to bitregion_start rather than
6911         start and size them according to bitregion_{end,start} difference.
6912         (struct imm_store_chain_info): Drop unnecessary struct keyword from
6913         struct store_immediate_info.
6914         (pass_store_merging::gate): Punt if BITS_PER_UNIT or CHAR_BIT is not 8.
6915         (pass_store_merging::terminate_all_aliasing_chains): Drop unnecessary
6916         struct keyword from struct store_immediate_info.
6917         (imm_store_chain_info::coalesce_immediate_stores): Allow gaps in
6918         between stores as long as the surrounding bitregions have no gaps.
6919         Formatting fixes.
6920         (struct split_store): Add orig non-static data member.
6921         (split_store::split_store): Initialize orig to false.
6922         (find_constituent_stmts): Return store_immediate_info *, non-NULL
6923         if there is exactly a single original stmt.  Change stmts argument
6924         to pointer from reference, if NULL, don't push anything to it.  Add
6925         first argument, use it to optimize skipping over orig stmts that
6926         are known to be before bitpos already.  Simplify.
6927         (split_group): Return unsigned int count how many stores are or
6928         would be needed rather than a bool.  Add allow_unaligned argument.
6929         Change split_stores argument from reference to pointer, if NULL,
6930         only do a dry run computing how many stores would be produced.
6931         Rewritten algorithm to use both alignment and misalign if
6932         !allow_unaligned and handle bitfield stores with gaps.
6933         (imm_store_chain_info::output_merged_store): Set start_byte_pos
6934         from bitregion_start instead of start.  Compute allow_unaligned
6935         here, if true, do 2 split_group dry runs to compute which one
6936         produces fewer stores and prefer aligned if equal.  Punt if
6937         new count is bigger or equal than original before emitting any
6938         statements, rather than during that.  Remove no longer needed
6939         new_ssa_names tracking.  Replace num_stmts with
6940         split_stores.length ().  Use 32-bit stack allocated entries
6941         in split_stores auto_vec.  Try to reuse original store lhs/rhs1
6942         if possible.  Handle bitfields with gaps.
6943         (pass_store_merging::execute): Ignore bitsize == 0 stores.
6944         Compute bitregion_{start,end} for the stores and construct
6945         store_immediate_info with that.  Formatting fixes.
6947 2017-10-30  Uros Bizjak  <ubizjak@gmail.com>
6949         PR target/82725
6950         * config/i386/i386.c (legitimate_pic_address_disp_p): Allow
6951         UNSPEC_DTPOFF and UNSPEC_NTPOFF with SImode immediate offset.
6953 2017-10-29  Jim Wilson  <wilson@tuliptree.org>
6955         * gimplify.c: Include tm_p.h.
6957         * common.opt (gcoff): Re-add as ignored option.
6958         (gcoff1, gcoff2, gcoff3): Likewise.
6960         * Makefile.in (OBJS): Delete sdbout.o.
6961         (GTFILES): Delete $(srcdir)/sdbout.c.
6962         * debug.h: Delete sdb_debug_hooks.
6963         * final.c: Delete sdbout.h include.
6964         (final_scan_insn): Delete SDB_DEBUG check.
6965         (rest_of_clean_state): Likewise.
6966         * output.h: Delete sdb_begin_function_line.
6967         * sdbout.c: Delete.
6968         * sdbout.h: Delete.
6969         * toplev.c: Delete sdbout.h include.
6970         (process_options): Delete SDB_DEBUG check.
6971         * tree-core.h (tree_type_common): Delete pointer field of
6972         tree_type_symtab.
6973         * tree.c (copy_node): Clear TYPE_SYMTAB_DIE instead of
6974         TYPE_SYMTAB_POINTER.
6975         * tree.h (TYPE_SYMTAB_POINTER): Delete.
6976         (TYPE_SYMTAB_IS_POINTER): Delete.
6977         (TYPE_SYMTAB_IS_DIE): Renumber.
6978         * xcoffout.c: Refer to former sdbout.c file.
6979         (xcoffout_begin_prologue): Use past tense for sdbout.c reference.
6981         * doc/install.texi (--with-stabs): Delete COFF and ECOFF info.
6982         * doc/invoke.texi (SEEALSO): Delete adb and sdb references.
6983         (Debugging Options): Delete -gcoff.
6984         (-gstabs): Delete SDB reference.
6985         (-gcoff): Delete.
6986         (-gcoff@var{level}): Delete.
6987         * doc/passes.texi (Debugging information output): Delete SDB and
6988         sdbout.c references.
6989         * doc/tm.texi: Regenerate.
6990         * doc/tm.texi.in (DWARF_CIE_DATA_ALIGNMENT): Delete SDB from xref.
6991         (SDB and DWARF): Change node name to DWARF and delete SDB and COFF
6992         references.
6993         (DEBUGGER_AUTO_OFFSET): Delete COFF and SDB references.
6994         (PREFERRED_DEBUGGING_TYPE): Delete SDB_DEBUG and -gcoff references.
6995         (SDB_DEBUGGING_INFO): Delete.
6996         (PUT_SDB_@dots{}, SDB_DELIM, SDB_ALLOW_UNKNOWN_REFERENCES)
6997         SDB_ALLOW_FORWARD_REFERENCES, SDB_OUTPUT_SOURCE_LINE): Delete.
6998         * target.def (output_source_filename): Delete COFF reference.
7000         * common.opt (gcoff): Delete.
7001         (gxcoff+): Update Negative chain.
7002         * defaults.h: Delete all references to SDB_DEBUGGING_INFO and
7003         SDB_DEBUG.
7004         * dwarf2out.c (gen_array_type_die): Change SDB to debuggers.
7005         * flag-types.h (enum debug_info_type): Delete SDB_DEBUG.
7006         * function.c (number_blocks): Delete SDB_DEBUGGING_INFO, SDB_DEBUG,
7007         and SDB references.
7008         (expand_function_start): Change sdb reference to past tense.
7009         (expand_function_end): Change sdb reference to past tense.
7010         * gcc.c (cpp_unique_options): Delete gcoff3 reference.
7011         * opts.c (debug_type_names): Delete coff entry.
7012         (common_handle_option): Delete OPT_gcoff case.
7013         * system.h (SDB_DEBUG, SDB_DEBUGGING_INFO): Poison.
7015         * config/dbxcoff.h (PREFERRED_DEBUGGING_TYPE): Set to DBX_DEBUG.
7016         * config/cris/cris.h: Delete SDB reference in comment.
7017         * config/i386/cygming.h: Don't define SDB_DEBUGGING_INFO.
7018         (ASM_DECLARE_FUNCTION_NAME): Delete SDB reference from comment.
7019         * config/i386/gas.h: Don't define SDB_DEBUGGING_INFO.
7020         * config/i386/i386.c (svr4_dbx_register_map): Change SDB references
7021         to past tense.
7022         (ix86_expand_prologue): Likewise.
7023         * config/i386/winnt.c (i386_pe_start_function): Don't check SDB_DEBUG.
7024         * config/ia64/ia64.h: Likewise.
7025         * config/m68k/m68kelf.h (DBX_REGISTER_NUMBER): Delete SDB reference.
7026         * config/mips/mips.h (SUBTARGET_ASM_DEBUGGING_SPEC): Delete gcoff*
7027         support.
7028         * config/mmix/mmix.h: Likewise.
7029         * config/nds32/nds32.c: Likewise.
7030         * config/stormy/storym16.h: Likewise.
7031         * config/visium/visium.h: Likewise.
7032         * config/vx-common.h (SDB_DEBUGGING_INFO): Delete undef.
7034 2017-10-28  Sandra Loosemore  <sandra@codesourcery.com>
7036         * config/nios2/nios2.h (FRAME_GROWS_DOWNWARD): Define to 1.
7037         * config/nios2/nios2.c (nios2_initial_elimination_offset):  Make
7038         FRAME_POINTER_REGNUM point at high end of local var area.
7040 2017-10-27  Eric Botcazou  <ebotcazou@adacore.com>
7042         * bb-reorder.c (find_traces_1_round): Fix off-by-one index.
7043         Move comment around.  Do not reset best_edge for a copiable
7044         destination if the copy would cause a partition change.
7045         (better_edge_p): Remove redundant check.
7047 2017-10-27  Uros Bizjak  <ubizjak@gmail.com>
7049         * config/i386/i386-protos.h (ix86_fp_compare_mode): Remove prototype.
7051 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
7053         * builtins.c (CASE_MATHFN_FLOATN): New helper macro to add cases
7054         for math functions that have _Float<N> and _Float<N>X variants.
7055         (mathfn_built_in_2): Add support for math functions that have
7056         _Float<N> and _Float<N>X variants.
7057         (DEF_INTERNAL_FLT_FLOATN_FN): New helper macro.
7058         (expand_builtin_mathfn_ternary): Add support for fma with
7059         _Float<N> and _Float<N>X variants.
7060         (expand_builtin): Likewise.
7061         (fold_builtin_3): Likewise.
7062         * builtins.def (DEF_EXT_LIB_FLOATN_NX_BUILTINS): New macro to
7063         create math function _Float<N> and _Float<N>X variants as external
7064         library builtins.
7065         (BUILT_IN_COPYSIGN _Float<N> and _Float<N>X variants) Use
7066         DEF_EXT_LIB_FLOATN_NX_BUILTINS to make built-in functions using
7067         the __builtin_ prefix and if not strict ansi, without the prefix.
7068         (BUILT_IN_FABS _Float<N> and _Float<N>X variants): Likewise.
7069         (BUILT_IN_FMA _Float<N> and _Float<N>X variants): Likewise.
7070         (BUILT_IN_FMAX _Float<N> and _Float<N>X variants): Likewise.
7071         (BUILT_IN_FMIN _Float<N> and _Float<N>X variants): Likewise.
7072         (BUILT_IN_NAN _Float<N> and _Float<N>X variants): Likewise.
7073         (BUILT_IN_SQRT _Float<N> and _Float<N>X variants): Likewise.
7074         * builtin-types.def (BT_FN_FLOAT16_FLOAT16_FLOAT16_FLOAT16): New
7075         function signatures for fma _Float<N> and _Float<N>X variants.
7076         (BT_FN_FLOAT32_FLOAT32_FLOAT32_FLOAT32): Likewise.
7077         (BT_FN_FLOAT64_FLOAT64_FLOAT64_FLOAT64): Likewise.
7078         (BT_FN_FLOAT128_FLOAT128_FLOAT128_FLOAT128): Likewise.
7079         (BT_FN_FLOAT32X_FLOAT32X_FLOAT32X_FLOAT32X): Likewise.
7080         (BT_FN_FLOAT64X_FLOAT64X_FLOAT64X_FLOAT64X): Likewise.
7081         (BT_FN_FLOAT128X_FLOAT128X_FLOAT128X_FLOAT128X): Likewise.
7082         * gencfn-macros.c (print_case_cfn): Add support for math functions
7083         that have _Float<N> and _Float<N>X variants.
7084         (print_define_operator_list): Likewise.
7085         (fltfn_suffixes): Likewise.
7086         (main): Likewise.
7087         * internal-fn.def (DEF_INTERNAL_FLT_FLOATN_FN): New helper macro
7088         for math functions that have _Float<N> and _Float<N>X variants.
7089         (SQRT): Add support for sqrt, copysign, fmin and fmax _Float<N>
7090         and _Float<N>X variants.
7091         (COPYSIGN): Likewise.
7092         (FMIN): Likewise.
7093         (FMAX): Likewise.
7094         * fold-const.c (tree_call_nonnegative_warnv_p): Add support for
7095         copysign, fma, fmax, fmin, and sqrt _Float<N> and _Float<N>X
7096         variants.
7097         (integer_valued_read_call_p): Likewise.
7098         * fold-const-call.c (fold_const_call_ss): Likewise.
7099         (fold_const_call_sss): Add support for copysign, fmin, and fmax
7100         _Float<N> and _Float<N>X variants.
7101         (fold_const_call_ssss): Add support for fma _Float<N> and
7102         _Float<N>X variants.
7103         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Add
7104         support for copysign and fma _Float<N> and _Float<N>X variants.
7105         (backprop::process_builtin_call_use): Likewise.
7106         * tree-call-cdce.c (can_test_argument_range); Add support for
7107         sqrt _Float<N> and _Float<N>X variants.
7108         (edom_only_function): Likewise.
7109         (get_no_error_domain): Likewise.
7110         * tree-ssa-math-opts.c (internal_fn_reciprocal): Likewise.
7111         * tree-ssa-reassoc.c (attempt_builtin_copysign): Add support for
7112         copysign _Float<N> and _Float<N>X variants.
7113         * config/rs6000/rs6000-builtin.def (SQRTF128): Delete, this is now
7114         handled by machine independent code.
7115         (FMAF128): Likewise.
7116         * doc/cpp.texi (Common Predefined Macros): Document defining
7117         __FP_FAST_FMAF<N> and __FP_FAST_FMAF<N>X if the backend supports
7118         fma _Float<N> and _Float<N>X variants.
7120 2017-10-27  Uros Bizjak  <ubizjak@gmail.com>
7122         PR target/82692
7123         * config/i386/i386-modes.def (CCFPU): Remove definition.
7124         * config/i386/i386.c (put_condition_mode): Remove CCFPU mode handling.
7125         (ix86_cc_modes_compatible): Ditto.
7126         (ix86_expand_carry_flag_compare): Ditto.
7127         (ix86_expand_int_movcc): Ditto.
7128         (ix86_expand_int_addcc): Ditto.
7129         (ix86_reverse_condition): Ditto.
7130         (ix86_unordered_fp_compare): Rename from ix86_fp_compare_mode.
7131         Return true/false for unordered/ordered fp comparisons.
7132         (ix86_cc_mode): Always return CCFPmode for float mode comparisons.
7133         (ix86_prepare_fp_compare_args): Update for rename.
7134         (ix86_expand_fp_compare): Update for rename.  Generate unordered
7135         compare RTXes wrapped with UNSPEC_NOTRAP unspec.
7136         (ix86_expand_sse_compare_and_jump): Ditto.
7137         * config/i386/predicates.md (fcmov_comparison_operator):
7138         Remove CCFPU mode handling.
7139         (ix86_comparison_operator): Ditto.
7140         (ix86_carry_flag_operator): Ditto.
7141         * config/i386/i386.md (UNSPEC_NOTRAP): New unspec.
7142         (*cmpu<mode>_i387): Wrap compare RTX with UNSPEC_NOTRAP unspec.
7143         (*cmpu<mode>_cc_i387): Ditto.
7144         (FPCMP): Remove mode iterator.
7145         (unord): Remove mode attribute.
7146         (unord_subst): New define_subst transformation
7147         (unord): New define_subst attribute.
7148         (unordered): Ditto.
7149         (*cmpi<unord><MODEF:mode>): Rewrite using unord_subst transformation.
7150         (*cmpi<unord>xf_i387): Ditto.
7151         * config/i386/sse.md (<sse>_<unord>comi<round_saeonly_name>): Merge
7152         from <sse>_comi<round_saeonly_name> and <sse>_ucomi<round_saeonly_name>
7153         using unord_subst transformation.
7154         * config/i386/subst.md (SUBST_A): Remove CCFP and CCFPU modes.
7155         (round_saeonly): Also handle CCFP mode.
7156         * reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_NOTRAP unspec.
7157         Remove UNSPEC_SAHF unspec handling.
7159 2017-10-27  Jan Hubicka  <hubicka@ucw.cz>
7161         * x86-tune.def (X86_TUNE_INTER_UNIT_MOVES_TO_VEC): Disable for Zen.
7163 2017-10-27  Jeff Law  <law@redhat.com>
7165         * gimple-ssa-sprintf.c: Include domwalk.h.
7166         (class sprintf_dom_walker): New class, derived from dom_walker.
7167         (sprintf_dom_walker::before_dom_children): New function.
7168         (struct call_info): Moved into sprintf_dom_walker class
7169         (compute_formath_length, handle_gimple_call): Likewise.
7170         (sprintf_length::execute): Call the dominator walker rather
7171         than walking the statements.
7173         * tree-vrp.c (check_all_array_refs): Do not use wi->info to smuggle
7174         gimple statement locations.
7175         (check_array_bounds): Corresponding changes.  Get the statement's
7176         location directly from wi->stmt.
7178 2017-10-27  Palmer Dabbelt  <palmer@dabbelt.com>
7180         PR target/82717
7181         * doc/invoke.texi (RISC-V) <-mabi>: Correct and improve.
7183 2017-10-27  Jan Hubicka  <hubicka@ucw.cz>
7185         * config/i386/x86-tune.def (X86_TUNE_PARTIAL_REG_DEPENDENCY,
7186         X86_TUNE_MOVX): Disable for Haswell and newer CPUs.
7188 2017-10-27  Jakub Jelinek  <jakub@redhat.com>
7190         PR target/82703
7191         * config/i386/i386-protos.h (maybe_get_pool_constant): Removed.
7192         * config/i386/i386.c (maybe_get_pool_constant): Removed.
7193         (ix86_split_to_parts): Use avoid_constant_pool_reference instead of
7194         maybe_get_pool_constant.
7195         * config/i386/predicates.md (zero_extended_scalar_load_operand):
7196         Likewise.
7198 2017-10-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7200         * doc/install.texi (Specific, i?86-*-solaris2.10): Simplify gas
7201         2.26 caveat.  Update gas and gld versions.
7202         (Specific, *-*-solaris2*): Update binutils version.  Remove caveat
7203         reference.
7205 2017-10-27  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7207         * cgraph.h (set_malloc_flag): Declare.
7208         * cgraph.c (set_malloc_flag_1): New function.
7209         (set_malloc_flag): Likewise.
7210         * ipa-fnsummary.h (ipa_call_summary): Add new field is_return_callee.
7211         * ipa-fnsummary.c (ipa_call_summary::reset): Set is_return_callee to
7212         false.
7213         (read_ipa_call_summary): Add support for reading is_return_callee.
7214         (write_ipa_call_summary): Stream is_return_callee.
7215         * ipa-inline.c (ipa_inline): Remove call to ipa_free_fn_summary.
7216         * ipa-pure-const.c: Add headers ssa.h, alloc-pool.h, symbol-summary.h,
7217         ipa-prop.h, ipa-fnsummary.h.
7218         (pure_const_names): Change to static.
7219         (malloc_state_e): Define.
7220         (malloc_state_names): Define.
7221         (funct_state_d): Add field malloc_state.
7222         (varying_state): Set malloc_state to STATE_MALLOC_BOTTOM.
7223         (check_retval_uses): New function.
7224         (malloc_candidate_p): Likewise.
7225         (analyze_function): Add support for malloc attribute.
7226         (pure_const_write_summary): Stream malloc_state.
7227         (pure_const_read_summary): Add support for reading malloc_state.
7228         (dump_malloc_lattice): New function.
7229         (propagate_malloc): New function.
7230         (warn_function_malloc): New function.
7231         (ipa_pure_const::execute): Call propagate_malloc and
7232         ipa_free_fn_summary.
7233         (pass_local_pure_const::execute): Add support for malloc attribute.
7234         * ssa-iterators.h (RETURN_FROM_IMM_USE_STMT): New macro.
7235         * doc/invoke.texi: Document Wsuggest-attribute=malloc.
7237 2017-10-27  Martin Liska  <mliska@suse.cz>
7239         PR gcov-profile/82457
7240         * doc/invoke.texi: Document that one needs a non-strict ISO mode
7241         for fork-like functions to be properly instrumented.
7243 2017-10-27  Richard Biener  <rguenther@suse.de>
7245         PR middle-end/81659
7246         * tree-eh.c (pass_lower_eh_dispatch::execute): Free dominator
7247         info when we redirected EH.
7249 2017-10-26  Michael Collison  <michael.collison@arm.com>
7251         * config/aarch64/aarch64.md(<optab>_trunc><vf><GPI:mode>2):
7252         New pattern.
7253         (<optab>_trunchf<GPI:mode>2: New pattern.
7254         (<optab>_trunc<vgp><GPI:mode>2: New pattern.
7255         * config/aarch64/iterators.md (wv): New mode attribute.
7256         (vf, VF): New mode attributes.
7257         (vgp, VGP): New mode attributes.
7258         (s): Update attribute with SImode and DImode prefixes.
7260 2017-10-26  Sandra Loosemore  <sandra@codesourcery.com>
7262         * config/nios2/constraints.md ("S"): Match r0rel_constant_p too.
7263         * config/nios2/nios2-protos.h (r0rel_constant_p): Declare.
7264         * config/nios2/nios2.c: (nios2_r0rel_sec_regex): New.
7265         (nios2_option_overide): Initialize it.  Don't allow R0-relative
7266         addressing with PIC.
7267         (nios2_rtx_costs): Handle r0rel_constant_p like gprel_constant_p.
7268         (nios2_symbolic_constant_p): Likewise.
7269         (nios2_legitimate_address_p): Likewise.
7270         (nios2_r0rel_section_name_p): New.
7271         (nios2_symbol_ref_in_r0rel_data_p): New.
7272         (nios2_emit_move_sequence): Handle r0rel_constant_p.
7273         (r0rel_constant_p): New.
7274         (nios2_print_operand_address): Handle r0rel_constant_p.
7275         (nios2_cdx_narrow_form_p): Likewise.
7276         * config/nios2/nios2.opt (mr0rel-sec=): New option.
7277         * doc/invoke.texi (Option Summary): Add -mr0rel-sec.
7278         (Nios II Options): Document -mr0rel-sec.
7280 2017-10-26  Sandra Loosemore  <sandra@codesourcery.com>
7282         * config/nios2/nios2.c: Include xregex.h.
7283         (nios2_gprel_sec_regex): New.
7284         (nios2_option_overide): Initialize it.  Don't allow GP-relative
7285         addressing with PIC.
7286         (nios2_small_section_name_p): Check for regex match.
7287         * config/nios2/nios2.opt (mgprel-sec=): New option.
7288         * doc/invoke.texi (Option Summary): Add -mgprel-sec.
7289         (Nios II Options): Document -mgprel-sec.
7291 2017-10-26  Jim Wilson  <wilson@tuliptree.org>
7293         * doc/invoke.texi (-fdebug-prefix-map): Expand documentation.
7295 2017-10-26  Tom de Vries  <tom@codesourcery.com>
7297         PR tree-optimization/82707
7298         * gimple.c (gimple_copy): Fix unsharing of
7299         GIMPLE_OMP_{SINGLE,TARGET,TEAMS}.
7301 2017-10-26  Olga Makhotina  <olga.makhotina@intel.com>
7303         * config/i386/avx512fintrin.h (_mm512_cmpeq_pd_mask,
7304         _mm512_cmple_pd_mask, _mm512_cmplt_pd_mask,
7305         _mm512_cmpneq_pd_mask, _mm512_cmpnle_pd_mask,
7306         _mm512_cmpnlt_pd_mask, _mm512_cmpord_pd_mask,
7307         _mm512_cmpunord_pd_mask, _mm512_mask_cmpeq_pd_mask,
7308         _mm512_mask_cmple_pd_mask, _mm512_mask_cmplt_pd_mask,
7309         _mm512_mask_cmpneq_pd_mask, _mm512_mask_cmpnle_pd_mask,
7310         _mm512_mask_cmpnlt_pd_mask, _mm512_mask_cmpord_pd_mask,
7311         _mm512_mask_cmpunord_pd_mask, _mm512_cmpeq_ps_mask,
7312         _mm512_cmple_ps_mask, _mm512_cmplt_ps_mask,
7313         _mm512_cmpneq_ps_mask, _mm512_cmpnle_ps_mask,
7314         _mm512_cmpnlt_ps_mask, _mm512_cmpord_ps_mask,
7315         _mm512_cmpunord_ps_mask, _mm512_mask_cmpeq_ps_mask,
7316         _mm512_mask_cmple_ps_mask, _mm512_mask_cmplt_ps_mask,
7317         _mm512_mask_cmpneq_ps_mask, _mm512_mask_cmpnle_ps_mask,
7318         _mm512_mask_cmpnlt_ps_mask, _mm512_mask_cmpord_ps_mask,
7319         _mm512_mask_cmpunord_ps_mask): New intrinsics.
7321 2017-10-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
7323         * config/rs6000/aix.h (TARGET_IEEEQUAD_DEFAULT): Set long double
7324         default to IBM.
7325         * config/rs6000/darwin.h (TARGET_IEEEQUAD_DEFAULT): Likewise.
7326         * config/rs6000/rs6000.opt (-mabi=ieeelongdouble): Move the
7327         warning to rs6000.c.  Remove the Undocumented flag, since it has
7328         been documented.
7329         (-mabi=ibmlongdouble): Likewise.
7330         * config/rs6000/rs6000.c (TARGET_IEEEQUAD_DEFAULT): If it is not
7331         already set, set the default format for long double.
7332         (rs6000_debug_reg_global): Print whether long double is IBM or
7333         IEEE.
7334         (rs6000_option_override_internal): Rework setting long double
7335         format.  Only warn if the user is changing the long double default
7336         and they did not use -Wno-psabi.
7337         * doc/invoke.texi (PowerPC options): Update the documentation for
7338         -mabi=ieeelongdouble and -mabi=ibmlongdouble.
7340 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
7341             Alan Hayward  <alan.hayward@arm.com>
7342             David Sherwood  <david.sherwood@arm.com>
7344         * rtl.h (wider_subreg_mode): New function.
7345         * ira.h (ira_sort_regnos_for_alter_reg): Take a machine_mode *
7346         rather than an unsigned int *.
7347         * ira-color.c (regno_max_ref_width): Replace with...
7348         (regno_max_ref_mode): ...this new variable.
7349         (coalesced_pseudo_reg_slot_compare): Update accordingly.
7350         Use wider_subreg_mode.
7351         (ira_sort_regnos_for_alter_reg): Likewise.  Take a machine_mode *
7352         rather than an unsigned int *.
7353         * lra-constraints.c (uses_hard_regs_p): Use wider_subreg_mode.
7354         (process_alt_operands): Likewise.
7355         (invariant_p): Likewise.
7356         * lra-spills.c (assign_mem_slot): Likewise.
7357         (add_pseudo_to_slot): Likewise.
7358         * lra.c (collect_non_operand_hard_regs): Likewise.
7359         (add_regs_to_insn_regno_info): Likewise.
7360         * reload1.c (regno_max_ref_width): Replace with...
7361         (regno_max_ref_mode): ...this new variable.
7362         (reload): Update accordingly.  Update call to
7363         ira_sort_regnos_for_alter_reg.
7364         (alter_reg): Update to use regno_max_ref_mode.  Call wider_subreg_mode.
7365         (init_eliminable_invariants): Update to use regno_max_ref_mode.
7366         (scan_paradoxical_subregs): Likewise.
7368 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
7370         * config/aarch64/aarch64.h (EXIT_IGNORE_STACK): Set if alloca is used.
7371         (aarch64_frame): Add emit_frame_chain boolean.
7372         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
7373         Move eh_return case to aarch64_layout_frame.
7374         (aarch64_layout_frame): Initialize emit_frame_chain.
7375         (aarch64_expand_prologue): Use emit_frame_chain.
7377 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
7379         * config/aarch64/aarch64.c (aarch64_layout_frame):
7380         Ensure LR is always stored at the bottom of the callee-saves.
7381         Remove rarely used frame layout which saves callee-saves at top of
7382         frame, so the store of LR can be used as a valid probe in all cases.
7384 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
7386         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
7387         Improve unaligned TImode/TFmode base/offset split.
7389 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
7390             Alan Hayward  <alan.hayward@arm.com>
7391             David Sherwood  <david.sherwood@arm.com>
7393         * caller-save.c (mark_referenced_regs):  Use read_modify_subreg_p.
7394         * combine.c (find_single_use_1): Likewise.
7395         (expand_field_assignment): Likewise.
7396         (move_deaths): Likewise.
7397         * lra-constraints.c (simplify_operand_subreg): Likewise.
7398         (curr_insn_transform): Likewise.
7399         * lra.c (collect_non_operand_hard_regs): Likewise.
7400         (add_regs_to_insn_regno_info): Likewise.
7401         * rtlanal.c (reg_referenced_p): Likewise.
7402         (covers_regno_no_parallel_p): Likewise.
7404 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
7406         * wide-int-print.cc (print_hex): Loop based on extract_uhwi.
7407         Don't print any bits outside the precision of the value.
7408         * wide-int.cc (test_printing): Add some new tests.
7410 2017-10-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7412         * configure.ac (gcc_cv_as_ix86_xbrace_comment): Check if assembler
7413         supports -xbrace_comment option.
7414         * configure: Regenerate.
7415         * config.in: Regenerate.
7416         * config/i386/sol2.h (ASM_XBRACE_COMMENT_SPEC): Define.
7417         (ASM_CPU_SPEC): Use it.
7419 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
7421         * target.def (static_rtx_alignment): New hook.
7422         * targhooks.h (default_static_rtx_alignment): Declare.
7423         * targhooks.c (default_static_rtx_alignment): New function.
7424         * doc/tm.texi.in (TARGET_STATIC_RTX_ALIGNMENT): New hook.
7425         * doc/tm.texi: Regenerate.
7426         * varasm.c (force_const_mem): Use targetm.static_rtx_alignment
7427         instead of targetm.constant_alignment.  Remove call to
7428         set_mem_attributes.
7429         * config/cris/cris.c (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
7430         (cris_preferred_mininum_alignment): New function, split out from...
7431         (cris_constant_alignment): ...here.
7432         (cris_static_rtx_alignment): New function.
7433         * config/i386/i386.c (ix86_static_rtx_alignment): New function,
7434         split out from...
7435         (ix86_constant_alignment): ...here.
7436         (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
7437         * config/mmix/mmix.c (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
7438         (mmix_static_rtx_alignment): New function.
7439         * config/spu/spu.c (spu_static_rtx_alignment): New function.
7440         (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
7442 2017-10-26  Tamar Christina  <tamar.christina@arm.com>
7444         PR target/81800
7445         * config/aarch64/aarch64.md (lrint<GPF:mode><GPI:mode>2):
7446         Add flag_trapping_math and flag_fp_int_builtin_inexact.
7448 2017-10-25  Palmer Dabbelt  <palmer@dabbelt.com>
7450         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Define.
7451         * config/riscv/pic.md (local_pic_load): Rename to local_pic_load_s,
7452         mark as a sign-extending load.
7453         (local_pic_load_u): Define.
7455 2017-10-25  Eric Botcazou  <ebotcazou@adacore.com>
7457         PR middle-end/82062
7458         * fold-const.c (operand_equal_for_comparison_p): Also return true
7459         if ARG0 is a simple variant of ARG1 with narrower precision.
7460         (fold_ternary_loc): Always pass unstripped operands to the predicate.
7462 2017-10-25  Jan Hubicka  <hubicka@ucw.cz>
7464         * i386.c (ix86_builtin_vectorization_cost): Compute scatter/gather
7465         cost correctly.
7466         * i386.h (processor_costs): Add gather_static, gather_per_elt,
7467         scatter_static, scatter_per_elt.
7468         * x86-tune-costs.h: Add new cost entries.
7470 2017-10-25  Richard Biener  <rguenther@suse.de>
7472         * tree-ssa-sccvn.h (vn_eliminate): Declare.
7473         * tree-ssa-pre.c (class eliminate_dom_walker, eliminate,
7474         class pass_fre): Move to ...
7475         * tree-ssa-sccvn.c (class eliminate_dom_walker, vn_eliminate,
7476         class pass_fre): ... here and adjust for statistics.
7478 2017-10-25  Jakub Jelinek  <jakub@redhat.com>
7480         PR libstdc++/81706
7481         * attribs.c (attribute_value_equal): Use omp_declare_simd_clauses_equal
7482         for comparison of OMP_CLAUSEs regardless of flag_openmp{,_simd}.
7483         (duplicate_one_attribute, copy_attributes_to_builtin): New functions.
7484         * attribs.h (duplicate_one_attribute, copy_attributes_to_builtin): New
7485         declarations.
7487 2017-10-25  Richard Biener  <rguenther@suse.de>
7489         * tree-ssa-pre.c (need_eh_cleanup, need_ab_cleanup, el_to_remove,
7490         el_to_fixup, el_todo, el_avail, el_avail_stack, eliminate_avail,
7491         eliminate_push_avail, eliminate_insert): Move inside...
7492         (class eliminate_dom_walker): ... this class in preparation
7493         of move.
7494         (fini_eliminate): Remove by merging with ...
7495         (eliminate): ... this function.  Adjust for class changes.
7496         (pass_pre::execute): Remove fini_eliminate call.
7497         (pass_fre::execute): Likewise.
7499 2017-10-24  Jakub Jelinek  <jakub@redhat.com>
7501         PR target/82460
7502         * config/i386/sse.md (UNSPEC_VPERMI2, UNSPEC_VPERMI2_MASK): Remove.
7503         (VPERMI2, VPERMI2I): New mode iterators.
7504         (<avx512>_vpermi2var<mode>3_maskz): Remove 3 define_expand patterns.
7505         (<avx512>_vpermi2var<mode>3<sd_maskz_name>): Remove 3 define_insn
7506         patterns.
7507         (<avx512>_vpermi2var<mode>3_mask): New define_expand using VPERMI2
7508         mode iterator.  Remove 3 old define_insn patterns.
7509         (*<avx512>_vpermi2var<mode>3_mask): 2 new define_insn patterns.
7510         (<avx512>_vpermt2var<mode>3_maskz): Adjust 1 define_expand to use
7511         VPERMI2 mode iterator, remove the other two expanders.
7512         (<avx512>_vpermt2var<mode>3<sd_maskz_name>): Adjust 1 define_insn
7513         to use VPERMI2 mode iterator, add another alternative for vpermi2*
7514         instructions, remove the other two patterns.
7515         (<avx512>_vpermt2var<mode>3_mask): Adjust 1 define_insn to use VPERMI2
7516         mode iterator, remove the other two patterns.
7517         * config/i386/i386.c (ix86_expand_vec_perm_vpermi2): Renamed to ...
7518         (ix86_expand_vec_perm_vpermt2): ... this.  Swap mask and op0
7519         arguments, use gen_*vpermt2* expanders instead of gen_*vpermi2*
7520         and adjust argument order accordingly.
7521         (ix86_expand_vec_perm): Adjust caller.
7522         (expand_vec_perm_1): Likewise.
7523         (expand_vec_perm_vpermi2_vpshub2): Rename to ...
7524         (expand_vec_perm_vpermt2_vpshub2): ... this.
7525         (ix86_expand_vec_perm_const_1): Adjust caller.
7526         (ix86_vectorize_vec_perm_const_ok): Adjust comments.
7528         PR target/82370
7529         * config/i386/sse.md (VIMAX_AVX2): Remove V4TImode.
7530         (VIMAX_AVX2_AVX512BW, VIMAX_AVX512VL): New mode iterators.
7531         (vec_shl_<mode>): Remove unused expander.
7532         (avx512bw_<shift_insn><mode>3): New define_insn.
7533         (<sse2_avx2>_ashl<mode>3, <sse2_avx2>_lshr<mode>3): Replaced by ...
7534         (<sse2_avx2>_<shift_insn><mode>3): ... this.  New define_insn.
7536 2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>
7538         PR c++/82466
7539         * doc/invoke.texi ([Wbuiltin-declaration-mismatch]): Extend
7540         description.
7542 2017-10-24  Wilco Dijkstra  <wdijkstr@arm.com>
7544         PR rtl-optimization/82396
7545         * gcc/haifa-sched.c (ready_sort_real): Remove qsort workaround.
7546         (autopref_multipass_init): Simplify initialization.
7547         (autopref_rank_data): Simplify sort order.
7548         * gcc/sched-int.h (autopref_multipass_data_): Remove
7549         multi_mem_insn_p, min_offset and max_offset.
7551 2017-10-24  Wilco Dijkstra  <wdijkstr@arm.com>
7553         PR middle-end/60580
7554         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
7555         Check special value of flag_omit_frame_pointer.
7556         (aarch64_can_eliminate): Likewise.
7557         (aarch64_override_options_after_change_1): Simplify handling of
7558         -fomit-frame-pointer and -fomit-leaf-frame-pointer.
7560 2017-10-24  Richard Biener  <rguenther@suse.de>
7562         PR tree-optimization/82697
7563         * tree-ssa-phiopt.c (cond_store_replacement): Use alias-set
7564         zero for conditional load and unconditional store.
7566 2017-10-24  H.J. Lu  <hongjiu.lu@intel.com>
7568         * doc/install.texi: Document bootstrap-cet.
7570 2017-10-24  H.J. Lu  <hongjiu.lu@intel.com>
7572         PR target/82659
7573         * config/i386/i386.c (rest_of_insert_endbranch): Don't insert
7574         ENDBR instruction at function entrance if function is only
7575         called directly.
7577 2017-10-24  Jakub Jelinek  <jakub@redhat.com>
7579         PR target/82628
7580         * config/i386/i386.md (addcarry<mode>, subborrow<mode>): Change
7581         patterns to better describe from which operation the CF is computed.
7582         (addcarry<mode>_0, subborrow<mode>_0): New patterns.
7583         * config/i386/i386.c (ix86_expand_builtin) <case handlecarry>: Pass
7584         one LTU with [DT]Imode and another one with [SD]Imode.  If arg0
7585         is 0, use _0 suffixed expanders instead of emitting a comparison
7586         before it.
7588 2017-10-06  Sergey Shalnov  <Sergey.Shalnov@intel.com>
7590         * config/i386/i386.md(*movsf_internal, *movdf_internal):
7591         Avoid 512-bit AVX modes for TARGET_PREFER_AVX256.
7593 2017-10-24  Eric Botcazou  <ebotcazou@adacore.com>
7595         PR middle-end/82569
7596         * tree-outof-ssa.h (always_initialized_rtx_for_ssa_name_p): Delete.
7597         * expr.c (expand_expr_real_1) <expand_decl_rtl>: Revert latest change.
7598         * loop-iv.c (iv_get_reaching_def): Likewise.
7599         * cfgexpand.c (expand_one_ssa_partition): Initialize the RTX if the
7600         variable is promoted and the partition contains undefined values.
7602 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
7604         * config/nios2/nios2.c (nios2_rtx_costs): Make costs better
7605         reflect reality.
7606         (nios2_address_cost): Define.
7607         (nios2_legitimize_address): Recognize (exp + constant) directly.
7608         (TARGET_ADDRESS_COST): Define.
7610 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
7612         * config/nios2/nios2-protos.h (nios2_large_constant_p): Declare.
7613         (nios2_symbolic_memory_operand_p): Declare.
7614         (nios2_split_large_constant): Declare.
7615         (nios2_split_symbolic_memory_operand): Declare.
7616         * config/nios2/nios2.c: Adjust includes.
7617         (nios2_symbolic_constant_allowed): New.
7618         (nios2_symbolic_constant_p): New.
7619         (nios2_plus_symbolic_constant_p): New.
7620         (nios2_valid_addr_expr_p): Recognize addresses involving
7621         symbolic constants.
7622         (nios2_legitimate_address_p): Likewise, also LO_SUM.
7623         (nios2_symbolic_memory_operand_p): New.
7624         (nios2_large_constant_p): New.
7625         (nios2_split_large_constant): New.
7626         (nios2_split_plus_large_constant): New.
7627         (nios2_split_symbolic_memory_operand): New.
7628         (nios2_legitimize_address): Code refactoring.  Handle addresses
7629         involving symbolic constants.
7630         (nios2_emit_move_sequence): Likewise.
7631         (nios2_print_operand): Improve error output.
7632         (nios2_print_operand_address): Handle LO_SUM.
7633         (nios2_cdx_narrow_form_p): Likewise.
7634         * config/nios2/nios2.md (movqi_internal): Add splitter for memory
7635         operands involving symbolic constants.
7636         (movhi_internal, movsi_internal): Likewise.
7637         (zero_extendhisi2, zero_extendqi<mode>2): Likewise.
7638         (extendhisi2, extendqi<mode>2): Likewise.
7640 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
7642         * tree-pass.h (PROP_rtl_split_insns): Define.
7643         * recog.c (pass_data_split_all_insns): Provide PROP_rtl_split_insns.
7645 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
7647         * config/nios2/nios2.c (TARGET_LRA_P): Don't override.
7649 2017-10-23  Jakub Jelinek  <jakub@redhat.com>
7651         PR debug/82630
7652         * target.def (const_not_ok_for_debug_p): Default to
7653         default_const_not_ok_for_debug_p instead of hook_bool_rtx_false.
7654         * targhooks.h (default_const_not_ok_for_debug_p): New declaration.
7655         * targhooks.c (default_const_not_ok_for_debug_p): New function.
7656         * dwarf2out.c (const_ok_for_output_1): Only reject UNSPECs for
7657         which targetm.const_not_ok_for_debug_p returned true.
7658         * config/arm/arm.c (arm_const_not_ok_for_debug_p): Return true
7659         for UNSPECs.
7660         * config/powerpcspe/powerpcspe.c (rs6000_const_not_ok_for_debug_p):
7661         Likewise.
7662         * config/rs6000/rs6000.c (rs6000_const_not_ok_for_debug_p): Likewise.
7663         * config/i386/i386.c (ix86_delegitimize_address_1): Don't delegitimize
7664         UNSPEC_GOTOFF with addend into addend - _GLOBAL_OFFSET_TABLE_ + symbol
7665         if !base_term_p.
7666         (ix86_const_not_ok_for_debug_p): New function.
7667         (i386_asm_output_addr_const_extra): Handle UNSPEC_GOTOFF.
7668         (TARGET_CONST_NOT_OK_FOR_DEBUG_P): Redefine.
7670 2017-10-23  David Malcolm  <dmalcolm@redhat.com>
7672         PR bootstrap/82610
7673         * system.h: Conditionally include "unique-ptr.h" if
7674         INCLUDE_UNIQUE_PTR is defined.
7675         * unique-ptr-tests.cc: Remove include of "unique-ptr.h" in favor
7676         of defining INCLUDE_UNIQUE_PTR before including "system.h".
7678 2017-10-23  Sebastian Perta  <sebastian.perta@renesas.com>
7680         * config/rl78/rl78.md: New define_expand "subdi3".
7682 2017-10-23  H.J. Lu  <hongjiu.lu@intel.com>
7684         PR target/82673
7685         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Skip
7686         DF_REF_INSN if DF_REF_INSN_INFO is false.
7688 2017-10-23  Jan Hubicka  <hubicka@ucw.cz>
7690         * i386.c (dimode_scalar_chain::compute_convert_gain): Use
7691         xmm_move instead of sse_move.
7692         (sse_store_index): New function.
7693         (ix86_register_move_cost): Be more sensible about mismatch stall;
7694         model AVX moves correctly; make difference between sse->integer and
7695         integer->sse.
7696         (ix86_builtin_vectorization_cost): Model correctly aligned and unaligned
7697         moves; make difference between SSE and AVX.
7698         * i386.h (processor_costs): Remove sse_move; add xmm_move, ymm_move
7699         and zmm_move. Increase size of sse load and store tables;
7700         add unaligned load and store tables; add ssemmx_to_integer.
7701         * x86-tune-costs.h: Update all entries according to real
7702         move latencies from Agner Fog's manual and chip documentation.
7704 2017-10-23  Jakub Jelinek  <jakub@redhat.com>
7706         PR target/82628
7707         * config/i386/predicates.md (x86_64_dwzext_immediate_operand): New.
7708         * config/i386/constraints.md (Wf): New constraint.
7709         * config/i386/i386.md (UNSPEC_SBB): New unspec.
7710         (cmp<dwi>_doubleword): Removed.
7711         (sub<mode>3_carry_ccc, *sub<mode>3_carry_ccc_1): New patterns.
7712         (sub<mode>3_carry_ccgz): Use unspec instead of compare.
7713         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>: Don't
7714         expand with cmp<dwi>_doubleword.  For LTU and GEU use
7715         sub<mode>3_carry_ccc instead of sub<mode>3_carry_ccgz and use CCCmode.
7717         * common.opt (gcolumn-info): Enable by default.
7718         * doc/invoke.texi (gcolumn-info): Document new default.
7720 2017-10-23  Richard Biener  <rguenther@suse.de>
7722         PR tree-optimization/82672
7723         * graphite-isl-ast-to-gimple.c (graphite_copy_stmts_from_block):
7724         Fold the stmt if we propagated into it.
7726 2017-10-23  Richard Biener  <rguenther@suse.de>
7728         * tree-ssa-pre.c (bitmap_remove_from_set): Rename to...
7729         (bitmap_remove_expr_from_set): ... this.  All callers call this
7730         for non-constant values.
7731         (bitmap_set_subtract): Rename to...
7732         (bitmap_set_subtract_expressions): ... this.  Adjust and
7733         optimize.
7734         (bitmap_set_contains_value): Remove superfluous check.
7735         (bitmap_set_replace_value): Inline into single caller ...
7736         (bitmap_value_replace_in_set): ... here and simplify.
7737         (dependent_clean): Merge into ...
7738         (clean): ... this using an overload.  Adjust.
7739         (prune_clobbered_mems): Adjust.
7740         (compute_antic_aux): Likewise.
7741         (compute_partial_antic_aux): Likewise.
7743 2017-10-23  Richard Biener  <rguenther@suse.de>
7745         PR tree-optimization/82129
7746         Revert
7747         2017-08-01  Richard Biener  <rguenther@suse.de>
7749         PR tree-optimization/81181
7750         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
7751         (compute_antic): ... end of iteration here.
7753 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
7755         * target.def (starting_frame_offset): New hook.
7756         * doc/tm.texi (STARTING_FRAME_OFFSET): Remove in favor of...
7757         (TARGET_STARTING_FRAME_OFFSET): ...this new hook.
7758         * doc/tm.texi.in: Regenerate.
7759         * hooks.h (hook_hwi_void_0): Declare.
7760         * hooks.c (hook_hwi_void_0): New function.
7761         * doc/rtl.texi: Refer to TARGET_STARTING_FRAME_OFFSET instead of
7762         STARTING_FRAME_OFFSET.
7763         * builtins.c (expand_builtin_setjmp_receiver): Likewise.
7764         * reload1.c (reload): Likewise.
7765         * cfgexpand.c (expand_used_vars): Use targetm.starting_frame_offset
7766         instead of STARTING_FRAME_OFFSET.
7767         * function.c (try_fit_stack_local): Likewise.
7768         (assign_stack_local_1): Likewise
7769         (instantiate_virtual_regs): Likewise.
7770         * rtlanal.c (rtx_addr_can_trap_p_1): Likewise.
7771         * config/avr/avr.md (nonlocal_goto_receiver): Likewise.
7772         * config/aarch64/aarch64.h (STARTING_FRAME_OFFSET): Delete.
7773         * config/alpha/alpha.h (STARTING_FRAME_OFFSET): Likewise.
7774         * config/arc/arc.h (STARTING_FRAME_OFFSET): Likewise.
7775         * config/arm/arm.h (STARTING_FRAME_OFFSET): Likewise.
7776         * config/bfin/bfin.h (STARTING_FRAME_OFFSET): Likewise.
7777         * config/c6x/c6x.h (STARTING_FRAME_OFFSET): Likewise.
7778         * config/cr16/cr16.h (STARTING_FRAME_OFFSET): Likewise.
7779         * config/cris/cris.h (STARTING_FRAME_OFFSET): Likewise.
7780         * config/fr30/fr30.h (STARTING_FRAME_OFFSET): Likewise.
7781         * config/frv/frv.h (STARTING_FRAME_OFFSET): Likewise.
7782         * config/ft32/ft32.h (STARTING_FRAME_OFFSET): Likewise.
7783         * config/h8300/h8300.h (STARTING_FRAME_OFFSET): Likewise.
7784         * config/i386/i386.h (STARTING_FRAME_OFFSET): Likewise.
7785         * config/ia64/ia64.h (STARTING_FRAME_OFFSET): Likewise.
7786         * config/m32c/m32c.h (STARTING_FRAME_OFFSET): Likewise.
7787         * config/m68k/m68k.h (STARTING_FRAME_OFFSET): Likewise.
7788         * config/mcore/mcore.h (STARTING_FRAME_OFFSET): Likewise.
7789         * config/mn10300/mn10300.h (STARTING_FRAME_OFFSET): Likewise.
7790         * config/moxie/moxie.h (STARTING_FRAME_OFFSET): Likewise.
7791         * config/msp430/msp430.h (STARTING_FRAME_OFFSET): Likewise.
7792         * config/nds32/nds32.h (STARTING_FRAME_OFFSET): Likewise.
7793         * config/nios2/nios2.h (STARTING_FRAME_OFFSET): Likewise.
7794         * config/nvptx/nvptx.h (STARTING_FRAME_OFFSET): Likewise.
7795         * config/pdp11/pdp11.h (STARTING_FRAME_OFFSET): Likewise.
7796         * config/riscv/riscv.h (STARTING_FRAME_OFFSET): Likewise.
7797         * config/rl78/rl78.h (STARTING_FRAME_OFFSET): Likewise.
7798         * config/rx/rx.h (STARTING_FRAME_OFFSET): Likewise.
7799         * config/s390/s390.h (STARTING_FRAME_OFFSET): Likewise.
7800         * config/sh/sh.h (STARTING_FRAME_OFFSET): Likewise.
7801         * config/sparc/sparc.c (sparc_compute_frame_size): Likewise.
7802         * config/sparc/sparc.h (STARTING_FRAME_OFFSET): Likewise.
7803         * config/spu/spu.h (STARTING_FRAME_OFFSET): Likewise.
7804         * config/stormy16/stormy16.h (STARTING_FRAME_OFFSET): Likewise.
7805         * config/tilegx/tilegx.h (STARTING_FRAME_OFFSET): Likewise.
7806         * config/tilepro/tilepro.h (STARTING_FRAME_OFFSET): Likewise.
7807         * config/v850/v850.h (STARTING_FRAME_OFFSET): Likewise.
7808         * config/visium/visium.h (STARTING_FRAME_OFFSET): Likewise.
7809         * config/avr/avr.h (STARTING_FRAME_OFFSET): Likewise.
7810         * config/avr/avr-protos.h (avr_starting_frame_offset): Likewise.
7811         * config/avr/avr.c (avr_starting_frame_offset): Make static and
7812         return a HOST_WIDE_INT.
7813         (avr_builtin_setjmp_frame_value): Use it instead of
7814         STARTING_FRAME_OFFSET.
7815         (TARGET_STARTING_FRAME_OFFSET): Redefine.
7816         * config/epiphany/epiphany.h (STARTING_FRAME_OFFSET): Delete.
7817         * config/epiphany/epiphany.c (epiphany_starting_frame_offset):
7818         New function.
7819         (TARGET_STARTING_FRAME_OFFSET): Redefine.
7820         * config/iq2000/iq2000.h (STARTING_FRAME_OFFSET): Delete.
7821         * config/iq2000/iq2000.c (iq2000_starting_frame_offset): New function.
7822         (TARGET_CONSTANT_ALIGNMENT): Redefine.
7823         * config/lm32/lm32.h (STARTING_FRAME_OFFSET): Delete.
7824         * config/lm32/lm32.c (lm32_starting_frame_offset): New function.
7825         (TARGET_STARTING_FRAME_OFFSET): Redefine.
7826         * config/m32r/m32r.h (STARTING_FRAME_OFFSET): Delete.
7827         * config/m32r/m32r.c (m32r_starting_frame_offset): New function.
7828         (TARGET_STARTING_FRAME_OFFSET): Redefine.
7829         * config/microblaze/microblaze.h (STARTING_FRAME_OFFSET): Delete.
7830         * config/microblaze/microblaze.c (microblaze_starting_frame_offset):
7831         New function.
7832         (TARGET_STARTING_FRAME_OFFSET): Redefine.
7833         * config/mips/mips.h (STARTING_FRAME_OFFSET): Delete.
7834         * config/mips/mips.c (mips_compute_frame_info): Refer to
7835         TARGET_STARTING_FRAME_OFFSET instead of STARTING_FRAME_OFFSET.
7836         (mips_starting_frame_offset): New function.
7837         (TARGET_STARTING_FRAME_OFFSET): Redefine.
7838         * config/mmix/mmix.h (STARTING_FRAME_OFFSET): Delete.
7839         * config/mmix/mmix-protos.h (mmix_starting_frame_offset): Delete.
7840         * config/mmix/mmix.c (mmix_starting_frame_offset): Make static
7841         and return a HOST_WIDE_INT.
7842         (TARGET_STARTING_FRAME_OFFSET): Redefine.
7843         (mmix_initial_elimination_offset): Refer to
7844         TARGET_STARTING_FRAME_OFFSET instead of STARTING_FRAME_OFFSET.
7845         * config/pa/pa.h (STARTING_FRAME_OFFSET): Delete.
7846         * config/pa/pa.c (pa_starting_frame_offset): New function.
7847         (pa_compute_frame_size): Use it instead of STARTING_FRAME_OFFSET.
7848         (pa_expand_prologue): Likewise.
7849         (TARGET_STARTING_FRAME_OFFSET): Redefine.
7850         * config/powerpcspe/aix.h (STARTING_FRAME_OFFSET): Split out
7851         !FRAME_GROWS_DOWNWARD handling to...
7852         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
7853         * config/powerpcspe/darwin.h (STARTING_FRAME_OFFSET): Split out
7854         !FRAME_GROWS_DOWNWARD handling to...
7855         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
7856         * config/powerpcspe/powerpcspe.h (STARTING_FRAME_OFFSET): Split out
7857         !FRAME_GROWS_DOWNWARD handling to...
7858         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
7859         * config/powerpcspe/powerpcspe.c (TARGET_STARTING_FRAME_OFFSET):
7860         Redefine.
7861         (rs6000_starting_frame_offset): New function.
7862         * config/rs6000/aix.h (STARTING_FRAME_OFFSET): Split out
7863         !FRAME_GROWS_DOWNWARD handling to...
7864         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
7865         * config/rs6000/darwin.h (STARTING_FRAME_OFFSET): Split out
7866         !FRAME_GROWS_DOWNWARD handling to...
7867         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
7868         * config/rs6000/rs6000.h (STARTING_FRAME_OFFSET): Split out
7869         !FRAME_GROWS_DOWNWARD handling to...
7870         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
7871         * config/rs6000/rs6000.c (TARGET_STARTING_FRAME_OFFSET): Refine.
7872         (rs6000_starting_frame_offset): New function.
7873         * config/vax/elf.h (STARTING_FRAME_OFFSET): Delete.
7874         * config/vax/vax.h (STARTING_FRAME_OFFSET): Delete.
7875         * config/vax/vax.c (vax_starting_frame_offset): New function.
7876         (vax_expand_prologue): Use it instead of STARTING_FRAME_OFFSET.
7877         (TARGET_STARTING_FRAME_OFFSET): Redefine.
7878         * config/xtensa/xtensa.h (STARTING_FRAME_OFFSET): Delete.
7879         * config/xtensa/xtensa.c (xtensa_starting_frame_offset): New function.
7880         (TARGET_STARTING_FRAME_OFFSET): Redefine.
7881         * system.h (STARTING_FRAME_OFFSET): Poison.
7883 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
7885         * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
7886         SCALAR_TYPE_MODE instead of TYPE_MODE.
7888 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
7889             Alan Hayward  <alan.hayward@arm.com>
7890             David Sherwood  <david.sherwood@arm.com>
7892         * dwarf2out.c (loc_list_from_tree_1): Use SCALAR_INT_TYPE_MODE
7894 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
7895             Alan Hayward  <alan.hayward@arm.com>
7896             David Sherwood  <david.sherwood@arm.com>
7898         * expmed.c (expand_shift_1): Use scalar_mode for scalar_mode.
7900 2017-10-23  Richard Biener  <rguenther@suse.de>
7902         PR tree-optimization/82129
7903         * tree-ssa-pre.c (bitmap_set_and): Remove.
7904         (compute_antic_aux): Compute ANTIC_OUT intersection in a way
7905         canonicalizing expressions in the set to those with lowest
7906         ID rather than taking that from the first edge.
7908 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
7910         * combine.c (rtx_equal_for_field_assignment_p): Use
7911         byte_lowpart_offset.
7913 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
7914             Alan Hayward  <alan.hayward@arm.com>
7915             David Sherwood  <david.sherwood@arm.com>
7917         * internal-fn.c (expand_direct_optab_fn): Don't assign directly
7918         to a SUBREG_PROMOTED_VAR.
7920 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
7921             Alan Hayward  <alan.hayward@arm.com>
7922             David Sherwood  <david.sherwood@arm.com>
7924         * cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_PRECISION.
7925         (expand_debug_source_expr): Likewise.
7926         * combine.c (combine_simplify_rtx): Likewise.
7927         * cse.c (fold_rtx): Likewise.
7928         * optabs.c (expand_float): Likewise.
7929         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
7930         (simplify_binary_operation_1): Likewise.
7932 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
7933             Alan Hayward  <alan.hayward@arm.com>
7934             David Sherwood  <david.sherwood@arm.com>
7936         * combine.c (simplify_comparison): Use HWI_COMPUTABLE_MODE_P.
7937         (record_promoted_value): Likewise.
7938         * expr.c (expand_expr_real_2): Likewise.
7939         * ree.c (update_reg_equal_equiv_notes): Likewise.
7940         (combine_set_extension): Likewise.
7941         * rtlanal.c (low_bitmask_len): Likewise.
7942         * simplify-rtx.c (neg_const_int): Likewise.
7943         (simplify_binary_operation_1): Likewise.
7945 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
7946             Alan Hayward  <alan.hayward@arm.com>
7947             David Sherwood  <david.sherwood@arm.com>
7949         * lra-spills.c (assign_mem_slot): Use subreg_size_lowpart_offset.
7950         * regcprop.c (maybe_mode_change): Likewise.
7951         * reload1.c (alter_reg): Likewise.
7953 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
7955         * inchash.h (inchash::hash::add_wide_int): New function.
7956         * lto-streamer-out.c (hash_tree): Use it.
7958 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
7960         * inchash.h (inchash::hash::add_wide_int): Rename to...
7961         (inchash::hash::add_hwi): ...this.
7962         * ipa-devirt.c (hash_odr_vtable): Update accordingly.
7963         (polymorphic_call_target_hasher::hash): Likewise.
7964         * ipa-icf.c (sem_function::get_hash, sem_function::init): Likewise.
7965         (sem_item::add_expr, sem_item::add_type, sem_variable::get_hash)
7966         (sem_item_optimizer::update_hash_by_addr_refs): Likewise.
7967         * lto-streamer-out.c (hash_tree): Likewise.
7968         * optc-save-gen.awk: Likewise.
7969         * tree.c (add_expr): Likewise.
7971 2017-10-22  Uros Bizjak  <ubizjak@gmail.com>
7973         PR target/52451
7974         * config/i386/i386.c (ix86_fp_compare_mode): Return CCFPmode
7975         for ordered inequality comparisons even with TARGET_IEEE_FP.
7977 2017-10-22  Uros Bizjak  <ubizjak@gmail.com>
7979         PR target/82628
7980         * config/i386/i386.md (cmp<dwi>_doubleword): New pattern.
7981         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>:
7982         Expand with cmp<dwi>_doubleword.
7984 2017-10-21  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
7986         * extend.texi: Add x86 specific to 'nocf_check' attribute.
7987         List CET intrinsics.
7988         * invoke.texi: Add -mcet, -mibt, -mshstk options.  Add x86
7989         specific to -fcf-protection option.
7991 2017-10-21  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
7993         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET): New.
7994         (OPTION_MASK_ISA_SHSTK_SET): Likewise.
7995         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
7996         (OPTION_MASK_ISA_SHSTK_UNSET): Likewise.
7997         (ix86_handle_option): Add -mibt, -mshstk, -mcet handling.
7998         * config.gcc (extra_headers): Add cetintrin.h for x86 targets.
7999         (extra_objs): Add cet.o for Linux/x86 targets.
8000         (tmake_file): Add i386/t-cet for Linux/x86 targets.
8001         * config/i386/cet.c: New file.
8002         * config/i386/cetintrin.h: Likewise.
8003         * config/i386/t-cet: Likewise.
8004         * config/i386/cpuid.h (bit_SHSTK): New.
8005         (bit_IBT): Likewise.
8006         * config/i386/driver-i386.c (host_detect_local_cpu): Detect and
8007         pass IBT and SHSTK bits.
8008         * config/i386/i386-builtin-types.def
8009         (VOID_FTYPE_UNSIGNED_PVOID): New.
8010         (VOID_FTYPE_UINT64_PVOID): Likewise.
8011         * config/i386/i386-builtin.def: Add CET intrinsics.
8012         * config/i386/i386-c.c (ix86_target_macros_internal): Add
8013         OPTION_MASK_ISA_IBT, OPTION_MASK_ISA_SHSTK handling.
8014         * config/i386/i386-passes.def: Add pass_insert_endbranch pass.
8015         * config/i386/i386-protos.h (make_pass_insert_endbranch): New
8016         prototype.
8017         * config/i386/i386.c (rest_of_insert_endbranch): New.
8018         (pass_data_insert_endbranch): Likewise.
8019         (pass_insert_endbranch): Likewise.
8020         (make_pass_insert_endbranch): Likewise.
8021         (ix86_notrack_prefixed_insn_p): Likewise.
8022         (ix86_target_string): Add -mibt, -mshstk flags.
8023         (ix86_option_override_internal): Add flag_cf_protection
8024         processing.
8025         (ix86_valid_target_attribute_inner_p): Set OPT_mibt, OPT_mshstk.
8026         (ix86_print_operand): Add 'notrack' prefix output.
8027         (ix86_init_mmx_sse_builtins): Add CET intrinsics.
8028         (ix86_expand_builtin): Expand CET intrinsics.
8029         (x86_output_mi_thunk): Add 'endbranch' instruction.
8030         * config/i386/i386.h (TARGET_IBT): New.
8031         (TARGET_IBT_P): Likewise.
8032         (TARGET_SHSTK): Likewise.
8033         (TARGET_SHSTK_P): Likewise.
8034         * config/i386/i386.md (unspecv): Add UNSPECV_NOP_RDSSP,
8035         UNSPECV_INCSSP, UNSPECV_SAVEPREVSSP, UNSPECV_RSTORSSP,
8036         UNSPECV_WRSS, UNSPECV_WRUSS, UNSPECV_SETSSBSY, UNSPECV_CLRSSBSY.
8037         (builtin_setjmp_setup): New pattern.
8038         (builtin_longjmp): Likewise.
8039         (rdssp<mode>): Likewise.
8040         (incssp<mode>): Likewise.
8041         (saveprevssp): Likewise.
8042         (rstorssp): Likewise.
8043         (wrss<mode>): Likewise.
8044         (wruss<mode>): Likewise.
8045         (setssbsy): Likewise.
8046         (clrssbsy): Likewise.
8047         (nop_endbr): Likewise.
8048         * config/i386/i386.opt: Add -mcet, -mibt, -mshstk and -mcet-switch
8049         options.
8050         * config/i386/immintrin.h: Include <cetintrin.h>.
8051         * config/i386/linux-common.h
8052         (file_end_indicate_exec_stack_and_cet): New prototype.
8053         (TARGET_ASM_FILE_END): New.
8055 2017-10-20  Jan Hubicka  <hubicka@ucw.cz>
8057         * i386.c (ix86_builtin_vectorization_cost): Use existing rtx_cost
8058         latencies instead of having separate table; make difference between
8059         integer and float costs.
8060         * i386.h (processor_costs): Remove scalar_stmt_cost,
8061         scalar_load_cost, scalar_store_cost, vec_stmt_cost, vec_to_scalar_cost,
8062         scalar_to_vec_cost, vec_align_load_cost, vec_unalign_load_cost,
8063         vec_store_cost.
8064         * x86-tune-costs.h: Remove entries which has been removed in
8065         procesor_costs from all tables; make cond_taken_branch_cost
8066         and cond_not_taken_branch_cost COST_N_INSNS based.
8068 2017-10-20  Jan Hubicka  <hubicka@ucw.cz>
8070         * x86-tune-costs.h (intel_cost, generic_cost): Fix move costs.
8072 2017-10-20  Jakub Jelinek  <jakub@redhat.com>
8074         * config/i386/i386.md (isa): Remove fma_avx512f.
8075         * config/i386/sse.md (<avx512>_fmadd_<mode>_mask<round_name>,
8076         <avx512>_fmadd_<mode>_mask3<round_name>,
8077         <avx512>_fmsub_<mode>_mask<round_name>,
8078         <avx512>_fmsub_<mode>_mask3<round_name>,
8079         <avx512>_fnmadd_<mode>_mask<round_name>,
8080         <avx512>_fnmadd_<mode>_mask3<round_name>,
8081         <avx512>_fnmsub_<mode>_mask<round_name>,
8082         <avx512>_fnmsub_<mode>_mask3<round_name>,
8083         <avx512>_fmaddsub_<mode>_mask<round_name>,
8084         <avx512>_fmaddsub_<mode>_mask3<round_name>,
8085         <avx512>_fmsubadd_<mode>_mask<round_name>,
8086         <avx512>_fmsubadd_<mode>_mask3<round_name>): Remove isa attribute.
8087         (*vec_widen_umult_even_v16si<mask_name>,
8088         *vec_widen_smult_even_v16si<mask_name>): Likewise.
8089         (<mask_codefor>avx512bw_dbpsadbw<mode><mask_name>): Likewise.
8091 2017-10-20  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
8093         * extend.texi: Add 'nocf_check' documentation.
8094         * gimple.texi: Add second parameter to
8095         gimple_build_call_from_tree.
8096         * invoke.texi: Add -fcf-protection documentation.
8097         * rtl.texi: Add REG_CALL_NOTRACK documenation.
8099 2017-10-20  Richard Biener  <rguenther@suse.de>
8101         PR tree-optimization/82473
8102         * tree-vect-loop.c (vectorizable_reduction): Properly get at
8103         the largest input type.
8105 2017-10-20  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
8107         * c-attribs.c (handle_nocf_check_attribute): New function.
8108         (c_common_attribute_table): Add 'nocf_check' handling.
8109         * gimple-parser.c: Add second argument NULL to
8110         gimple_build_call_from_tree.
8111         * attrib.c (comp_type_attributes): Check nocf_check attribute.
8112         * cfgexpand.c (expand_call_stmt): Set REG_CALL_NOCF_CHECK for
8113         call insn.
8114         * combine.c (distribute_notes): Add REG_CALL_NOCF_CHECK handling.
8115         * common.opt: Add fcf-protection flag.
8116         * emit-rtl.c (try_split): Add REG_CALL_NOCF_CHECK handling.
8117         * flag-types.h: Add enum cf_protection_level.
8118         * gimple.c (gimple_build_call_from_tree): Add second parameter.
8119         Add 'nocf_check' attribute propagation to gimple call.
8120         * gimple.h (gf_mask): Add GF_CALL_NOCF_CHECK.
8121         (gimple_build_call_from_tree): Update prototype.
8122         (gimple_call_nocf_check_p): New function.
8123         (gimple_call_set_nocf_check): Likewise.
8124         * gimplify.c: Add second argument to gimple_build_call_from_tree.
8125         * ipa-icf.c: Add nocf_check attribute in statement hash.
8126         * recog.c (peep2_attempt): Add REG_CALL_NOCF_CHECK handling.
8127         * reg-notes.def: Add REG_NOTE (CALL_NOCF_CHECK).
8128         * toplev.c (process_options): Add flag_cf_protection handling.
8130 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
8132         * x86-tune-costs.h (core_cost): Fix div, move and sqrt latencies.
8134 2017-10-20  Richard Biener  <rguenther@suse.de>
8136         PR tree-optimization/82603
8137         * tree-if-conv.c (predicate_mem_writes): Make sure to only
8138         remove false predicated stores.
8140 2017-10-20  Richard Biener  <rguenther@suse.de>
8142         * graphite-isl-ast-to-gimple.c
8143         (translate_isl_ast_to_gimple::graphite_copy_stmts_from_block):
8144         Remove return value and simplify, dump copied stmt after lhs
8145         adjustment.
8146         (translate_isl_ast_to_gimple::translate_isl_ast_node_user):
8147         Reduce dump verbosity.
8148         (gsi_insert_earliest): Likewise.
8149         (translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences): Adjust.
8150         * graphite.c (print_global_statistics): Adjust dumping.
8151         (print_graphite_scop_statistics): Likewise.
8152         (print_graphite_statistics): Do not dump loops here.
8153         (graphite_transform_loops): But here.
8155 2017-10-20  Nicolas Roche  <roche@adacore.com>
8157         * configure.ac (ACX_PROG_GNAT): Append "libgnat" to include search dir.
8158         * configure: Regenerate.
8160 2017-10-20  Jakub Jelinek  <jakub@redhat.com>
8162         PR target/82158
8163         * tree-cfg.c (pass_warn_function_return::execute): In noreturn
8164         functions when optimizing replace GIMPLE_RETURN stmts with
8165         calls to __builtin_unreachable ().
8167         PR sanitizer/82595
8168         * config/gnu-user.h (LIBTSAN_EARLY_SPEC): Add libtsan_preinit.o
8169         for -fsanitize=thread link of executables.
8170         (LIBLSAN_EARLY_SPEC): Add liblsan_preinit.o for -fsanitize=leak
8171         link of executables.
8173         PR target/82370
8174         * config/i386/sse.md (VI248_AVX2, VI248_AVX512BW, VI248_AVX512BW_2):
8175         New mode iterators.
8176         (<shift_insn><mode>3<mask_name>): Change the last of the 3
8177         define_insns for logical vector shifts to use VI248_AVX512BW
8178         iterator instead of VI48_AVX512, remove <mask_mode512bit_condition>
8179         condition, useless isa and prefix attributes.  Change the first
8180         2 of these define_insns to ...
8181         (<mask_codefor><shift_insn><mode>3<mask_name>): ... this, new
8182         define_insn for avx512vl.
8183         (<shift_insn><mode>3): ... and this, new define_insn without
8184         masking for non-avx512vl.
8186         PR target/82370
8187         * config/i386/sse.md (*andnot<mode>3,
8188         <mask_codefor><code><mode>3<mask_name>, *<code><mode>3): Split
8189         (=v,v,vm) alternative into (=x,x,xm) and (=v,v,vm), for 128-bit
8190         and 256-bit vectors, the (=x,x,xm) alternative and when mask is
8191         not applied use empty suffix even for TARGET_AVX512VL.
8192         * config/i386/subst.md (mask_prefix3, mask_prefix4): When mask
8193         is applied, supply evex,evex or evex,evex,evex instead of just
8194         evex.
8196 2017-10-20  Julia Koval  <julia.koval@intel.com>
8198         * common/config/i386/i386-common.c (OPTION_MASK_ISA_GFNI_SET,
8199         (OPTION_MASK_ISA_GFNI_UNSET): New.
8200         (ix86_handle_option): Handle OPT_mgfni.
8201         * config/i386/cpuid.h (bit_GFNI): New.
8202         * config/i386/driver-i386.c (host_detect_local_cpu): Detect gfni.
8203         * config/i386/i386-c.c (ix86_target_macros_internal): Define __GFNI__.
8204         * config/i386/i386.c (ix86_target_string): Add -mgfni.
8205         (ix86_valid_target_attribute_inner_p): Add OPT_mgfni.
8206         * config/i386/i386.h (TARGET_GFNI, TARGET_GFNI_P): New.
8207         * config/i386/i386.opt: Add mgfni.
8209 2017-10-20  Orlando Arias  <oarias@knights.ucf.edu>
8211         * config/msp430/msp430.c (msp430_option_override): Disable
8212         -fdelete-null-pointer-checks.
8213         * doc/invoke.text (-fdelete-null-pointer-checks): Document that.
8215 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
8217         * x86-tune-costs.h (generic_cost, core_cost): Correct costs
8218         of x87 and SSE instructions.
8220 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
8222         * asan.c (create_cond_insert_point): Do not update edge count.
8223         * auto-profile.c (afdo_propagate_edge): Update for edge count removal.
8224         (afdo_propagate_circuit): Likewise.
8225         (afdo_calculate_branch_prob): Likewise.
8226         (afdo_annotate_cfg): Likewise.
8227         * basic-block.h (struct edge_def): Remove count.
8228         (edge_def::count): New accessor.
8229         * bb-reorder.c (rotate_loop): Update.
8230         (find_traces_1_round): Update.
8231         (connect_traces): Update.
8232         (sanitize_hot_paths): Update.
8233         * cfg.c (unchecked_make_edge): Update.
8234         (make_single_succ_edge): Update.
8235         (check_bb_profile): Update.
8236         (dump_edge_info): Update.
8237         (update_bb_profile_for_threading): Update.
8238         (scale_bbs_frequencies_int): Update.
8239         (scale_bbs_frequencies_gcov_type): Update.
8240         (scale_bbs_frequencies_profile_count): Update.
8241         (scale_bbs_frequencies): Update.
8242         * cfganal.c (connect_infinite_loops_to_exit): Update.
8243         * cfgbuild.c (compute_outgoing_frequencies): Update.
8244         (find_many_sub_basic_blocks): Update.
8245         * cfgcleanup.c (try_forward_edges): Update.
8246         (try_crossjump_to_edge): Update
8247         * cfgexpand.c (expand_gimple_cond): Update
8248         (expand_gimple_tailcall): Update
8249         (construct_exit_block): Update
8250         * cfghooks.c (verify_flow_info): Update
8251         (redirect_edge_succ_nodup): Update
8252         (split_edge): Update
8253         (make_forwarder_block): Update
8254         (duplicate_block): Update
8255         (account_profile_record): Update
8256         * cfgloop.c (find_subloop_latch_edge_by_profile): Update.
8257         * cfgloopanal.c (expected_loop_iterations_unbounded): Update.
8258         * cfgloopmanip.c (scale_loop_profile): Update.
8259         (loopify): Update.
8260         (lv_adjust_loop_entry_edge): Update.
8261         * cfgrtl.c (try_redirect_by_replacing_jump): Update.
8262         (force_nonfallthru_and_redirect): Update.
8263         (purge_dead_edges): Update.
8264         (rtl_flow_call_edges_add): Update.
8265         * cgraphunit.c (init_lowered_empty_function): Update.
8266         (cgraph_node::expand_thunk): Update.
8267         * gimple-pretty-print.c (dump_probability): Update.
8268         (dump_edge_probability): Update.
8269         * gimple-ssa-isolate-paths.c (isolate_path): Update.
8270         * haifa-sched.c (sched_create_recovery_edges): Update.
8271         * hsa-gen.c (convert_switch_statements): Update.
8272         * ifcvt.c (dead_or_predicable): Update.
8273         * ipa-inline-transform.c (inline_transform): Update.
8274         * ipa-split.c (split_function): Update.
8275         * ipa-utils.c (ipa_merge_profiles): Update.
8276         * loop-doloop.c (add_test): Update.
8277         * loop-unroll.c (unroll_loop_runtime_iterations): Update.
8278         * lto-streamer-in.c (input_cfg): Update.
8279         (input_function): Update.
8280         * lto-streamer-out.c (output_cfg): Update.
8281         * modulo-sched.c (sms_schedule): Update.
8282         * postreload-gcse.c (eliminate_partially_redundant_load): Update.
8283         * predict.c (maybe_hot_edge_p): Update.
8284         (unlikely_executed_edge_p): Update.
8285         (probably_never_executed_edge_p): Update.
8286         (dump_prediction): Update.
8287         (drop_profile): Update.
8288         (propagate_unlikely_bbs_forward): Update.
8289         (determine_unlikely_bbs): Update.
8290         (force_edge_cold): Update.
8291         * profile.c (compute_branch_probabilities): Update.
8292         * reg-stack.c (better_edge): Update.
8293         * shrink-wrap.c (handle_simple_exit): Update.
8294         * tracer.c (better_p): Update.
8295         * trans-mem.c (expand_transaction): Update.
8296         (split_bb_make_tm_edge): Update.
8297         * tree-call-cdce.c: Update.
8298         * tree-cfg.c (gimple_find_sub_bbs): Update.
8299         (gimple_split_edge): Update.
8300         (gimple_duplicate_sese_region): Update.
8301         (gimple_duplicate_sese_tail): Update.
8302         (gimple_flow_call_edges_add): Update.
8303         (insert_cond_bb): Update.
8304         (execute_fixup_cfg): Update.
8305         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update.
8306         * tree-complex.c (expand_complex_div_wide): Update.
8307         * tree-eh.c (lower_resx): Update.
8308         (unsplit_eh): Update.
8309         (cleanup_empty_eh_move_lp): Update.
8310         * tree-inline.c (copy_edges_for_bb): Update.
8311         (freqs_to_counts): Update.
8312         (copy_cfg_body): Update.
8313         * tree-ssa-dce.c (remove_dead_stmt): Update.
8314         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
8315         * tree-ssa-loop-im.c (execute_sm_if_changed): Update.
8316         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
8317         (unloop_loops): Update.
8318         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
8319         * tree-ssa-loop-split.c (connect_loops): Update.
8320         (split_loop): Update.
8321         * tree-ssa-loop-unswitch.c (hoist_guard): Update.
8322         * tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
8323         * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
8324         * tree-ssa-reassoc.c (branch_fixup): Update.
8325         * tree-ssa-tail-merge.c (replace_block_by): Update.
8326         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
8327         (compute_path_counts): Update.
8328         (update_profile): Update.
8329         (recompute_probabilities): Update.
8330         (update_joiner_offpath_counts): Update.
8331         (estimated_freqs_path): Update.
8332         (freqs_to_counts_path): Update.
8333         (clear_counts_path): Update.
8334         (ssa_fix_duplicate_block_edges): Update.
8335         (duplicate_thread_path): Update.
8336         * tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
8337         (case_bit_test_cmp): Update.
8338         (collect_switch_conv_info): Update.
8339         (gen_inbound_check): Update.
8340         (do_jump_if_equal): Update.
8341         (emit_cmp_and_jump_insns): Update.
8342         * tree-tailcall.c (decrease_profile): Update.
8343         (eliminate_tail_call): Update.
8344         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
8345         (vect_do_peeling): Update.
8346         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
8347         * ubsan.c (ubsan_expand_null_ifn): Update.
8348         (ubsan_expand_ptr_ifn): Update.
8349         * value-prof.c (gimple_divmod_fixed_value): Update.
8350         (gimple_mod_pow2): Update.
8351         (gimple_mod_subtract): Update.
8352         (gimple_ic): Update.
8353         (gimple_stringop_fixed_value): Update.
8355 2017-10-19  Uros Bizjak  <ubizjak@gmail.com>
8357         PR target/82618
8358         * config/i386/i386.md (sub to cmp): New peephole2 pattern.
8360 2017-10-19  Alexander Monakov  <amonakov@ispras.ru>
8362         PR rtl-optimization/82395
8363         * ira-color.c (allocno_priority_compare_func): Fix comparison step
8364         based on non_spilled_static_chain_regno_p.
8366 2017-10-19  Uros Bizjak  <ubizjak@gmail.com>
8368         * config/i386/i386.c (output_387_binary_op): Rewrite SSE part.
8369         (ix86_emit_mode_set): Rewrite insn mnemonic construction.
8370         (ix86_prepare_fp_compare_args): Redefine is_sse as bool.
8372 2017-10-19  Martin Sebor  <msebor@redhat.com>
8374         PR tree-optimization/82596
8375         * tree.c (array_at_struct_end_p): Handle STRING_CST.
8377 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
8379         * asan.c (handle_builtin_alloca): Deal with all alloca variants.
8380         (get_mem_refs_of_builtin_call): Likewise.
8381         * builtins.c (expand_builtin_apply): Adjust call to
8382         allocate_dynamic_stack_space.
8383         (expand_builtin_alloca): For __builtin_alloca_with_align_and_max, pass
8384         the third argument to allocate_dynamic_stack_space, otherwise -1.
8385         (expand_builtin): Deal with all alloca variants.
8386         (is_inexpensive_builtin): Likewise.
8387         * builtins.def (BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX): New.
8388         * calls.c (special_function_p): Deal with all alloca variants.
8389         (initialize_argument_information): Adjust call to
8390         allocate_dynamic_stack_space.
8391         (expand_call): Likewise.
8392         * cfgexpand.c (expand_call_stmt): Deal with all alloca variants.
8393         * doc/extend.texi (Built-ins): Add __builtin_alloca_with_align_and_max
8394         * explow.c (allocate_dynamic_stack_space): Add MAX_SIZE parameter and
8395         use it for the stack usage computation.
8396         * explow.h (allocate_dynamic_stack_space): Adjust prototype.
8397         * function.c (gimplify_parameters): Call build_alloca_call_expr.
8398         * gimple-ssa-warn-alloca.c (alloca_call_type): Simplify control flow.
8399         Take into account 3rd argument of __builtin_alloca_with_align_and_max.
8400         (in_loop_p): Remove first argument and useless check.
8401         (pass_walloca::execute): Remove useless test and adjust call to above.
8402         * gimple.c (gimple_build_call_from_tree): Deal with all alloc variants
8403         * gimplify.c (gimplify_vla_decl): Call build_alloca_call_expr.
8404         (gimplify_call_expr): Deal with all alloca variants.
8405         * hsa-gen.c (gen_hsa_alloca): Likewise.
8406         (gen_hsa_insns_for_call): Likewise.
8407         * ipa-pure-const.c (special_builtin_state): Likewise.
8408         * tree-chkp.c (chkp_build_returned_bound): Likewise.
8409         * tree-object-size.c (alloc_object_size): Likewise.
8410         * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Likewise.
8411         (call_may_clobber_ref_p_1): Likewise.
8412         * tree-ssa-ccp.c (evaluate_stmt): Likewise.
8413         (ccp_fold_stmt): Likewise.
8414         (optimize_stack_restore): Likewise.
8415         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
8416         (mark_all_reaching_defs_necessary_1): Likewise.
8417         (propagate_necessity): Likewise.
8418         (eliminate_unnecessary_stmts): Likewise.
8419         * tree.c (build_common_builtin_nodes): Build
8420         BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX.
8421         (build_alloca_call_expr): New function.
8422         * tree.h (ALLOCA_FUNCTION_CODE_P): New macro.
8423         (CASE_BUILT_IN_ALLOCA): Likewise.
8424         (build_alloca_call_expr): Declare.
8425         * varasm.c (incorporeal_function_p): Deal with all alloca variants.
8427 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
8429         PR debug/82509
8430         * dwarf2out.c (new_die_raw): New static inline function.
8431         (new_die): Use it to create the DIE.
8432         (add_AT_external_die_ref): Likewise.
8433         (clone_die): Likewise.
8434         (clone_as_declaration): Likewise.
8435         (dwarf2out_vms_debug_main_pointer): Likewise.
8436         (base_type_die): Likewise.  Remove early return for corner cases.
8437         Do not call add_pubtype on the DIE here.
8438         (is_base_type): Remove ERROR_MARK and return 0 for VOID_TYPE.
8439         (modified_type_die): Adjust the lookup for reverse order DIEs.  Skip
8440         typedefs for base types with DW_AT_endianity.  Make sure a DIE with
8441         native order exists for base types, attach the DIE manually and call
8442         add_pubtype on it.  Do not equate a reverse order DIE to the type.
8444 2017-10-19  Richard Earnshaw  <rearnsha@arm.com>
8446         * config/arm/arm.c (align_ok_ldrd_strd): New function.
8447         (mem_ok_for_ldrd_strd): New parameter align.  Extract the alignment of
8448         the mem into it.
8449         (gen_operands_ldrd_strd): Validate the alignment of the accesses.
8451 2017-10-19  Jakub Jelinek  <jakub@redhat.com>
8453         * flag-types.h (enum sanitize_code): Add SANITIZE_BUILTIN.  Or
8454         SANITIZE_BUILTIN into SANITIZE_UNDEFINED.
8455         * sanitizer.def (BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN,
8456         BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN_ABORT): New builtins.
8457         * opts.c (sanitizer_opts): Add builtin.
8458         * ubsan.c (instrument_builtin): New function.
8459         (pass_ubsan::execute): Call it.
8460         (pass_ubsan::gate): Enable even for SANITIZE_BUILTIN.
8461         * doc/invoke.texi: Document -fsanitize=builtin.
8463         * ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch
8464         builtins, store max (log2 (align), 0) into uchar field instead of
8465         align into uptr field.
8466         (ubsan_expand_objsize_ifn): Use _v1 suffixed type mismatch builtins,
8467         store uchar 0 field instead of uptr 0 field.
8468         (instrument_nonnull_return): Use _v1 suffixed nonnull return builtin,
8469         instead of passing one address of struct with 2 locations pass
8470         two addresses of structs with 1 location each.
8471         * sanitizer.def (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH,
8472         BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_ABORT,
8473         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN,
8474         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_ABORT): Removed.
8475         (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1,
8476         BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1_ABORT,
8477         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1,
8478         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1_ABORT): New builtins.
8480 2017-10-19  Martin Liska  <mliska@suse.cz>
8482         PR driver/81829
8483         * file-find.c (remove_prefix): Remove.
8484         * file-find.h (remove_prefix): Likewise.
8485         * gcc-ar.c: Remove smartness of lookup.
8487 2017-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
8489         * config/rs6000/rs6000.md (*call_indirect_aix<mode>,
8490         *call_value_indirect_aix<mode>, *call_indirect_elfv2<mode>,
8491         *call_value_indirect_elfv2<mode>): Add correct mode to the unspec.
8493 2017-10-19  Jakub Jelinek  <jakub@redhat.com>
8495         PR target/82580
8496         * config/i386/i386.md (setcc + movzbl to xor + setcc): New peephole2.
8497         (setcc + and to xor + setcc): New peephole2.
8499 2017-10-19  Tom de Vries  <tom@codesourcery.com>
8501         * doc/sourcebuild.texi (Test Directives, Variants of
8502         dg-require-support): Add dg-require-stack-size.
8504 2017-10-19  Martin Liska  <mliska@suse.cz>
8506         PR sanitizer/82517
8507         * gimplify.c (gimplify_decl_expr): Do not instrument variables
8508         that have a large alignment.
8509         (gimplify_target_expr): Likewise.
8511 2017-10-18  Segher Boessenkool  <segher@kernel.crashing.org>
8513         PR rtl-optimization/82602
8514         * ira.c (rtx_moveable_p): Return false for volatile asm.
8516 2017-10-18  Uros Bizjak  <ubizjak@gmail.com>
8518         PR target/82580
8519         * config/i386/i386-modes.def (CCGZ): New CC mode.
8520         * config/i386/i386.md (sub<mode>3_carry_ccgz): New insn pattern.
8521         * config/i386/predicates.md (ix86_comparison_operator):
8522         Handle CCGZmode.
8523         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>:
8524         Emulate LE, LEU, GT, GTU, LT, LTU, GE and GEU double-word comparisons
8525         with double-word subtraction.
8526         (put_condition_code): Handle CCGZmode.
8528 2017-10-18  Aldy Hernandez  <aldyh@redhat.com>
8530         * wide-int.cc (debug (const wide_int &)): New.
8531         (debug (const wide_int *)): New.
8532         (debug (const widest_int &)): New.
8533         (debug (const widest_int *)): New.
8535 2017-10-18  Vladimir Makarov  <vmakarov@redhat.com>
8537         PR middle-end/82556
8538         * lra-constraints.c (curr_insn_transform): Use non-input operand
8539         instead of output one for matched reload.
8541 2017-10-18  Bin Cheng  <bin.cheng@arm.com>
8543         * tree-loop-distribution.c (INCLUDE_ALGORITHM): New header file.
8544         (tree-ssa-loop-ivopts.h): New header file.
8545         (struct builtin_info): New fields.
8546         (classify_builtin_1): Compute and record base and offset parts for
8547         memset builtin partition by calling strip_offset.
8548         (offset_cmp, fuse_memset_builtins): New functions.
8549         (finalize_partitions): Fuse adjacent memset partitions by calling
8550         above function.
8551         * tree-ssa-loop-ivopts.c (strip_offset): Delete static declaration.
8552         Expose the interface.
8553         * tree-ssa-loop-ivopts.h (strip_offset): New declaration.
8555 2017-10-18  Bin Cheng  <bin.cheng@arm.com>
8557         PR tree-optimization/82574
8558         * tree-loop-distribution.c (find_single_drs): New parameter.  Check
8559         that data reference must be executed exactly once per iteration
8560         against the outermost loop in nest.
8561         (classify_partition): Update call to above function.
8563 2017-10-18  Richard Biener  <rguenther@suse.de>
8565         PR tree-optimization/82591
8566         * graphite.c (graphite_transform_loops): Move code gen message
8567         printing ...
8568         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
8569         Here.  Handle scop_to_isl_ast failing.
8570         (scop_to_isl_ast): Limit the number of ISL operations.
8572 2017-10-18  Richard Biener  <rguenther@suse.de>
8574         * graphite-isl-ast-to-gimple.c
8575         (translate_isl_ast_to_gimple::set_rename): Simplify.
8576         (translate_isl_ast_to_gimple::set_rename_for_each_def): Inline...
8577         (graphite_copy_stmts_from_block): ... here.
8578         (copy_bb_and_scalar_dependences): Simplify.
8579         (add_parameters_to_ivs_params): Canonicalize.
8580         (generate_entry_out_of_ssa_copies): Simplify.
8581         * graphite-sese-to-poly.c (extract_affine_name): Simplify
8582         by passing in ISL dimension.
8583         (parameter_index_in_region_1): Rename to ...
8584         (parameter_index_in_region): ... this.
8585         (extract_affine): Adjust assert, pass down parameter index.
8586         (add_param_constraints): Use range-info when available.
8587         (build_scop_context): Adjust.
8588         * sese.c (new_sese_info): Adjust.
8589         (free_sese_info): Likewise.
8590         * sese.h (bb_map_t, rename_map_t, phi_rename, init_back_edge_pair_t):
8591         Remove unused typedefs.
8592         (struct sese_info_t): Simplify rename_map, remove incomplete_phis.
8594 2017-10-18  Martin Liska  <mliska@suse.cz>
8596         * combine.c (simplify_compare_const): Add gcc_fallthrough.
8598 2017-10-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
8600         * config/s390/s390.c (s390_bb_fallthru_entry_likely): New function.
8601         (s390_sched_init): Do not reset s390_sched_state if we entered the
8602         current basic block via a fallthru edge and all others are unlikely.
8604 2017-10-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
8606         * config/s390/s390.c (NUM_SIDES): New variable.
8607         (LONGRUNNING_THRESHOLD): New variable.
8608         (LATENCY_FACTOR): New variable.
8609         (s390_sched_score): Decrease score for long-running instructions on
8610         wrong side.
8611         (s390_sched_variable_issue): Perform bookkeeping for long-running
8612         instructions.
8614 2017-10-18  Richard Biener  <rguenther@suse.de>
8616         * graphite-isl-ast-to-gimple.c (gcc_expression_from_isl_ast_expr_id):
8617         Simplify with removal of the parameter rename map.
8618         (set_rename): Likewise.
8619         (should_copy_to_new_region): Likewise.
8620         (graphite_copy_stmts_from_block): Likewise.
8621         (copy_bb_and_scalar_dependences): Remove initialization of
8622         unused copied_bb_map.
8623         (copy_def): Remove.
8624         (copy_internal_parameters): Likewise.
8625         (graphite_regenerate_ast_isl): Do not call copy_internal_parameters.
8626         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
8627         Use INTEGRAL_TYPE_P.
8628         (parameter_index_in_region_1): Rename to ...
8629         (assign_parameter_index_in_region): ... this.  Assert we have
8630         a parameter we handle.
8631         (scan_tree_for_params): Adjust.
8632         * sese.h (parameter_rename_map_t): Remove.
8633         (struct sese_info_t): Remove unused parameter_rename_map and
8634         copied_bb_map members.
8635         * sese.c (new_sese_info): Adjust.
8636         (free_sese_info): Likewise.
8638 2017-10-18  Martin Liska  <mliska@suse.cz>
8640         PR sanitizer/82545
8641         * asan.c (asan_expand_poison_ifn): Do not put gimple stmt
8642         on an abnormal edge.
8644 2017-10-18  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8646         * doc/invoke.texi (ffunction-sections and fdata-sections):
8647         Update.
8649 2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>
8651         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Bail out only if
8652         the use statement can throw internally.
8654 2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>
8656         * config/visium/visium.c (visium_select_cc_mode): Return CCmode for
8657         any RTX present on the RHS of a SET.
8658         * compare-elim.c (try_eliminate_compare): Restore comment.
8660 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
8662         * langhooks.h (struct lang_hooks): Document that tree_size langhook
8663         may be also called on tcc_type nodes.
8664         * langhooks.c (lhd_tree_size): Likewise.
8666 2017-10-17  David Malcolm  <dmalcolm@redhat.com>
8668         * gimple-ssa-sprintf.c (fmtwarn): Update for changed signature of
8669         format_warning_at_substring.
8670         (maybe_warn): Convert source_range * param to a location_t.  Pass
8671         UNKNOWN_LOCATION rather than NULL to fmtwarn.
8672         (format_directive): Remove code to extract source_ranges and
8673         source_range * in favor of just a location_t.
8674         (parse_directive): Pass UNKNOWN_LOCATION rather than NULL to
8675         fmtwarn.
8676         * substring-locations.c (format_warning_va): Convert
8677         source_range * param to a location_t.
8678         (format_warning_at_substring): Likewise.
8679         * substring-locations.h (format_warning_va): Likewise.
8680         (format_warning_at_substring): Likewise.
8682 2017-10-17  Jan Hubicka  <hubicka@ucw.cz>
8684         * target.h (enum vect_cost_for_stmt): Add vec_gather_load and
8685         vec_scatter_store
8686         * tree-vect-stmts.c (record_stmt_cost): Make difference between normal
8687         and scatter/gather ops.
8689         * aarch64/aarch64.c (aarch64_builtin_vectorization_cost): Add
8690         vec_gather_load and vec_scatter_store.
8691         * arm/arm.c (arm_builtin_vectorization_cost): Likewise.
8692         * powerpcspe/powerpcspe.c (rs6000_builtin_vectorization_cost): Likewise.
8693         * rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Likewise.
8694         * s390/s390.c (s390_builtin_vectorization_cost): Likewise.
8695         * spu/spu.c (spu_builtin_vectorization_cost): Likewise.
8696         * i386/i386.c (x86_builtin_vectorization_cost): Likewise.
8698 2017-10-17  Uros Bizjak  <ubizjak@gmail.com>
8700         * reg-stack.c (compare_for_stack_reg): Add bool argument.
8701         Detect FTST instruction and handle its register pops.  Only pop
8702         second operand if can_pop_second_op is true.
8703         (subst_stack_regs_pat) <case COMPARE>: Detect FCOMI instruction to
8704         set can_pop_second_op to false in the compare_for_stack_reg call.
8706         * config/i386/i386.md (*cmpi<FPCMP:unord><MODEF:mode>): Only call
8707         output_fp_compare for stack register operands.
8708         * config/i386/i386.c (output_fp_compare): Do not output SSE compare
8709         instructions here.  Do not emit stack register pops here.  Assert
8710         that FCOMPP pops next to top stack register.  Rewrite function.
8712 2017-10-17  Nathan Sidwell  <nathan@acm.org>
8714         PR middle-end/82577
8715         * alias.c (compare_base_decls): Check HAS_DECL_ASSEMBLER_NAME_P,
8716         use DECL_ASSEMBLER_NAME_RAW.
8718         PR middle-end/82546
8719         * tree.c (tree_code_size): Reformat.  Punt to lang hook for unknown
8720         TYPE nodes.
8722 2017-10-17  Qing Zhao <qing.zhao@oracle.com>
8723             Wilco Dijkstra <wilco.dijkstra@arm.com>
8725         * builtins.c (expand_builtin_update_setjmp_buf): Add a
8726         converstion to Pmode from the buf_addr.
8728 2017-10-17  Richard Biener  <rguenther@suse.de>
8730         * graphite-dependences.c (scop_get_reads_and_writes): Change
8731         output parameters to references.
8733 2017-10-17  Jackson Woodruff  <jackson.woodruff@arm.com>
8735         PR 71026/tree-optimization
8736         * fold-const.c (distribute_real_division): Removed.
8737         (fold_binary_loc): Remove calls to distribute_real_divison.
8739 2017-10-17  Richard Biener  <rguenther@suse.de>
8741         * graphite-scop-detection.c
8742         (scop_detection::stmt_has_simple_data_refs_p): Always use
8743         the full nest as region.
8744         (try_generate_gimple_bb): Likewise.
8745         * sese.c (scalar_evolution_in_region): Simplify now that
8746         SCEV can handle instantiation in regions.
8747         * tree-scalar-evolution.c (instantiate_scev_name): Also instantiate
8748         in the non-loop part of a function if requested.
8750 2017-10-17  Richard Biener  <rguenther@suse.de>
8752         PR tree-optimization/82563
8753         * graphite-isl-ast-to-gimple.c (generate_entry_out_of_ssa_copies):
8754         New function.
8755         (graphite_regenerate_ast_isl): Call it.
8756         * graphite-scop-detection.c (build_scops): Remove entry edge split.
8758 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
8760         PR tree-optimization/82549
8761         * fold-const.c (optimize_bit_field_compare, fold_truth_andor_1):
8762         Formatting fixes.  Instead of calling make_bit_field_ref with negative
8763         bitpos return 0.
8765 2017-10-17  Olga Makhotina  <olga.makhotina@intel.com>
8767         * config/i386/avx512dqintrin.h (_mm_mask_reduce_sd,
8768         _mm_maskz_reduce_sd, _mm_mask_reduce_ss,=20
8769         _mm_maskz_reduce_ss): New.
8770         * config/i386/i386-builtin.def (__builtin_ia32_reducesd_mask,
8771         __builtin_ia32_reducess_mask): Ditto..
8772         (__builtin_ia32_reducesd, __builtin_ia32_reducess): Remove.
8773         * config/i386/sse.md (reduces<mode>): Renamed to ...
8774         (reduces<mode><mask_scalar_name>): ... this.
8775         (vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0|%0, %1, %2, %3}):
8776         Changed to ...
8777         (vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0<mask_scalar_operand4>|
8778         %0<mask_scalar_operand4>, %1, %2, %3}): ... this.
8780 2017-10-16  David Malcolm  <dmalcolm@redhat.com>
8782         * Makefile.in (OBJS): Add unique-ptr-tests.o.
8783         * selftest-run-tests.c (selftest::run_tests): Call
8784         selftest::unique_ptr_tests_cc_tests.
8785         * selftest.h (selftest::unique_ptr_tests_cc_tests): New decl.
8786         * unique-ptr-tests.cc: New file.
8788 2017-10-16  Vladimir Makarov  <vmakarov@redhat.com>
8790         PR sanitizer/82353
8791         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
8792         locations.
8793         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
8794         (make_hard_regno_born, make_hard_regno_dead): Update
8795         bb_killed_pseudos and bb_gen_pseudos for fixed regs.
8797 2017-10-16  Jeff Law  <law@redhat.com>
8799         * tree-ssa-dse.c (live_bytes_read): Fix thinko.
8801 2017-10-16  Jan Hubicka  <hubicka@ucw.cz>
8803         * x86-tune-costs.h (znver1_cost): Fix move cost tables.
8805 2017-10-16  Olivier Hainque  <hainque@adacore.com>
8807         * gcc/config.gcc (powerpc*-*-*spe*): Pick 8548 as the default
8808         with_cpu if we were configured for an e500v2 target cpu name.
8810 2017-10-16  Thomas Preud'homme  <thomas.preudhomme@arm.com>
8812         * config/arm/arm-cpus.in (cortex-m33): Add nodsp option.
8813         * doc/invoke.texi: Document +nodsp as a valid extension for
8814         -mcpu=cortex-m33.
8816 2017-10-16  Martin Liska  <mliska@suse.cz>
8818         * sbitmap.c (bitmap_bit_in_range_p_checking): New function.
8819         (test_set_range): Likewise.
8820         (test_range_functions): Rename to ...
8821         (test_bit_in_range): ... this.
8822         (sbitmap_c_tests): Add new test.
8824 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
8826         * config/aarch64/arm_neon.h (vdot_u32, vdotq_u32, vdot_s32, vdotq_s32):
8827         New.
8828         (vdot_lane_u32, vdot_laneq_u32, vdotq_lane_u32, vdotq_laneq_u32): New.
8829         (vdot_lane_s32, vdot_laneq_s32, vdotq_lane_s32, vdotq_laneq_s32): New.
8831 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
8833         * config/aarch64/aarch64-builtins.c
8834         (aarch64_types_quadopu_lane_qualifiers): New.
8835         (TYPES_QUADOPU_LANE): New.
8836         * config/aarch64/aarch64-simd.md (aarch64_<sur>dot<vsi2qi>): New.
8837         (<sur>dot_prod<vsi2qi>, aarch64_<sur>dot_lane<vsi2qi>): New.
8838         (aarch64_<sur>dot_laneq<vsi2qi>): New.
8839         * config/aarch64/aarch64-simd-builtins.def (sdot, udot): New.
8840         (sdot_lane, udot_lane, sdot_laneq, udot_laneq): New.
8841         * config/aarch64/iterators.md (sur): Add UNSPEC_SDOT, UNSPEC_UDOT.
8842         (Vdottype, DOTPROD): New.
8843         (sur): Add SDOT and UDOT.
8845 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
8847         * config/aarch64/aarch64.h (AARCH64_FL_DOTPROD): New.
8848         (AARCH64_ISA_DOTPROD, TARGET_DOTPROD): New.
8849         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
8850         Add TARGET_DOTPROD.
8851         * config/aarch64/aarch64-option-extensions.def (dotprod): New.
8852         * config/aarch64/aarch64-cores.def (cortex-a55, cortex-a75):
8853         Enable TARGET_DOTPROD.
8854         (cortex-a75.cortex-a55): Likewise.
8855         * doc/invoke.texi (aarch64-feature-modifiers): Document dotprod.
8857 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
8859         * config/arm/arm-builtins.c (arm_unsigned_uternop_qualifiers): New.
8860         (UTERNOP_QUALIFIERS, arm_umac_lane_qualifiers, UMAC_LANE_QUALIFIERS):
8861         New.
8862         * config/arm/arm_neon_builtins.def (sdot, udot, sdot_lane, udot_lane):
8863         New.
8864         * config/arm/iterators.md (DOTPROD, VSI2QI, vsi2qi): New.
8865         (UNSPEC_DOT_S, UNSPEC_DOT_U, opsuffix): New.
8866         * config/arm/neon.md (neon_<sup>dot<vsi2qi>): New.
8867         (neon_<sup>dot_lane<vsi2qi>, <sup>dot_prod<vsi2qi>): New.
8868         * config/arm/types.md (neon_dot, neon_dot_q): New.
8869         * config/arm/unspecs.md (sup): Add UNSPEC_DOT_S, UNSPEC_DOT_U.
8871 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
8873         * config/arm/arm.h (TARGET_DOTPROD): New.
8874         * config/arm/arm.c (arm_arch_dotprod): New.
8875         (arm_option_reconfigure_globals): Add arm_arch_dotprod.
8876         * config/arm/arm-c.c (__ARM_FEATURE_DOTPROD): New.
8877         * config/arm/arm-cpus.in (armv8.2-a): Enabled +dotprod.
8878         (feature dotprod, group dotprod, ALL_SIMD_INTERNAL): New.
8879         (ALL_FPU_INTERNAL): Use ALL_SIMD_INTERNAL.
8880         * config/arm/t-multilib (v8_2_a_simd_variants): Add dotprod.
8881         * doc/invoke.texi (armv8.2-a): Document dotprod
8883 2017-10-14  Jan Hubicka  <hubicka@ucw.cz>
8885         * i386.c (ix86_vec_cost): New function.
8886         (ix86_rtx_costs): Handle vector operations better.
8887         * i386.h (struct processor_costs): Add sse_op, fmasd, fmass.
8888         * x86-tune-costs.h: Add new costs to all tables.
8890 2017-10-14  Jan Hubicka  <hubicka@ucw.cz>
8892         * i386.c (ix86_rtx_costs): Make difference between x87 and SSE
8893         operations.
8894         * i386.h (struct processor_costs): Add addss, mulss, mulsd, divss,
8895         divsd, sqrtss and sqrtsd
8896         * x86-tune-costs.h: Add new entries to all costs.
8897         (znver1_cost): Fix to match real instruction latencies.
8899 2017-10-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8900             Michael Collison <michael.collison@arm.com>
8902         * compare-elim.c: Include emit-rtl.h.
8903         (can_merge_compare_into_arith): New function.
8904         (try_validate_parallel): Likewise.
8905         (try_merge_compare): Likewise.
8906         (try_eliminate_compare): Call the above when no previous clobber
8907         is available.
8908         (execute_compare_elim_after_reload): Add DF_UD_CHAIN and DF_DU_CHAIN
8909         dataflow problems.
8911 2017-10-14  Jakub Jelinek  <jakub@redhat.com>
8913         PR middle-end/62263
8914         PR middle-end/82498
8915         * tree-ssa-phiopt.c (value_replacement): Comment fix.  Handle
8916         up to 2 preparation statements for ASSIGN in MIDDLE_BB.
8918         PR middle-end/62263
8919         PR middle-end/82498
8920         * tree-ssa-forwprop.c (simplify_rotate): Allow def_arg1[N]
8921         to be any operand_equal_p operands.  For & (B - 1) require
8922         B to be power of 2.  Recognize
8923         (X << (Y & (B - 1))) | (X >> ((-Y) & (B - 1))) and similar patterns.
8925 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
8927         PR bootstrap/82553
8928         * optabs.c (expand_memory_blockage): Fix call of
8929         targetm.have_memory_blockage.
8931 2017-10-14  Jakub Jelinek  <jakub@redhat.com>
8933         PR bootstrap/82548
8934         * config.gcc (*-*-solaris2*, i[34567]86-*-cygwin*,
8935         x86_64-*-cygwin*, i[34567]86-*-mingw* | x86_64-*-mingw*): Append
8936         objects to extra_objs instead of overwriting it.
8938 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
8940         * config/i386/sync.md (FILD_ATOMIC/FIST_ATOMIC FP load peephole2):
8941         Use any_fp_register_operand as operand[3] predicate.  Simplify
8942         equality test for operands[2] and operands[4] memory location.
8943         (LDX_ATOMIC/STX_ATOMIC FP load peephole2): Ditto.
8944         (FILD_ATOMIC/FIST_ATOMIC FP load peephole2 with mem blockage): New.
8945         (LDX_ATOMIC/LDX_ATOMIC FP load peephole2 with mem blockage): Ditto.
8946         (FILD_ATOMIC/FIST_ATOMIC FP store peephole2): Use
8947         any_fp_register_operand as operand[1] predicate.  Simplify
8948         equality test for operands[0] and operands[3] memory location.
8949         (LDX_ATOMIC/STX_ATOMIC FP store peephole2): Ditto.
8950         (FILD_ATOMIC/FIST_ATOMIC FP store peephole2 with mem blockage): New.
8951         (LDX_ATOMIC/LDX_ATOMIC FP storepeephole2 with mem blockage): Ditto.
8953 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
8955         * target-insns.def: Add memory_blockage.
8956         * optabs.c (expand_memory_blockage): New function.
8957         (expand_asm_memory_barrier): Rename ...
8958         (expand_asm_memory_blockage): ... to this.
8959         (expand_mem_thread_fence): Call expand_memory_blockage
8960         instead of expand_asm_memory_barrier.
8961         (expand_mem_singnal_fence): Ditto.
8962         (expand_atomic_load): Ditto.
8963         (expand_atomic_store): Ditto.
8964         * doc/md.texi (Standard Pattern Names For Generation):
8965         Document memory_blockage instruction pattern.
8967 2017-10-13  Sebastian Perta  <sebastian.perta@renesas.com>
8969         * config/rl78/rl78.c (rl78_emit_libcall): New function.
8970         * config/rl78/rl78-protos.h (rl78_emit_libcall): New function.
8971         * config/rl78/rl78.md: New define_expand "adddi3".
8973 2017-10-13  Jan Hubicka  <hubicka@ucw.cz>
8975         * cfghooks.c (verify_flow_info): Disable check that all probabilities
8976         are set correctly.
8978 2017-10-13  Jeff Law  <law@redhat.com>
8980         * tree-ssa-reassoc.c (reassociate_bb): Clarify code slighly.
8982 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
8984         PR target/82274
8985         * internal-fn.c (expand_mul_overflow): If both operands have
8986         the same highpart of -1 or 0 and the topmost bit of lowpart
8987         is different, overflow is if res <= 0 rather than res < 0.
8989 2017-10-13  Pat Haugen  <pthaugen@us.ibm.com>
8991         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Remove
8992         TARGET_P9_VECTOR code for unaligned_load case.
8994 2017-10-13  Jan Hubicka  <hubicka@ucw.cz>
8996         * cfghooks.c (verify_flow_info): Check that edge probabilities are set.
8998 2017-10-13  Nathan Sidwell  <nathan@acm.org>
9000         * tree-core.h (tree_contains_struct): Make bool.
9001         * tree.c (tree_contains_struct): Likewise.
9002         * tree.h (MARK_TS_BASE): Remove do ... while (0) idiom.
9003         (MARK_TS_TYPED, MARK_TS_COMMON, MARK_TS_TYPE_COMMON,
9004         MARK_TS_TYPE_WITH_LANG_SPECIFIC, MARK_TS_DECL_MINIMAL,
9005         MARK_TS_DECL_COMMON, MARK_TS_DECL_WRTL, MARK_TS_DECL_WITH_VIS,
9006         MARK_TS_DECL_NON_COMMON): Likewise, use comma operator.
9008 2017-10-13  Richard Biener  <rguenther@suse.de>
9010         * graphite-isl-ast-to-gimple.c
9011         (translate_isl_ast_to_gimple::get_rename_from_scev): Remove unused
9012         parameters and dominance check.
9013         (translate_isl_ast_to_gimple::graphite_copy_stmts_from_block): Adjust.
9014         (translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences): Likewise.
9015         (translate_isl_ast_to_gimple::graphite_regenerate_ast_isl):
9016         Do not update SSA form here or do intermediate IL verification.
9017         * graphite.c: Include tree-ssa.h and tree-into-ssa.h.
9018         (graphite_initialize): Remove check on the number of loops in
9019         the function and inline into graphite_transform_loops.
9020         (graphite_finalize): Inline into graphite_transform_loops.
9021         (graphite_transform_loops): Perform SSA update and IL verification
9022         here.
9023         * params.def (PARAM_GRAPHITE_MIN_LOOPS_PER_FUNCTION): Remove.
9025 2017-10-13  Richard Biener  <rguenther@suse.de>
9027         * graphite-isl-ast-to-gimple.c (max_mode_int_precision,
9028         graphite_expression_type_precision): Avoid global constructor
9029         by moving ...
9030         (translate_isl_ast_to_gimple::translate_isl_ast_to_gimple): Here.
9031         (translate_isl_ast_to_gimple::graphite_expr_type): Add type member.
9032         (translate_isl_ast_to_gimple::translate_isl_ast_node_for): Use it.
9033         (translate_isl_ast_to_gimple::build_iv_mapping): Likewise.
9034         (translate_isl_ast_to_gimple::graphite_create_new_guard): Likewise.
9035         * graphite-sese-to-poly.c (build_original_schedule): Return nothing.
9037 2017-10-13  H.J. Lu  <hongjiu.lu@intel.com>
9039         PR target/82499
9040         * config/i386/i386.h (ix86_red_zone_size): New.
9041         * config/i386/i386.md (push peephole2s): Replace
9042         "!ix86_using_red_zone ()" with "ix86_red_zone_size == 0".
9044 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
9045             Alan Hayward  <alan.hayward@arm.com>
9046             David Sherwood  <david.sherwood@arm.com>
9048         * combine.c (can_change_dest_mode): Reject changes in
9049         REGMODE_NATURAL_SIZE.
9051 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
9052             Alan Hayward  <alan.hayward@arm.com>
9053             David Sherwood  <david.sherwood@arm.com>
9055         * cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_BITSIZE.
9056         (expand_debug_source_expr): Likewise.
9057         * combine.c (combine_simplify_rtx): Likewise.
9058         * cse.c (fold_rtx): Likewise.
9059         * fwprop.c (canonicalize_address): Likewise.
9060         * targhooks.c (default_shift_truncation_mask): Likewise.
9062 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
9063             Alan Hayward  <alan.hayward@arm.com>
9064             David Sherwood  <david.sherwood@arm.com>
9066         * optabs.c (add_equal_note): Use GET_MODE_UNIT_SIZE.
9067         (widened_mode): Likewise.
9068         (expand_unop): Likewise.
9069         * ree.c (transform_ifelse): Likewise.
9070         (merge_def_and_ext): Likewise.
9071         (combine_reaching_defs): Likewise.
9072         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
9074 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
9075             Alan Hayward  <alan.hayward@arm.com>
9076             David Sherwood  <david.sherwood@arm.com>
9078         * caller-save.c (replace_reg_with_saved_mem): Use byte_lowpart_offset.
9079         * combine.c (gen_lowpart_for_combine): Likewise.
9080         * dwarf2out.c (rtl_for_decl_location): Likewise.
9081         * final.c (alter_subreg): Likewise.
9082         * rtlhooks.c (gen_lowpart_general): Likewise.
9083         (gen_lowpart_if_possible): Likewise.
9085 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
9086             Alan Hayward  <alan.hayward@arm.com>
9087             David Sherwood  <david.sherwood@arm.com>
9089         * calls.c (expand_call): Use subreg_lowpart_offset.
9090         * cse.c (cse_insn): Likewise.
9091         * regcprop.c (copy_value): Likewise.
9092         (copyprop_hardreg_forward_1): Likewise.
9094 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
9096         PR target/82524
9097         * config/i386/i386.md (addqi_ext_1, andqi_ext_1,
9098         *andqi_ext_1_cc, *<code>qi_ext_1, *xorqi_ext_1_cc): Change
9099         =Q constraints to +Q and into insn condition add check
9100         that operands[0] and operands[1] are equal.
9101         (*addqi_ext_2, *andqi_ext_2, *<code>qi_ext_2): Change
9102         =Q constraints to +Q and into insn condition add check
9103         that operands[0] is equal to either operands[1] or operands[2].
9105         PR target/82498
9106         * fold-const.c (fold_binary_loc) <bit_rotate>: Code cleanups,
9107         instead of handling MINUS_EXPR twice (once for each argument),
9108         canonicalize operand order and handle just once, use rtype where
9109         possible.  Handle (A << B) | (A >> (-B & (Z - 1))).
9111         PR target/82498
9112         * config/i386/ia32intrin.h (__rold, __rord, __rolq, __rorq): Allow
9113         any values of __C while still being pattern recognizable as a simple
9114         rotate instruction.
9116 2017-10-13  Richard Biener  <rguenther@suse.de>
9118         PR tree-optimization/82451
9119         Revert
9120         2017-10-02  Richard Biener  <rguenther@suse.de>
9122         PR tree-optimization/82355
9123         * graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
9124         a mapping for the enclosing loop but avoid generating one for
9125         the loop tree root.
9126         (copy_bb_and_scalar_dependences): Remove premature codegen
9127         error on PHIs in blocks duplicated into multiple places.
9128         * graphite-scop-detection.c
9129         (scop_detection::stmt_has_simple_data_refs_p): For a loop not
9130         in the region use it as loop and nest to analyze the DR in.
9131         (try_generate_gimple_bb): Likewise.
9132         * graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
9133         (add_loop_constraints): For blocks in a loop not in the region
9134         create a dimension with a single iteration.
9135         * sese.h (gbb_loop_at_index): Remove assert.
9137         * cfgloop.c (loop_preheader_edge): For the loop tree root
9138         return the single successor of the entry block.
9139         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
9140         Reset the SCEV hashtable and niters.
9141         * graphite-scop-detection.c
9142         (scop_detection::graphite_can_represent_scev): Add SCOP parameter,
9143         assert that we only have POLYNOMIAL_CHREC that vary in loops
9144         contained in the region.
9145         (scop_detection::graphite_can_represent_expr): Adjust.
9146         (scop_detection::stmt_has_simple_data_refs_p): For loops
9147         not in the region set loop to NULL.  The nest is now the
9148         entry edge to the region.
9149         (try_generate_gimple_bb): Likewise.
9150         * sese.c (scalar_evolution_in_region): Adjust for
9151         instantiate_scev change.
9152         * tree-data-ref.h (graphite_find_data_references_in_stmt):
9153         Make nest parameter the edge into the region.
9154         (create_data_ref): Likewise.
9155         * tree-data-ref.c (dr_analyze_indices): Make nest parameter an
9156         entry edge into a region and adjust instantiate_scev calls.
9157         (create_data_ref): Likewise.
9158         (graphite_find_data_references_in_stmt): Likewise.
9159         (find_data_references_in_stmt): Pass the loop preheader edge
9160         from the nest argument.
9161         * tree-scalar-evolution.h (instantiate_scev): Make instantiate_below
9162         parameter the edge into the region.
9163         (instantiate_parameters): Use the loop preheader edge as entry.
9164         * tree-scalar-evolution.c (analyze_scalar_evolution): Handle
9165         NULL loop.
9166         (get_instantiated_value_entry): Make instantiate_below parameter
9167         the edge into the region.
9168         (instantiate_scev_name): Likewise.  Adjust dominance checks,
9169         when we cannot use loop-based instantiation instantiate by
9170         walking use-def chains.
9171         (instantiate_scev_poly): Adjust.
9172         (instantiate_scev_binary): Likewise.
9173         (instantiate_scev_convert): Likewise.
9174         (instantiate_scev_not): Likewise.
9175         (instantiate_array_ref): Remove.
9176         (instantiate_scev_3): Likewise.
9177         (instantiate_scev_2): Likewise.
9178         (instantiate_scev_1): Likewise.
9179         (instantiate_scev_r): Do not blindly handle N-operand trees.
9180         Do not instantiate array-refs.  Handle all constants and invariants.
9181         (instantiate_scev): Make instantiate_below parameter
9182         the edge into the region.
9183         (resolve_mixers): Use the loop preheader edge for the region
9184         parameter to instantiate_scev_r.
9185         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Adjust.
9187 2017-10-13  Richard Biener  <rguenther@suse.de>
9189         PR tree-optimization/82525
9190         * graphite-isl-ast-to-gimple.c
9191         (translate_isl_ast_to_gimple::widest_int_from_isl_expr_int): Split
9192         out from ...
9193         (translate_isl_ast_to_gimple::gcc_expression_from_isl_expr_int): Here.
9194         Fail code generation when we cannot represent the isl integer.
9195         (binary_op_to_tree): Elide modulo operations that are no-ops
9196         in the type we code generate.  Remove now superfluous code
9197         generation errors.
9199 2017-10-13  Richard Biener  <rguenther@suse.de>
9201         * graphite-scop-detection.c (loop_ivs_can_be_represented): Remove.
9202         (scop_detection::harmful_loop_in_region): Remove premature
9203         IV type restriction.
9204         (scop_detection::graphite_can_represent_scev): We can handle
9205         pointer IVs just fine.
9207 2017-10-13  Alan Modra  <amodra@gmail.com>
9209         * doc/extend.texi (Extended Asm <Clobbers>): Rename to
9210         "Clobbers and Scratch Registers".  Add paragraph on
9211         alternative to clobbers for scratch registers and OpenBLAS
9212         example.
9214 2017-10-13  Alan Modra  <amodra@gmail.com>
9216         * doc/extend.texi (Clobbers): Correct vax example.  Delete old
9217         example of a memory input for a string of known length.  Move
9218         commentary out of table.  Add a number of new examples
9219         covering array memory inputs.
9221 2017-10-12  Martin Liska  <mliska@suse.cz>
9223         PR tree-optimization/82493
9224         * sbitmap.c (bitmap_bit_in_range_p): Fix the implementation.
9225         (test_range_functions): New function.
9226         (sbitmap_c_tests): Likewise.
9227         * selftest-run-tests.c (selftest::run_tests): Run new tests.
9228         * selftest.h (sbitmap_c_tests): New function.
9230         * tree-ssa-dse.c (live_bytes_read): Fix thinko.
9232 2017-10-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
9234         * config/rs6000/amo.h: Fix spacing issue.
9236 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
9238         PR target/82498
9239         * config/i386/i386.md (*ashl<mode>3_mask_1,
9240         *<shift_insn><mode>3_mask_1, *<rotate_insn><mode>3_mask_1,
9241         *<btsc><mode>_mask_1, *btr<mode>_mask_1): New define_insn_and_split
9242         patterns.
9244 2017-10-12  Jan Hubicka  <hubicka@ucw.cz>
9246         * profile-count.h (safe_scale_64bit): Fix GCC4.x path.
9247         (profile_probability): Set max_probability
9248         to (uint32_t) 1 << (n_bits - 2) and update accessors to avoid overlfows
9249         in temporaries.
9250         * profile-count.c (profile_probability::differs_from_p): Do not
9251         rely on max_probaiblity == 10000
9253 2017-10-12  Jeff Law  <law@redhat.com>
9255         * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject ao_refs with
9256         negative offsets.
9258 2017-10-12  Martin Sebor  <msebor@redhat.com>
9260         PR other/82301
9261         PR c/82435
9262         * cgraphunit.c (maybe_diag_incompatible_alias): New function.
9263         (handle_alias_pairs): Call it.
9264         * common.opt (-Wattribute-alias): New option.
9265         * doc/extend.texi (ifunc attribute): Discuss C++ specifics.
9266         * doc/invoke.texi (-Wattribute-alias): Document.
9268 2017-10-12  Vladimir Makarov  <vmakarov@redhat.com>
9270         Revert
9271         2017-10-11  Vladimir Makarov  <vmakarov@redhat.com>
9272         PR sanitizer/82353
9273         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
9274         locations.
9275         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
9276         (make_hard_regno_born, make_hard_regno_dead): Update
9277         bb_killed_pseudos and bb_gen_pseudos.
9279 2017-10-12  Jan Hubicka  <hubicka@ucw.cz>
9281         * config/i386/x86-tune-sched.c (ix86_adjust_cost): Fix Zen support.
9283 2017-10-12  Uros Bizjak  <ubizjak@gmail.com>
9285         * config/alpha/alpha.c (alpha_split_conditional_move):
9286         Use std::swap instead of manually swapping.
9287         (alpha_stdarg_optimize_hook): Ditto.
9288         (alpha_canonicalize_comparison): Ditto.
9290 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
9292         * tree-loop-distribution.c (struct builtin_info): New struct.
9293         (struct partition): Refactor fields into struct builtin_info.
9294         (partition_free): Free struct builtin_info.
9295         (build_size_arg_loc, build_addr_arg_loc): Delete.
9296         (generate_memset_builtin, generate_memcpy_builtin): Get memory range
9297         information from struct builtin_info.
9298         (find_single_drs): New function refactored from classify_partition.
9299         Also moved builtin validity checks to this function.
9300         (compute_access_range, alloc_builtin): New functions.
9301         (classify_builtin_st, classify_builtin_ldst): New functions.
9302         (classify_partition): Refactor code into functions find_single_drs,
9303         classify_builtin_st and classify_builtin_ldst.
9304         (distribute_loop): Don't do runtime alias check when distributing
9305         loop nest.
9306         (find_seed_stmts_for_distribution): New function.
9307         (pass_loop_distribution::execute): Refactor code finding seed
9308         stmts into above function.  Support distribution for the innermost
9309         two-level loop nest.  Adjust dump information.
9311 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
9313         * tree-loop-distribution.c: Adjust the general comment.
9314         (NUM_PARTITION_THRESHOLD): New macro.
9315         (ssa_name_has_uses_outside_loop_p): Support loop nest distribution.
9316         (classify_partition): Skip builtin pattern of loop nest's inner loop.
9317         (merge_dep_scc_partitions): New parameter ignore_alias_p and use it
9318         in call to build_partition_graph.
9319         (finalize_partitions): New parameter.  Make loop distribution more
9320         conservative by fusing more partitions.
9321         (distribute_loop): Don't do runtime alias check in case of loop nest
9322         distribution.
9323         (find_seed_stmts_for_distribution): New function.
9324         (prepare_perfect_loop_nest): New function.
9325         (pass_loop_distribution::execute): Refactor code finding seed stmts
9326         and loop nest into above functions.  Support loop nest distribution.
9327         Adjust dump information accordingly.
9329 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
9331         * tree-loop-distribution.c (break_alias_scc_partitions): Add comment
9332         and set PTYPE_SEQUENTIAL for merged partition.
9334 2017-10-12  Richard Biener  <rguenther@suse.de>
9336         PR tree-optimization/69728
9337         Revert
9338         2017-09-19  Richard Biener  <rguenther@suse.de>
9340         PR tree-optimization/69728
9341         * graphite-sese-to-poly.c (schedule_error): New global.
9342         (add_loop_schedule): Handle empty domain by failing the
9343         schedule.
9344         (build_original_schedule): Handle schedule_error.
9346         * graphite-sese-to-poly.c (add_loop_schedule): Handle empty
9347         domain by returning an unchanged schedule.
9349 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
9351         * genrecog.c (validate_pattern): For VEC_SELECT verify that
9352         CONST_INT selectors are 0 to GET_MODE_NUNITS (imode) - 1.
9354 2017-10-12  Aldy Hernandez  <aldyh@redhat.com>
9356         * Makefile.in (TAGS): Merge all the *.def files into one pattern.
9357         Handle params.def.
9359 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
9361         PR c++/82159
9362         * expr.c (store_field): Don't optimize away bitsize == 0 store
9363         from CALL_EXPR with addressable return type.
9365 2017-10-11  Segher Boessenkool  <segher@kernel.crashing.org>
9367         * config/rs6000/rs6000.h (TARGET_ISEL64): Delete.
9368         * config/rs6000/rs6000.md (sel): Delete mode attribute.
9369         (mov<mode>cc, isel_signed_<mode>, isel_unsigned_<mode>,
9370         *isel_reversed_signed_<mode>, *isel_reversed_unsigned_<mode>): Use
9371         TARGET_ISEL instead of TARGET_ISEL<sel>.
9373 2017-10-11  David Edelsohn  <dje.gcc@gmail.com>
9375         * config/rs6000/rs6000.c
9376         (rs6000_xcoff_asm_output_aligned_decl_common): Test for NULL decl.
9378 2017-10-11  Segher Boessenkool  <segher@kernel.crashing.org>
9380         * config/rs6000/predicates.md (zero_constant, all_ones_constant):
9381         Move up in file.
9382         (reg_or_cint_operand): Fix comment.
9383         (reg_or_zero_operand): New predicate.
9384         * config/rs6000/rs6000-protos.h (output_isel): Delete.
9385         * config/rs6000/rs6000.c (output_isel): Delete.
9386         * config/rs6000/rs6000.md (isel_signed_<mode>): Use reg_or_zero_operand
9387         instead of reg_or_cint_operand.  Output instruction directly (not via
9388         output_isel).
9389         (isel_unsigned_<mode>): Ditto.
9390         (*isel_reversed_signed_<mode>): Use reg_or_zero_operand instead of
9391         gpc_reg_operand.  Add an instruction alternative for this.  Output
9392         instruction directly.
9393         (*isel_reversed_unsigned_<mode>): Ditto.
9395 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
9397         * config/i386/i386.c (ix86_canonicalize_comparison): New function.
9398         (TARGET_CANONICALIZE_COMPARISON): Define.
9400 2017-10-11  Qing Zhao  <qing.zhao@oracle.com>
9402         PR target/81422
9403         * config/aarch64/aarch64.c (aarch64_load_symref_appropriately):
9404         Check whether the dest is REG before adding REG_EQUIV note.
9406 2017-10-11  Vladimir Makarov  <vmakarov@redhat.com>
9408         PR sanitizer/82353
9409         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
9410         locations.
9411         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
9412         (make_hard_regno_born, make_hard_regno_dead): Update
9413         bb_killed_pseudos and bb_gen_pseudos.
9415 2017-10-11  Nathan Sidwell  <nathan@acm.org>
9417         * incpath.h (enum incpath_kind): Name enum, prefix values.
9418         (add_path, add_cpp_dir_path, get_added_cpp_dirs): Use incpath_kind.
9419         * incpath.c (heads, tails): Use INC_MAX.
9420         (add_env_var_paths, add_standard_paths): Use incpath_kind.
9421         (merge_include_chains, split_quote_chain,
9422         register_include_chains): Update incpath_kind names.
9423         (add_cpp_dir_path, add_path, get_added_cpp_dirs): Use incpath_kind.
9424         * config/darwin-c.c (add_system_framework_path): Update incpath_kind
9425         names.
9426         (add_framework_path, darwin_register_objc_includes): Likewise.
9427         * config/vms/vms-c.c (vms_c_register_includes): Likewise.
9429 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
9431         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
9432         Do not use float_operator operator predicate.
9433         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
9434         * config/i386/predicates.md (float_operator): Remove predicate.
9436 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
9438         * config/i386/i386.md (*jcc<mode>_0_i387): Remove insn pattern.
9439         (*jccxf_i387): Ditto.
9440         (*jcc<mode>_i387): Ditto.
9441         (*jccu<mode>_i387): Ditto.
9442         (*jcc<X87MODEF:mode>_<SWI24:mode>_i387): Ditto.
9443         (*jcc_*_i387 splitters): Remove.
9444         * config/i386/i386-protos.h (ix86_split_fp_branch): Remove prototype.
9445         * config/i386/i386.c (ix86_split_fp_branch): Remove.
9446         * config/i386/predicates.md (ix86_swapped_fp_comparison_operator):
9447         Remove predicate.
9449 2017-10-11  Jan Hubicka  <hubicka@ucw.cz>
9451         * profile-count.h (slow_safe_scale_64bit): New function.
9452         (safe_scale_64bit): New inline.
9453         (profile_count::max_safe_multiplier): Remove; use safe_scale_64bit.
9454         * profile-count.c: Include wide-int.h
9455         (slow_safe_scale_64bit): New.
9457 2017-10-11  Nathan Sidwell  <nathan@acm.org>
9459         * tree.h (DECL_ASSEMBLER_NAME_SET_P): Don't check
9460         HAS_DECL_ASSEMBLER_NAME_P.
9461         * gimple-expr.c (gimple_decl_printable_name: Check
9462         HAS_DECL_ASSEMBLER_NAME_P too.
9463         * ipa-utils.h (type_in_anonymous_namespace_p): Check
9464         DECL_ASSEMBLER_NAME_SET_P of TYPE_NAME.
9465         (odr_type_p): No need to assert TYPE_NAME is a TYPE_DECL.
9466         * passes.c (rest_of_decl_compilation): Check
9467         HAS_DECL_ASSEMBLER_NAME_P too.
9468         * recog.c (verify_changes): Likewise.
9469         * tree-pretty-print.c (dump_decl_name): Likewise.
9470         * tree-ssa-structalias.c (alias_get_name): Likewise.  Reimplement.
9472         * tree.h (DECL_ASSEMBLER_NAME_RAW): New.
9473         (SET_DECL_ASSEMBLER_NAME): Use it.
9474         (DECL_ASSEMBLER_NAME_SET_P): Likewise.
9475         (COPY_DECL_ASSEMBLER_NAME): Likewise.
9476         * tree.c (decl_assembler_name): Use DECL_ASSEMBLER_NAME_RAW.
9478 2017-10-11  Jan Hubicka  <hubicka@ucw.cz>
9480         * config.gcc (i386, x86_64): Add extra objects.
9481         * config/i386/i386-protos.h (ix86_rip_relative_addr_p): Declare.
9482         (ix86_min_insn_size): Declare.
9483         (ix86_issue_rate): Declare.
9484         (ix86_adjust_cost): Declare.
9485         (ia32_multipass_dfa_lookahead): Declare.
9486         (ix86_macro_fusion_p): Declare.
9487         (ix86_macro_fusion_pair_p): Declare.
9488         (ix86_bd_has_dispatch): Declare.
9489         (ix86_bd_do_dispatch): Declare.
9490         (ix86_core2i7_init_hooks): Declare.
9491         (ix86_atom_sched_reorder): Declare.
9492         * config/i386/i386.c Move all CPU cost tables to x86-tune-costs.h.
9493         (COSTS_N_BYTES): Move to x86-tune-costs.h.
9494         (DUMMY_STRINGOP_ALGS):Move to x86-tune-costs.h.
9495         (rip_relative_addr_p): Rename to ...
9496         (ix86_rip_relative_addr_p): ... this one; export.
9497         (memory_address_length): Update.
9498         (ix86_issue_rate): Move to x86-tune-sched.c.
9499         (ix86_flags_dependent): Move to x86-tune-sched.c.
9500         (ix86_agi_dependent): Move to x86-tune-sched.c.
9501         (exact_dependency_1): Move to x86-tune-sched.c.
9502         (exact_store_load_dependency): Move to x86-tune-sched.c.
9503         (ix86_adjust_cost): Move to x86-tune-sched.c.
9504         (ia32_multipass_dfa_lookahead): Move to x86-tune-sched.c.
9505         (ix86_macro_fusion_p): Move to x86-tune-sched.c.
9506         (ix86_macro_fusion_pair_p): Move to x86-tune-sched.c.
9507         (do_reorder_for_imul): Move to x86-tune-sched-atom.c.
9508         (swap_top_of_ready_list): Move to x86-tune-sched-atom.c.
9509         (ix86_sched_reorder): Move to x86-tune-sched-atom.c.
9510         (core2i7_first_cycle_multipass_init): Move to x86-tune-sched-core.c.
9511         (core2i7_dfa_post_advance_cycle): Move to x86-tune-sched-core.c.
9512         (min_insn_size): Rename to ...
9513         (ix86_min_insn_size): ... this one; export.
9514         (core2i7_first_cycle_multipass_begin): Move to x86-tune-sched-core.c.
9515         (core2i7_first_cycle_multipass_issue): Move to x86-tune-sched-core.c.
9516         (core2i7_first_cycle_multipass_backtrack): Move to
9517         x86-tune-sched-core.c.
9518         (core2i7_first_cycle_multipass_end): Move to x86-tune-sched-core.c.
9519         (core2i7_first_cycle_multipass_fini): Move to x86-tune-sched-core.c.
9520         (ix86_sched_init_global): Break up logic to ix86_core2i7_init_hooks.
9521         (ix86_avoid_jump_mispredicts): Update.
9522         (TARGET_SCHED_DISPATCH): Move to ix86-tune-sched-bd.c.
9523         (TARGET_SCHED_DISPATCH_DO): Move to ix86-tune-sched-bd.c.
9524         (TARGET_SCHED_REORDER): Move to ix86-tune-sched-bd.c.
9525         (DISPATCH_WINDOW_SIZE): Move to ix86-tune-sched-bd.c.
9526         (MAX_DISPATCH_WINDOWS): Move to ix86-tune-sched-bd.c.
9527         (MAX_INSN): Move to ix86-tune-sched-bd.c.
9528         (MAX_IMM): Move to ix86-tune-sched-bd.c.
9529         (MAX_IMM_SIZE): Move to ix86-tune-sched-bd.c.
9530         (MAX_IMM_32): Move to ix86-tune-sched-bd.c.
9531         (MAX_IMM_64): Move to ix86-tune-sched-bd.c.
9532         (MAX_LOAD): Move to ix86-tune-sched-bd.c.
9533         (MAX_STORE): Move to ix86-tune-sched-bd.c.
9534         (BIG): Move to ix86-tune-sched-bd.c.
9535         (enum dispatch_group): Move to ix86-tune-sched-bd.c.
9536         (enum insn_path): Move to ix86-tune-sched-bd.c.
9537         (get_mem_group): Move to ix86-tune-sched-bd.c.
9538         (is_cmp): Move to ix86-tune-sched-bd.c.
9539         (dispatch_violation): Move to ix86-tune-sched-bd.c.
9540         (is_branch): Move to ix86-tune-sched-bd.c.
9541         (is_prefetch): Move to ix86-tune-sched-bd.c.
9542         (init_window): Move to ix86-tune-sched-bd.c.
9543         (allocate_window): Move to ix86-tune-sched-bd.c.
9544         (init_dispatch_sched): Move to ix86-tune-sched-bd.c.
9545         (is_end_basic_block): Move to ix86-tune-sched-bd.c.
9546         (process_end_window): Move to ix86-tune-sched-bd.c.
9547         (allocate_next_window): Move to ix86-tune-sched-bd.c.
9548         (find_constant): Move to ix86-tune-sched-bd.c.
9549         (get_num_immediates): Move to ix86-tune-sched-bd.c.
9550         (has_immediate): Move to ix86-tune-sched-bd.c.
9551         (get_insn_path): Move to ix86-tune-sched-bd.c.
9552         (get_insn_group): Move to ix86-tune-sched-bd.c.
9553         (count_num_restricted): Move to ix86-tune-sched-bd.c.
9554         (fits_dispatch_window): Move to ix86-tune-sched-bd.c.
9555         (add_insn_window): Move to ix86-tune-sched-bd.c.
9556         (add_to_dispatch_window): Move to ix86-tune-sched-bd.c.
9557         (debug_dispatch_window_file): Move to ix86-tune-sched-bd.c.
9558         (debug_dispatch_window): Move to ix86-tune-sched-bd.c.
9559         (debug_insn_dispatch_info_file): Move to ix86-tune-sched-bd.c.
9560         (debug_ready_dispatch): Move to ix86-tune-sched-bd.c.
9561         (do_dispatch): Move to ix86-tune-sched-bd.c.
9562         (has_dispatch): Move to ix86-tune-sched-bd.c.
9563         * config/i386/t-i386: Add new object files.
9564         * config/i386/x86-tune-costs.h: New file.
9565         * config/i386/x86-tune-sched-atom.c: New file.
9566         * config/i386/x86-tune-sched-bd.c: New file.
9567         * config/i386/x86-tune-sched-core.c: New file.
9568         * config/i386/x86-tune-sched.c: New file.
9570 2017-10-11  Liu Hao  <lh_mouse@126.com>
9572         * pretty-print.c [_WIN32] (colorize_init): Remove.  Use
9573         the generic version below instead.
9574         (should_colorize): Recognize Windows consoles as terminals
9575         for MinGW targets.
9576         * pretty-print.c [__MINGW32__] (write_all): New function.
9577         [__MINGW32__] (find_esc_head): Likewise.
9578         [__MINGW32__] (find_esc_terminator): Likewise.
9579         [__MINGW32__] (eat_esc_sequence): Likewise.
9580         [__MINGW32__] (mingw_ansi_fputs): New function that handles
9581         ANSI escape codes.
9582         (pp_write_text_to_stream): Use mingw_ansi_fputs instead of fputs
9583         for MinGW targets.
9585 2017-10-11  Richard Biener  <rguenther@suse.de>
9587         * tree-ssa-loop-niter.c (infer_loop_bounds_from_pointer_arith):
9588         Properly call analyze_scalar_evolution with the loop of the stmt.
9590 2017-10-11  Richard Biener  <rguenther@suse.de>
9592         * tree.def (POLYNOMIAL_CHREC): Remove CHREC_VARIABLE tree operand.
9593         * tree-core.h (tree_base): Add chrec_var union member.
9594         * tree.h (CHREC_VAR): Remove.
9595         (CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): Adjust.
9596         * tree-chrec.h (build_polynomial_chrec): Adjust.
9597         * tree-chrec.c (reset_evolution_in_loop): Use build_polynomial_chrec.
9598         * tree-pretty-print.c (dump_generic_node): Use CHREC_VARIABLE.
9600 2017-10-11  Marc Glisse  <marc.glisse@inria.fr>
9602         * fold-const.c (fold_binary_loc) [X +- Y CMP X]: Move ...
9603         * match.pd: ... here.
9604         ((T) X == (T) Y): Relax condition.
9606 2017-10-11  Bin Cheng  <bin.cheng@arm.com>
9608         PR tree-optimization/82472
9609         * tree-loop-distribution.c (sort_partitions_by_post_order): Refine
9610         comment.
9611         (break_alias_scc_partitions): Update postorder number.
9613 2017-10-11  Martin Liska  <mliska@suse.cz>
9615         PR sanitizer/82490
9616         * opts.c (parse_no_sanitize_attribute): Do not use error_value
9617         variable.
9618         * opts.h (parse_no_sanitize_attribute): Remove last argument.
9620 2017-10-11  Martin Liska  <mliska@suse.cz>
9622         * print-rtl.c (print_insn): Move declaration of idbuf
9623         to same scope as name.
9625 2017-10-11  Martin Liska  <mliska@suse.cz>
9627         Revert r253637:
9629         PR sanitizer/82484
9630         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
9631         volatile arguments.
9633 2017-10-11  Martin Liska  <mliska@suse.cz>
9635         PR sanitizer/82484
9636         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
9637         volatile arguments.
9639 2017-10-11  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
9641         * config.gcc (default_gnu_indirect_function): Default to yes for
9642         arm*-*-linux* with glibc.
9644 2017-10-11  Richard Biener  <rguenther@suse.de>
9646         * tree-scalar-evolution.c (get_scalar_evolution): Handle
9647         default-defs and types we do not want to analyze.
9648         (interpret_loop_phi): Replace unreachable code with an assert.
9649         (compute_scalar_evolution_in_loop): Remove and inline ...
9650         (analyze_scalar_evolution_1): ... here, replacing condition with
9651         what makes the intent clearer.  Remove handling of cases
9652         get_scalar_evolution now handles.
9654 2017-10-10  Jim Wilson  <wilson@tuliptree.org>
9656         PR rtl-optimization/81434
9657         * haifa-sched.c (prune_ready_list): Init min_cost_group to 0.  Update
9658         comment for main loop.  In sched_group_found if, also add checks for
9659         pass and min_cost_group.
9661 2017-10-10  Segher Boessenkool  <segher@kernel.crashing.org>
9663         * config/rs6000/rs6000.c (TARGET_INSN_COST): New.
9664         (rs6000_insn_cost): New function.
9665         * config/rs6000/rs6000.md (cost): New attribute.
9667 2017-10-10  Jakub Jelinek  <jakub@redhat.com>
9668             H.J. Lu  <hongjiu.lu@intel.com>
9670         PR target/79565
9671         PR target/82483
9672         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Add
9673         OPTION_MASK_ISA_MMX for __builtin_ia32_maskmovq,
9674         __builtin_ia32_vec_ext_v4hi and __builtin_ia32_vec_set_v4hi.
9675         (ix86_expand_builtin): Treat OPTION_MASK_ISA_MMX similarly
9676         to OPTION_MASK_ISA_AVX512VL - builtins that have both
9677         OPTION_MASK_ISA_MMX and some other bit set require both
9678         mmx and the ISAs without the mmx bit.
9679         * config/i386/i386-builtin.def (__builtin_ia32_cvtps2pi,
9680         __builtin_ia32_cvttps2pi, __builtin_ia32_cvtpi2ps,
9681         __builtin_ia32_pavgb, __builtin_ia32_pavgw, __builtin_ia32_pmulhuw,
9682         __builtin_ia32_pmaxub, __builtin_ia32_pmaxsw, __builtin_ia32_pminub,
9683         __builtin_ia32_pminsw, __builtin_ia32_psadbw, __builtin_ia32_pmovmskb,
9684         __builtin_ia32_pshufw, __builtin_ia32_cvtpd2pi,
9685         __builtin_ia32_cvttpd2pi, __builtin_ia32_cvtpi2pd,
9686         __builtin_ia32_pmuludq, __builtin_ia32_pabsb, __builtin_ia32_pabsw,
9687         __builtin_ia32_pabsd, __builtin_ia32_phaddw, __builtin_ia32_phaddd,
9688         __builtin_ia32_phaddsw, __builtin_ia32_phsubw, __builtin_ia32_phsubd,
9689         __builtin_ia32_phsubsw, __builtin_ia32_pmaddubsw,
9690         __builtin_ia32_pmulhrsw, __builtin_ia32_pshufb, __builtin_ia32_psignb,
9691         __builtin_ia32_psignw, __builtin_ia32_psignd, __builtin_ia32_movntq,
9692         __builtin_ia32_paddq, __builtin_ia32_psubq, __builtin_ia32_palignr):
9693         Add OPTION_MASK_ISA_MMX.
9695 2017-10-10  Andreas Tobler  <andreast@gcc.gnu.org>
9697         * config.gcc (armv7*-*-freebsd*): New target.
9698         (armv6*-*-freebsd*): Remove obsolete TARGET_FREEBSD_ARMv6 define.
9700 2017-10-10  Jan Hubicka  <hubicka@ucw.cz>
9702         * x86-tune.def (X86_TUNE_AVOID_FALSE_DEP_FOR_BMI,
9703         X86_TUNE_ADJUST_UNROLL, X86_TUNE_ONE_IF_CONV_INSN): Move to right
9704         spot in the file.
9706 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
9708         * wide-int.h (wide_int_ref_storage): Make host_dependent_precision
9709         a template parameter.
9710         (WIDE_INT_REF_FOR): Update accordingly.
9711         * tree.h (wi::int_traits <const_tree>): Delete.
9712         (wi::tree_to_widest_ref, wi::tree_to_offset_ref): New typedefs.
9713         (wi::to_widest, wi::to_offset): Use them.  Expand commentary.
9714         (wi::tree_to_wide_ref): New typedef.
9715         (wi::to_wide): New function.
9716         * calls.c (get_size_range): Use wi::to_wide when operating on
9717         trees as wide_ints.
9718         * cgraph.c (cgraph_node::create_thunk): Likewise.
9719         * config/i386/i386.c (ix86_data_alignment): Likewise.
9720         (ix86_local_alignment): Likewise.
9721         * dbxout.c (stabstr_O): Likewise.
9722         * dwarf2out.c (add_scalar_info, gen_enumeration_type_die): Likewise.
9723         * expr.c (const_vector_from_tree): Likewise.
9724         * fold-const-call.c (host_size_t_cst_p, fold_const_call_1): Likewise.
9725         * fold-const.c (may_negate_without_overflow_p, negate_expr_p)
9726         (fold_negate_expr_1, int_const_binop_1, const_binop)
9727         (fold_convert_const_int_from_real, optimize_bit_field_compare)
9728         (all_ones_mask_p, sign_bit_p, unextend, extract_muldiv_1)
9729         (fold_div_compare, fold_single_bit_test, fold_plusminus_mult_expr)
9730         (pointer_may_wrap_p, expr_not_equal_to, fold_binary_loc)
9731         (fold_ternary_loc, multiple_of_p, fold_negate_const, fold_abs_const)
9732         (fold_not_const, round_up_loc): Likewise.
9733         * gimple-fold.c (gimple_fold_indirect_ref): Likewise.
9734         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Likewise.
9735         (alloca_call_type): Likewise.
9736         * gimple.c (preprocess_case_label_vec_for_gimple): Likewise.
9737         * godump.c (go_output_typedef): Likewise.
9738         * graphite-sese-to-poly.c (tree_int_to_gmp): Likewise.
9739         * internal-fn.c (get_min_precision): Likewise.
9740         * ipa-cp.c (ipcp_store_vr_results): Likewise.
9741         * ipa-polymorphic-call.c
9742         (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Likewise.
9743         * ipa-prop.c (ipa_print_node_jump_functions_for_edge): Likewise.
9744         (ipa_modify_call_arguments): Likewise.
9745         * match.pd: Likewise.
9746         * omp-low.c (scan_omp_1_op, lower_omp_ordered_clauses): Likewise.
9747         * print-tree.c (print_node_brief, print_node): Likewise.
9748         * stmt.c (expand_case): Likewise.
9749         * stor-layout.c (layout_type): Likewise.
9750         * tree-affine.c (tree_to_aff_combination): Likewise.
9751         * tree-cfg.c (group_case_labels_stmt): Likewise.
9752         * tree-data-ref.c (dr_analyze_indices): Likewise.
9753         (prune_runtime_alias_test_list): Likewise.
9754         * tree-dump.c (dequeue_and_dump): Likewise.
9755         * tree-inline.c (remap_gimple_op_r, copy_tree_body_r): Likewise.
9756         * tree-predcom.c (is_inv_store_elimination_chain): Likewise.
9757         * tree-pretty-print.c (dump_generic_node): Likewise.
9758         * tree-scalar-evolution.c (iv_can_overflow_p): Likewise.
9759         (simple_iv_with_niters): Likewise.
9760         * tree-ssa-address.c (addr_for_mem_ref): Likewise.
9761         * tree-ssa-ccp.c (ccp_finalize, evaluate_stmt): Likewise.
9762         * tree-ssa-loop-ivopts.c (constant_multiple_of): Likewise.
9763         * tree-ssa-loop-niter.c (split_to_var_and_offset)
9764         (refine_value_range_using_guard, number_of_iterations_ne_max)
9765         (number_of_iterations_lt_to_ne, number_of_iterations_lt)
9766         (get_cst_init_from_scev, record_nonwrapping_iv)
9767         (scev_var_range_cant_overflow): Likewise.
9768         * tree-ssa-phiopt.c (minmax_replacement): Likewise.
9769         * tree-ssa-pre.c (compute_avail): Likewise.
9770         * tree-ssa-sccvn.c (vn_reference_fold_indirect): Likewise.
9771         (vn_reference_maybe_forwprop_address, valueized_wider_op): Likewise.
9772         * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Likewise.
9773         * tree-ssa-uninit.c (is_pred_expr_subset_of): Likewise.
9774         * tree-ssanames.c (set_nonzero_bits, get_nonzero_bits): Likewise.
9775         * tree-switch-conversion.c (collect_switch_conv_info, array_value_type)
9776         (dump_case_nodes, try_switch_expansion): Likewise.
9777         * tree-vect-loop-manip.c (vect_gen_vector_loop_niters): Likewise.
9778         (vect_do_peeling): Likewise.
9779         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
9780         * tree-vect-stmts.c (vectorizable_load): Likewise.
9781         * tree-vrp.c (compare_values_warnv, vrp_int_const_binop): Likewise.
9782         (zero_nonzero_bits_from_vr, ranges_from_anti_range): Likewise.
9783         (extract_range_from_binary_expr_1, adjust_range_with_scev): Likewise.
9784         (overflow_comparison_p_1, register_edge_assert_for_2): Likewise.
9785         (is_masked_range_test, find_switch_asserts, maybe_set_nonzero_bits)
9786         (vrp_evaluate_conditional_warnv_with_ops, intersect_ranges): Likewise.
9787         (range_fits_type_p, two_valued_val_range_p, vrp_finalize): Likewise.
9788         (evrp_dom_walker::before_dom_children): Likewise.
9789         * tree.c (cache_integer_cst, real_value_from_int_cst, integer_zerop)
9790         (integer_all_onesp, integer_pow2p, integer_nonzerop, tree_log2)
9791         (tree_floor_log2, tree_ctz, mem_ref_offset, tree_int_cst_sign_bit)
9792         (tree_int_cst_sgn, get_unwidened, int_fits_type_p): Likewise.
9793         (get_type_static_bounds, num_ending_zeros, drop_tree_overflow)
9794         (get_range_pos_neg): Likewise.
9795         * ubsan.c (ubsan_expand_ptr_ifn): Likewise.
9796         * config/darwin.c (darwin_mergeable_constant_section): Likewise.
9797         * config/aarch64/aarch64.c (aapcs_vfp_sub_candidate): Likewise.
9798         * config/arm/arm.c (aapcs_vfp_sub_candidate): Likewise.
9799         * config/avr/avr.c (avr_fold_builtin): Likewise.
9800         * config/bfin/bfin.c (bfin_local_alignment): Likewise.
9801         * config/msp430/msp430.c (msp430_attr): Likewise.
9802         * config/nds32/nds32.c (nds32_insert_attributes): Likewise.
9803         * config/powerpcspe/powerpcspe-c.c
9804         (altivec_resolve_overloaded_builtin): Likewise.
9805         * config/powerpcspe/powerpcspe.c (rs6000_aggregate_candidate)
9806         (rs6000_expand_ternop_builtin): Likewise.
9807         * config/rs6000/rs6000-c.c
9808         (altivec_resolve_overloaded_builtin): Likewise.
9809         * config/rs6000/rs6000.c (rs6000_aggregate_candidate): Likewise.
9810         (rs6000_expand_ternop_builtin): Likewise.
9811         * config/s390/s390.c (s390_handle_hotpatch_attribute): Likewise.
9813 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
9815         * tree-vect-loop-manip.c (rename_variables_in_bb): Rename PHI nodes
9816         when copying loop nest with only one inner loop.
9818 2017-10-10  Richard Biener  <rguenther@suse.de>
9820         * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Avoid compacting
9821         blocks if SCEV is active.
9822         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Remove
9823         dead code.
9824         (analyze_scalar_evolution): Handle cached evolutions the obvious way.
9825         (scev_initialize): Assert we are not yet initialized.
9827 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
9829         * tree-loop-distribution.c (generate_loops_for_partition): Remove
9830         inner loop's exit stmt by making it always exit the loop, otherwise
9831         we would generate an infinite empty loop.
9833 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
9835         * tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg): Skip
9836         renaming variables in new preheader if it's deleted.
9838 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
9840         * tree-loop-distribution.c (struct partition): Remove unused field
9841         loops of the structure.
9842         (partition_alloc, partition_free): Ditto.
9843         (build_rdg_partition_for_vertex): Ditto.
9845 2017-10-09  Jeff Law  <law@redhat.com>
9847         * targhooks.c (default_stack_clash_protection_final_dynamic_probe): Fix
9848         return type to match prototype and documentation.
9850 2010-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
9852         * config/rs6000/rs6000.c (processor_costs): Move to ...
9853         * config/rs6000/rs6000.h: ... here.
9854         (rs6000_cost): Declare.
9856 2017-10-09  Eric Botcazou  <ebotcazou@adacore.com>
9858         * except.c (setjmp_fn): New global variable.
9859         (init_eh): Initialize it if DONT_USE_BUILTIN_SETJMP is defined.
9860         (sjlj_emit_function_enter): Call it instead of BUILTIN_SETJMP
9861         if DONT_USE_BUILTIN_SETJMP is defined.
9863 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
9865         * target.def (insn_cost): New hook.
9866         * doc/tm.texi.in (TARGET_INSN_COST): New hook.
9867         * doc/tm.texi: Regenerate.
9868         * rtlanal.c (insn_cost): Use the new hook.
9870 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
9872         * combine.c (combine_validate_cost): Compute the new insn_cost,
9873         not just pattern_cost.
9874         (try_combine): Adjust comment.
9876 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
9878         * cfgrtl.c (rtl_account_profile_record): Replace insn_rtx_cost with
9879         insn_cost.
9880         * combine.c (uid_insn_cost): Adjust comment.
9881         (combine_validate_cost): Adjust comment.  Use pattern_cost instead
9882         of insn_rtx_cost
9883         (combine_instructions): Use insn_cost instead of insn_rtx_cost.
9884         * dse.c (find_shift_sequence): Ditto.
9885         * ifcvt.c (cheap_bb_rtx_cost_p): Ditto.
9886         (bb_valid_for_noce_process_p): Use pattern_cost.
9887         * rtl.h (insn_rtx_cost): Delete.
9888         (pattern_cost): New prototype.
9889         (insn_cost): New prototype.
9890         * rtlanal.c (insn_rtx_cost): Rename to...
9891         (pattern_cost): ... this.
9892         (insn_cost): New.
9894 2017-10-09  Uros Bizjak  <ubizjak@gmail.com>
9896         * config/i386/i386.md (*jcc_2): Remove insn pattern.
9897         (*jcc<mode>_0_r_i387): Ditto.
9898         (*jccxf_r_i387): Ditto.
9899         (*jcc<mode>_r_i387): Ditto.
9900         (*jccu<mode>_r_i387): Ditto.
9901         (*jcc<X87MODEF:mode>_<SWI24:mode>_r_i387): Ditto.
9902         (*jcc): Rename from *jcc_1.
9904 2017-10-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9906         * config/rs6000/rs6000-p8swap.c (rs6000_analyze_swaps): Process
9907         deferred rescans after the lvx/stvx recombination pre-pass.
9909 2017-10-09  Michael Meissner  <meissner@linux.vnet.ibm.com>
9911         * config/rs6000/amo.h: New include file to provide ISA 3.0 atomic
9912         memory operation instruction support.
9913         * config.gcc (powerpc*-*-*): Include amo.h as an extra header.
9914         (rs6000-ibm-aix[789]*): Likewise.
9915         * doc/extend.texi (PowerPC Atomic Memory Operation Functions):
9916         Document new functions.
9918 2017-10-09  Richard Biener  <rguenther@suse.de>
9920         PR tree-optimization/82397
9921         * tree-data-ref.c (data_ref_compare_tree): Make sure to return
9922         equality only for semantically equal trees.
9924 2017-10-09  Richard Biener  <rguenther@suse.de>
9926         PR tree-optimization/82449
9927         * sese.c (scev_analyzable_p): Check whether the SCEV is linear.
9928         * tree-chrec.h (evolution_function_is_constant_p): Adjust to
9929         allow constant addresses.
9930         * tree-chrec.c (scev_is_linear_expression): Constant evolutions
9931         are linear.
9933 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9935         * config/s390/s390-builtins.def (vec_nabs, vec_vfi): Fix builtin
9936         flags.
9938 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9940         PR target/82463
9941         * config/s390/vecintrin.h (vec_madd, vec_msub): Fix macro
9942         definitions.
9944 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
9946         PR target/82465
9947         * config/s390/s390-builtins.def (vec_sqrt): Fix builtin flags.
9949 2017-10-09  Jakub Jelinek  <jakub@redhat.com>
9951         PR target/82464
9952         * config/s390/s390-builtins.def (s390_vec_xor_flt_a,
9953         s390_vec_xor_flt_b, s390_vec_xor_flt_c): New.
9955 2017-10-09  Richard Sandiford  <richard.sandiford@linaro.org>
9957         * wide-int.h (WI_BINARY_OPERATOR_RESULT): New macro.
9958         (WI_BINARY_PREDICATE_RESULT): Likewise.
9959         (wi::binary_traits::operator_result): New type.
9960         (wi::binary_traits::predicate_result): Likewise.
9961         (generic_wide_int::operator~, unary generic_wide_int::operator-)
9962         (generic_wide_int::operator==, generic_wide_int::operator!=)
9963         (generic_wide_int::operator&, generic_wide_int::and_not)
9964         (generic_wide_int::operator|, generic_wide_int::or_not)
9965         (generic_wide_int::operator^, generic_wide_int::operator+
9966         (binary generic_wide_int::operator-, generic_wide_int::operator*):
9967         Delete.
9968         (operator~, unary operator-, operator==, operator!=, operator&)
9969         (operator|, operator^, operator+, binary operator-, operator*): New
9970         functions.
9971         * expr.c (get_inner_reference): Use wi::bit_and_not.
9972         * fold-const.c (fold_binary_loc): Likewise.
9973         * ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise.
9974         * tree-ssa-ccp.c (get_value_from_alignment): Likewise.
9975         (bit_value_binop): Likewise.
9976         * tree-ssa-math-opts.c (find_bswap_or_nop_load): Likewise.
9977         * tree-vrp.c (zero_nonzero_bits_from_vr): Likewise.
9978         (extract_range_from_binary_expr_1): Likewise.
9979         (masked_increment): Likewise.
9980         (simplify_bit_ops_using_ranges): Likewise.
9982 2017-10-09  Martin Jambor  <mjambor@suse.cz>
9984         PR hsa/82416
9985         * hsa-common.h (hsa_op_with_type): New method extend_int_to_32bit.
9986         * hsa-gen.c (hsa_extend_inttype_to_32bit): New function.
9987         (hsa_type_for_scalar_tree_type): Use it.  Always force min32int for
9988         COMPLEX types.
9989         (hsa_fixup_mov_insn_type): New function.
9990         (hsa_op_with_type::get_in_type): Use it.
9991         (hsa_build_append_simple_mov): Likewise.  Allow sub-32bit
9992         immediates in an assert.
9993         (hsa_op_with_type::extend_int_to_32bit): New method.
9994         (gen_hsa_insns_for_bitfield): Fixup instruction and intermediary
9995         types.  Convert to dest type if necessary.
9996         (gen_hsa_insns_for_bitfield_load): Fixup load type if necessary.
9997         (reg_for_gimple_ssa): Pass false as min32int to
9998         hsa_type_for_scalar_tree_type.
9999         (gen_hsa_addr): Fixup type when creating addresable temporary.
10000         (gen_hsa_cmp_insn_from_gimple): Extend operands if necessary.
10001         (gen_hsa_unary_operation): Extend operands and convert to dest type if
10002         necessary.  Call hsa_fixup_mov_insn_type.
10003         (gen_hsa_binary_operation): Changed operand types to hsa_op_with_type,
10004         extend operands and convert to dest type if necessary.
10005         (gen_hsa_insns_for_operation_assignment): Extend operands and convert
10006         to dest type if necessary.
10007         (set_output_in_type): Call hsa_fixup_mov_insn_type.  Just ude dest
10008         if conversion nt necessary and size matches.
10009         (gen_hsa_insns_for_load): Call hsa_fixup_mov_insn_type, convert
10010         to dest type if necessary.
10011         (gen_hsa_insns_for_store): Call hsa_fixup_mov_insn_type.
10012         (gen_hsa_insns_for_switch_stmt): Likewise. Also extend operands if
10013         necessary.
10014         (gen_hsa_clrsb): Likewise.
10015         (gen_hsa_ffs): Likewise.
10016         (gen_hsa_divmod): Extend operands and convert to dest type if
10017         necessary.
10018         (gen_hsa_atomic_for_builtin): Change type of op to hsa_op_with_type.
10020 2017-10-08  Segher Boessenkool  <segher@kernel.crashing.org>
10022         * config/rs6000/rs6000.md (conditional branch): Clean up formatting.
10023         Remove empty default arguments.  Use a brace block as output
10024         statement.
10025         (conditional return): Ditto.
10026         (jump): Ditto.
10027         (indirect_jump): Ditto.  Use b%T0 instead of bctr/blr.
10028         (tablejump, tablejumpsi, tablejumpdi, *tablejump<mode>_internal1):
10029         Ditto.
10030         (group_ending_nop): Ditto.
10031         (doloop_end): Ditto.
10032         (ctr<mode>, ctr<mode>_internal1, ctr<mode>_internal2): Ditto.
10033         (splitters for those): Ditto.
10035 2017-10-08  Segher Boessenkool  <segher@kernel.crashing.org>
10037         * config/rs6000/rs6000-string.c (expand_strncmp_align_check): Invert
10038         a conditional jump (and the compare for it) so that pc_rtx is the
10039         last operand.
10040         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Adjust
10041         for the deleted and renamed ctr<mode>_internal[234] patterns.
10042         * config/rs6000/rs6000.md: Delete second conditional branch pattern.
10043         Delete second conditional return pattern.
10044         (ctr<mode>_internal2): Delete this second bdnz pattern.
10045         (ctr<mode>_internal3): Rename to ctr<mode>_internal2.
10046         (ctr<mode>_internal4): Delete this second bdz pattern.
10048 2017-10-08  Eric Botcazou  <ebotcazou@adacore.com>
10050         * tree-outof-ssa.h (ssaexpand): Add partitions_for_undefined_values.
10051         (always_initialized_rtx_for_ssa_name_p): New predicate.
10052         * tree-outof-ssa.c (remove_ssa_form): Initialize new field of SA.
10053         (finish_out_of_ssa): Free new field of SA.
10054         * tree-ssa-coalesce.h (get_undefined_value_partitions): Declare.
10055         * tree-ssa-coalesce.c: Include tree-ssa.h.
10056         (get_parm_default_def_partitions): Remove extern keyword.
10057         (get_undefined_value_partitions): New function.
10058         * expr.c (expand_expr_real_1) <expand_decl_rtl>: For a SSA_NAME, do
10059         not set SUBREG_PROMOTED_VAR_P on the sub-register if it may contain
10060         uninitialized bits.
10061         * loop-iv.c (iv_get_reaching_def): Disqualify all subregs.
10063 2017-10-08  Eric Botcazou  <ebotcazou@adacore.com>
10065         * builtins.def (BUILT_IN_SETJMP): Revert latest change.
10067 2017-10-08  Jan Hubicka  <hubicka@ucw.cz>
10069         * config/i386/i386.c (ix86_expand_set_or_movmem): Disable 512bit loops
10070         for targets that preffer 128bit.
10072 2017-10-08  Jan Hubicka  <hubicka@ucw.cz>
10074         * config/i386/i386.c (has_dispatch): Disable for Ryzen.
10076 2017-10-08  Olivier Hainque  <hainque@adacore.com>
10078         * config/arm/arm.c (arm_set_return_address): Use MEM_VOLATILE_P
10079         on the target mem instead of RTX_FRAME_RELATED_P on the insn to
10080         prevent DSE.
10081         (thumb_set_return_address): Likewise.
10083 2017-10-08  Olivier Hainque  <hainque@adacore.com>
10085         * common/config/arm/arm-common.c (arm_except_unwind_info):
10086         Handle DWARF2_UNWIND_INFO.
10088 2017-10-07  Michael Collison <michael.collison@arm.com>
10090         * config/aarch64/aarch64.md (*aarch64_reg_<optab>_minus<mode>3):
10091         New pattern.
10093 2017-10-07  Eric Botcazou  <ebotcazou@adacore.com>
10095         * builtins.def (BUILT_IN_SETJMP): Declare as library builtin instead
10096         of GCC builtin if DONT_USE_BUILTIN_SETJMP is defined.
10097         * except.c (sjlj_emit_function_enter): If DONT_USE_BUILTIN_SETJMP is
10098         defined, force the creation of a new block for a dispatch label.
10100 2017-10-07  Jan Hubicka  <hubicka@ucw.cz>
10102         * invoke.texi (Wsuggest-attribute=cold): Document.
10103         * common.opt (Wsuggest-attribute=cold): New
10104         * ipa-pure-const.c (warn_function_cold): New function.
10105         * predict.c (compute_function_frequency): Use it.
10106         * predict.h (warn_function_cold): Declare.
10108 2017-10-06  Jan Hubicka  <hubicka@ucw.cz>
10110         * tree-switch-conversion.c (do_jump_if_equal, emit_cmp_and_jump_insns):
10111         Update profile.
10113 2017-10-06  Martin Liska  <mliska@suse.cz>
10115         * sanopt.c (struct sanopt_tree_triplet_hash): Remove inline
10116         keyword for member functions.
10117         (struct sanopt_tree_couple): New struct.
10118         (struct sanopt_tree_couple_hash): New function.
10119         (struct sanopt_ctx): Add new hash_map.
10120         (has_dominating_ubsan_ptr_check): New function.
10121         (record_ubsan_ptr_check_stmt): Likewise.
10122         (maybe_optimize_ubsan_ptr_ifn): Likewise.
10123         (sanopt_optimize_walker): Handle IFN_UBSAN_PTR.
10124         (pass_sanopt::execute): Handle also SANITIZE_POINTER_OVERFLOW.
10126 2017-10-06  Sudakshina Das  <sudi.das@arm.com>
10128         PR target/82440
10129         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Only call
10130         aarch64_simd_valid_immediate on CONST_VECTORs.
10131         (aarch64_reg_or_bic_imm): Likewise.
10133 2017-10-06  Wilco Dijkstra  <wdijkstr@arm.com>
10135         PR rtl-optimization/82396
10136         * haifa-sched.c (ready_sort_real): Disable qsort checking.
10138 2017-10-06  Sebastian Pop  <sebpop@gmail.com>
10140         * graphite-dependences.c (scop_get_reads): Move code to...
10141         (scop_get_must_writes): Move code to...
10142         (scop_get_may_writes): Move code to...
10143         (scop_get_reads_and_writes): ... here.
10144         (scop_get_dependences): Call scop_get_reads_and_writes.
10146 2017-10-06  Jakub Jelinek  <jakub@redhat.com>
10148         PR tree-optimization/82434
10149         * fold-const.h (can_native_encode_type_p,
10150         can_native_encode_string_p): Remove.
10151         * fold-const.c (native_encode_int): Formatting fixes.  If ptr is NULL,
10152         don't encode anything, just return what would be otherwise returned.
10153         (native_encode_fixed, native_encode_complex, native_encode_vector):
10154         Likewise.
10155         (native_encode_string): Likewise.  Inline by hand
10156         can_native_encode_string_p.
10157         (can_native_encode_type_p): Remove.
10158         (can_native_encode_string_p): Remove.
10159         * tree-vect-stmts.c (vectorizable_store): Instead of testing just
10160         STRING_CSTs using can_native_encode_string_p, test all
10161         CONSTANT_CLASS_P values using native_encode_expr with NULL ptr.
10162         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Remove last
10163         argument from native_encode_expr.
10164         (rhs_valid_for_store_merging_p): Use native_encode_expr with NULL ptr.
10165         (pass_store_merging::execute): Don't unnecessarily look for 3 stmts,
10166         but just 2.
10168 2017-10-06  Richard Biener  <rguenther@suse.de>
10170         PR tree-optimization/82397
10171         * tree-vect-data-refs.c (dr_group_sort_cmp): Do not use
10172         operand_equal_p but rely on data_ref_compare_tree for detecting
10173         equalities.
10174         (vect_analyze_data_ref_accesses): Use data_ref_compare_tree
10175         to match up with dr_group_sort_cmp.
10177 2017-10-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10179         PR target/82322
10180         * config/s390/s390-builtins.def (s390_vfi): Define new overloaded
10181         builtin.
10182         * config/s390/s390-builtin-types.def: Regenerate.
10184 2017-10-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10186         PR target/82317
10187         * config/s390/s390-builtin-types.def: Regenerate.
10188         * config/s390/s390-builtins.def (s390_vfmaxdb_4, s390_vfmindb_4):
10189         Change flag from B_VXE to B_VX.
10190         (s390_vec_min_dbl): Remove B_VXE flag.
10192 2017-10-06  Richard Biener  <rguenther@suse.de>
10194         * graphite-isl-ast-to-gimple.c: Include ssa.h and tree-ssa.h.
10195         (translate_isl_ast_to_gimple::translate_pending_phi_nodes,
10196         translate_isl_ast_to_gimple::is_valid_rename,
10197         translate_isl_ast_to_gimple::get_rename,
10198         translate_isl_ast_to_gimple::get_def_bb_for_const,
10199         translate_isl_ast_to_gimple::get_new_name,
10200         translate_isl_ast_to_gimple::collect_all_ssa_names,
10201         translate_isl_ast_to_gimple::copy_loop_phi_args,
10202         translate_isl_ast_to_gimple::collect_all_ssa_names,
10203         translate_isl_ast_to_gimple::copy_loop_phi_args,
10204         translate_isl_ast_to_gimple::copy_loop_phi_nodes,
10205         translate_isl_ast_to_gimple::add_close_phis_to_merge_points,
10206         translate_isl_ast_to_gimple::add_close_phis_to_outer_loops,
10207         translate_isl_ast_to_gimple::copy_loop_close_phi_args,
10208         translate_isl_ast_to_gimple::copy_loop_close_phi_nodes,
10209         translate_isl_ast_to_gimple::copy_cond_phi_args,
10210         translate_isl_ast_to_gimple::copy_cond_phi_nodes,
10211         translate_isl_ast_to_gimple::edge_for_new_close_phis,
10212         translate_isl_ast_to_gimple::add_phi_arg_for_new_expr,
10213         translate_isl_ast_to_gimple::rename_uses,
10214         translate_isl_ast_to_gimple::rename_all_uses): Remove.
10215         (translate_isl_ast_to_gimple::get_rename_from_scev): Simplify.
10216         (set_rename_for_each_def): Likewise.
10217         (graphite_copy_stmts_from_block): Handle debug stmt resetting
10218         here.  Handle rewriting SCEV analyzable uses here.
10219         (copy_bb_and_scalar_dependences): Generate code for PHI
10220         copy-in/outs.
10221         (graphite_regenerate_ast_isl): Adjust.
10222         * graphite-scop-detection.c (trivially_empty_bb_p): Move to sese.[ch].
10223         (add_write, add_read): New functions.
10224         (build_cross_bb_scalars_def): Use it and simplify.
10225         (build_cross_bb_scalars_use): Likewise.
10226         (graphite_find_cross_bb_scalar_vars): Inline into...
10227         (try_generate_gimple_bb): ...here.  Add dependences for PHIs,
10228         simulating out-of-SSA.  Compute liveout and add dependencies.
10229         (build_scops): Force an empty entry block.
10230         * sese.h (sese_info_t::liveout, sese_info_t::debug_liveout): New
10231         members.
10232         (sese_build_liveouts): Declare.
10233         (sese_trivially_empty_bb_p): Likewise.
10234         * sese.c (sese_build_liveouts_bb): Properly handle PHIs,
10235         compute liveout and debug_liveout.
10236         (sese_bad_liveouts_use): Remove.
10237         (sese_reset_debug_liveouts_bb): Likewise.
10238         (sese_reset_debug_liveouts): Rewrite in terms of debug_liveout.
10239         (sese_build_liveouts): Build liveout and debug_liveout and store
10240         it in region.
10241         (new_sese_info): Adjust.
10242         (free_sese_info): Likewise.
10243         (sese_insert_phis_for_liveouts): Reset debug stmts from here,
10244         do not build liveout here.
10245         (move_sese_in_condition): Adjust region entry.
10246         (scev_analyzable_p): Match up with chrec_apply requirements.
10247         (sese_trivially_empty_bb_p): New.
10248         * tree-into-ssa.c (get_reaching_def): Properly support generating
10249         default-defs for incremental rewrite of anonymous names.
10251 2017-10-06  Richard Biener  <rguenther@suse.de>
10253         * graphite-sese-to-poly.c (extract_affine): For casts increasing
10254         precision do not perform modulo reduction.
10256 2017-10-06  Richard Biener  <rguenther@suse.de>
10258         PR tree-optimization/82436
10259         * tree-vect-slp.c (vect_supported_load_permutation_p): More
10260         conservatively choose the vectorization factor when checking
10261         whether we can perform the required load permutation.
10262         (vect_transform_slp_perm_load): Assert when we may not fail.
10264 2017-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
10266         * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Correct error
10267         message for incompatible -msdata=* and -mcall-* options.
10269 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
10271         * config/i386/i386.c (ia32_multipass_dfa_lookahead): Default to issue
10272         rate for post-reload scheduling.
10274 2017-10-05  Tamar Christina  <tamar.christina@arm.com>
10276         * doc/sourcebuild.texi (vect_sizes_16B_8B, vect_sizes_32B_16B): New.
10278 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
10280         * config/i386/i386.c (znver1_cost): Set branch_cost to 3 (instead of 2)
10281         to improve monte carlo in scimark.
10283 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
10285         * config/i386/i386.c (ix86_size_cost, i386_cost, i486_cost,
10286         pentium_cost, lakemont_cost, pentiumpro_cost, geode_cost, k6_cost,
10287         athlon_cost, k8_cost, amdfam10_cost, btver1_cost, btver2_cost,
10288         pentium4_cost, nocona_cost): Set reassociation width to 1.
10289         (bdver1_cost, bdver2_cost, bdver3_cost, bdver4_cost): Set reassociation
10290         width to 2 for fp operations and 1 otherwise.
10291         (znver1_cost): Set scalar reassoc width to 4 and vector to 3 and 6
10292         for int and fp.
10293         (atom_cost): Set reassociation width to 2.
10294         (slm_cost, generic_cost): Set fp reassociation width
10295         to 2 and 1 otherwise.
10296         (intel_cost): Set fp reassociation width to 4 and 1 otherwise.
10297         (core_cost): Set fp reassociation width to 4 and vector to 2.
10298         (ix86_reassociation_width): Rewrite using cost table; special case
10299         plus/minus on Zen; honor X86_TUNE_SSE_SPLIT_REGS
10300         and TARGET_AVX128_OPTIMAL.
10301         * config/i386/i386.h (processor_costs): Add
10302         reassoc_int, reassoc_fp, reassoc_vec_int, reassoc_vec_fp.
10303         (TARGET_VECTOR_PARALLEL_EXECUTION, TARGET_REASSOC_INT_TO_PARALLEL,
10304         TARGET_REASSOC_FP_TO_PARALLEL): Remove.
10305         * x86-tune.def (X86_TUNE_REASSOC_INT_TO_PARALLEL): Remove.
10306         (X86_TUNE_REASSOC_FP_TO_PARALLEL): Remove.
10307         (X86_TUNE_VECTOR_PARALLEL_EXECUTION):  Remove.
10309 2017-10-05  Nathan Sidwell  <nathan@acm.org>
10311         * doc/invoke.texi (Wparentheses): Document C++ MVP behaviour.
10313 2017-10-05  Tamar Christina  <tamar.christina@arm.com>
10315         * config/arm/arm.c (arm_test_fpu_data): New.
10316         (arm_run_selftests): Call arm_test_fpu_data.
10318 2017-10-04  Nathan Sidwell  <nathan@acm.org>
10320         * toplev.c (toplev::main): Remove excess parens on pretty_printer
10321         decl.
10322         * caller-save.c (insert_save): Remove excess parens on TO_SAVE parm.
10324 2017-10-04  Sudakshina Das  <sudi.das@arm.com>
10326         * config/aarch64/aarch64-protos.h (enum simd_immediate_check): New
10327         check type for aarch64_simd_valid_immediate.
10328         (aarch64_output_simd_mov_immediate): Update prototype.
10329         (aarch64_simd_valid_immediate): Update prototype.
10330         * config/aarch64/aarch64-simd.md (orr<mode>3): modified pattern to add
10331         support for ORR-immediate.
10332         (and<mode>3): modified pattern to add support for BIC-immediate.
10333         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Function
10334         now checks for valid immediate for BIC and ORR based on new enum
10335         argument.
10336         (aarch64_output_simd_mov_immediate): Function now used to output
10337         BIC/ORR imm as well based on new enum argument.
10338         * config/aarch64/constraints.md (Do): New vector immediate constraint.
10339         (Db) : Likewise.
10340         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): New predicate.
10341         (aarch64_reg_or_bic_imm): Likewise.
10343 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10345         * config/s390/vx-builtins.md ("vec_mergeh<mode>")
10346         ("vec_mergel<mode>"): Change mode iterator to V_128_NOSINGLE.
10348 2017-10-04  Wilco Dijkstra  <wdijkstr@arm.com>
10350         Revert r253399:
10352         PR rtl-optimization/82396
10353         * haifa-sched.c (autopref_multipass_init): Simplify
10354         initialization.
10355         (autopref_rank_data): Simplify sort order.
10356         * sched-int.h (autopref_multipass_data_): Remove
10357         multi_mem_insn_p, min_offset and max_offset.
10359 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10361         * doc/sourcebuild.texi: Document vect_peeling_profitable.
10363 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10365         * doc/sourcebuild.texi: Document vect_intdouble_cvt and
10366         vect_doubleint_cvt.
10368 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10370         * doc/sourcebuild.texi: Document vect_long_mult.
10372 2017-10-04  Richard Sandiford  <richard.sandiford@linaro.org>
10374         PR tree-optimization/82413
10375         * fold-const.c (build_range_check): Use widest_int when comparing
10376         the maximum ETYPE value with HIGH.
10378 2017-10-04  Wilco Dijkstra  <wdijkstr@arm.com>
10380         PR rtl-optimization/82396
10381         * haifa-sched.c (autopref_multipass_init): Simplify
10382         initialization.
10383         (autopref_rank_data): Simplify sort order.
10384         * sched-int.h (autopref_multipass_data_): Remove
10385         multi_mem_insn_p, min_offset and max_offset.
10387 2017-10-04  Jakub Jelinek  <jakub@redhat.com>
10389         PR tree-optimization/82381
10390         * tree-ssa-reassoc.c (sort_by_operand_rank): Check for different
10391         oeN->rank first.  Return 1 or -1 if one op is SSA_NAME and the other
10392         is not.
10394         PR tree-optimization/82374
10395         * omp-low.c (create_omp_child_function): Copy DECL_ATTRIBUTES,
10396         DECL_FUNCTION_SPECIFIC_OPTIMIZATION,
10397         DECL_FUNCTION_SPECIFIC_TARGET and DECL_FUNCTION_VERSIONED from
10398         current_function_decl to the new decl.
10400 2017-10-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
10402         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_2_HW): Define new
10403         helper macro for IEEE float128 hardware built-in functions.
10404         (SQRTF128_ODD): Add built-in functions with the round-to-odd
10405         semantics.
10406         (TRUNCF128_ODD): Likewise.
10407         (ADDF128_ODD): Likewise.
10408         (SUBF128_ODD): Likewise.
10409         (MULF128_ODD): Likewise.
10410         (DIVF128_ODD): Likewise.
10411         (FMAF128_ODD): Likewise.
10412         * config/rs6000/rs6000.md (UNSPEC_ROUND_TO_ODD): Rename to
10413         UNSPEC_TRUNC_ROUND_TO_ODD.
10414         (UNSPEC_TRUNC_ROUND_TO_ODD): Likewise.
10415         (UNSPEC_ADD_ROUND_TO_ODD): New unspec codes for the IEEE 128-bit
10416         floating point round to odd instructions.
10417         (UNSPEC_SUB_ROUND_TO_ODD): Likewise.
10418         (UNSPEC_MUL_ROUND_TO_ODD): Likewise.
10419         (UNSPEC_DIV_ROUND_TO_ODD): Likewise.
10420         (UNSPEC_FMA_ROUND_TO_ODD): Likewise.
10421         (UNSPEC_SQRT_ROUND_TO_ODD): Likewise.
10422         (trunc<mode>sf2_hw): Change the truncate with round to odd
10423         expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.
10424         (add<mode>3_odd): Add insns for IEEE 128-bit floating point round
10425         to odd hardware instructions.
10426         (sub<mode>3_odd): Likewise.
10427         (mul<mode>3_odd): Likewise.
10428         (div<mode>3_odd): Likewise.
10429         (sqrt<mode>2_odd): Likewise.
10430         (fma<mode>4_odd): Likewise.
10431         (fms<mode>4_odd): Likewise.
10432         (nfma<mode>4_odd): Likewise.
10433         (nfms<mode>4_odd): Likewise.
10434         (trunc<mode>df2_odd): Change the truncate with round to odd
10435         expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.  Add a generator
10436         function.
10437         * doc/extend.texi (PowerPC built-in functions): Update documentation
10438         for existing IEEE float128-bit built-in functions.  Add built-in
10439         functions that generate the IEEE 128-bit floating point round to
10440         odd instructions.
10442 2017-10-03  Segher Boessenkool  <segher@kernel.crashing.org>
10444         PR rtl-optimization/77729
10445         * simplify-rtx.c (simplify_binary_operation_1): Delete the (X&C1)|C2
10446         to (X&(C1&~C2))|C2 transformations.
10448 2017-10-03  Martin Jambor  <mjambor@suse.cz>
10450         PR tree-optimization/82363
10451         * tree-sra.c (propagate_subaccesses_across_link): In unrecoverable
10452         mismatch, mark lacc written regardless of racc.
10454 2017-10-03  Jakub Jelinek  <jakub@redhat.com>
10456         PR tree-optimization/82381
10457         * tree-ssa-reassoc.c (sort_by_operand_rank): Don't check
10458         stmt_to_insert nor wheather SSA_NAMEs are default defs.
10459         Return 1 or -1 if one of bba and bbb is NULL. If bb_rank is equal,
10460         fallthrough into reassoc_stmt_dominates_stmt_p.
10462         PR target/82386
10463         * combine.c (combine_instructions): Don't combine in unreachable
10464         basic blocks.
10466 2017-10-02  Peter Bergner  <bergner@vnet.ibm.com>
10468         PR target/80210
10469         * config/rs6000/rs6000.c (rs6000_option_override_internal): Rewrite
10470         function to not use the have_cpu variable.  Do not set cpu_index,
10471         rs6000_cpu_index or rs6000_tune_index if we end up using TARGET_DEFAULT
10472         or the default cpu.
10473         (rs6000_valid_attribute_p): Remove duplicate initializations of
10474         old_optimize and func_optimize.
10475         (rs6000_pragma_target_parse): Call rs6000_activate_target_options ().
10476         (rs6000_activate_target_options): Make global.
10477         * config/rs6000/rs6000-protos.h (rs6000_activate_target_options): Add
10478         prototype.
10480 2017-10-02  Jakub Jelinek  <jakub@redhat.com>
10482         * tree-dfa.c (get_ref_base_and_extent): Set *pmax_size to -1
10483         if *poffset + *pmax_size overflows in HOST_WIDE_INT.
10484         Set *poffset to 0 and *psize and *pmax_size to -1 if
10485         *poffset + *psize overflows in HOST_WIDE_INT.
10487         PR tree-optimization/82387
10488         PR tree-optimization/82388
10489         PR tree-optimization/82389
10490         * tree-ssa-dse.c (dse_classify_store): Test byte_tracking_enabled
10491         instead of live_bytes non-NULL.
10493 2017-10-02  Georg-Johann Lay  <avr@gjlay.de>
10495         PR target/41076
10496         * confg/avr/avr.md (*iorhi3.ashift8-ext.zerox): Add "r,r,0"
10497         alternative.
10499 2017-10-02  Richard Biener  <rguenther@suse.de>
10501         * graphite-isl-ast-to-gimple.c (set_codegen_error): With
10502         -fchecking and --param graphite-allow-codegen-errors=0 ICE.
10503         * params.def (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): New param.
10505 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
10507         * tree.h (wi::int_traits <const_tree>::decompose): Assert that the
10508         requested precision matches the type's.
10509         * calls.c (alloc_max_size): Calculate the new candidate size as
10510         a widest_int and use wi::to_widest when comparing it with the
10511         current candidate size.
10512         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Compare with
10513         zero rather than integer_zero_node.
10514         * match.pd: Check for a no-op conversion before using wi::add
10515         rather than after.  Use tree_to_uhwi when summing small shift
10516         counts into an unsigned int.
10518 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
10519             Alan Hayward  <alan.hayward@arm.com>
10520             David Sherwood  <david.sherwood@arm.com>
10522         PR target/71307
10523         * config/aarch64/aarch64.h (POINTER_AND_FP_REGS): New reg class.
10524         (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update accordingly.
10525         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
10526         POINTER_AND_FP_REGS.
10528 2017-10-02  Richard Biener  <rguenther@suse.de>
10530         PR tree-optimization/82355
10531         * graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
10532         a mapping for the enclosing loop but avoid generating one for
10533         the loop tree root.
10534         (copy_bb_and_scalar_dependences): Remove premature codegen
10535         error on PHIs in blocks duplicated into multiple places.
10536         * graphite-scop-detection.c
10537         (scop_detection::stmt_has_simple_data_refs_p): For a loop not
10538         in the region use it as loop and nest to analyze the DR in.
10539         (try_generate_gimple_bb): Likewise.
10540         * graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
10541         (add_loop_constraints): For blocks in a loop not in the region
10542         create a dimension with a single iteration.
10543         * sese.h (gbb_loop_at_index): Remove assert.
10545 2017-10-01  Kevin Buettner  <kevinb@redhat.com>
10547         * omp-expand.c (adjust_context_scope): New function.
10548         (expand_parallel_call): Call adjust_context_scope.
10550 2017-10-01  Jeff Law  <law@redhat.com>
10552         * tree-ssa-dom.c (optimize_stmt): Make this a method within the
10553         dom_opt_dom_walker class with direct access to private members.
10554         Add comments.  Call test_for_singularity.
10555         (dom_opt_dom_walker::before_dom_children): Corresponding changes.
10556         (dom_opt_dom_walker::after_dom_children): Do not lazily initialize
10557         m_dummy_cond anymore.
10558         (class dom_opt_dom_walker): Initialize m_dummy_cond member in the
10559         class ctor.
10560         (pass_dominator:execute): Build the dummy_cond here and pass it
10561         to the dom_opt_dom_walker ctor.
10562         (test_for_singularity): New function.
10564 2017-09-30  Krister Walfridsson  <krister.walfridsson@gmail.com>
10565             Maya Rashish  <coypu@sdf.org>
10567         * config.gcc (*-*-netbsd*): New variable nbsd_tm_file containing
10568         netbsd.h, netbsd-stdint.h, and netbsd-elf.h.
10569         (alpha*-*-netbsd*) Use nbsd_tm_file.
10570         (arm*-*-netbsdelf*) Likewise.
10571         (i[34567]86-*-netbsdelf*) Likewise.
10572         (x86_64-*-netbsd*) Likewise.
10573         (mips*-*-netbsd*) Likewise.
10574         (powerpc-*-netbsd*) Likewise.
10575         (sh*-*-netbsd*) Likewise.
10576         (sparc-*-netbsdelf*) Likewise.
10577         (sparc64-*-netbsd*) Likewise.
10578         (m68k*-*-netbsdelf*) Use nbsd_tm_file and add CHAR_FAST8/SHORT_FAST16
10579         to tm_defines.
10580         (vax-*-netbsdelf*) Likewise.
10581         * config/netbsd-stdint.h (INT_FAST8_TYPE): Check CHAR_FAST8.
10582         (UINT_FAST8_TYPE) Likewise.
10583         (INT_FAST16_TYPE) Check CHAR_FAST16.
10584         (UINT_FAST16_TYPE) Likewise.
10586 2017-09-30  Jakub Jelinek  <jakub@redhat.com>
10588         PR target/82361
10589         * config/i386/i386.md
10590         (TARGET_USE_8BIT_IDIV zext divmodsi4 splitter): New define_split.
10591         (divmodsi4_zext_1, divmodsi4_zext_2, *divmodsi4_zext_1,
10592         *divmodsi4_zext_2): New define_insn_and_split.
10593         (*divmodsi4_noext_zext_1, *divmodsi4_noext_zext_2): New define_insn.
10594         (TARGET_USE_8BIT_IDIV zext udivmodsi4 splitter): New define_split.
10595         (udivmodsi4_zext_1, udivmodsi4_zext_2, *udivmodsi4_zext_1,
10596         *udivmodsi4_zext_2, *udivmodsi4_pow2_zext_1, *udivmodsi4_pow2_zext_2):
10597         New define_insn_and_split.
10598         (*udivmodsi4_noext_zext_1, *udivmodsi4_noext_zext_2): New define_insn.
10599         * config/i386/i386.c (ix86_split_idivmod): Handle operands[0] or
10600         operands[1] having DImode when mode is SImode.
10602         * config/i386/i386.c (ix86_split_idivmod): Use mode instead of
10603         always SImode for DIV and MOD in REG_EQUAL notes.
10605 2017-09-29  Yury Gribov  <tetra2005@gmail.com>
10607         PR middle-end/82319
10608         * match.pd: Fix handling of NaNs in pattern.
10610 2017-09-29  Jeff Law  <law@redhat.com>
10612         * sbitmap.c (bitmap_bit_in_range_p): New function.
10613         * sbitmap.h (bitmap_bit_in_range_p): Prototype.
10614         * tree-ssa-dse.c (live_bytes_read): New function.
10615         (dse_classify_store): Ignore reads of dead bytes.
10617         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Fix
10618         typos and whitespace errors.
10619         * config/i386/predicates.md (address_no_seg_operand): Likewise.
10620         * config/s390/s390.c (s390_emit_prologue): Likewise.
10622 2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>
10624         PR target/81481
10625         * ira-costs.c (scan_one_insn): Don't take into account PIC equiv
10626         with a symbol for LRA.
10628 2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>
10630         PR rtl-optimization/82338
10631         * lra-constraints.c (inherit_in_ebb): Check usage_insns check.
10633 2017-09-29  Alexander Monakov  <amonakov@ispras.ru>
10635         * genmodes.c (calc_wider_mode): Suppress qsort macro.
10636         * system.h [CHECKING_P] (qsort): Redirect to qsort_chk.
10637         (qsort_chk): Declare.
10638         * vec.c [CHECKING_P] (qsort_chk_error): New static function.
10639         (qsort_chk): New function.
10641 2017-09-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10643         PR tree-optimization/82337
10644         * gimple-ssa-strength-reduction.c (find_phi_def): Don't record a
10645         phi definition if the PHI result appears in an abnormal PHI.
10646         (find_basis_for_base_expr): Don't record a basis if the LHS of the
10647         basis appears in an abnormal PHI.
10649 2017-09-29  Richard Biener  <rguenther@suse.de>
10651         * graphite-isl-ast-to-gimple.c
10652         (translate_isl_ast_to_gimple::set_codegen_error): New function.
10653         (binary_op_to_tree): Use it.
10654         (get_rename_from_scev): Likewise.
10655         (copy_loop_phi_nodes): Likewise.
10656         (copy_bb_and_scalar_dependences): Likewise.
10657         (translate_pending_phi_nodes): Likewise.
10659 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
10661         PR target/82339
10662         * config/i386/i386.md (*movdi_internal peephole2): New -Os peephole
10663         for movabsq $(i32 << shift), r64.
10665 2017-09-28  Uros Bizjak  <ubizjak@gmail.com>
10667         * config/i386/i386.c (ix86_print_operand_address_as): Do not check
10668         index when encoding %esp as %rsp to avoid 0x67 prefix.
10670 2017-09-28  Sergey Shalnov  <Sergey.Shalnov@intel.com>
10672         * config/i386/i386.md (*movsf_internal, *movdf_internal):
10673         Return 256-bit AVX modes for TARGET_PREFER_AVX256.
10675 2017-09-28  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10677         * config/arm/arm.c (arm_option_override): Forbid ARMv8-M Security
10678         Extensions with more than 16 double VFP registers.
10679         (cmse_nonsecure_entry_clear_before_return): Remove second entry of
10680         to_clear_mask and all code related to it.  Replace the remaining
10681         entry by a sbitmap and adapt code accordingly.
10683 2017-09-28  Henry Linjamäki  <henry.linjamaki@parmance.com>
10685         * brig-builtins.def: Change pure attributes to const.
10687 2017-09-28  Joseph Myers  <joseph@codesourcery.com>
10689         * config.gcc (default_gnu_indirect_function): Default to yes for
10690         sparc*-*-linux* with glibc.
10692 2017-09-28  Joseph Myers  <joseph@codesourcery.com>
10694         * config/aarch64/aarch64.c (aarch64_elf_asm_constructor)
10695         (aarch64_elf_asm_destructor): Pass SECTION_NOTYPE to get_section
10696         when creating .init_array and .fini_array sections with priority
10697         specified.
10699 2017-09-27  Christophe Lyon  <christophe.lyon@linaro.org>
10701         PR target/71727
10702         * config/aarch64/aarch64.c
10703         (aarch64_builtin_support_vector_misalignment): Always return false
10704         when misalignment is unknown.
10706 2017-09-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10708         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Revise
10709         this function to return false if the definition used by the swap
10710         instruction is artificial, or if the memory address from which the
10711         constant value is loaded is not represented by a base address held
10712         in a register or if the base address register is a frame or stack
10713         pointer.  Additionally, return false if the base address of the
10714         loaded constant is a SYMBOL_REF but is not considered to be a
10715         constant.
10716         (replace_swapped_load_constant): New function.
10717         (rs6000_analyze_swaps): Add a new pass to replace a swap of a
10718         loaded constant vector with a load of a swapped constant vector.
10720 2017-09-27  Carl Love  <cel@us.ibm.com>
10722         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
10723         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
10724         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
10725         fctiw instruction.
10727 2017-09-27  Alexander Monakov  <amonakov@ispras.ru>
10729         * haifa-sched.c (autopref_rank_for_schedule): Order 'irrelevant' insns
10730         first, always call autopref_rank_data otherwise.
10732 2017-09-27  Richard Biener  <rguenther@suse.de>
10734         * graphite-scop-detection.c (find_scop_parameters): Move
10735         loop bound handling ...
10736         (gather_bbs::before_dom_children): ... here, avoiding the need
10737         to build scop_info->loop_nest.
10738         (record_loop_in_sese): Remove.
10739         * sese.h (sese_info_t::loop_nest): Remove.
10740         * sese.c (new_sese_info): Do not allocate loop_nest.
10741         (free_sese_info): Do not free loop_nest.
10743 2017-09-27  Jakub Jelinek  <jakub@redhat.com>
10745         PR c++/82159
10746         * gimplify.c (gimplify_modify_expr): Don't optimize away zero sized
10747         lhs from calls if the lhs has addressable type.
10749 2017-09-27  Richard Biener  <rguenther@suse.de>
10751         * graphite.h (scop::max_alias_set): New member.
10752         * graphite-scop-detection.c: Remove references to non-existing
10753         --param in comments.
10754         (build_alias_sets): Record the maximum alias set used for drs.
10755         (build_scops): Support zero as unlimited for
10756         --param graphite-max-arrays-per-scop.
10757         * graphite-sese-to-poly.c (add_scalar_version_numbers): Remove
10758         and inline into ...
10759         (build_poly_sr_1): ... here.  Compute alias set based on the
10760         maximum alias set used for drs rather than
10761         PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP
10763 2017-09-27  Richard Biener  <rguenther@suse.de>
10765         * graphite-optimize-isl.c (get_schedule_for_node_st): Allow
10766         --param loop-block-tile-size=0 to disable tiling.
10768 2017-09-27  Richard Biener  <rguenther@suse.de>
10770         * doc/invoke.texi (graphite-max-bbs-per-function): Remove.
10771         (graphite-max-nb-scop-params): Document special value zero.
10772         * domwalk.h (dom_walker::STOP): New symbolical constant.
10773         (dom_walker::dom_walker): Add optional parameter for bb to
10774         RPO mapping.
10775         (dom_walker::~dom_walker): Declare.
10776         (dom_walker::before_dom_children): Document STOP return value.
10777         (dom_walker::m_user_bb_to_rpo): New member.
10778         (dom_walker::m_bb_to_rpo): Likewise.
10779         * domwalk.c (dom_walker::dom_walker): Compute bb to RPO
10780         mapping here if not provided by the user.
10781         (dom_walker::~dom_walker): Free bb to RPO mapping if not
10782         provided by the user.
10783         (dom_walker::STOP): Define.
10784         (dom_walker::walk): Do not compute bb to RPO mapping here.
10785         Support STOP return value from before_dom_children to stop
10786         walking.
10787         * graphite-optimize-isl.c (optimize_isl): If the schedule
10788         is the same still generate code if -fgraphite-identity
10789         or -floop-parallelize-all are given.
10790         * graphite-scop-detection.c: Include cfganal.h.
10791         (gather_bbs::gather_bbs): Get and pass through bb to RPO
10792         mapping.
10793         (gather_bbs::before_dom_children): Return STOP for BBs
10794         not in the region.
10795         (build_scops): Compute bb to RPO mapping and pass it to
10796         the domwalk.  Treat --param graphite-max-nb-scop-params=0
10797         as not limiting the number of params.
10798         * graphite.c (graphite_initialize): Remove limit on the
10799         number of basic-blocks in a function.
10800         * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Remove.
10801         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Adjust to documented
10802         default value of 10.
10804 2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
10806         * config/rs6000/vsx.md (peephole for optimizing move SF to GPR):
10807         Adjust code to eliminate needing to do the shift right 32-bits
10808         operation after XSCVDPSPN.
10810 2017-09-26  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10812         * match.pd ((X / Y) == 0 -> X < Y): New pattern.
10813         ((X / Y) != 0 -> X >= Y): Likewise.
10815 2017-09-26  Carl Love  <cel@us.ibm.com>
10817         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_XL_LEN_R,
10818         P9V_BUILTIN_VEC_XST_LEN_R): Add support for builtins
10819         vector unsigned char vec_xl_len_r (unsigned char *, size_t);
10820         void vec_xst_len_r (vector unsigned char, unsigned char *, size_t);
10821         * config/rs6000/altivec.h (vec_xl_len_r, vec_xst_len_r): Add defines.
10822         * config/rs6000/rs6000-builtin.def (XL_LEN_R, XST_LEN_R): Add
10823         definitions and overloading.
10824         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case
10825         statement for P9V_BUILTIN_XST_LEN_R.
10826         (altivec_init_builtins): Add def_builtin for P9V_BUILTIN_STXVLL.
10827         * config/rs6000/vsx.md (lxvll, stxvll, xl_len_r, xst_len_r): Add
10828         define_expand and define_insn for the instructions and builtins.
10829         * doc/extend.texi: Update the built-in documentation file for the new
10830         built-in functions.
10831         * config/rs6000/altivec.md (altivec_lvsl_reg, altivec_lvsr_reg): Add
10832         define_insn for the instructions
10834 2017-09-26  Krister Walfridsson  <krister.walfridsson@gmail.com>
10836         PR target/39570
10837         * gcc/config/netbsd-protos.h: New file.
10838         * gcc/config/netbsd.c: New file.
10839         * gcc/config/netbsd.h (SUBTARGET_INIT_BUILTINS): Define.
10840         * gcc/config/t-netbsd: New file.
10841         * gcc/config.gcc (tm_p_file): Add netbsd-protos.h.
10842         (tmake_file) Add t-netbsd.
10843         (extra_objs) Add netbsd.o.
10845 2017-09-26  Janus Weil  <janus@gcc.gnu.org>
10847         PR fortran/82143
10848         PR fortran/82324
10849         * doc/sourcebuild.texi: Document fortran_real_10 and fortran_real_16.
10851 2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
10853         * config/rs6000/rs6000.md (extendsi<mode>2): Add a splitter to do
10854         sign extension from a vector register to a GPR by doing a 32-bit
10855         direct move and then an EXTSW.
10856         (extendsi<mode>2 splitter): Likewise.
10857         (movsi_from_sf): Adjust code to eliminate doing a 32-bit shift
10858         right or vector extract after doing XSCVDPSPN.  Use
10859         zero_extendsidi2 instead of p8_mfvsrd_4_disf to move the value to
10860         the GPRs.
10861         (movdi_from_sf_zero_ext): Likewise.
10862         (reload_gpr_from_vsxsf): Likewise.
10863         (p8_mfvsrd_4_disf): Delete, no longer used.
10864         (movsi_from_df): Optimize converting a DFmode to a SFmode, and
10865         then needing to move the SFmode to a GPR to use the XSCVDPSP
10866         instruction instead of FRSP and XSCVDPSPN.
10867         * config/rs6000/vsx.md (vsx_xscvspdp_scalar2): Move insn so that
10868         it is adjacent to the other XSCVSPDP insns.
10869         (vsx_xscvdpsp_scalar): Use "ww" constraint instead of "f" to allow
10870         SFmode to be in traditional Altivec registers.
10871         (vsx_xscvdpspn): Eliminate useless alternative constraint.
10872         (vsx_xscvspdpn): Likewise.
10873         (vsx_xscvspdpn_scalar): Likewise.
10875 2017-09-26  Martin Jambor  <mjambor@suse.cz>
10877         * tree-sra.c (compare_access_positions): Put integral types first,
10878         stabilize sorting of integral types, remove conditions putting
10879         non-full-precision integers last.
10880         (sort_and_splice_var_accesses): Disable scalarization if a
10881         non-integert would be represented by a non-full-precision integer.
10883 2017-09-26  Joseph Myers  <joseph@codesourcery.com>
10885         * config/microblaze/linux.h (TARGET_ASM_FILE_END): Likewise.
10886         * config/pa/pa.h (NEED_INDICATE_EXEC_STACK): Likewise.
10887         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Likewise.
10888         * config/pa/pa.c (pa_hpux_file_end): Rename to pa_file_end.
10889         Define unconditionally, with [ASM_OUTPUT_EXTERNAL_REAL]
10890         conditionals inside the function instead of around it.  Call
10891         file_end_indicate_exec_stack if NEED_INDICATE_EXEC_STACK.
10892         (TARGET_ASM_FILE_END): Define unconditionally to pa_file_end.
10894 2017-09-26  Richard Biener  <rguenther@suse.de>
10896         * graphite-scop-detection.c (scop_detection::build_scop_depth): Rewrite,
10897         fold in ...
10898         (scop_detection::build_scop_breadth): ... this.  Removed.
10899         (scop_detection::loop_is_valid_in_scop): Fold into single caller.
10900         (scop_detection::harmful_stmt_in_bb): Likewise.
10901         (scop_detection::graphite_can_represent_stmt): Likewise.
10902         (scop_detection::loop_body_is_valid_scop): Likewise.  Remove recursion.
10903         (scop_detection::can_represent_loop): Remove recursion, fold in ...
10904         (scop_detection::can_represent_loop_1): ... this.  Removed.
10905         (scop_detection::harmful_loop_in_region): Simplify after inlining
10906         the above and remove more quadraticness.
10907         (build_scops): Adjust.
10908         * tree-data-ref.c (loop_nest_has_data_refs): Remove pointless
10909         quadraticness.
10911 2017-09-26  Jakub Jelinek  <jakub@redhat.com>
10913         PR target/82267
10914         * config/i386/i386.c (ix86_print_operand_address_as): Only test
10915         REGNO (base) == SP_REG if base is a REG.
10917         PR middle-end/35691
10918         * tree-ssa-reassoc.c (update_range_test): Dump r->exp each time
10919         if it is different SSA_NAME.
10920         (optimize_range_tests_cmp_bitwise): New function.
10921         (optimize_range_tests): Call it.
10923 2017-09-26  Richard Biener  <rguenther@suse.de>
10925         PR tree-optimization/82321
10926         * graphite.c (canonicalize_loop_closed_ssa): Properly check
10927         for the def being inside the loop.
10929 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10931         * config/s390/vx-builtins.md ("vmslg"): Add missing operand in
10932         assembler output.
10933         * config/s390/s390-builtins.def: Fix constraint on op4.
10935 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10937         * config/s390/s390.c (s390_expand_vec_compare): Use the new mode
10938         independent expanders.
10939         * config/s390/vector.md ("vec_cmpuneq", "vec_cmpltgt")
10940         ("vec_ordered", "vec_unordered"): New expanders.
10942 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10944         * config/s390/s390.c (s390_preferred_simd_mode): Return V4SFmode
10945         for SFmode.
10947 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10949         * config/s390/vector.md ("vec_unpacks_low_v16qi"): Rename to
10950         vec_unpacks_lo_v16qi.
10951         ("vec_unpacku_low_v16qi"): Rename to vec_unpacku_lo_v16qi.
10953 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10955         * config/s390/vector.md ("vec_unpacks_lo_v4sf")
10956         ("vec_unpacks_hi_v4sf", "vec_unpacks_lo_v2df")
10957         ("vec_unpacks_hi_v2df", "vec_pack_trunc_v2df"): New expanders.
10959 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10961         * config/s390/predicates.md ("const_shift_by_byte_operand"): New
10962         predicate.
10963         * config/s390/vector.md ("*vec_srb<mode>"): Change modes to V_128
10964         and V16QI.
10965         ("*vec_slb<mode>"): New insn pattern.
10966         ("vec_shr_<mode>"): New expander.
10967         * config/s390/vx-builtins.md ("vec_slb<mode>"): Turn into expander
10968         and force the shift count operand to V16QImode.
10969         ("vec_srb<mode>"): Set shift count mode to V16QI.
10971 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10973         * config/s390/vector.md ("vec_widen_umult_lo_<mode>")
10974         ("vec_widen_umult_hi_<mode>", "vec_widen_smult_lo_<mode>")
10975         ("vec_widen_smult_hi_<mode>"): New expander definitions.
10977 2017-09-26  Richard Earnshaw  <rearnsha@arm.com>
10979         PR target/82175
10980         * config/arm/arm.h (DRIVER_SELF_SPECS): Separate sub-rules with commas.
10982 2017-09-26  Richard Biener  <rguenther@suse.de>
10984         PR tree-optimization/82320
10985         * tree-ssa-sccvn.c (set_ssa_val_to): Changing undef to undef
10986         isn't a change.
10988 2017-09-25  Jeff Law  <law@redhat.com>
10990         * config/rs6000/rs6000-protos.h (output_probe_stack_range): Update
10991         prototype for new argument.
10992         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack_1): New function,
10993         mostly extracted from rs6000_emit_allocate_stack.
10994         (rs6000_emit_probe_stack_range_stack_clash): New function.
10995         (rs6000_emit_allocate_stack): Call
10996         rs6000_emit_probe_stack_range_stack_clash as needed.
10997         (rs6000_emit_probe_stack_range): Add additional argument
10998         to call to gen_probe_stack_range{si,di}.
10999         (output_probe_stack_range): New.
11000         (output_probe_stack_range_1): Renamed from output_probe_stack_range.
11001         (output_probe_stack_range_stack_clash): New.
11002         (rs6000_emit_prologue): Emit notes into dump file as requested.
11003         * rs6000.md (allocate_stack): Handle -fstack-clash-protection.
11004         (probe_stack_range<P:mode>): Operand 0 is now early-clobbered.
11005         Add additional operand and pass it to output_probe_stack_range.
11007 2017-09-25  Bin Cheng  <bin.cheng@arm.com>
11009         PR tree-optimization/82163
11010         * tree-ssa-loop-manip.h (verify_loop_closed_ssa): New parameter.
11011         (checking_verify_loop_closed_ssa): New parameter.
11012         * tree-ssa-loop-manip.c (check_loop_closed_ssa_use): Delete.
11013         (check_loop_closed_ssa_stmt): Delete.
11014         (check_loop_closed_ssa_def, check_loop_closed_ssa_bb): New functions.
11015         (verify_loop_closed_ssa): Check loop closed ssa form for LOOP.
11016         (tree_transform_and_unroll_loop): Check loop closed ssa form only for
11017         changed loops.
11019 2017-09-25  Pekka Jaaskelainen <pekka@parmance.com>
11021         * brig-builtins.def: Treat HSAIL barrier builtins as
11022         setjmp/longjump style functions.
11024 2017-09-25  Richard Sandiford  <richard.sandiford@linaro.org>
11026         * target.def (constant_alignment): New hook.
11027         * defaults.h (CONSTANT_ALIGNMENT): Delete.
11028         * doc/tm.texi.in (CONSTANT_ALIGNMENT): Replace with...
11029         (TARGET_CONSTANT_ALIGNMENT): ...this new hook.
11030         * doc/tm.texi: Regenerate.
11031         * targhooks.h (default_constant_alignment): Declare.
11032         (constant_alignment_word_strings): Likewise.
11033         * targhooks.c (default_constant_alignment): New function.
11034         (constant_alignment_word_strings): Likewise.
11035         * builtins.c (get_object_alignment_2): Use targetm.constant_alignment
11036         instead of CONSTANT_ALIGNMENT.
11037         * varasm.c (align_variable, get_variable_align, build_constant_desc)
11038         (force_const_mem): Likewise.
11039         * config/aarch64/aarch64.h (CONSTANT_ALIGNMENT): Delete.
11040         * config/aarch64/aarch64.c (aarch64_constant_alignment): New function.
11041         (aarch64_classify_address): Call it instead of CONSTANT_ALIGNMENT.
11042         (TARGET_CONSTANT_ALIGNMENT): Redefine.
11043         * config/alpha/alpha.h (CONSTANT_ALIGNMENT): Delete commented-out
11044         definition.
11045         * config/arc/arc.h (CONSTANT_ALIGNMENT): Delete.
11046         * config/arc/arc.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
11047         constant_alignment_word_strings.
11048         * config/arm/arm.h (CONSTANT_ALIGNMENT_FACTOR): Delete.
11049         (CONSTANT_ALIGNMENT): Likewise.
11050         * config/arm/arm.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
11051         (arm_constant_alignment): New function.
11052         * config/bfin/bfin.h (CONSTANT_ALIGNMENT): Delete.
11053         * config/bfin/bfin.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
11054         constant_alignment_word_strings.
11055         * config/cr16/cr16.h (CONSTANT_ALIGNMENT): Delete.
11056         * config/cr16/cr16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
11057         constant_alignment_word_strings.
11058         * config/cris/cris.h (CONSTANT_ALIGNMENT): Delete.
11059         * config/cris/cris.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
11060         (cris_constant_alignment): New function.
11061         * config/epiphany/epiphany.h (CONSTANT_ALIGNMENT): Delete.
11062         * config/epiphany/epiphany.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
11063         (epiphany_constant_alignment): New function.
11064         * config/fr30/fr30.h (CONSTANT_ALIGNMENT): Delete.
11065         * config/fr30/fr30.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
11066         constant_alignment_word_strings.
11067         * config/frv/frv.h (CONSTANT_ALIGNMENT): Delete.
11068         * config/frv/frv.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
11069         constant_alignment_word_strings.
11070         * config/ft32/ft32.h (CONSTANT_ALIGNMENT): Delete.
11071         * config/ft32/ft32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
11072         constant_alignment_word_strings.
11073         * config/i386/i386.h (CONSTANT_ALIGNMENT): Delete.
11074         * config/i386/i386-protos.h (ix86_constant_alignment): Delete.
11075         * config/i386/i386.c (ix86_constant_alignment): Make static.
11076         Use the same interface as the target hook.
11077         (TARGET_CONSTANT_ALIGNMENT): Redefine.
11078         * config/ia64/ia64.h (CONSTANT_ALIGNMENT): Delete.
11079         * config/ia64/ia64.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
11080         constant_alignment_word_strings.
11081         * config/iq2000/iq2000.h (CONSTANT_ALIGNMENT): Delete.
11082         * config/iq2000/iq2000.c (iq2000_constant_alignment): New function.
11083         (TARGET_CONSTANT_ALIGNMENT): Redefine.
11084         * config/lm32/lm32.h (CONSTANT_ALIGNMENT): Delete.
11085         * config/lm32/lm32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
11086         constant_alignment_word_strings.
11087         * config/m32r/m32r.h (CONSTANT_ALIGNMENT): Delete.
11088         * config/m32r/m32r.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
11089         constant_alignment_word_strings.
11090         * config/mcore/mcore.h (CONSTANT_ALIGNMENT): Delete.
11091         * config/mcore/mcore.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
11092         constant_alignment_word_strings.
11093         * config/microblaze/microblaze.h (CONSTANT_ALIGNMENT): Delete.
11094         * config/microblaze/microblaze.c (microblaze_constant_alignment):
11095         New function.
11096         (TARGET_CONSTANT_ALIGNMENT): Redefine.
11097         * config/mips/mips.h (CONSTANT_ALIGNMENT): Delete.
11098         * config/mips/mips.c (mips_constant_alignment): New function.
11099         (TARGET_CONSTANT_ALIGNMENT): Redefine.
11100         * config/mmix/mmix.h (CONSTANT_ALIGNMENT): Delete.
11101         * config/mmix/mmix-protos.h (mmix_constant_alignment): Delete.
11102         * config/mmix/mmix.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
11103         (mmix_constant_alignment): Make static.  Use the same interface
11104         as the target hook.
11105         * config/moxie/moxie.h (CONSTANT_ALIGNMENT): Delete.
11106         * config/moxie/moxie.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
11107         constant_alignment_word_strings.
11108         * config/nios2/nios2.h (CONSTANT_ALIGNMENT): Delete.
11109         * config/nios2/nios2.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
11110         constant_alignment_word_strings.
11111         * config/pa/pa.h (CONSTANT_ALIGNMENT): Delete.
11112         * config/pa/pa.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
11113         constant_alignment_word_strings.
11114         * config/powerpcspe/powerpcspe.h (CONSTANT_ALIGNMENT): Delete.
11115         * config/powerpcspe/powerpcspe.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
11116         (rs6000_constant_alignment): New function.
11117         * config/riscv/riscv.h (CONSTANT_ALIGNMENT): Delete.
11118         * config/riscv/riscv.c (riscv_constant_alignment): New function.
11119         (TARGET_CONSTANT_ALIGNMENT): Redefine.
11120         * config/rs6000/rs6000.h (CONSTANT_ALIGNMENT): Delete.
11121         * config/rs6000/rs6000.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
11122         (rs6000_constant_alignment): New function.
11123         * config/s390/s390.h (CONSTANT_ALIGNMENT): Delete.
11124         * config/s390/s390.c (s390_constant_alignment): New function.
11125         (TARGET_CONSTANT_ALIGNMENT): Redefine.
11126         * config/sh/sh.h (CONSTANT_ALIGNMENT): Delete.
11127         * config/sh/sh.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
11128         constant_alignment_word_strings.
11129         * config/sparc/sparc.h (CONSTANT_ALIGNMENT): Delete.
11130         * config/sparc/sparc.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
11131         (sparc_constant_alignment): New function.
11132         * config/spu/spu.h (CONSTANT_ALIGNMENT): Delete.
11133         * config/spu/spu.c (spu_constant_alignment): New function.
11134         (TARGET_CONSTANT_ALIGNMENT): Redefine.
11135         * config/stormy16/stormy16.h (CONSTANT_ALIGNMENT): Delete.
11136         * config/stormy16/stormy16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
11137         constant_alignment_word_strings.
11138         * config/tilegx/tilegx.h (CONSTANT_ALIGNMENT): Delete.
11139         * config/tilegx/tilegx.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
11140         constant_alignment_word_strings.
11141         * config/tilepro/tilepro.h (CONSTANT_ALIGNMENT): Delete.
11142         * config/tilepro/tilepro.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
11143         constant_alignment_word_strings.
11144         * config/visium/visium.h (CONSTANT_ALIGNMENT): Delete.
11145         * config/visium/visium.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
11146         (visium_constant_alignment): New function.
11147         * config/xtensa/xtensa.h (CONSTANT_ALIGNMENT): Delete.
11148         * config/xtensa/xtensa.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
11149         (xtensa_constant_alignment): New function.
11150         * system.h (CONSTANT_ALIGNMENT): Poison.
11152 2017-09-25  Will Schmidt  <will_schmidt@vnet.ibm.com>
11154         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
11155         for early folding of vector stores (ALTIVEC_BUILTIN_ST_*).
11156         (rs6000_builtin_valid_without_lhs): New helper function.
11157         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
11158         Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_ST.
11160 2017-09-25  Richard Sandiford  <richard.sandiford@linaro.org>
11162         * target.h (vec_perm_indices): Use unsigned short rather than
11163         unsigned char.
11164         (auto_vec_perm_indices): Likewise.
11165         * config/aarch64/aarch64.c (aarch64_vectorize_vec_perm_const_ok):
11166         Use unsigned int rather than unsigned char.
11167         * config/arm/arm.c (arm_vectorize_vec_perm_const_ok): Likewise.
11169 2017-09-25  Richard Biener  <rguenther@suse.de>
11171         * cfgloop.h (sort_sibling_loops): Declare.
11172         * cfgloop.c (sort_sibling_loops_cmp): New helper.
11173         (sort_sibling_loops): New function sorting the sibling loop list
11174         in RPO order.
11175         * graphite.c (graphite_transform_loops): Sort sibling loops.
11177 2017-09-25  Richard Sandiford  <richard.sandifird@linaro.org>
11179         * target.def (vec_perm_const_ok): Change sel parameter to
11180         vec_perm_indices.
11181         * optabs-query.c (can_vec_perm_p): Update accordingly.
11182         * doc/tm.texi: Regenerate.
11183         * config/aarch64/aarch64.c (expand_vec_perm_d): Change perm to
11184         auto_vec_perm_indices and remove separate nelt field.
11185         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
11186         (aarch64_evpc_ext, aarch64_evpc_rev, aarch64_evpc_dup)
11187         (aarch64_evpc_tbl, aarch64_expand_vec_perm_const_1)
11188         (aarch64_expand_vec_perm_const): Update accordingly.
11189         (aarch64_vectorize_vec_perm_const_ok): Likewise.  Change sel
11190         to vec_perm_indices.
11191         * config/arm/arm.c (expand_vec_perm_d): Change perm to
11192         auto_vec_perm_indices and remove separate nelt field.
11193         (arm_evpc_neon_vuzp, arm_evpc_neon_vzip, arm_evpc_neon_vrev)
11194         (arm_evpc_neon_vtrn, arm_evpc_neon_vext, arm_evpc_neon_vtbl)
11195         (arm_expand_vec_perm_const_1, arm_expand_vec_perm_const): Update
11196         accordingly.
11197         (arm_vectorize_vec_perm_const_ok): Likewise.  Change sel
11198         to vec_perm_indices.
11199         * config/i386/i386.c (ix86_vectorize_vec_perm_const_ok): Change
11200         sel to vec_perm_indices.
11201         * config/ia64/ia64.c (ia64_vectorize_vec_perm_const_ok): Likewise.
11202         * config/mips/mips.c (mips_vectorize_vec_perm_const_ok): Likewise.
11203         * config/powerpcspe/powerpcspe.c (rs6000_vectorize_vec_perm_const_ok):
11204         Likewise.
11205         * config/rs6000/rs6000.c (rs6000_vectorize_vec_perm_const_ok):
11206         Likewise.
11208 2017-09-25  Pierre-Marie de Rodat  <derodat@adacore.com>
11210         PR debug/82155
11211         * dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl
11212         on the FUNCTION_DECL function context if it has a DIE that is a
11213         declaration.
11215 2017-09-25  Richard Biener  <rguenther@suse.de>
11217         PR tree-optimization/82285
11218         * tree-vect-patterns.c (vect_recog_bool_pattern): Also handle
11219         enumeral types.
11221 2017-09-25  Tom de Vries  <tom@codesourcery.com>
11223         PR target/80035
11224         PR target/81069
11225         * config/nvptx/nvptx.c (nvptx_output_call_insn): Add exit after call to
11226         noreturn function.
11228 2017-09-25  Richard Biener  <rguenther@suse.de>
11230         * graphite-optimize-isl.c (optimize_isl): Fail and dump if
11231         ISL errors other than isl_error_quota happen.  Dump if the
11232         schedule is the same.
11233         * graphite-sese-to-poly.c (build_poly_scop): Fail on ISL
11234         errors instead of aborting inside ISL.
11236 2017-09-25  Iain Sandoe  <iain@codesourcery.com>
11238         PR target/80556
11239         * config/i386/darwin.h (REAL_LIB_SPEC): New; put libSystem ahead
11240         of libgcc_eh for m64.
11241         * config/i386/darwin64.h: Likewise.
11243 2017-09-25  Richard Biener  <rguenther@suse.de>
11245         PR middle-end/82144
11246         * dwarf2out.c (gen_enumeration_type_die): Do not add alignment
11247         attribute for incomplete types nor twice for complete ones.
11249 2017-09-24  Uros Bizjak  <ubizjak@gmail.com>
11251         PR target/82267
11252         * config/i386/i386.c (ix86_print_operand_address_as): Encode
11253         %esp as %rsp to avoid 0x67 prefix if there is no index or base
11254         register.
11256 2017-09-23  Uros Bizjak  <ubizjak@gmail.com>
11258         PR bootstrap/82306
11259         * config/i386/i386.opt (mprefer-avx256): Use
11260         ix86_target_flags variable.
11261         * config/i386/i386.c (ix86_target_string): Move
11262         -mprefer-avx256 to flag2_opts.
11264 2017-09-22  Jakub Jelinek  <jakub@redhat.com>
11266         PR middle-end/35691
11267         * match.pd: Simplify x == -1 & y == -1 into (x & y) == -1
11268         and x != -1 | y != -1 into (x & y) != -1.
11270 2017-09-22  Steve Ellcey  <sellcey@cavium.com>
11272         * config.gcc: Add new case statement to set
11273         default_gnu_indirect_function.  Remove it from x86_64-*-linux*,
11274         i[34567]86-*, powerpc*-*-linux*spe*, powerpc*-*-linux*, s390-*-linux*,
11275         s390x-*-linux* case statements.   Added aarch64 to the list of
11276         supported architectures.
11278 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
11280         PR tree-optimization/82289
11281         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Check
11282         STMT_VINFO_RELEVANT_P.
11284 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
11285             Alan Hayward  <alan.hayward@arm.com>
11286             David Sherwood  <david.sherwood@arm.com>
11288         * tree-vrp.c (extract_range_from_multiplicative_op_1): Assert
11289         for VR_RANGE only; don't allow VR_ANTI_RANGE.
11290         (extract_range_from_binary_expr_1): Don't call
11291         extract_range_from_multiplicative_op_1 if !range_int_cst_p.
11293 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
11294             Alan Hayward  <alan.hayward@arm.com>
11295             David Sherwood  <david.sherwood@arm.com>
11297         * target.def (preferred_vector_alignment): New hook.
11298         * doc/tm.texi.in (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): New
11299         hook.
11300         * doc/tm.texi: Regenerate.
11301         * targhooks.h (default_preferred_vector_alignment): Declare.
11302         * targhooks.c (default_preferred_vector_alignment): New function.
11303         * tree-vectorizer.h (dataref_aux): Add a target_alignment field.
11304         Expand commentary.
11305         (DR_TARGET_ALIGNMENT): New macro.
11306         (aligned_access_p): Update commentary.
11307         (vect_known_alignment_in_bytes): New function.
11308         * tree-vect-data-refs.c (vect_calculate_required_alignment): New
11309         function.
11310         (vect_compute_data_ref_alignment): Set DR_TARGET_ALIGNMENT.
11311         Calculate the misalignment based on the target alignment rather than
11312         the vector size.
11313         (vect_update_misalignment_for_peel): Use DR_TARGET_ALIGMENT
11314         rather than TYPE_ALIGN / BITS_PER_UNIT to update the misalignment.
11315         (vect_enhance_data_refs_alignment): Mask the byte misalignment with
11316         the target alignment, rather than masking the element misalignment
11317         with the number of elements in a vector.  Also use the target
11318         alignment when calculating the maximum number of peels.
11319         (vect_find_same_alignment_drs): Use vect_calculate_required_alignment
11320         instead of TYPE_ALIGN_UNIT.
11321         (vect_duplicate_ssa_name_ptr_info): Remove stmt_info parameter.
11322         Measure DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT.
11323         (vect_create_addr_base_for_vector_ref): Update call accordingly.
11324         (vect_create_data_ref_ptr): Likewise.
11325         (vect_setup_realignment): Realign by ANDing with
11326         -DR_TARGET_MISALIGNMENT.
11327         * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Calculate
11328         the number of peels based on DR_TARGET_ALIGNMENT.
11329         * tree-vect-stmts.c (get_group_load_store_type): Compare the gap
11330         with the guaranteed alignment boundary when deciding whether
11331         overrun is OK.
11332         (vectorizable_mask_load_store): Interpret DR_MISALIGNMENT
11333         relative to DR_TARGET_ALIGNMENT instead of TYPE_ALIGN_UNIT.
11334         (ensure_base_align): Remove stmt_info parameter.  Get the
11335         target base alignment from DR_TARGET_ALIGNMENT.
11336         (vectorizable_store): Update call accordingly.   Interpret
11337         DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT instead of
11338         TYPE_ALIGN_UNIT.
11339         (vectorizable_load): Likewise.
11341 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
11342             Alan Hayward  <alan.hayward@arm.com>
11343             David Sherwood  <david.sherwood@arm.com>
11345         * tree-vectorizer.h (vect_get_scalar_dr_size): New function.
11346         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Use it.
11347         (vect_enhance_data_refs_alignment): Likewise.
11349 2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>
11351         * config/arm/parsecpu.awk (fatal): Note that we've encountered an
11352         error.  Only quit immediately if parsing is complete.
11353         (BEGIN): Initialize fatal_err and parse_done.
11354         (begin fpu, end fpu): Check number of arguments.
11355         (begin arch, end arch): Likewise.
11356         (begin cpu, end cpu): Likewise.
11357         (cname, tune for, tune flags, architecture, fpu, option): Likewise.
11358         (optalias): Likewise.
11360 2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>
11362         * config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
11363         * config/arm/arm-isa.h: Delete.  Move definitions to ...
11364         * arm-cpus.in: ... here.  Use new feature and fgroup values.
11365         * config/arm/arm.c (arm_option_override): Use lower case for feature
11366         bit names.
11367         * config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
11368         (TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
11369         * config/arm/parsecpu.awk (END): Add new command 'isa'.
11370         (isa_pfx): Delete.
11371         (print_isa_bits_for): New function.
11372         (gen_isa): New function.
11373         (gen_comm_data): Use print_isa_bits_for.
11374         (define feature): New keyword.
11375         (define fgroup): New keyword.
11376         * config/arm/t-arm (TM_H): Remove.
11377         (GTM_H): Add arm-isa.h.
11378         (arm-isa.h): Add rule to generate file.
11379         * common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
11380         case for feature bit names.
11382 2017-09-22  Richard Biener  <rguenther@suse.de>
11384         * graphite-isl-ast-to-gimple.c (graphite_verify): Inline into
11385         single caller.
11386         (graphite_regenerate_ast_isl): Do not reset SCEV.  Move debug
11387         print of no dependency loops ...
11388         * graphite.c (graphite_transform_loops): ... here.
11389         (canonicalize_loop_closed_ssa_form): Work from inner to outer
11390         loops.
11391         (same_close_phi_node, remove_duplicate_close_phi,
11392         make_close_phi_nodes_unique, defined_in_loop_p): Fold into ...
11393         (canonicalize_loop_closed_ssa): ... here and simplify.
11394         * graphite-optimize-isl.c: Include tree-vectorizer.h.
11395         (optimize_isl): Use dump_printf_loc to tell when we stopped
11396         optimizing because of an ISL timeout.
11398 2017-09-22  Richard Biener  <rguenther@suse.de>
11400         PR tree-optimization/82291
11401         * tree-if-conv.c (predicate_mem_writes): Make sure to
11402         remove writes in blocks predicated with false.
11404 2017-09-22  Richard Biener  <rguenther@suse.de>
11406         * sese.c: Include cfganal.h.
11407         (if_region_set_false_region): Remove.
11408         (create_if_region_on_edge): Likewise.
11409         (move_sese_in_condition): Re-implement without destroying
11410         dominators.
11412 2017-09-22  Richard Biener  <rguenther@suse.de>
11414         * graphite-isl-ast-to-gimple.c (translate_pending_phi_nodes):
11415         Verify both BBs contain loop PHI nodes before dispatching to
11416         copy_loop_phi_args.
11417         (graphite_regenerate_ast_isl): Do not recompute dominators,
11418         do not verify three times.  Restructure for clarity.
11419         * graphite-scop-detection.c (same_close_phi_node,
11420         remove_duplicate_close_phi, make_close_phi_nodes_unique,
11421         defined_in_loop_p, canonicalize_loop_closed_ssa,
11422         canonicalize_loop_closed_ssa_form): Simplify, remove excess
11423         checking and SSA rewrite, move to ...
11424         * graphite.c: ... here.  Include ssa.h and tree-ssa-loop-manip.h.
11425         (graphite_initialize): Do not pass in ctx, do not reset the
11426         SCEV cache, compute only dominators.
11427         (graphite_transform_loops): Allocate ISL ctx after
11428         graphite_initialize.  Call canonicalize_loop_closed_ssa_form.
11429         Maintain post-dominators only around build_scops.
11430         * sese.c (if_region_set_false_region): Make static.  Free
11431         and recompute dominators.
11432         (move_sese_in_condition): Assert we don't get called with
11433         post-dominators computed.
11434         * sese.h (if_region_set_false_region): Remove.
11436 2017-09-22  Sergey Shalnov  <sergey.shalnov@intel.com>
11438         * config/i386/sse.md ("mov<mode>_internal"): Use <sseinsnmode>
11439         mode attribute for TARGET_AVX512VL.
11441 2017-09-21  Sergey Shalnov  <sergey.shalnov@intel.com>
11443         * config/i386/i386.opt (mprefer-avx256): New option.
11444         * config/i386/i386.c (ix86_target_string): Add -mprefer-avx256
11445         to flag_opts.
11446         (ix86_preferred_simd_mode): Return 256-bit AVX modes
11447         for TARGET_PREFER_AVX256.
11448         * doc/invoke.texi (x86 Options): Document -mprefer-avx256.
11450 2017-09-21  Jeff Law  <law@redhat.com>
11452         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash):
11453         Fix dump output if the only stack space is for pushed registers.
11455 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
11457         * config/spu/spu.c (spu_sched_adjust_cost): Update after renaming
11458         of insn_cost.
11460 2017-09-21  Martin Sebor  <msebor@redhat.com>
11462         PR c/81882
11463         * doc/extend.texi (attribute ifunc): Avoid relying on ill-formed
11464         code (in C++) or code that triggers warnings.
11466 2017-09-21  Eric Botcazou  <ebotcazou@adacore.com>
11468         * stor-layout.c (bit_from_pos): Do not distribute the conversion.
11470 2017-09-21  Segher Boessenkool  <segher@kernel.crashing.org>
11472         * haifa-sched.c: Rename insn_cost to insn_sched_cost.
11473         * sched-rgn.c: Ditto.
11474         * sel-sched-ir.c: Ditto.
11476 2017-09-21  Alexander Monakov  <amonakov@ispras.ru>
11478         * toplev.h (set_random_seed): Adjust return type.
11479         * toplev.c (init_local_tick): Move eager initialization of random_seed
11480         to get_random_seed.  Adjust comment.
11481         (init_random_seed): Inline to get_random_seed, delete.
11482         (get_random_seed): Initialize random_seed lazily.
11483         (set_random_seed): Do not return previous value.
11484         (print_switch_value): Do not call get_random_seed.
11486 2017-09-21  Evgeny Kudryashov  <kudryashov@ispras.ru>
11488         * cgraph.c (delete_function_version): New, broken out from...
11489         (cgraph_node::delete_function_version): ...here.  Rename to
11490         cgraph_node::delete_function_version_by_decl.  Update all uses.
11491         (cgraph_node::remove): Call delete_function_version.
11493 2017-09-21  Jakub Jelinek  <jakub@redhat.com>
11495         PR sanitizer/81715
11496         * tree-inline.c (expand_call_inline): Emit clobber stmts for
11497         VAR_DECLs to which addressable non-volatile parameters are mapped
11498         and for id->retvar after the return value assignment.  Clear
11499         id->retval and id->retbnd after inlining.
11501 2017-09-21  Richard Biener  <rguenther@suse.de>
11503         PR tree-optimization/82276
11504         PR tree-optimization/82244
11505         * tree-vrp.c (build_assert_expr_for): Set
11506         SSA_NAME_OCCURS_IN_ABNORMAL_PHI if the variable we assert on
11507         has it set.
11508         (remove_range_assertions): Revert earlier change.
11510 2017-09-21  Wilco Dijkstra  <wdijkstr@arm.com>
11512         PR target/71951
11513         * config/aarch64/aarch64.h (LIBGCC2_UNWIND_ATTRIBUTE): Define.
11515 2017-09-21  Richard Biener  <rguenther@suse.de>
11517         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
11518         Restore valid IL after code generation errors.
11519         * graphite.c (graphite_transform_loops): Diagnose code
11520         generation issues as MSG_MISSED_OPTIMIZATION and continue
11521         with processing SCOPs.
11523 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
11524             Alan Hayward  <alan.hayward@arm.com>
11525             David Sherwood  <david.sherwood@arm.com>
11527         * calls.c (compute_argument_addresses): Use simplify_gen_binary
11528         rather than choosing between plus_constant and gen_rtx_<CODE>.
11529         * expr.c (emit_push_insn): Likewise.
11530         (expand_expr_real_2): Likewise.
11532 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
11533             Alan Hayward  <alan.hayward@arm.com>
11534             David Sherwood  <david.sherwood@arm.com>
11536         * loop-unroll.c (split_iv): Call copy_rtx on the step.
11538 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
11539             Alan Hayward  <alan.hayward@arm.com>
11540             David Sherwood  <david.sherwood@arm.com>
11542         * tree.c (find_atomic_core_type): Check tree_fits_uhwi_p before
11543         calling tree_to_uhwi.
11545 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
11546             Alan Hayward  <alan.hayward@arm.com>
11547             David Sherwood  <david.sherwood@arm.com>
11549         * tree-ssa-ccp.c (get_value_for_expr): Use a positive test for
11550         INTEGER_CST rather than a negative test for ADDR_EXPR.
11552 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
11553             Alan Hayward  <alan.hayward@arm.com>
11554             David Sherwood  <david.sherwood@arm.com>
11556         * tree-vrp.c (extract_range_from_binary_expr_1): Check
11557         int_cst_rangeN before calling value_range_constant_singleton (&vrN).
11559 2017-09-21  Richard Biener  <rguenther@suse.de>
11561         PR tree-optimization/71351
11562         * graphite-isl-ast-to-gimple.c (translate_isl_ast_to_gimple::
11563         graphite_create_new_loop_guard): Remove, fold remaining parts
11564         into caller ...
11565         (translate_isl_ast_node_for): ... here and simplify.
11567 2017-09-21  Jakub Jelinek  <jakub@redhat.com>
11569         PR target/82260
11570         * config/i386/i386.md (*movqi_internal): Replace (=q,q) alternative
11571         with (=Q,Q), (=R,R) and (=r,r) alternatives, only enable the
11572         latter two for 64-bit, renumber alternatives, for -Os imov (=q,n)
11573         alternative always use QI mode, for -Os imov (=R,R) alternative
11574         always use SI mode, for imov (=Q,Q) or (=r,r) alternatives
11575         ignore -Os.
11577 2017-09-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11578             Jeff Law  <law@redhat.com>
11580         * config/s390/s390.c (MIN_UNROLL_PROBES): Define.
11581         (allocate_stack_space): New function, partially extracted from
11582         s390_emit_prologue.
11583         (s390_emit_prologue): Track offset to most recent stack probe.
11584         Code to allocate space moved into allocate_stack_space.
11585         Dump actions when no stack is allocated.
11586         (s390_prologue_plus_offset): New function.
11587         (s390_emit_stack_probe): Likewise.
11589 2017-09-20  Alexandre Oliva  <aoliva@redhat.com>
11591         * common.opt (Wa, Wl, Wp, g, gz=): Add
11592         RejectNegative.
11593         (gno-column-info): Remove.
11594         (gcolumn-info): Drop RejectNegative.
11595         (gno-): New prefix.
11596         (gno-record-gcc-switches): Remove.
11597         (grecord-gcc-switches): Drop RejectNegative.
11598         (gno-split-dwarf): Remove.
11599         (gsplit-dwarf): Drop RejectNegative.
11600         (gno-strict-dwarf): Remove.
11601         (gstrict-dwarf): Drop RejectNegative.
11602         * config/darwin.opt (gfull, gused): Add RejectNegative.
11603         * dwarf2out.c (gen_producer_string): Drop
11604         gno-record-gcc-switches handler.
11605         * optc-gen.awk: Add g to prefixes with negative forms.
11606         * opts-common.c (remapping_prefix_p): New.
11607         (find_opt): Check it.
11608         (generate_canonical_option): Test g prefix.
11609         (option_map): Add -gno- mapping.
11610         (add_misspelling_candidates): Check remapping_prefix_p.
11612 2017-09-20  Jeff Law  <law@redhat.com>
11614         * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Fix
11615         thinko in stack clash protection support.
11617         * explow.c (compute_stack_clash_protection_loop_data): Use
11618         CONST_INT_P instead of explicit test.  Verify object is a
11619         CONST_INT_P before looking at INTVAL.
11620         (anti_adjust_stack_and_probe_stack_clash): Use CONST_INT_P
11621         instead of explicit test.
11623 2017-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
11625         PR target/77687
11626         * config/rs6000/rs6000.md (stack_restore_tie): Store to a scratch
11627         address instead of to r1 and r11.
11629 2017-09-20  Sebastian Peryt  <sebastian.peryt@intel.com>
11631         * config.gcc: Support "knm".
11632         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "knm".
11633         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
11634         PROCESSOR_KNM.
11635         * config/i386/i386.c (m_KNM): Define.
11636         (processor_target_table): Add "knm".
11637         (PTA_KNM): Define.
11638         (ix86_option_override_internal): Add "knm".
11639         (ix86_issue_rate): Add PROCESSOR_KNM.
11640         (ix86_adjust_cost): Ditto.
11641         (ia32_multipass_dfa_lookahead): Ditto.
11642         (get_builtin_code_for_version): Handle PROCESSOR_KNM.
11643         (fold_builtin_cpu): Add M_INTEL_KNM.
11644         * config/i386/i386.h (processor_costs): Define TARGET_KNM.
11645         (processor_type): Add PROCESSOR_KNM.
11646         * config/i386/x86-tune.def: Add m_KNM.
11647         * doc/invoke.texi: Add knm as x86 -march=/-mtune= CPU type.
11649 2017-09-20  Richard Biener  <rguenther@suse.de>
11651         PR tree-optimization/80213
11652         * graphite-scop-detection.c (trivially_empty_bb_p): Labels
11653         are allowed in empty BBs as well.
11654         (canonicalize_loop_closed_ssa): Also look for other complex
11655         edges.
11656         (scop_detection::get_sese): Include the loop-closed PHI block
11657         in loop SESEs.
11658         (scop_detection::merge_sese): Remove code adding extra blocks.
11659         (scop_detection::region_has_one_loop): Adjust for get_sese changes.
11660         (build_scops): Assert the final returned scop is invalid.
11662 2017-09-20  Richard Biener  <rguenther@suse.de>
11664         PR tree-optimization/82264
11665         * tree-ssa-sccvn.c (vn_phi_eq): Use safe_dyn_cast to check
11666         for GIMPLE_CONDs.
11667         (vn_phi_lookup): Likewise.
11668         (vn_phi_insert): Likewise.
11670 2017-09-20  Jakub Jelinek  <jakub@redhat.com>
11672         * dwarf2out.c (tree_add_const_value_attribute): For INTEGER_CST
11673         that fits into uhwi or shwi, add DW_AT_const_value regardless
11674         of early_dwarf without going through RTL, using add_AT_unsigned
11675         or add_AT_int.
11677         * dwarf2out.c (DEBUG_LTO_DWO_INFO_SECTION): Reorder defines.
11678         (DEBUG_LTO_ABBREV_SECTION): Likewise.
11679         (DEBUG_LTO_MACINFO_SECTION): Likewise.
11680         (DEBUG_MACRO_SECTION): Likewise.
11681         (DEBUG_LTO_MACRO_SECTION): Likewise.
11682         (DEBUG_STR_DWO_SECTION): Likewise.
11683         (DEBUG_LTO_STR_DWO_SECTION): Likewise.
11684         (DEBUG_LTO_LINE_SECTION): Drop .dwo suffix from the name.
11685         (DEBUG_LTO_DWO_LINE_SECTION): Define.
11686         (DEBUG_LTO_LINE_STR_SECTION): Define.
11687         (init_sections_and_labels): Initialize debug_line_str_section
11688         variable.  Initialize debug_loc_section for -gdwarf-5 to
11689         DEBUG_LOCLISTS_SECTION.  Formatting fixes.
11691 2017-09-20  Richard Biener  <rguenther@suse.de>
11693         * graphite-sese-to-poly.c (extract_affine): Properly handle
11694         POINTER_PLUS_EXPR, BIT_NOT_EXPR and conversion to signed.
11696 2017-09-20  Richard Biener  <rguenther@suse.de>
11698         PR tree-optimization/81373
11699         * graphite-scop-detection.c (build_cross_bb_scalars_def):
11700         Force SESE live-out defs to be handled even if they are
11701         scev_analyzable_p.
11703 2017-09-19  Jeff Law  <law@redhat.com>
11705         * combine-stack-adj.c (combine_stack_adjustments_for_block): Do
11706         nothing for stack adjustments with REG_STACK_CHECK.
11707         * sched-deps.c (parse_add_or_inc): Reject insns with
11708         REG_STACK_CHECK from dependency breaking.
11709         * config/i386/i386.c (pro_epilogue_adjust_stack): Return insn.
11710         (ix86_adjust_satck_and_probe_stack_clash): Add REG_STACK_NOTEs.
11711         * reg-notes.def (STACK_CHECK): New note.
11713         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): New.
11714         (ix86_expand_prologue): Dump stack clash info as needed.
11715         Call ix86_adjust_stack_and_probe_stack_clash as needed.
11717         * function.c (dump_stack_clash_frame_info): New function.
11718         * function.h (dump_stack_clash_frame_info): Prototype.
11719         (enum stack_clash_probes): New enum.
11721         * config/alpha/alpha.c (alpha_expand_prologue): Also check
11722         flag_stack_clash_protection.
11723         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Likewise.
11724         (arm_expand_prologue, thumb1_expand_prologue): Likewise.
11725         (arm_frame_pointer_required): Likewise.
11726         * config/ia64/ia64.c (ia64_compute_frame_size): Likewise.
11727         (ia64_expand_prologue): Likewise.
11728         * config/mips/mips.c (mips_expand_prologue): Likewise.
11729         * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Likewise.
11730         * config/sparc/sparc.c (sparc_expand_prologue): Likewise.
11731         (sparc_flat_expand_prologue): Likewise.
11732         * config/spu/spu.c (spu_expand_prologue): Likewise.
11734         * explow.c: Include "params.h".
11735         (anti_adjust_stack_and_probe_stack_clash): New function.
11736         (get_stack_check_protect): Likewise.
11737         (compute_stack_clash_protection_loop_data): Likewise.
11738         (emit_stack_clash_protection_loop_start): Likewise.
11739         (emit_stack_clash_protection_loop_end): Likewise.
11740         (allocate_dynamic_stack_space): Use get_stack_check_protect.
11741         Use anti_adjust_stack_and_probe_stack_clash.
11742         * explow.h (compute_stack_clash_protection_loop_data): Prototype.
11743         (emit_stack_clash_protection_loop_start): Likewise.
11744         (emit_stack_clash_protection_loop_end): Likewise.
11745         * rtl.h (get_stack_check_protect): Prototype.
11746         * target.def (stack_clash_protection_final_dynamic_probe): New hook.
11747         * targhooks.c (default_stack_clash_protection_final_dynamic_probe): New.
11748         * targhooks.h (default_stack_clash_protection_final_dynamic_probe):
11749         Prototype.
11750         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE):
11751         Add @hook.
11752         * doc/tm.texi: Rebuilt.
11753         * config/aarch64/aarch64.c (aarch64_expand_prologue): Use
11754         get_stack_check_protect.
11755         * config/alpha/alpha.c (alpha_expand_prologue): Likewise.
11756         * config/arm/arm.c (arm_expand_prologue): Likewise.
11757         (arm_frame_pointer_required): Likewise.
11758         * config/i386/i386.c (ix86_expand_prologue): Likewise.
11759         * config/ia64/ia64.c (ia64_expand_prologue): Likewise.
11760         * config/mips/mips.c (mips_expand_prologue): Likewise.
11761         * config/powerpcspe/powerpcspe.c (rs6000_emit_prologue): Likewise.
11762         * config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise.
11763         * config/sparc/sparc.c (sparc_expand_prologue): Likewise.
11764         (sparc_flat_expand_prologue): Likewise.
11766         * common.opt (-fstack-clash-protection): New option.
11767         * flag-types.h (enum stack_check_type): Note difference between
11768         -fstack-check= and -fstack-clash-protection.
11769         * params.def (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE): New PARAM.
11770         (PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Likewise.
11771         * toplev.c (process_options): Issue warnings/errors for cases
11772         not handled with -fstack-clash-protection.
11773         * doc/invoke.texi (-fstack-clash-protection): Document new option.
11774         (-fstack-check): Note additional problem with -fstack-check=generic.
11775         Note that -fstack-check is primarily for Ada and refer users
11776         to -fstack-clash-protection for stack-clash-protection.
11777         Document new params for stack clash protection.
11779 2017-09-19  Uros Bizjak  <ubizjak@gmail.com>
11781         * config/i386/i386.c (ix86_split_long_move): Do not handle
11782         address used for LEA in a special way.
11784 2017-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
11786         * simplify-rtx.c (simplify_binary_operation_1): Fix typo in comment.
11788 2017-09-19  Martin Sebor  <msebor@redhat.com>
11790         PR c/81854
11791         * cgraphunit.c (handle_alias_pairs): Reject aliases between functions
11792         of incompatible types.
11794 2017-09-19  Will Schmidt  <will_schmidt@vnet.ibm.com>
11796         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
11797         for early folding of vector loads (ALTIVEC_BUILTIN_LVX_*).
11798         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
11799         Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_LD.
11801 2017-09-19  Richard Biener  <rguenther@suse.de>
11803         PR tree-optimization/82244
11804         * tree-vrp.c (remove_range_assertions): Do not propagate
11805         a constant to abnormals but replace the assert with a copy.
11807 2017-09-19  Alexander Monakov  <amonakov@ispras.ru>
11809         PR rtl-optimization/57878
11810         PR rtl-optimization/68988
11811         * lra-assigns.c (reload_pseudo_compare_func): Remove fragmentation
11812         avoidance test involving non_reload_pseudos.  Move frequency test
11813         below the general fragmentation avoidance test.
11815 2017-09-19  Richard Biener  <rguenther@suse.de>
11817         PR tree-optimization/69728
11818         * graphite-sese-to-poly.c (schedule_error): New global.
11819         (add_loop_schedule): Handle empty domain by failing the
11820         schedule.
11821         (build_original_schedule): Handle schedule_error.
11823 2017-09-19  Richard Biener  <rguenther@suse.de>
11825         * graphite-scop-detection.c (scop_detection::can_represent_loop):
11826         Do not iterate to sibling loops but only to siblings of inner
11827         loops.
11829 2017-09-18  Andreas Schwab  <schwab@linux-m68k.org>
11831         PR target/81613
11832         * config/m68k/m68k.md (moveq feeding equality comparison): Check
11833         that the registers are different.
11835 2017-09-18  Uros Bizjak  <ubizjak@gmail.com>
11837         * config/i386/i386.c (fold_builtin_cpu): Add M_AMDFAM17H
11838         to processor_model and "amdfam17h" to arch_names_table.
11839         * doc/extend.texi (__builtin_cpu_is): Document amdfam17h CPU name.
11841 2017-09-18  Jakub Jelinek  <jakub@redhat.com>
11843         PR c/82234
11844         * doc/extend.texi: Add @findex entry for __builtin_shuffle.
11846 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
11847             Alan Hayward  <alan.hayward@arm.com>
11848             David Sherwood  <david.sherwood@arm.com>
11850         * tree-vectorizer.h (vect_slp_analyze_operations): Replace parameters
11851         with a vec_info *.
11852         * tree-vect-loop.c (vect_analyze_loop_operations): Update call
11853         accordingly.
11854         * tree-vect-slp.c (vect_slp_analyze_node_operations): Add vec_info *
11855         parameter.  Set SLP_TREE_NUMBER_OF_VEC_STMTS here rather than in
11856         vect_schedule_slp_instance.
11857         (vect_slp_analyze_operations): Replace parameters with a vec_info *.
11858         Update call to vect_slp_analyze_node_operations.  Simplify return
11859         value.
11860         (vect_slp_analyze_bb_1): Update call accordingly.
11861         (vect_schedule_slp_instance): Remove vectorization_factor parameter.
11862         Don't calculate SLP_TREE_NUMBER_OF_VEC_STMTS here.
11863         (vect_schedule_slp): Update call accordingly.
11865 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
11866             Alan Hayward  <alan.hayward@arm.com>
11867             David Sherwood  <david.sherwood@arm.com>
11869         * tree-vect-data-refs.c (vect_get_smallest_scalar_type): Cope
11870         with types that aren't in fact scalar.
11872 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
11874         * tree-vect-slp.c (vect_record_max_nunits): New function,
11875         split out from...
11876         (vect_build_slp_tree_1): ...here.
11877         (vect_build_slp_tree_2): Call it for phis too.
11879 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
11881         * tree-vect-stmts.c (vectorizable_mask_load_store): Pass mask_vectype
11882         to vect_get_vec_def_for_operand when getting the mask operand.
11884 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
11885             Alan Hayward  <alan.hayward@arm.com>
11886             David Sherwood  <david.sherwood@arm.com>
11888         * tree-vect-loop.c (vectorizable_live_operation): Fix type of
11889         bitstart.
11891 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
11892             Alan Hayward  <alan.hayward@arm.com>
11893             David Sherwood  <david.sherwood@arm.com>
11895         * tree-vect-loop.c (vectorizable_live_operation): Fix element size
11896         calculation for vector booleans.
11898 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
11899             Alan Hayward  <alan.hayward@arm.com>
11900             David Sherwood  <david.sherwood@arm.com>
11902         * tree-vect-stmts.c (can_vectorize_live_stmts): New function,
11903         split out from...
11904         (vect_transform_stmt): ...here.
11905         (vect_analyze_stmt): Use it instead of calling
11906         vectorizable_live_operation directly.
11908 2017-09-18  Cesar Philippidis  <cesar@codesourcery.com>
11910         * omp-offload.c (oacc_xform_loop): Enable SIMD vectorization on
11911         non-SIMT targets in acc vector loops.
11913 2017-09-18  Claudiu Zissulescu  <claziss@synopsys.com>
11915         * configure.ac: Add arc and check if assembler supports gdwarf2.
11916         * configure: Regenerate.
11918 2017-09-18  Richard Biener  <rguenther@suse.de>
11920         PR tree-optimization/82220
11921         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Exclude
11922         epilogue niters from the min_profitable_iters compute.
11924 2017-09-18  Jakub Jelinek  <jakub@redhat.com>
11926         PR target/82145
11927         * config/i386/i386.c (ix86_init_large_pic_reg): Revert 2017-09-01
11928         changes.  Turn CODE_LABEL into NOTE_INSN_DELETED_LABEL immediately.
11929         (ix86_init_pic_reg): Revert 2017-09-01 changes.
11931 2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
11933         PR target/81361
11934         * dwarf2cfi.c (add_cfis_to_fde): Do not generate DW_CFA_set_loc after
11935         switching to a new text section.
11937 2017-09-18  Richard Biener  <rguenther@suse.de>
11939         * graphite-scop-detection.c (scop_detection::stmt_has_simple_data_ref):
11940         Simplify.
11941         (build_alias_set): Reject aliases with no access function.
11943 2017-09-18  Richard Biener  <rguenther@suse.de>
11945         PR tree-optimization/79622
11946         * graphite-scop-detection.c (build_cross_bb_scalars_def): Properly
11947         handle PHIs.
11948         (build_cross_bb_scalars_use): Likewise.
11950 2017-09-18  Pierre-Marie de Rodat  <derodat@adacore.com>
11952         * cgraph.h (cgraph_thunk_info): Fix a typo in a comment.
11954 2017-09-18  Alan Modra  <amodra@gmail.com>
11956         PR target/81996
11957         * gcc/config/rs6000/rs6000.c (rs6000_return_addr): Use
11958         stack_pointer_rtx for count 0.  Update comments.  Break up
11959         large rtl expression.
11961 2017-09-17  Daniel Santos  <daniel.santos@pobox.com>
11963         * config/i386/i386.c (xlogue_layout::STUB_NAME_MAX_LEN):
11964         Increase to 20 bytes.
11965         (xlogue_layout::s_stub_names): Add an additional size-2 diminsion.
11966         (xlogue_layout::get_stub_name): Modify to select the appropairate sse
11967         or avx version of the stub.
11969 2017-09-17  H.J. Lu  <hongjiu.lu@intel.com>
11971         PR target/82166
11972         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Properly
11973         compute the minimum stack alignment.  Also update preferred stack
11974         boundary for leaf functions.
11976 2017-09-16  Richard Sandiford  <richard.sandiford@linaro.org>
11978         PR tree-optimization/82228
11979         * tree-vect-loop.c (vectorizable_live_operation): Move initialization
11980         of ncopies.
11982 2017-09-16  Chung-Ju Wu  <jasonwucj@gmail.com>
11984         * common/config/nds32/nds32-common.c
11985         (nds32_option_optimization_table): Refine formatting.
11986         (nds32_option_optimization_table): Use -fsched-pressure and
11987         -fomit-frame-pointer for specific optimization level.
11989 2017-09-16  Chung-Ju Wu  <jasonwucj@gmail.com>
11991         * config/nds32/nds32.c: Refine formatting and comments.
11992         * config/nds32/nds32.h: Likewise.
11993         * config/nds32/nds32.md: Likewise.
11994         * config/nds32/nds32-cost.c: Likewise.
11995         * config/nds32/nds32-isr.c: Likewise.
11996         * config/nds32/nds32-md-auxiliary.c: Likewise.
11997         * config/nds32/nds32-multiple.md: Likewise.
11998         * config/nds32/nds32-predicates.c: Likewise.
12000 2017-09-15  Andrew Sutton  <andrew.n.sutton@gmail.com>
12001             Jakub Jelinek  <jakub@redhat.com>
12003         Add support for -std=c++2a.
12004         * doc/cpp.texi (__cplusplus): Document value for -std=c++2a
12005         or -std=gnu+2a.
12006         * doc/invoke.texi: Document -std=c++2a and -std=gnu++2a.
12008 2017-09-15  Steve Ellcey  <sellcey@cavium.com>
12010         PR target/82066
12011         * doc/extend.texi (Common Function Attributes): Add 
12012         references to ARM, AArch64, and S/390 specific attributes.
12013         (Function Specific Option Pragmas): Add AArch64 and S/390
12014         to list of back ends that support the target pragma.
12016 2017-09-15  Nathan Sidwell  <nathan@acm.org>
12018         * doc/standards.texi: Fix C++17 description.  Update URLs for
12019         C++11 & 14.
12021 2017-09-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12023         * common.opt (Wcast-align=strict): New warning option.
12024         * doc/invoke.texi: Document -Wcast-align=strict. 
12026 2017-09-15  Pierre-Marie de Rodat  <derodat@adacore.com>
12028         * cgraph.h (cgraph_thunk_info): Add comments.
12029         * cgraph.c (cgraph_node::create_thunk): Adjust comment, make
12030         assert for VIRTUAL_* arguments stricter.
12032 2017-09-15  Jackson Woodruff  <jackson.woodruff@arm.com>
12034         PR tree-optimization/71026
12035         * match.pd: Move RDIV patterns from fold-const.c
12036         * fold-const.c (distribute_real_division): Removed.
12037         (fold_binary_loc): Remove calls to distribute_real_divison.
12039 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
12041         * doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document
12042         c++1z and gnu++1z as deprecated.  Change other references to
12043         -std=c++1z to -std=c++17 and -std=gnu++1z to -std=gnu++17.
12044         Change -Wc++1z-compat to -Wc++17-compat.
12045         * doc/cpp.texi: Document -std=c++17 defines __cplusplus 201703L.
12046         * dwarf2out.c (highest_c_language): Handle C++17.
12047         (gen_compile_unit_die): Likewise.
12049 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
12051         PR rtl-optimization/82192
12052         * combine.c (make_extraction): Don't look through non-paradoxical
12053         SUBREGs or TRUNCATE if pos + len is or might be bigger than
12054         inner's mode.
12056 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
12057             Alan Hayward  <alan.hayward@arm.com>
12058             David Sherwood  <david.sherwood@arm.com>
12060         * target.def (function_arg_offset): New hook.
12061         * targhooks.h (default_function_arg_offset): Declare.
12062         * targhooks.c (default_function_arg_offset): New function.
12063         * function.c (locate_and_pad_parm): Use
12064         targetm.calls.function_arg_offset instead of FUNCTION_ARG_OFFSET.
12065         * doc/tm.texi.in (FUNCTION_ARG_OFFSET): Replace with...
12066         (TARGET_FUNCTION_ARG_OFFSET): ...this.
12067         * doc/tm.texi: Regenerate.
12068         * config/spu/spu.h (FUNCTION_ARG_OFFSET): Delete.
12069         * config/spu/spu.c (spu_function_arg_offset): New function.
12070         (TARGET_FUNCTION_ARG_OFFSET): Redefine.
12071         * system.h (FUNCTION_ARG_OFFSET): Poison.
12073 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
12074             Alan Hayard  <alan.hayward@arm.com>
12075             David Sherwood  <david.sherwood@arm.com>
12077         * target.def (truly_noop_truncation): New hook.
12078         (mode_rep_extended): Refer to TARGET_TRULY_NOOP_TRUNCATION rather
12079         than TRULY_NOOP_TRUNCATION.
12080         * hooks.h (hook_bool_uint_uint_true): Declare.
12081         * hooks.c (hook_bool_uint_uint_true): New function.
12082         * doc/tm.texi.in (TRULY_NOOP_TRUNCATION): Replace with...
12083         (TARGET_TRULY_NOOP_TRUNCATION): ...this.
12084         * doc/tm.texi: Regenerate.
12085         * combine.c (make_extraction): Refer to TARGET_TRULY_NOOP_TRUNCATION
12086         rather than TRULY_NOOP_TRUNCATION in comments.
12087         (simplify_comparison): Likewise.
12088         (record_truncated_value): Likewise.
12089         * expmed.c (extract_bit_field_1): Likewise.
12090         (extract_split_bit_field): Likewise.
12091         * convert.c (convert_to_integer_1): Use targetm.truly_noop_truncation
12092         instead of TRULY_NOOP_TRUNCATION.
12093         * function.c (assign_parm_setup_block): Likewise.
12094         * machmode.h (TRULY_NOOP_TRUNCATION_MODES_P): Likewise.
12095         * rtlhooks.c: Include target.h.
12096         * config/aarch64/aarch64.h (TRULY_NOOP_TRUNCATION): Delete.
12097         * config/alpha/alpha.h (TRULY_NOOP_TRUNCATION): Delete.
12098         * config/arc/arc.h (TRULY_NOOP_TRUNCATION): Delete.
12099         * config/arm/arm.h (TRULY_NOOP_TRUNCATION): Delete.
12100         * config/avr/avr.h (TRULY_NOOP_TRUNCATION): Delete.
12101         * config/bfin/bfin.h (TRULY_NOOP_TRUNCATION): Delete.
12102         * config/c6x/c6x.h (TRULY_NOOP_TRUNCATION): Delete.
12103         * config/cr16/cr16.h (TRULY_NOOP_TRUNCATION): Delete.
12104         * config/cris/cris.h (TRULY_NOOP_TRUNCATION): Delete.
12105         * config/epiphany/epiphany.h (TRULY_NOOP_TRUNCATION): Delete.
12106         * config/fr30/fr30.h (TRULY_NOOP_TRUNCATION): Delete.
12107         * config/frv/frv.h (TRULY_NOOP_TRUNCATION): Delete.
12108         * config/ft32/ft32.h (TRULY_NOOP_TRUNCATION): Delete.
12109         * config/h8300/h8300.h (TRULY_NOOP_TRUNCATION): Delete.
12110         * config/i386/i386.h (TRULY_NOOP_TRUNCATION): Delete.
12111         * config/ia64/ia64.h (TRULY_NOOP_TRUNCATION): Delete.
12112         * config/iq2000/iq2000.h (TRULY_NOOP_TRUNCATION): Delete.
12113         * config/lm32/lm32.h (TRULY_NOOP_TRUNCATION): Delete.
12114         * config/m32c/m32c.h (TRULY_NOOP_TRUNCATION): Delete.
12115         * config/m32r/m32r.h (TRULY_NOOP_TRUNCATION): Delete.
12116         * config/m68k/m68k.h (TRULY_NOOP_TRUNCATION): Delete.
12117         * config/mcore/mcore.h (TRULY_NOOP_TRUNCATION): Delete.
12118         * config/microblaze/microblaze.h (TRULY_NOOP_TRUNCATION): Delete.
12119         * config/mips/mips.h (TRULY_NOOP_TRUNCATION): Delete.
12120         * config/mips/mips.c (mips_truly_noop_truncation): New function.
12121         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
12122         * config/mips/mips.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
12123         rather than TRULY_NOOP_TRUNCATION in comments.
12124         * config/mmix/mmix.h (TRULY_NOOP_TRUNCATION): Delete.
12125         * config/mn10300/mn10300.h (TRULY_NOOP_TRUNCATION): Delete.
12126         * config/moxie/moxie.h (TRULY_NOOP_TRUNCATION): Delete.
12127         * config/msp430/msp430.h (TRULY_NOOP_TRUNCATION): Delete.
12128         * config/nds32/nds32.h (TRULY_NOOP_TRUNCATION): Delete.
12129         * config/nios2/nios2.h (TRULY_NOOP_TRUNCATION): Delete.
12130         * config/nvptx/nvptx.h (TRULY_NOOP_TRUNCATION): Delete.
12131         * config/pa/pa.h (TRULY_NOOP_TRUNCATION): Delete.
12132         * config/pdp11/pdp11.h (TRULY_NOOP_TRUNCATION): Delete.
12133         * config/powerpcspe/powerpcspe.h (TRULY_NOOP_TRUNCATION): Delete.
12134         * config/riscv/riscv.h (TRULY_NOOP_TRUNCATION): Delete.
12135         * config/riscv/riscv.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
12136         rather than TRULY_NOOP_TRUNCATION in comments.
12137         * config/rl78/rl78.h (TRULY_NOOP_TRUNCATION): Delete.
12138         * config/rs6000/rs6000.h (TRULY_NOOP_TRUNCATION): Delete.
12139         * config/rx/rx.h (TRULY_NOOP_TRUNCATION): Delete.
12140         * config/s390/s390.h (TRULY_NOOP_TRUNCATION): Delete.
12141         * config/sh/sh.h (MAYBE_BASE_REGISTER_RTX_P): Remove
12142         TRULY_NOOP_TRUNCATION condition.
12143         (MAYBE_INDEX_REGISTER_RTX_P): Likewise.
12144         (TRULY_NOOP_TRUNCATION): Delete.
12145         * config/sparc/sparc.h (TRULY_NOOP_TRUNCATION): Delete.
12146         * config/spu/spu.h (TRULY_NOOP_TRUNCATION): Delete.
12147         * config/spu/spu.c (spu_truly_noop_truncation): New function.
12148         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
12149         * config/stormy16/stormy16.h (TRULY_NOOP_TRUNCATION): Delete.
12150         * config/tilegx/tilegx.h (TRULY_NOOP_TRUNCATION): Delete.
12151         * config/tilegx/tilegx.c (tilegx_truly_noop_truncation): New fuction.
12152         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
12153         * config/tilegx/tilegx.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
12154         rather than TRULY_NOOP_TRUNCATION in comments.
12155         * config/tilepro/tilepro.h (TRULY_NOOP_TRUNCATION): Delete.
12156         * config/v850/v850.h (TRULY_NOOP_TRUNCATION): Delete.
12157         * config/vax/vax.h (TRULY_NOOP_TRUNCATION): Delete.
12158         * config/visium/visium.h (TRULY_NOOP_TRUNCATION): Delete.
12159         * config/xtensa/xtensa.h (TRULY_NOOP_TRUNCATION): Delete.
12160         * system.h (TRULY_NOOP_TRUNCATION): Poison.
12162 2017-09-15  Christophe Lyon  <christophe.lyon@linaro.org>
12164         PR target/67591
12165         * config/arm/arm.md (*cmp_and): Add enabled_for_depr_it attribute.
12166         (*cmp_ior): Likewise.
12167         (*ior_scc_scc): Add alternative for enabled_for_depr_it attribute.
12168         (*ior_scc_scc_cmp): Likewise.
12169         (*and_scc_scc): Likewise.
12170         (*and_scc_scc_cmp): Likewise.
12172 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
12173             Alan Hayard  <alan.hayward@arm.com>
12174             David Sherwood  <david.sherwood@arm.com>
12176         * target.def (can_change_mode_class): New hook.
12177         (mode_rep_extended): Refer to it instead of CANNOT_CHANGE_MODE_CLASS.
12178         (hard_regno_nregs): Likewise.
12179         * hooks.h (hook_bool_mode_mode_reg_class_t_true): Declare.
12180         * hooks.c (hook_bool_mode_mode_reg_class_t_true): New function.
12181         * doc/tm.texi.in (CANNOT_CHANGE_MODE_CLASS): Replace with...
12182         (TARGET_CAN_CHANGE_MODE_CLASS): ...this.
12183         (LOAD_EXTEND_OP): Update accordingly.
12184         * doc/tm.texi: Regenerate.
12185         * doc/rtl.texi: Refer to TARGET_CAN_CHANGE_MODE_CLASS instead of
12186         CANNOT_CHANGE_MODE_CLASS.
12187         * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): Replace with...
12188         (REG_CAN_CHANGE_MODE_P): ...this new macro.
12189         * combine.c (simplify_set): Update accordingly.
12190         * emit-rtl.c (validate_subreg): Likewise.
12191         * recog.c (general_operand): Likewise.
12192         * regcprop.c (mode_change_ok): Likewise.
12193         * reload1.c (choose_reload_regs): Likewise.
12194         (inherit_piecemeal_p): Likewise.
12195         * rtlanal.c (simplify_subreg_regno): Likewise.
12196         * postreload.c (reload_cse_simplify_set): Use REG_CAN_CHANGE_MODE_P
12197         instead of CANNOT_CHANGE_MODE_CLASS.
12198         (reload_cse_simplify_operands): Likewise.
12199         * reload.c (push_reload): Use targetm.can_change_mode_class
12200         instead of CANNOT_CHANGE_MODE_CLASS.
12201         (push_reload): Likewise.  Also use REG_CAN_CHANGE_MODE_P instead of
12202         REG_CANNOT_CHANGE_MODE_P.
12203         * config/alpha/alpha.h (CANNOT_CHANGE_MODE_CLASS): Delete.
12204         * config/alpha/alpha.c (alpha_can_change_mode_class): New function.
12205         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
12206         * config/arm/arm.h (CANNOT_CHANGE_MODE_CLASS): Delete.
12207         * config/arm/arm.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
12208         (arm_can_change_mode_class): New function.
12209         * config/arm/neon.md: Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
12210         than CANNOT_CHANGE_MODE_CLASS in comments.
12211         * config/i386/i386.h (CANNOT_CHANGE_MODE_CLASS): Delete.
12212         * config/i386/i386-protos.h (ix86_cannot_change_mode_class): Delete.
12213         * config/i386/i386.c (ix86_cannot_change_mode_class): Replace with...
12214         (ix86_can_change_mode_class): ...this new function, inverting the
12215         sense of the return value.
12216         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
12217         * config/ia64/ia64.h (CANNOT_CHANGE_MODE_CLASS): Delete.
12218         * config/ia64/ia64.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
12219         (ia64_can_change_mode_class): New function.
12220         * config/m32c/m32c.h (CANNOT_CHANGE_MODE_CLASS): Delete.
12221         * config/m32c/m32c-protos.h (m32c_cannot_change_mode_class): Delete.
12222         * config/m32c/m32c.c (m32c_cannot_change_mode_class): Replace with...
12223         (m32c_can_change_mode_class): ...this new function, inverting the
12224         sense of the return value.
12225         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
12226         * config/mips/mips.h (CANNOT_CHANGE_MODE_CLASS): Delete.
12227         * config/mips/mips-protos.h (mips_cannot_change_mode_class): Delete.
12228         * config/mips/mips.c (mips_cannot_change_mode_class): Replace with...
12229         (mips_can_change_mode_class): ...this new function, inverting the
12230         sense of the return value.
12231         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
12232         * config/msp430/msp430.h (CANNOT_CHANGE_MODE_CLASS): Delete.
12233         * config/msp430/msp430.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
12234         (msp430_can_change_mode_class): New function.
12235         * config/nvptx/nvptx.h (CANNOT_CHANGE_MODE_CLASS): Delete.
12236         * config/nvptx/nvptx.c (nvptx_can_change_mode_class): New function.
12237         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
12238         * config/pa/pa32-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
12239         * config/pa/pa64-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
12240         * config/pa/pa-protos.h (pa_cannot_change_mode_class): Delete.
12241         * config/pa/pa.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
12242         (pa_cannot_change_mode_class): Replace with...
12243         (pa_can_change_mode_class): ...this new function, inverting the
12244         sense of the return value.
12245         (pa_modes_tieable_p): Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
12246         than CANNOT_CHANGE_MODE_CLASS in comments.
12247         * config/pdp11/pdp11.h (CANNOT_CHANGE_MODE_CLASS): Delete.
12248         * config/pdp11/pdp11-protos.h (pdp11_cannot_change_mode_class): Delete.
12249         * config/pdp11/pdp11.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
12250         (pdp11_cannot_change_mode_class): Replace with...
12251         (pdp11_can_change_mode_class): ...this new function, inverting the
12252         sense of the return value.
12253         * config/powerpcspe/powerpcspe.h (CANNOT_CHANGE_MODE_CLASS): Delete.
12254         * config/powerpcspe/powerpcspe-protos.h
12255         (rs6000_cannot_change_mode_class_ptr): Delete.
12256         * config/powerpcspe/powerpcspe.c
12257         (rs6000_cannot_change_mode_class_ptr): Delete.
12258         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
12259         (rs6000_option_override_internal): Assign to
12260         targetm.can_change_mode_class instead of
12261         rs6000_cannot_change_mode_class_ptr.
12262         (rs6000_cannot_change_mode_class): Replace with...
12263         (rs6000_can_change_mode_class): ...this new function, inverting the
12264         sense of the return value.
12265         (rs6000_debug_cannot_change_mode_class): Replace with...
12266         (rs6000_debug_can_change_mode_class): ...this new function.
12267         * config/riscv/riscv.h (CANNOT_CHANGE_MODE_CLASS): Delete.
12268         * config/riscv/riscv.c (riscv_can_change_mode_class): New function.
12269         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
12270         * config/rs6000/rs6000.h (CANNOT_CHANGE_MODE_CLASS): Delete.
12271         * config/rs6000/rs6000-protos.h (rs6000_cannot_change_mode_class_ptr):
12272         Delete.
12273         * config/rs6000/rs6000.c (rs6000_cannot_change_mode_class_ptr): Delete.
12274         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
12275         (rs6000_option_override_internal): Assign to
12276         targetm.can_change_mode_class instead of
12277         rs6000_cannot_change_mode_class_ptr.
12278         (rs6000_cannot_change_mode_class): Replace with...
12279         (rs6000_can_change_mode_class): ...this new function, inverting the
12280         sense of the return value.
12281         (rs6000_debug_cannot_change_mode_class): Replace with...
12282         (rs6000_debug_can_change_mode_class): ...this new function.
12283         * config/s390/s390.h (CANNOT_CHANGE_MODE_CLASS): Delete.
12284         * config/s390/s390-protos.h (s390_cannot_change_mode_class): Delete.
12285         * config/s390/s390.c (s390_cannot_change_mode_class): Replace with...
12286         (s390_can_change_mode_class): ...this new function, inverting the
12287         sense of the return value.
12288         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
12289         * config/sh/sh.h (CANNOT_CHANGE_MODE_CLASS): Delete.
12290         * config/sh/sh-protos.h (sh_cannot_change_mode_class): Delete.
12291         * config/sh/sh.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
12292         (sh_cannot_change_mode_class): Replace with...
12293         (sh_can_change_mode_class): ...this new function, inverting the
12294         sense of the return value.
12295         * config/sparc/sparc.h (CANNOT_CHANGE_MODE_CLASS): Delete.
12296         * config/sparc/sparc.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
12297         (sparc_can_change_mode_class): New function.
12298         * config/spu/spu.h (CANNOT_CHANGE_MODE_CLASS): Delete.
12299         * config/spu/spu.c (spu_can_change_mode_class): New function.
12300         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
12301         * config/visium/visium.h (CANNOT_CHANGE_MODE_CLASS): Delete.
12302         * config/visium/visium.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
12303         (visium_can_change_mode_class): New function.
12304         * system.h (CANNOT_CHANGE_MODE_CLASS): Poison.
12306 2017-09-15  Richard Biener  <rguenther@suse.de>
12308         PR tree-optimization/82217
12309         * tree-ssa-sccvn.c (visit_phi): Properly handle all VN_TOP
12310         but not undefined case.
12312 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
12314         PR target/82145
12315         * postreload.c (reload_cse_simplify_operands): Skip
12316         NOTE_INSN_DELETED_LABEL similarly to skipping CODE_LABEL.
12318 2017-09-15  Richard Biener  <rguenther@suse.de>
12320         PR tree-optimization/68823
12321         * graphite-scop-detection.c (build_alias_set): If we have a
12322         possible dependence check whether we can handle them by just
12323         looking at the DRs DR_ACCESS_FNs.
12324         (build_scops): If build_alias_set fails, fail the SCOP.
12326 2017-09-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
12328         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_1_HW): New macros
12329         to support float128 built-in functions that require the ISA 3.0
12330         hardware.
12331         (BU_FLOAT128_3_HW): Likewise.
12332         (SQRTF128): Add support for the IEEE 128-bit square root and fma
12333         built-in functions.
12334         (FMAF128): Likewise.
12335         (FMAQ): Likewise.
12336         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
12337         support for built-in functions that need the ISA 3.0 IEEE 128-bit
12338         floating point instructions.
12339         (rs6000_invalid_builtin): Likewise.
12340         (rs6000_builtin_mask_names): Likewise.
12341         * config/rs6000/rs6000.h (MASK_FLOAT128_HW): Likewise.
12342         (RS6000_BTM_FLOAT128_HW): Likewise.
12343         (RS6000_BTM_COMMON): Likewise.
12344         * config/rs6000/rs6000.md (fma<mode>4_hw): Add a generator
12345         function.
12346         * doc/extend.texi (RS/6000 built-in functions): Document the
12347         IEEE 128-bit floating point square root and fused multiply-add
12348         built-in functions.
12350 2017-09-14  Pat Haugen  <pthaugen@us.ibm.com>
12352         * config/rs6000/rs6000.c (rs6000_set_up_by_prologue): Make sure the TOC
12353         reg (r2) isn't in the set of registers defined in the prologue.
12355 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
12356             Alan Hayward  <alan.hayward@arm.com>
12357             David Sherwood  <david.sherwood@arm.com>
12359         * tree-vectorizer.h (_loop_vec_info): Add max_vectorization_factor.
12360         (LOOP_VINFO_MAX_VECT_FACTOR): New macro.
12361         (LOOP_VINFO_ORIG_VECT_FACTOR): Replace with...
12362         (LOOP_VINFO_ORIG_MAX_VECT_FACTOR): ...this new macro.
12363         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Update
12364         accordingly.
12365         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
12366         max_vectorization_factor.
12367         (vect_analyze_loop_2): Set LOOP_VINFO_MAX_VECT_FACTOR.
12369 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
12370             Alan Hayward  <alan.hayward@arm.com>
12371             David Sherwood  <david.sherwood@arm.com>
12373         * tree-vectorizer.h (vect_min_worthwhile_factor): Delete.
12374         (vect_worthwhile_without_simd_p): Declare.
12375         * tree-vect-loop.c (vect_worthwhile_without_simd_p): New function.
12376         (vectorizable_reduction): Use it.
12377         * tree-vect-stmts.c (vectorizable_shift): Likewise.
12378         (vectorizable_operation): Likewise.
12380 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
12381             Alan Hayward  <alan.hayward@arm.com>
12382             David Sherwood  <david.sherwood@arm.com>
12384         * tree-vectorizer.h (vect_get_num_copies): New function.
12385         * tree-vect-data-refs.c (vect_get_data_access_cost): Use it.
12386         * tree-vect-loop.c (vectorizable_reduction): Likewise.
12387         (vectorizable_induction): Likewise.
12388         (vectorizable_live_operation): Likewise.
12389         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
12390         (vectorizable_bswap): Likewise.
12391         (vectorizable_call): Likewise.
12392         (vectorizable_conversion): Likewise.
12393         (vectorizable_assignment): Likewise.
12394         (vectorizable_shift): Likewise.
12395         (vectorizable_operation): Likewise.
12396         (vectorizable_store): Likewise.
12397         (vectorizable_load): Likewise.
12398         (vectorizable_condition): Likewise.
12399         (vectorizable_comparison): Likewise.
12400         (vect_analyze_stmt): Pass the slp node to vectorizable_live_operation.
12402 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
12403             Alan Hayward  <alan.hayward@arm.com>
12404             David Sherwood  <david.sherwood@arm.com>
12406         * tree-vect-loop.c (vectorizable_induction): Use gimple_build instead
12407         of vect_init_vector.
12409 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
12410             Alan Hayward  <alan.hayward@arm.com>
12411             David Sherwood  <david.sherwood@arm.com>
12413         * gimple-fold.h (gimple_build_vector_from_val): Declare, and provide
12414         an inline wrapper that provides a location.
12415         (gimple_build_vector): Likewise.
12416         * gimple-fold.c (gimple_build_vector_from_val): New function.
12417         (gimple_build_vector): Likewise.
12418         * tree-vect-loop.c (get_initial_def_for_reduction): Use the new
12419         functions to build the initial value.  Always return a gimple value.
12420         (get_initial_defs_for_reduction): Likewise.  Only compute
12421         neutral_vec once.
12422         (vect_create_epilog_for_reduction): Don't call force_gimple_operand or
12423         vect_init_vector on the results from get_initial_def(s)_for_reduction.
12424         (vectorizable_induction): Use gimple_build_vector rather than
12425         vect_init_vector.
12427 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
12428             Alan Hayward  <alan.hayward@arm.com>
12429             David Sherwood  <david.sherwood@arm.com>
12431         * target.h (vec_perm_indices): New typedef.
12432         (auto_vec_perm_indices): Likewise.
12433         * optabs-query.h: Include target.h
12434         (can_vec_perm_p): Take a vec_perm_indices *.
12435         * optabs-query.c (can_vec_perm_p): Likewise.
12436         (can_mult_highpart_p): Update accordingly.  Use auto_vec_perm_indices.
12437         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
12438         * tree-vect-generic.c (lower_vec_perm): Likewise.
12439         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
12440         (vect_grouped_load_supported): Likewise.
12441         (vect_shift_permute_load_chain): Likewise.
12442         (vect_permute_store_chain): Use auto_vec_perm_indices.
12443         (vect_permute_load_chain): Likewise.
12444         * fold-const.c (fold_vec_perm): Take vec_perm_indices.
12445         (fold_ternary_loc): Update accordingly.  Use auto_vec_perm_indices.
12446         Update uses of can_vec_perm_p.
12447         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Replace the
12448         mode with a number of elements.  Take a vec_perm_indices *.
12449         (vect_create_epilog_for_reduction): Update accordingly.
12450         Use auto_vec_perm_indices.
12451         (have_whole_vector_shift): Likewise.  Update call to can_vec_perm_p.
12452         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
12453         (vect_transform_slp_perm_load): Likewise.
12454         (vect_schedule_slp_instance): Use auto_vec_perm_indices.
12455         * tree-vectorizer.h (vect_gen_perm_mask_any): Take a vec_perm_indices.
12456         (vect_gen_perm_mask_checked): Likewise.
12457         * tree-vect-stmts.c (vect_gen_perm_mask_any): Take a vec_perm_indices.
12458         (vect_gen_perm_mask_checked): Likewise.
12459         (vectorizable_mask_load_store): Use auto_vec_perm_indices.
12460         (vectorizable_store): Likewise.
12461         (vectorizable_load): Likewise.
12462         (perm_mask_for_reverse): Likewise.  Update call to can_vec_perm_p.
12463         (vectorizable_bswap): Likewise.
12465 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
12466             Alan Hayward  <alan.hayward@arm.com>
12467             David Sherwood  <david.sherwood@arm.com>
12469         * tree.h (build_vector): Take a vec<tree> instead of a tree *.
12470         * tree.c (build_vector): Likewise.
12471         (build_vector_from_ctor): Update accordingly.
12472         (build_vector_from_val): Likewise.
12473         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
12474         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
12475         * tree-vect-generic.c (add_rshift): Likewise.
12476         (expand_vector_divmod): Likewise.
12477         (optimize_vector_constructor): Likewise.
12478         * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
12479         (vect_transform_slp_perm_load): Likewise.
12480         (vect_schedule_slp_instance): Likewise.
12481         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
12482         (vectorizable_call): Likewise.
12483         (vect_gen_perm_mask_any): Likewise.  Add elements in order.
12484         * expmed.c (make_tree): Likewise.
12485         * fold-const.c (fold_negate_expr_1): Use auto_vec<tree> when building
12486         a vector passed to build_vector.
12487         (fold_convert_const): Likewise.
12488         (exact_inverse): Likewise.
12489         (fold_ternary_loc): Likewise.
12490         (fold_relational_const): Likewise.
12491         (const_binop): Likewise.  Use VECTOR_CST_ELT directly when operating
12492         on VECTOR_CSTs, rather than going through vec_cst_ctor_to_array.
12493         (const_unop): Likewise.  Store the reduction accumulator in a
12494         variable rather than an array.
12495         (vec_cst_ctor_to_array): Take the number of elements as a parameter.
12496         (fold_vec_perm): Update calls accordingly.  Use auto_vec<tree> for
12497         the new vector, rather than constructing it after the input arrays.
12498         (native_interpret_vector): Use auto_vec<tree> when building
12499         a vector passed to build_vector.  Add elements in order.
12500         * tree-vect-loop.c (get_initial_defs_for_reduction): Use
12501         auto_vec<tree> when building a vector passed to build_vector.
12502         (vect_create_epilog_for_reduction): Likewise.
12503         (vectorizable_induction): Likewise.
12504         (get_initial_def_for_reduction): Likewise.  Fix indentation of
12505         case statements.
12506         * config/sparc/sparc.c (sparc_handle_vis_mul8x16): Change n_elts
12507         to a vec<tree> *.
12508         (sparc_fold_builtin): Use auto_vec<tree> when building a vector
12509         passed to build_vector.
12511 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
12512             Alan Hayward  <alan.hayward@arm.com>
12513             David Sherwood  <david.sherwood@arm.com>
12515         * tree-core.h (tree_base::u): Add an "nelts" field.
12516         (tree_vector): Use VECTOR_CST_NELTS as the length.
12517         * tree.c (tree_size): Likewise.
12518         (make_vector): Initialize VECTOR_CST_NELTS.
12519         * tree.h (VECTOR_CST_NELTS): Use the u.nelts field.
12520         * cfgexpand.c (expand_debug_expr): Use VECTOR_CST_NELTS instead of
12521         TYPE_VECTOR_SUBPARTS.
12522         * expr.c (const_vector_mask_from_tree): Consistently use "units"
12523         as the number of units, setting it from VECTOR_CST_NELTS.
12524         (const_vector_from_tree): Likewise.
12525         * fold-const.c (negate_expr_p): Use VECTOR_CST_NELTS instead of
12526         TYPE_VECTOR_SUBPARTS for the number of elements in a VECTOR_CST.
12527         (fold_negate_expr_1): Likewise.
12528         (fold_convert_const): Likewise.
12529         (const_binop): Likewise.  Differentiate the number of output and
12530         input elements.
12531         (const_unop): Likewise.
12532         (fold_ternary_loc): Use VECTOR_CST_NELTS for the number of elements
12533         in a VECTOR_CST, asserting that it is the same as TYPE_VECTOR_SUBPARTS
12534         in cases that did the opposite.
12536 2017-09-14  Richard Biener  <rguenther@suse.de>
12538         * tree-ssa-sccvn.c (visit_phi): Merge undefined values similar
12539         to VN_TOP.
12541 2017-09-14  Eric Botcazou  <ebotcazou@adacore.com>
12543         * dwarf2out.c (dwarf2out_source_line): Remove superfluous test.
12545 2017-09-14  Jakub Jelinek  <jakub@redhat.com>
12547         PR target/81325
12548         * cfgbuild.c (find_bb_boundaries): Ignore debug insns in decisions
12549         if and where to split a bb, except for splitting before debug insn
12550         sequences followed by non-label real insn.  Delete debug insns
12551         in between basic blocks.
12553         * combine.c (make_compound_operation_int): Formatting fixes.
12555         * config/alpha/elf.h (LINK_EH_SPEC): Add -static-pie support.
12556         * config/alpha/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
12557         * config/netbsd.h (LINK_EH_SPEC): Likewise.
12558         * config/sol2.h (LINK_EH_SPEC): Likewise.
12559         * config/arm/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
12560         * config/s390/linux.h (LINK_SPEC): Likewise.
12561         * config/freebsd.h (LINK_EH_SPEC): Likewise.
12562         * config/openbsd.h (LINK_EH_SPEC): Likewise.
12563         * config/lm32/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
12564         * config/aarch64/aarch64-linux.h (LINUX_TARGET_LINK_SPEC): Likewise.
12565         * config/powerpcspe/sysv4.h (LINK_EH_SPEC): Likewise.
12566         * config/bfin/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
12567         * config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Fix a typo.
12568         * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Formatting fix.
12570 2017-09-13  Jakub Jelinek  <jakub@redhat.com>
12572         * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Add -static-pie
12573         support.
12574         (ENDFILE_LINUX_SPEC): Likewise.
12575         (LINK_EH_SPEC): Likewise.
12576         * config/rs6000/linux64.h (LINK_SHLIB_SPEC): Likewise.
12577         (LINK_OS_LINUX_SPEC32): Likewise.
12578         (LINK_OS_LINUX_SPEC64): Likewise.
12579         * config/rs6000/linux.h (LINK_SHLIB_SPEC): Likewise.
12580         (LINK_OS_LINUX_SPEC): Likewise.
12582 2017-09-13  Martin Liska  <mliska@suse.cz>
12584         PR middle-end/82154
12585         * stmt.c (expand_sjlj_dispatch_table): Use CASE_LOW when
12586         CASE_HIGH is NULL_TREE.
12588 2017-09-13  Richard Sandiford  <richard.sandiford@linaro.org>
12589             Alan Hayward  <alan.hayward@arm.com>
12590             David Sherwood  <david.sherwood@arm.com>
12592         * target.def (secondary_memory_needed): New hook.
12593         (secondary_reload): Refer to TARGET_SECONDARY_MEMORY_NEEDED
12594         instead of SECONDARY_MEMORY_NEEDED.
12595         (secondary_memory_needed_mode): Likewise.
12596         * hooks.h (hook_bool_mode_reg_class_t_reg_class_t_false): Declare.
12597         * hooks.c (hook_bool_mode_reg_class_t_reg_class_t_false): New function.
12598         * doc/tm.texi.in (SECONDARY_MEMORY_NEEDED): Replace with...
12599         (TARGET_SECONDARY_MEMORY_NEEDED): ...this.
12600         (SECONDARY_MEMORY_NEEDED_RTX): Update reference accordingly.
12601         * doc/tm.texi: Regenerate.
12602         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED): Delete.
12603         * config/alpha/alpha.c (alpha_secondary_memory_needed): New function.
12604         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
12605         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED): Delete.
12606         * config/i386/i386-protos.h (ix86_secondary_memory_needed): Delete.
12607         * config/i386/i386.c (inline_secondary_memory_needed): Put the
12608         mode argument first and change the reg_class arguments to reg_class_t.
12609         (ix86_secondary_memory_needed): Likewise.  Remove the strict parameter.
12610         Make static.  Update the call to inline_secondary_memory_needed.
12611         (ix86_register_move_cost): Update the call to
12612         inline_secondary_memory_needed.
12613         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
12614         * config/ia64/ia64.h (SECONDARY_MEMORY_NEEDED): Delete commented-out
12615         definition.
12616         * config/ia64/ia64.c (spill_xfmode_rfmode_operand): Refer to
12617         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
12618         in comment.
12619         * config/mips/mips.h (SECONDARY_MEMORY_NEEDED): Delete.
12620         * config/mips/mips-protos.h (mips_secondary_memory_needed): Delete.
12621         * config/mips/mips.c (mips_secondary_memory_needed): Make static
12622         and match hook interface.  Add comment from mips.h.
12623         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
12624         * config/mmix/mmix.md (truncdfsf2): Refer to
12625         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
12626         in comment.
12627         * config/pa/pa-64.h (SECONDARY_MEMORY_NEEDED): Rename to...
12628         (PA_SECONDARY_MEMORY_NEEDED): ...this, and put the mode argument first.
12629         * config/pa/pa.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
12630         (pa_secondary_memory_needed): New function.
12631         * config/pdp11/pdp11.h (SECONDARY_MEMORY_NEEDED): Delete.
12632         * config/pdp11/pdp11-protos.h (pdp11_secondary_memory_needed): Delete.
12633         * config/pdp11/pdp11.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
12634         (pdp11_secondary_memory_needed): Make static and match hook interface.
12635         * config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED): Delete.
12636         * config/powerpcspe/powerpcspe-protos.h
12637         (rs6000_secondary_memory_needed_ptr): Delete.
12638         * config/powerpcspe/powerpcspe.c (rs6000_secondary_memory_needed_ptr):
12639         Delete.
12640         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
12641         (rs6000_option_override_internal): Assign to
12642         targetm.secondary_memory_needed rather than
12643         rs6000_secondary_memory_needed_ptr.
12644         (rs6000_secondary_memory_needed): Match hook interface.
12645         (rs6000_debug_secondary_memory_needed): Likewise.
12646         * config/riscv/riscv.h (SECONDARY_MEMORY_NEEDED): Delete.
12647         * config/riscv/riscv.c (riscv_secondary_memory_needed): New function.
12648         (riscv_register_move_cost): Use it instead of SECONDARY_MEMORY_NEEDED.
12649         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
12650         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED): Delete.
12651         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_ptr):
12652         Delete.
12653         * config/rs6000/rs6000.c (rs6000_secondary_memory_needed_ptr): Delete.
12654         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
12655         (rs6000_option_override_internal): Assign to
12656         targetm.secondary_memory_needed rather than
12657         rs6000_secondary_memory_needed_ptr.
12658         (rs6000_secondary_memory_needed): Match hook interface.
12659         (rs6000_debug_secondary_memory_needed): Likewise.
12660         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED): Delete.
12661         * config/s390/s390.c (s390_secondary_memory_needed): New function.
12662         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
12663         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED): Delete.
12664         * config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
12665         (sparc_secondary_memory_needed): New function.
12666         * lra-constraints.c (check_and_process_move): Refer to
12667         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
12668         in comment.
12669         (curr_insn_transform): Likewise.
12670         (process_alt_operands): Use targetm.secondary_memory_needed
12671         instead of TARGET_SECONDARY_MEMORY_NEEDED.
12672         (check_secondary_memory_needed_p): Likewise.
12673         (choose_split_class): Likewise.
12674         * reload.c: Unconditionally include code that was previously
12675         conditional on SECONDARY_MEMORY_NEEDED.
12676         (push_secondary_reload): Use targetm.secondary_memory_needed
12677         instead of TARGET_SECONDARY_MEMORY_NEEDED.
12678         (push_reload): Likewise.
12679         * reload1.c: Unconditionally include code that was previously
12680         conditional on SECONDARY_MEMORY_NEEDED.
12681         (choose_reload_regs): Use targetm.secondary_memory_needed
12682         instead of TARGET_SECONDARY_MEMORY_NEEDED.
12683         (gen_reload): Likewise.
12684         * system.h (SECONDARY_MEMORY_NEEDED): Poison.
12686 2017-09-13  Richard Sandiford  <richard.sandiford@linaro.org>
12687             Alan Hayward  <alan.hayward@arm.com>
12688             David Sherwood  <david.sherwood@arm.com>
12690         * target.def (secondary_memory_needed_mode): New hook:
12691         * targhooks.c (default_secondary_memory_needed_mode): Declare.
12692         * targhooks.h (default_secondary_memory_needed_mode): New function.
12693         * doc/tm.texi.in (SECONDARY_MEMORY_NEEDED_MODE): Replace with...
12694         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): ...this.
12695         * doc/tm.texi: Regenerate.
12696         * lra-constraints.c (check_and_process_move): Use
12697         targetm.secondary_memory_needed_mode instead of
12698         TARGET_SECONDARY_MEMORY_NEEDED_MODE.
12699         (curr_insn_transform): Likewise.
12700         * reload.c (get_secondary_mem): Likewise.
12701         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
12702         * config/alpha/alpha.c (alpha_secondary_memory_needed_mode): New
12703         function.
12704         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
12705         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
12706         * config/i386/i386.c (ix86_secondary_memory_needed_mode): New function.
12707         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
12708         * config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED_MODE):
12709         Delete.
12710         * config/powerpcspe/powerpcspe-protos.h
12711         (rs6000_secondary_memory_needed_mode): Delete.
12712         * config/powerpcspe/powerpcspe.c
12713         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
12714         (rs6000_secondary_memory_needed_mode): Make static.
12715         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
12716         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_mode):
12717         Delete.
12718         * config/rs6000/rs6000.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
12719         Redefine.
12720         (rs6000_secondary_memory_needed_mode): Make static.
12721         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
12722         * config/s390/s390.c (s390_secondary_memory_needed_mode): New function.
12723         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
12724         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
12725         * config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
12726         Redefine.
12727         (sparc_secondary_memory_needed_mode): New function.
12728         * system.h (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Poison.
12730 2017-09-13  Jackson Woodruff  <jackson.woodruff@arm.com>
12732         * config/aarch64/constraints.md (Umq): New constraint.
12733         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>):
12734         Change to use Umq.
12735         (mov<mode>): Update condition.
12737 2017-09-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12739         * gimple-ssa-store-merging.c (sort_by_bitpos): Compare store order
12740         when bitposition is the same.
12742 2017-09-13  Richard Biener  <rguenther@suse.de>
12744         * dwarf2out.c (output_die_symbol): Remove.
12745         (output_die): Do not output a DIEs symbol.
12747 2017-09-13  Richard Biener  <rguenther@suse.de>
12749         PR middle-end/82128
12750         * gimple-fold.c (gimple_fold_call): Update SSA name in-place to
12751         default-def to avoid breaking iterator update with the weird
12752         interaction with cgraph_update_edges_for_call_stmt_node.
12754 2017-09-13  Richard Biener  <rguenther@suse.de>
12756         * tree-cfg.c (verify_gimple_assign_binary): Add verification
12757         for WIDEN_SUM_EXPR, VEC_WIDEN_MULT_{HI,LO,EVEN,ODD}_EXPR,
12758         VEC_PACK_{TRUNC,SAT,FIX_TRUNC}_EXPR.
12759         (verify_gimple_assign_ternary): Add verification for DOT_PROD_EXPR.
12761 2017-09-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
12763         * config/aarch64/aarch64.c (aarch64_override_options_after_change_1):
12764         Disable pc relative literal load irrespective of
12765         TARGET_FIX_ERR_A53_84341 for default.
12767 2017-09-12  Eric Botcazou  <ebotcazou@adacore.com>
12769         * config/sparc/sparc.c (output_return): Output the source location of
12770         the insn in the delay slot, if any.
12771         (output_sibcall): Likewise.
12773 2017-09-12  H.J. Lu  <hongjiu.lu@intel.com>
12775         PR driver/81498
12776         * common.opt (-static-pie): New alias.
12777         (shared): Negate static-pie.
12778         (-no-pie): Update help text.
12779         (-pie): Likewise.
12780         (static-pie): New option.
12781         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Add
12782         -static-pie support.
12783         (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
12784         (LINK_EH_SPEC): Likewise.
12785         (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
12786         * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
12787         * config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
12788         * gcc.c (LINK_COMMAND_SPEC): Likewise.
12789         (init_gcc_specs): Likewise.
12790         (init_spec): Likewise.
12791         (display_help): Update help message for -pie.
12792         * doc/invoke.texi: Update -pie, -no-pie and -static.  Document
12793         -static-pie.
12795 2017-09-12  Wilco Dijkstra  <wdijkstr@arm.com>
12797         * config/aarch64/aarch64.md (movsi_aarch64): Remove all '*'.
12798         (movdi_aarch64): Likewise.
12799         (movti_aarch64): Likewise.
12801 2017-09-12 Simon Wright <simon@pushface.org>
12803         PR target/80204
12804         * config/darwin-driver.c (darwin_find_version_from_kernel): Eliminate
12805         calculation of the minor version, always output as 0.
12807 2017-09-12  Jakub Jelinek  <jakub@redhat.com>
12809         PR target/82112
12810         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
12811         ALTIVEC_BUILTIN_VEC_LD if arg1 has array type call default_conversion
12812         on it early, rather than manual conversion late.  For
12813         ALTIVEC_BUILTIN_VEC_ST if arg2 has array type call default_conversion
12814         instead of performing manual conversion.
12816 2017-09-12  Carl Love  <cel@us.ibm.com>
12818         * config/rs6000/altivec.md (vec_widen_umult_even_v4si,
12819         vec_widen_smult_even_v4si): Add define expands for vmuleuw, vmulesw,
12820         vmulouw, vmulosw.
12821         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
12822         VMULOSW): Add definitions.
12823         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
12824         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
12825         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
12826         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
12827         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
12829 2017-09-12  James Greenhalgh  <james.greenhalgh@arm.com>
12831         * config/aarch64/aarch64.md (movdi_aarch64): Set load/store
12832         types correctly.
12833         (movti_aarch64): Likewise.
12834         (movdf_aarch64): Likewise.
12835         (movtf_aarch64): Likewise.
12836         (load_pairdi): Likewise.
12837         (store_pairdi): Likewise.
12838         (load_pairdf): Likewise.
12839         (store_pairdf): Likewise.
12840         (loadwb_pair<GPI:mode>_<P:mode>): Likewise.
12841         (storewb_pair<GPI:mode>_<P:mode>): Likewise.
12842         (ldr_got_small_<mode>): Likewise.
12843         (ldr_got_small_28k_<mode>): Likewise.
12844         (ldr_got_tiny): Likewise.
12845         * config/aarch64/iterators.md (ldst_sz): New.
12846         (ldpstp_sz): Likewise.
12847         * config/aarch64/thunderx.md (thunderx_storepair): Split store_8
12848         to store_16.
12849         (thunderx_load): Split load_8 to load_16.
12850         * config/aarch64/thunderx2t99.md (thunderx2t99_loadpair): Split
12851         load_8 to load_16.
12852         (thunderx2t99_storepair_basic): Split store_8 to store_16.
12853         * config/arm/xgene1.md (xgene1_load_pair): Split load_8 to load_16.
12854         (xgene1_store_pair): Split store_8 to store_16.
12855         * config/aarch64/falkor.md (falkor_ld_3_ld): Split load_8 to load_16.
12856         (falkor_st_0_st_sd): Split store_8 to store_16.
12858 2017-09-12  James Greenhalgh  <james.greenhalgh@arm.com>
12860         * config/arm/types.md (type): Rename load1/2/3/4 to load_4/8/12/16
12861         and store1/2/3/4 to store_4/8/12/16.
12862         * config/aarch64/aarch64.md: Update for rename.
12863         * config/arm/arm.md: Likewise.: Likewise.
12864         * config/arm/arm.c: Likewise.
12865         * config/arm/thumb1.md: Likewise.
12866         * config/arm/thumb2.md: Likewise.
12867         * config/arm/vfp.md: Likewise.
12868         * config/arm/arm-generic.md: Likewise.
12869         * config/arm/arm1020e.md: Likewise.
12870         * config/arm/arm1026ejs.md: Likewise.
12871         * config/arm/arm1136jfs.md: Likewise.
12872         * config/arm/arm926ejs.md: Likewise.
12873         * config/arm/cortex-a15.md: Likewise.
12874         * config/arm/cortex-a17.md: Likewise.
12875         * config/arm/cortex-a5.md: Likewise.
12876         * config/arm/cortex-a53.md: Likewise.
12877         * config/arm/cortex-a57.md: Likewise.
12878         * config/arm/cortex-a7.md: Likewise.
12879         * config/arm/cortex-a8.md: Likewise.
12880         * config/arm/cortex-a9.md: Likewise.
12881         * config/arm/cortex-m4.md: Likewise.
12882         * config/arm/cortex-m7.md: Likewise.
12883         * config/arm/cortex-r4.md: Likewise.
12884         * config/arm/exynos-m1.md: Likewise.
12885         * config/arm/fa526.md: Likewise.
12886         * config/arm/fa606te.md: Likewise.
12887         * config/arm/fa626te.md: Likewise.
12888         * config/arm/fa726te.md: Likewise.
12889         * config/arm/fmp626.md: Likewise.
12890         * config/arm/iwmmxt.md: Likewise.
12891         * config/arm/ldmstm.md: Likewise.
12892         * config/arm/marvell-pj4.md: Likewise.
12893         * config/arm/xgene1.md: Likewise.
12894         * config/aarch64/thunderx.md: Likewise.
12895         * config/aarch64/thunderx2t99.md: Likewise.
12896         * config/aarch64/falkor.md: Likewise.
12898 2017-09-12  Martin Liska  <mliska@suse.cz>
12900         * attribs.c (private_lookup_attribute): New function.
12901         * attribs.h (private_lookup_attribute): Declared here.
12902         (lookup_attribute): Called from this place.
12904 2017-09-12  Richard Biener  <rguenther@suse.de>
12906         PR tree-optimization/82157
12907         * tree-ssa-pre.c (remove_dead_inserted_code): Do not remove
12908         stmts with side-effects.
12910 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
12911             Alan Hayward  <alan.hayward@arm.com>
12912             David Sherwood <david.sherwood@arm.com>
12914         * target.def (hard_regno_nregs): New hook.
12915         (class_max_nregs): Refer to it instead of HARD_REGNO_NREGS.
12916         * targhooks.h (default_hard_regno_nregs): Declare.
12917         * targhooks.c (default_hard_regno_nregs): New function.
12918         * doc/tm.texi.in (HARD_REGNO_NREGS): Replace with...
12919         (TARGET_HARD_REGNO_NREGS): ...this hook.
12920         (HARD_REGNO_NREGS_HAS_PADDING): Update accordingly.
12921         (CLASS_MAX_NREGS): Likewise.
12922         * doc/tm.texi: Regenerate.
12923         * reginfo.c (init_reg_modes_target): Use targetm.hard_regno_nregs
12924         instead of HARD_REGNO_NREGS.
12925         * rtl.h (REG_NREGS): Refer to TARGET_HARD_REGNO_NREGS rather than
12926         HARD_REGNO_NREGS in the comment.
12927         * config/aarch64/aarch64.h (HARD_REGNO_NREGS): Delete.
12928         * config/aarch64/aarch64-protos.h (aarch64_hard_regno_nregs): Delete.
12929         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs): Make static.
12930         Return an unsigned int.
12931         (TARGET_HARD_REGNO_NREGS): Redefine.
12932         * config/alpha/alpha.h (HARD_REGNO_NREGS): Delete.
12933         * config/arc/arc.h (HARD_REGNO_NREGS): Delete.
12934         * config/arc/arc.c (TARGET_HARD_REGNO_NREGS): Redefine.
12935         (arc_hard_regno_nregs): New function.
12936         * config/arm/arm.h (HARD_REGNO_NREGS): Delete.
12937         * config/arm/arm.c (TARGET_HARD_REGNO_NREGS): Redefine.
12938         (arm_hard_regno_nregs): New function.
12939         * config/avr/avr.h (HARD_REGNO_NREGS): Delete.
12940         * config/bfin/bfin.h (HARD_REGNO_NREGS): Delete.
12941         * config/bfin/bfin.c (bfin_hard_regno_nregs): New function.
12942         (TARGET_HARD_REGNO_NREGS): Redefine.
12943         * config/c6x/c6x.h (HARD_REGNO_NREGS): Delete.
12944         * config/cr16/cr16.h (LONG_REG_P): Use targetm.hard_regno_nregs.
12945         (HARD_REGNO_NREGS): Delete.
12946         * config/cr16/cr16.c (TARGET_HARD_REGNO_NREGS): Redefine.
12947         (cr16_hard_regno_nregs): New function.
12948         (cr16_memory_move_cost): Use it instead of HARD_REGNO_NREGS.
12949         * config/cris/cris.h (HARD_REGNO_NREGS): Delete.
12950         * config/cris/cris.c (TARGET_HARD_REGNO_NREGS): Redefine.
12951         (cris_hard_regno_nregs): New function.
12952         * config/epiphany/epiphany.h (HARD_REGNO_NREGS): Delete.
12953         * config/fr30/fr30.h (HARD_REGNO_NREGS): Delete.
12954         (CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
12955         * config/frv/frv.h (HARD_REGNO_NREGS): Delete.
12956         (CLASS_MAX_NREGS): Remove outdated copy of documentation.
12957         * config/frv/frv-protos.h (frv_hard_regno_nregs): Delete.
12958         * config/frv/frv.c (TARGET_HARD_REGNO_NREGS): Redefine.
12959         (frv_hard_regno_nregs): Make static.  Take and return an
12960         unsigned int.
12961         (frv_class_max_nregs): Remove outdated copy of documentation.
12962         * config/ft32/ft32.h (HARD_REGNO_NREGS): Delete.
12963         * config/h8300/h8300.h (HARD_REGNO_NREGS): Delete.
12964         * config/h8300/h8300-protos.h (h8300_hard_regno_nregs): Delete.
12965         * config/h8300/h8300.c (h8300_hard_regno_nregs): Delete.
12966         * config/i386/i386.h (HARD_REGNO_NREGS): Delete.
12967         * config/i386/i386.c (ix86_hard_regno_nregs): New function.
12968         (TARGET_HARD_REGNO_NREGS): Redefine.
12969         * config/ia64/ia64.h (HARD_REGNO_NREGS): Delete.
12970         (CLASS_MAX_NREGS): Update comment.
12971         * config/ia64/ia64.c (TARGET_HARD_REGNO_NREGS): Redefine.
12972         (ia64_hard_regno_nregs): New function.
12973         * config/iq2000/iq2000.h (HARD_REGNO_NREGS): Delete.
12974         * config/lm32/lm32.h (HARD_REGNO_NREGS): Delete.
12975         * config/m32c/m32c.h (HARD_REGNO_NREGS): Delete.
12976         * config/m32c/m32c-protos.h (m32c_hard_regno_nregs): Delete.
12977         * config/m32c/m32c.c (m32c_hard_regno_nregs_1): Take and return
12978         an unsigned int.
12979         (m32c_hard_regno_nregs): Likewise.  Make static.
12980         (TARGET_HARD_REGNO_NREGS): Redefine.
12981         * config/m32r/m32r.h (HARD_REGNO_NREGS): Delete.
12982         * config/m68k/m68k.h (HARD_REGNO_NREGS): Delete.
12983         * config/m68k/m68k.c (TARGET_HARD_REGNO_NREGS): Redefine.
12984         (m68k_hard_regno_nregs): New function.
12985         * config/mcore/mcore.h (HARD_REGNO_NREGS): Delete.
12986         * config/microblaze/microblaze.h (HARD_REGNO_NREGS): Delete.
12987         * config/mips/mips.h (HARD_REGNO_NREGS): Delete.
12988         * config/mips/mips-protos.h (mips_hard_regno_nregs): Delete.
12989         * config/mips/mips.c (mips_hard_regno_nregs): Make static.
12990         Take and return an unsigned int.
12991         (TARGET_HARD_REGNO_NREGS): Redefine.
12992         * config/mmix/mmix.h (HARD_REGNO_NREGS): Delete.
12993         (CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
12994         * config/mn10300/mn10300.h (HARD_REGNO_NREGS): Delete.
12995         * config/moxie/moxie.h (HARD_REGNO_NREGS): Delete.
12996         * config/msp430/msp430.h (HARD_REGNO_NREGS): Delete.
12997         * config/msp430/msp430-protos.h (msp430_hard_regno_nregs): Delete.
12998         * config/msp430/msp430.c (TARGET_HARD_REGNO_NREGS): Redefine.
12999         (msp430_hard_regno_nregs): Make static.  Take and return an
13000         unsigned int.
13001         * config/nds32/nds32.h (HARD_REGNO_NREGS): Delete.
13002         * config/nds32/nds32-protos.h (nds32_hard_regno_nregs): Delete.
13003         * config/nds32/nds32.c (nds32_hard_regno_nregs): Delete.
13004         (nds32_hard_regno_mode_ok): Use targetm.hard_regno_nregs.
13005         * config/nios2/nios2.h (HARD_REGNO_NREGS): Delete.
13006         * config/nvptx/nvptx.h (HARD_REGNO_NREGS): Delete.
13007         * config/nvptx/nvptx.c (nvptx_hard_regno_nregs): New function.
13008         (TARGET_HARD_REGNO_NREGS): Redefine.
13009         * config/pa/pa32-regs.h (HARD_REGNO_NREGS): Rename to...
13010         (PA_HARD_REGNO_NREGS): ...this.
13011         * config/pa/pa64-regs.h (HARD_REGNO_NREGS): Rename to...
13012         (PA_HARD_REGNO_NREGS): ...this.
13013         * config/pa/pa.c (TARGET_HARD_REGNO_NREGS): Redefine.
13014         (pa_hard_regno_nregs): New function.
13015         * config/pdp11/pdp11.h (HARD_REGNO_NREGS): Delete.
13016         * config/pdp11/pdp11.c (TARGET_HARD_REGNO_NREGS): Redefine.
13017         (pdp11_hard_regno_nregs): New function.
13018         * config/powerpcspe/powerpcspe.h (HARD_REGNO_NREGS): Delete.
13019         * config/powerpcspe/powerpcspe.c (TARGET_HARD_REGNO_NREGS): Redefine.
13020         (rs6000_hard_regno_nregs_hook): New function.
13021         * config/riscv/riscv.h (HARD_REGNO_NREGS): Delete.
13022         * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): Delete.
13023         * config/riscv/riscv.c (riscv_hard_regno_nregs): Make static.
13024         Take and return an unsigned int.  Move earlier in file.
13025         (TARGET_HARD_REGNO_NREGS): Redefine.
13026         * config/rl78/rl78.h (HARD_REGNO_NREGS): Delete.
13027         * config/rl78/rl78-protos.h (rl78_hard_regno_nregs): Delete.
13028         * config/rl78/rl78.c (TARGET_HARD_REGNO_NREGS): Reefine.
13029         (rl78_hard_regno_nregs): Make static.  Take and return an
13030         unsigned int.
13031         * config/rs6000/rs6000.h (HARD_REGNO_NREGS): Delete.
13032         * config/rs6000/rs6000.c (TARGET_HARD_REGNO_NREGS): Redefine.
13033         (rs6000_hard_regno_nregs_hook): New function.
13034         * config/rx/rx.h (HARD_REGNO_NREGS): Delete.
13035         * config/rx/rx.c (rx_hard_regno_nregs): New function.
13036         (TARGET_HARD_REGNO_NREGS): Redefine.
13037         * config/s390/s390.h (HARD_REGNO_NREGS): Delete.
13038         * config/s390/s390.c (REGNO_PAIR_OK): Use s390_hard_regno_nregs
13039         instead of HARD_REGNO_NREGS.
13040         (s390_hard_regno_nregs): New function.
13041         (s390_hard_regno_mode_ok): Add comment from s390.h.
13042         (TARGET_HARD_REGNO_NREGS): Redefine.
13043         * config/sh/sh.h (HARD_REGNO_NREGS): Delete.
13044         * config/sh/sh.c (TARGET_HARD_REGNO_NREGS): Redefine.
13045         (sh_hard_regno_nregs): New function.
13046         (sh_pass_in_reg_p): Use it.
13047         * config/sparc/sparc.h (HARD_REGNO_NREGS): Delete.
13048         * config/sparc/sparc.c (TARGET_HARD_REGNO_NREGS): Redefine.
13049         (sparc_hard_regno_nregs): New function.
13050         * config/spu/spu.h (HARD_REGNO_NREGS): Delete.
13051         * config/spu/spu.c (spu_hard_regno_nregs): New function.
13052         (spu_function_arg_advance): Use it, supplying a valid register number.
13053         (TARGET_HARD_REGNO_NREGS): Redefine.
13054         * config/stormy16/stormy16.h (HARD_REGNO_NREGS): Delete.
13055         * config/tilegx/tilegx.h (HARD_REGNO_NREGS): Delete.
13056         * config/tilepro/tilepro.h (HARD_REGNO_NREGS): Delete.
13057         * config/v850/v850.h (HARD_REGNO_NREGS): Delete.
13058         * config/vax/vax.h (HARD_REGNO_NREGS): Delete.
13059         * config/visium/visium.h (HARD_REGNO_NREGS): Delete.
13060         (CLASS_MAX_NREGS): Remove copy of old documentation.
13061         * config/visium/visium.c (TARGET_HARD_REGNO_NREGS): Redefine.
13062         (visium_hard_regno_nregs): New function.
13063         (visium_hard_regno_mode_ok): Use it instead of HARD_REGNO_NREGS.
13064         * config/xtensa/xtensa.h (HARD_REGNO_NREGS): Delete.
13065         * config/xtensa/xtensa.c (TARGET_HARD_REGNO_NREGS): Redefine.
13066         xtensa_hard_regno_nregs): New function.
13067         * system.h (HARD_REGNO_NREGS): Poison.
13069 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
13071         * config/arm/arm.h (THUMB_SECONDARY_INPUT_RELOAD_CLASS): Use
13072         hard_regno_nregs instead of HARD_REGNO_NREGS.
13073         (THUMB_SECONDARY_OUTPUT_RELOAD_CLASS): Likewise.
13074         * config/c6x/c6x.c (c6x_expand_prologue): Likewise.
13075         (c6x_expand_epilogue): Likewise.
13076         * config/frv/frv.c (frv_alloc_temp_reg): Likewise.
13077         (frv_read_iacc_argument): Likewise.
13078         * config/sh/sh.c: Include regs.h.
13079         (sh_print_operand): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
13080         (regs_used): Likewise.
13081         (output_stack_adjust): Likewise.
13082         * config/xtensa/xtensa.c (xtensa_copy_incoming_a7): Likewise.
13083         * expmed.c: Include regs.h.
13084         (store_bit_field_1): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
13085         * ree.c: Include regs.h.
13086         (combine_reaching_defs): Use hard_regno_nregs instead of
13087         HARD_REGNO_NREGS.
13088         (add_removable_extension): Likewise.
13090 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
13092         * regs.h (hard_regno_nregs): Turn into a function.
13093         (end_hard_regno): Update accordingly.
13094         * caller-save.c (setup_save_areas): Likewise.
13095         (save_call_clobbered_regs): Likewise.
13096         (replace_reg_with_saved_mem): Likewise.
13097         (insert_restore): Likewise.
13098         (insert_save): Likewise.
13099         * combine.c (can_change_dest_mode): Likewise.
13100         (move_deaths): Likewise.
13101         (distribute_notes): Likewise.
13102         * config/mips/mips.c (mips_hard_regno_call_part_clobbered): Likewise.
13103         * config/powerpcspe/powerpcspe.c (rs6000_cannot_change_mode_class)
13104         (rs6000_split_multireg_move): Likewise.
13105         (rs6000_register_move_cost): Likewise.
13106         (rs6000_memory_move_cost): Likewise.
13107         * config/rs6000/rs6000.c (rs6000_cannot_change_mode_class): Likewise.
13108         (rs6000_split_multireg_move): Likewise.
13109         (rs6000_register_move_cost): Likewise.
13110         (rs6000_memory_move_cost): Likewise.
13111         * cselib.c (cselib_reset_table): Likewise.
13112         (cselib_lookup_1): Likewise.
13113         * emit-rtl.c (set_mode_and_regno): Likewise.
13114         * function.c (aggregate_value_p): Likewise.
13115         * ira-color.c (setup_profitable_hard_regs): Likewise.
13116         (check_hard_reg_p): Likewise.
13117         (calculate_saved_nregs): Likewise.
13118         (assign_hard_reg): Likewise.
13119         (improve_allocation): Likewise.
13120         (calculate_spill_cost): Likewise.
13121         * ira-emit.c (modify_move_list): Likewise.
13122         * ira-int.h (ira_hard_reg_set_intersection_p): Likewise.
13123         (ira_hard_reg_in_set_p): Likewise.
13124         * ira.c (setup_reg_mode_hard_regset): Likewise.
13125         (clarify_prohibited_class_mode_regs): Likewise.
13126         (check_allocation): Likewise.
13127         * lra-assigns.c (find_hard_regno_for_1): Likewise.
13128         (lra_setup_reg_renumber): Likewise.
13129         (setup_try_hard_regno_pseudos): Likewise.
13130         (spill_for): Likewise.
13131         (assign_hard_regno): Likewise.
13132         (setup_live_pseudos_and_spill_after_risky_transforms): Likewise.
13133         * lra-constraints.c (in_class_p): Likewise.
13134         (lra_constraint_offset): Likewise.
13135         (simplify_operand_subreg): Likewise.
13136         (lra_constraints): Likewise.
13137         (split_reg): Likewise.
13138         (split_if_necessary): Likewise.
13139         (invariant_p): Likewise.
13140         (inherit_in_ebb): Likewise.
13141         * lra-lives.c (process_bb_lives): Likewise.
13142         * lra-remat.c (reg_overlap_for_remat_p): Likewise.
13143         (get_hard_regs): Likewise.
13144         (do_remat): Likewise.
13145         * lra-spills.c (assign_spill_hard_regs): Likewise.
13146         * mode-switching.c (create_pre_exit): Likewise.
13147         * postreload.c (reload_combine_recognize_pattern): Likewise.
13148         * recog.c (peep2_find_free_register): Likewise.
13149         * regcprop.c (kill_value_regno): Likewise.
13150         (set_value_regno): Likewise.
13151         (copy_value): Likewise.
13152         (maybe_mode_change): Likewise.
13153         (find_oldest_value_reg): Likewise.
13154         (copyprop_hardreg_forward_1): Likewise.
13155         * regrename.c (check_new_reg_p): Likewise.
13156         (regrename_do_replace): Likewise.
13157         * reload.c (push_reload): Likewise.
13158         (combine_reloads): Likewise.
13159         (find_dummy_reload): Likewise.
13160         (operands_match_p): Likewise.
13161         (find_reloads): Likewise.
13162         (find_equiv_reg): Likewise.
13163         (reload_adjust_reg_for_mode): Likewise.
13164         * reload1.c (count_pseudo): Likewise.
13165         (count_spilled_pseudo): Likewise.
13166         (find_reg): Likewise.
13167         (clear_reload_reg_in_use): Likewise.
13168         (free_for_value_p): Likewise.
13169         (allocate_reload_reg): Likewise.
13170         (choose_reload_regs): Likewise.
13171         (reload_adjust_reg_for_temp): Likewise.
13172         (emit_reload_insns): Likewise.
13173         (delete_output_reload): Likewise.
13174         * rtlanal.c (subreg_get_info): Likewise.
13175         * sched-deps.c (sched_analyze_reg): Likewise.
13176         * sel-sched.c (init_regs_for_mode): Likewise.
13177         (mark_unavailable_hard_regs): Likewise.
13178         (choose_best_reg_1): Likewise.
13179         (verify_target_availability): Likewise.
13180         * valtrack.c (dead_debug_insert_temp): Likewise.
13181         * var-tracking.c (track_loc_p): Likewise.
13182         (emit_note_insn_var_location): Likewise.
13183         * varasm.c (make_decl_rtl): Likewise.
13184         * reginfo.c (choose_hard_reg_mode): Likewise.
13185         (init_reg_modes_target): Refer directly to
13186         this_target_regs->x_hard_regno_nregs.
13188 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
13190         * ira-costs.c (record_operand_costs): Use in_hard_reg_set_p
13191         instead of hard_regno_nregs.
13193 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
13195         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Use
13196         end_hard_regno instead of hard_regno_nregs.
13197         * config/s390/s390.c (s390_reg_clobbered_rtx): Likewise.
13198         * config/sparc/sparc.h (ASM_DECLARE_REGISTER_GLOBAL): Likewise.
13199         * config/visium/visium.c (visium_hard_regno_mode_ok): Likewise.
13200         * ira-color.c (improve_allocation): Likewise.
13201         * lra-assigns.c (find_hard_regno_for_1): Likewise.
13202         * lra-lives.c (mark_regno_live): Likewise.
13203         (mark_regno_dead): Likewise.
13204         * lra-remat.c (operand_to_remat): Likewise.
13205         * lra.c (collect_non_operand_hard_regs): Likewise.
13206         * postreload.c (reload_combine_note_store): Likewise.
13207         (move2add_valid_value_p): Likewise.
13208         * reload.c (regno_clobbered_p): Likewise.
13210 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
13212         * config/frv/frv.c (FOR_EACH_REGNO): Use END_REGNO instead of
13213         hard_regno_nregs.
13214         * config/v850/v850.c (v850_reorg): Likewise.
13215         * reload.c (refers_to_regno_for_reload_p): Likewise.
13216         (find_equiv_reg): Likewise.
13217         * reload1.c (reload_reg_reaches_end_p): Likewise.
13219 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
13221         * caller-save.c (add_used_regs): Use REG_NREGS instead of
13222         hard_regno_nregs.
13223         * config/aarch64/aarch64.c (aarch64_split_combinev16qi): Likewise.
13224         * config/arm/arm.c (output_move_neon): Likewise.
13225         (arm_attr_length_move_neon): Likewise.
13226         (neon_split_vcombine): Likewise.
13227         * config/c6x/c6x.c (c6x_mark_reg_read): Likewise.
13228         (c6x_mark_reg_written): Likewise.
13229         (c6x_dwarf_register_span): Likewise.
13230         * config/i386/i386.c (ix86_save_reg): Likewise.
13231         * config/ia64/ia64.c (mark_reg_gr_used_mask): Likewise.
13232         (rws_access_reg): Likewise.
13233         * config/s390/s390.c (s390_call_saved_register_used): Likewise.
13234         * mode-switching.c (create_pre_exit): Likewise.
13235         * ree.c (combine_reaching_defs): Likewise.
13236         (add_removable_extension): Likewise.
13237         * regcprop.c (find_oldest_value_reg): Likewise.
13238         (copyprop_hardreg_forward_1): Likewise.
13239         * reload.c (reload_inner_reg_of_subreg): Likewise.
13240         (push_reload): Likewise.
13241         (combine_reloads): Likewise.
13242         (find_dummy_reload): Likewise.
13243         (reload_adjust_reg_for_mode): Likewise.
13244         * reload1.c (find_reload_regs): Likewise.
13245         (forget_old_reloads_1): Likewise.
13246         (reload_reg_free_for_value_p): Likewise.
13247         (reload_adjust_reg_for_temp): Likewise.
13248         (emit_reload_insns): Likewise.
13249         (delete_output_reload): Likewise.
13250         * sel-sched.c (choose_best_reg_1): Likewise.
13251         (choose_best_pseudo_reg): Likewise.
13253 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
13254             Alan Hayward  <alan.hayward@arm.com>
13255             David Sherwood <david.sherwood@arm.com>
13257         * defaults.h (SLOW_UNALIGNED_ACCESS): Delete.
13258         * target.def (slow_unaligned_access): New hook.
13259         * targhooks.h (default_slow_unaligned_access): Declare.
13260         * targhooks.c (default_slow_unaligned_access): New function.
13261         * doc/tm.texi.in (SLOW_UNALIGNED_ACCESS): Replace with...
13262         (TARGET_SLOW_UNALIGNED_ACCESS): ...this.
13263         * doc/tm.texi: Regenerate.
13264         * config/alpha/alpha.h (SLOW_UNALIGNED_ACCESS): Delete.
13265         * config/arm/arm.h (SLOW_UNALIGNED_ACCESS): Delete.
13266         * config/i386/i386.h (SLOW_UNALIGNED_ACCESS): Delete commented-out
13267         definition.
13268         * config/powerpcspe/powerpcspe.h (SLOW_UNALIGNED_ACCESS): Delete.
13269         * config/powerpcspe/powerpcspe.c (TARGET_SLOW_UNALIGNED_ACCESS):
13270         Redefine.
13271         (rs6000_slow_unaligned_access): New function.
13272         (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
13273         (expand_block_compare): Likewise.
13274         (expand_strn_compare): Likewise.
13275         (rs6000_rtx_costs): Likewise.
13276         * config/riscv/riscv.h (SLOW_UNALIGNED_ACCESS): Delete.
13277         (riscv_slow_unaligned_access): Likewise.
13278         * config/riscv/riscv.c (riscv_slow_unaligned_access): Rename to...
13279         (riscv_slow_unaligned_access_p): ...this and make static.
13280         (riscv_option_override): Update accordingly.
13281         (riscv_slow_unaligned_access): New function.
13282         (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
13283         * config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Delete.
13284         * config/rs6000/rs6000.c (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
13285         (rs6000_slow_unaligned_access): New function.
13286         (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
13287         (rs6000_rtx_costs): Likewise.
13288         * config/rs6000/rs6000-string.c (expand_block_compare)
13289         (expand_strn_compare): Use targetm.slow_unaligned_access instead
13290         of SLOW_UNALIGNED_ACCESS.
13291         * config/tilegx/tilegx.h (SLOW_UNALIGNED_ACCESS): Delete.
13292         * config/tilepro/tilepro.h (SLOW_UNALIGNED_ACCESS): Delete.
13293         * calls.c (expand_call): Use targetm.slow_unaligned_access instead
13294         of SLOW_UNALIGNED_ACCESS.
13295         * expmed.c (simple_mem_bitfield_p): Likewise.
13296         * expr.c (alignment_for_piecewise_move): Likewise.
13297         (emit_group_load_1): Likewise.
13298         (emit_group_store): Likewise.
13299         (copy_blkmode_from_reg): Likewise.
13300         (emit_push_insn): Likewise.
13301         (expand_assignment): Likewise.
13302         (store_field): Likewise.
13303         (expand_expr_real_1): Likewise.
13304         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
13305         * lra-constraints.c (simplify_operand_subreg): Likewise.
13306         * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
13307         * gimple-ssa-store-merging.c: Likewise in block comment at start
13308         of file.
13309         * tree-ssa-strlen.c: Include target.h.
13310         (handle_builtin_memcmp): Use targetm.slow_unaligned_access instead
13311         of SLOW_UNALIGNED_ACCESS.
13312         * system.h (SLOW_UNALIGNED_ACCESS): Poison.
13314 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
13316         PR rtl-optimization/82185
13317         * expmed.c (emit_store_flag_int): Only test tem if it has been
13318         initialized.
13320 2017-09-12  Richard Biener  <rguenther@suse.de>
13322         PR middle-end/82149
13323         * match.pd ((FTYPE) N CMP CST): Fix typo.
13325 2017-09-12  Simon Atanasyan  <simon.atanasyan@imgtec.com>
13327         * config/mips/mips.c (mips_attribute_table): Add 'short_call'
13328         attribute.
13329         (mips_near_type_p): Add 'short_call' attribute as a synonym
13330         for 'near'.
13331         * doc/extend.texi (short_call): Document new function attribute.
13333 2017-09-12  Jakub Jelinek  <jakub@redhat.com>
13335         PR target/82112
13336         * c-common.c (sync_resolve_size): Instead of c_dialect_cxx ()
13337         assertion check that in the condition.
13338         (get_atomic_generic_size): Likewise.  Before testing if parameter
13339         has pointer type, if it has array type, call for C++
13340         default_conversion to perform array-to-pointer conversion.
13342 2017-09-12  Richard Biener  <rguenther@suse.de>
13344         * tree-vect-generic.c (expand_vector_operations_1): Do nothing
13345         for operations we cannot scalarize.
13347 2017-09-12  Aldy Hernandez  <aldyh@redhat.com>
13349         * tree-ssa-threadbackward.c (fsm_find_thread_path): Make GC
13350         vectors heap vectors.  Clean up comments.
13351         Make visited_bbs a reference.
13352         (profitable_jump_thread_path): Make GC
13353         vectors heap vectors.  Clean up comments.
13354         Misc cleanups.
13355         (convert_and_register_jump_thread_path): Make GC vectors heap
13356         vectors.
13357         (check_subpath_and_update_thread_path): Same.  Clean up comments.
13358         Make visited_bbs a reference.
13359         (handle_phi): Abstract common code to to
13360         register_jump_thread_path_if_profitable.
13361         Rename VAR_BB to DEF_BB.
13362         Update comments.
13363         Make GC vectors heap vectors.
13364         Make visited_bbs a reference.
13365         (handle_assignment): Same.
13366         (register_jump_thread_path_if_profitable): New.
13367         (fsm_find_control_statement_thread_paths): Rename VAR_BB to
13368         DEF_BB.
13369         Make GC vectors heap vectors.  Clean up comments.
13370         Make visited_bbs a reference.
13371         (find_jump_threads_backwards): Make visited_bbs live in the stack.
13372         * tree-ssa-threadupdate.c (delete_jump_thread_path): Fix typo in
13373         comment.
13375 2017-09-11  Max Filippov  <jcmvbkbc@gmail.com>
13377         PR target/82181
13378         * config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
13379         words of E_DImode object are reachable by xtensa_uimm8x4 access.
13381 2017-09-11  Vidya Praveen  <vidyapraveen@arm.com>
13383         Revert r251800 and r251799.
13385 2017-09-11  Martin Jambor  <mjambor@suse.cz>
13387         PR hsa/82119
13388         * hsa-gen.c (gen_hsa_phi_from_gimple_phi): Process ADDR_EXPRs in
13389         arguments in advance.
13390         * hsa-regalloc.c (naive_process_phi): New parameter predecessors,
13391         use it to find predecessor edges.
13392         (naive_outof_ssa): Collect vector of predecessors.
13394 2017-09-08  Jason Merrill  <jason@redhat.com>
13396         PR c++/70029 - ICE with ref-qualifier and -flto
13397         * langhooks.h (struct lang_hooks_for_types): Add
13398         copy_lang_qualifiers.
13399         * attribs.c (build_type_attribute_qual_variant): Use it.
13400         * langhooks-def.h (LANG_HOOKS_COPY_LANG_QUALIFIERS): Default to
13401         NULL.
13402         (LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
13403         * tree.c (verify_type): Re-enable TYPE_CANONICAL main variant check.
13405 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
13407         PR target/81988
13408         * config/sparc/sparc.md (mulsi3): Rename into *mulsi3_sp32.
13409         (*mulsi3_sp64): New instruction.
13410         (mulsi3): New expander.
13412 2017-09-08  Uros Bizjak  <ubizjak@gmail.com>
13414         * config/alpha/alpha.c (alpha_print_operand) <case 'S'>: Remove.
13416 2017-09-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13418         * sancov.c: Include memmodel.h.
13420 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
13422         PR target/80897
13423         * config/sparc/sparc.c (sparc_emit_set_symbolic_const64): Deal with too
13424         large offsets.
13426 2017-09-07  Carl Love  <cel@us.ibm.com>
13428         * config/rs6000/vsx.md (define_insn "*stxvl"): Add missing argument to
13429         the sldi instruction.
13431 2017-09-07  David Edelsohn  <dje.gcc@gmail.com>
13433         * sancov.c: Include tm_p.h.
13435 2017-09-07  Jakub Jelinek  <jakub@redhat.com>
13437         PR target/81979
13438         * output.h (switch_to_other_text_partition): New declaration.
13439         * varasm.c (switch_to_other_text_partition): New function.
13440         * config/rs6000/rs6000.c (uses_TOC): Return 2 if
13441         NOTE_INSN_SWITCH_TEXT_SECTIONS is seen before finding load_toc_* insn.
13442         (rs6000_elf_declare_function_name): If uses_TOC returned 2, switch
13443         to the other text partition before emitting LCL label and switch back
13444         after emitting the word after it.
13446 2017-09-07  Richard Biener  <rguenther@suse.de>
13448         * passes.def (pass_split_crit_edges): Remove instance before PRE.
13449         * tree-ssa-pre.c (pass_pre::execute): Instead manually split
13450         critical edges here, after loop init.
13451         (pass_data_pre): Remove PROP_no_crit_edges flags.
13452         * tree-ssa-sccvn.c (vn_reference_lookup_3): Use vn_valueize
13453         for valueization of call args to avoid leaking VN_TOP.
13454         (visit_use): Assert we do not visit default defs.
13455         (init_scc_vn): Use build_decl for VN_TOP to make name nicer.
13456         Use error_mark_node to more easily detect leaking VN_TOP.
13457         All default-defs are varying, not VN_TOP.  Mark them visited.
13458         (run_scc_vn): Make code match comment.
13460 2017-09-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
13462         * config/rs6000/rs6000-cpus.def (OTHER_VSX_VECTOR_MASKS): Delete
13463         OPTION_MASK_FLOAT128_KEYWORD.
13464         (POWERPC_MASKS): Likewise.
13465         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Delete
13466         support for the -mfloat128-type option, and make -mfloat128
13467         default on PowerPC Linux systems.  Define or undefine
13468         __FLOAT128__ and  __FLOAT128_HARDWARE__ for the current options.
13469         Define __float128 to be __ieee128 if IEEE 128-bit support is
13470         enabled, or undefine it.
13471         (rs6000_cpu_cpp_builtins): Delete defining __FLOAT128__ here.
13472         Delete defining __FLOAT128_TYPE__.
13473         * config/rs6000/rs6000.opt (x_TARGET_FLOAT128_TYPE): Delete the
13474         -mfloat128-type option and make -mfloat128 default on PowerPC
13475         Linux systems.
13476         (TARGET_FLOAT128_TYPE): Likewise.
13477         (-mfloat128-type): Likewise.
13478         * config/rs6000/rs6000.c (rs6000_option_override_internal):
13479         Delete the -mfloat128-type option and make -mfloat128 default on
13480         PowerPC Linux systems.  Always use __ieee128 to be the keyword for
13481         the IEEE 128-bit type, and map __float128 to __ieee128 if IEEE
13482         128-bit floating point is enabled.  Change tests from using
13483         -mfloat128-type to -mfloat128.
13484         (rs6000_mangle_type): Use the correct mangling for the __float128
13485         type even if normal long double is restricted to 64-bits.
13486         (floatn_mode): Enable the _Float128 type by default on VSX Linux
13487         systems.
13488         * config/rs6000/rs6000.h (MASK_FLOAT128_TYPE): Delete.
13489         (MASK_FLOAT128_KEYWORD): Define new shortcut macro.
13490         (RS6000BTM_FLOAT128): Define in terms of -mfloat128, not
13491         -mfloat128-type.
13492         * doc/invoke.texi (RS/6000 and PowerPC Options): Update
13493         documentation for -mfloat128.
13495 2017-09-06  Olivier Hainque  <hainque@adacore.com>
13497         * config.gcc (powerpc-wrs-vxworksspe): Now match as vxworks*spe.
13499 2017-09-06  Wish Wu  <wishwu007@gmail.com>
13500             Jakub Jelinek  <jakub@redhat.com>
13502         * asan.c (initialize_sanitizer_builtins): Add
13503         BT_FN_VOID_UINT8_UINT8, BT_FN_VOID_UINT16_UINT16,
13504         BT_FN_VOID_UINT32_UINT32, BT_FN_VOID_UINT64_UINT64,
13505         BT_FN_VOID_FLOAT_FLOAT, BT_FN_VOID_DOUBLE_DOUBLE and
13506         BT_FN_VOID_UINT64_PTR variables.
13507         * builtin-types.def (BT_FN_VOID_UINT8_UINT8): New fn type.
13508         (BT_FN_VOID_UINT16_UINT16): Likewise.
13509         (BT_FN_VOID_UINT32_UINT32): Likewise.
13510         (BT_FN_VOID_FLOAT_FLOAT): Likewise.
13511         (BT_FN_VOID_DOUBLE_DOUBLE): Likewise.
13512         (BT_FN_VOID_UINT64_PTR): Likewise.
13513         * common.opt (flag_sanitize_coverage): New variable.
13514         (fsanitize-coverage=trace-pc): Remove.
13515         (fsanitize-coverage=): Add.
13516         * flag-types.h (enum sanitize_coverage_code): New enum.
13517         * fold-const.c (fold_range_test): Disable non-short-circuit
13518         optimization if flag_sanitize_coverage.
13519         (fold_truth_andor): Likewise.
13520         * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
13521         * opts.c (COVERAGE_SANITIZER_OPT): Define.
13522         (coverage_sanitizer_opts): New array.
13523         (get_closest_sanitizer_option): Add OPTS argument, handle also
13524         OPT_fsanitize_coverage_.
13525         (parse_sanitizer_options): Adjusted to also handle
13526         OPT_fsanitize_coverage_.
13527         (common_handle_option): Add OPT_fsanitize_coverage_.
13528         * sancov.c (instrument_comparison, instrument_switch): New function.
13529         (sancov_pass): Add trace-cmp support.
13530         * sanitizer.def (BUILT_IN_SANITIZER_COV_TRACE_CMP1,
13531         BUILT_IN_SANITIZER_COV_TRACE_CMP2, BUILT_IN_SANITIZER_COV_TRACE_CMP4,
13532         BUILT_IN_SANITIZER_COV_TRACE_CMP8,
13533         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP1,
13534         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP2,
13535         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP4,
13536         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP8,
13537         BUILT_IN_SANITIZER_COV_TRACE_CMPF, BUILT_IN_SANITIZER_COV_TRACE_CMPD,
13538         BUILT_IN_SANITIZER_COV_TRACE_SWITCH): New builtins.
13539         * doc/invoke.texi: Document -fsanitize-coverage=trace-cmp.
13541 2017-09-06  Richard Earnshaw  <rearnsha@arm.com>
13543         * config/arm/parsecpu.awk (fatal): Note that we've encountered an
13544         error.  Only quit immediately if parsing is complete.
13545         (BEGIN): Initialize fatal_err and parse_done.
13546         (begin fpu, end fpu): Check number of arguments.
13547         (begin arch, end arch): Likewise.
13548         (begin cpu, end cpu): Likewise.
13549         (cname, tune for, tune flags, architecture, fpu, option): Likewise.
13550         (optalias): Likewise.
13552 2017-09-06  Richard Earnshaw  <rearnsha@arm.com>
13554         * config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
13555         * config/arm/arm-isa.h: Delete.  Move definitions to ...
13556         * arm-cpus.in: ... here.  Use new feature and fgroup values.
13557         * config/arm/arm.c (arm_option_override): Use lower case for feature
13558         bit names.
13559         * config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
13560         (TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
13561         * config/arm/parsecpu.awk (END): Add new command 'isa'.
13562         (isa_pfx): Delete.
13563         (print_isa_bits_for): New function.
13564         (gen_isa): New function.
13565         (gen_comm_data): Use print_isa_bits_for.
13566         (define feature): New keyword.
13567         (define fgroup): New keyword.
13568         * config/arm/t-arm (OPTIONS_H_EXTRA): Add arm-isa.h
13569         (arm-isa.h): Add rule to generate file.
13570         * common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
13571         case for feature bit names.
13573 2017-09-06  Richard Biener  <rguenther@suse.de>
13575         * tree-ssa-pre.c (NECESSARY): Remove.
13576         (create_expression_by_pieces): Do not touch pass-local flags.
13577         (insert_into_preds_of_block): Likewise.
13578         (do_pre_regular_insertion): Likewise.
13579         (eliminate_insert): Likewise.
13580         (eliminate_dom_walker::before_dom_children): Likewise.
13581         (fini_eliminate): Do not look at inserted_exprs.
13582         (mark_operand_necessary): Remove.
13583         (remove_dead_inserted_code): Replace with simple work-list
13584         algorithm based on inserted_exprs and SSA uses.
13585         (pass_pre::execute): Re-order fini_eliminate and
13586         remove_dead_inserted_code.
13588 2017-09-06  Olivier Hainque  <hainque@adacore.com>
13590         * config/powerpcspe/vxworks.h (VXCPU_FOR_8548): Correct definition
13591         for VxWorks 7.  Adjust surrounding comments.
13593 2017-09-06  Richard Biener  <rguenther@suse.de>
13595         * gimple-ssa-strength-reduction.c
13596         (find_candidates_dom_walker::before_dom_children): Also allow
13597         pointer types.
13599 2017-09-06  Richard Biener  <rguenther@suse.de>
13601         PR tree-optimization/82108
13602         * tree-vect-stmts.c (vectorizable_load): Fix pointer adjustment
13603         for gap in the non-permutation SLP case.
13605 2017-09-06  Martin Jambor  <mjambor@suse.cz>
13607         PR tree-optimization/82078
13608         * tree-sra.c (sort_and_splice_var_accesses): Move call to
13609         add_access_to_work_queue...
13610         (build_accesses_from_assign): ...here.
13611         (propagate_all_subaccesses): Make sure racc is the group
13612         representative, if there is one.
13614 2017-09-06  Jakub Jelinek  <jakub@redhat.com>
13616         PR middle-end/82095
13617         * varasm.c (categorize_decl_for_section): Use SECCAT_TBSS for TLS vars with
13618         NULL DECL_INITIAL.
13620 2017-09-06  Richard Biener  <rguenther@suse.de>
13622         * gimple-ssa-strength-reduction.c
13623         (find_candidates_dom_walker::before_doom_children): Use a
13624         type and not a mode check.
13626 2017-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13628         PR target/77308
13629         * config/arm/predicates.md (arm_general_adddi_operand): Create new
13630         non-vfp predicate.
13631         * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Use new predicates.
13633 2017-09-05  Jeff Law  <law@redhat.com>
13635         PR tree-optimization/64910
13636         * tree-ssa-reassoc.c (reassociate_bb): Restrict last change to
13637         cases where we have 3 or more operands.
13639 2017-09-05  Jakub Jelinek  <jakub@redhat.com>
13641         PR middle-end/81768
13642         * omp-low.c (lower_omp_for): Recompute tree invariant if
13643         gimple_omp_for_initial/final is ADDR_EXPR.
13645         PR middle-end/81768
13646         * omp-expand.c (expand_omp_simd): Force second operands of COND_EXPR
13647         into gimple val before gimplification fo the COND_EXPR.
13649 2017-09-05  Aldy Hernandez  <aldyh@redhat.com>
13651         * tree-ssa-threadupdate.c (duplicate_thread_path): Remove unused
13652         REGION_COPY argument.
13653         (thread_through_all_blocks): Remove unused argument to
13654         duplicate_thread_path.
13656 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
13657             Alan Hayward  <alan.hayward@arm.com>
13658             David Sherwood  <david.sherwood@arm.com>
13660         * config/aarch64/aarch64-protos.h (aarch64_gen_adjusted_ldpstp):
13661         Take a scalar_mode rather than a machine_mode.
13662         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
13663         * config/aarch64/aarch64.c (aarch64_simd_container_mode): Likewise.
13664         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
13665         (aarch64_gen_adjusted_ldpstp): Likewise.
13666         (aarch64_expand_vector_init): Use scalar_mode instead of machine_mode.
13668 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
13669             Alan Hayward  <alan.hayward@arm.com>
13670             David Sherwood  <david.sherwood@arm.com>
13672         * config/aarch64/aarch64-protos.h (aarch64_is_extend_from_extract):
13673         Take a scalar_int_mode instead of a machine_mode.
13674         (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
13675         (aarch64_output_scalar_simd_mov_immediate): Likewise.
13676         (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
13677         (aarch64_simd_attr_length_rglist): Delete.
13678         * config/aarch64/aarch64.c (aarch64_is_extend_from_extract): Take
13679         a scalar_int_mode instead of a machine_mode.
13680         (aarch64_add_offset): Likewise.
13681         (aarch64_internal_mov_immediate): Likewise
13682         (aarch64_add_constant_internal): Likewise.
13683         (aarch64_add_constant): Likewise.
13684         (aarch64_movw_imm): Likewise.
13685         (aarch64_rtx_arith_op_extract_p): Likewise.
13686         (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
13687         (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
13688         Remove assert that the mode isn't a vector.
13689         (aarch64_output_scalar_simd_mov_immediate): Likewise.
13690         (aarch64_expand_mov_immediate): Update calls after above changes.
13691         (aarch64_output_casesi): Use as_a <scalar_int_mode>.
13692         (aarch64_and_bitmask_imm): Check for scalar integer modes.
13693         (aarch64_move_imm): Likewise.
13694         (aarch64_can_const_movi_rtx_p): Likewise.
13695         (aarch64_strip_extend): Likewise.
13696         (aarch64_extr_rtx_p): Likewise.
13697         (aarch64_rtx_costs): Likewise, using wode_mode as the mode of
13698         a CONST_INT when the mode parameter is VOIDmode.
13699         (aarch64_float_const_rtx_p): Use scalar_int_mode for a temporary.
13701 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
13703         * machmode.h (bitwise_mode_for_mode): Return opt_mode.
13704         * stor-layout.c (bitwise_mode_for_mode): Likewise.
13705         (bitwise_type_for_mode): Update accordingly.
13707 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
13709         * stor-layout.h (mode_for_size_tree): Return an opt_mode.
13710         * stor-layout.c (mode_for_size_tree): Likewise.
13711         (mode_for_array): Update accordingly.
13712         (layout_decl): Likewise.
13713         (compute_record_mode): Likewise.  Only set the mode once.
13715 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
13717         * target.def (get_mask_mode): Change return type to opt_mode.
13718         Expand commentary.
13719         * doc/tm.texi: Regenerate.
13720         * targhooks.h (default_get_mask_mode): Return an opt_mode.
13721         * targhooks.c (default_get_mask_mode): Likewise.
13722         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
13723         * optabs-query.c (can_vec_mask_load_store_p): Update use of
13724         targetm.get_mask_mode.
13725         * tree.c (build_truth_vector_type): Likewise.
13727 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
13729         * machmode.h (mode_for_vector): Return an opt_mode.
13730         * stor-layout.c (mode_for_vector): Likewise.
13731         (mode_for_int_vector): Update accordingly.
13732         (layout_type): Likewise.
13733         * config/i386/i386.c (emit_memmov): Likewise.
13734         (ix86_expand_set_or_movmem): Likewise.
13735         (ix86_expand_vector_init): Likewise.
13736         (ix86_get_mask_mode): Likewise.
13737         * config/powerpcspe/powerpcspe.c (rs6000_expand_vec_perm_const_1):
13738         Likewise.
13739         * config/rs6000/rs6000.c (rs6000_expand_vec_perm_const_1): Likewise.
13740         * expmed.c (extract_bit_field_1): Likewise.
13741         * expr.c (expand_expr_real_2): Likewise.
13742         * optabs-query.c (can_vec_perm_p): Likewise.
13743         (can_vec_mask_load_store_p): Likewise.
13744         * optabs.c (expand_vec_perm): Likewise.
13745         * targhooks.c (default_get_mask_mode): Likewise.
13746         * tree-vect-stmts.c (vectorizable_store): Likewise.
13747         (vectorizable_load): Likewise.
13748         (get_vectype_for_scalar_type_and_size): Likewise.
13750 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
13752         * machmode.h (mode_for_int_vector): New function.
13753         * stor-layout.c (mode_for_int_vector): Likewise.
13754         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Use it.
13755         * config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Likewise.
13756         * config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
13757         * config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
13758         (s390_expand_vcond): Likewise.
13760 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
13762         * machmode.h (opt_machine_mode): New type.
13763         (opt_mode<T>): Allow construction from anything that can be
13764         converted to a T.
13765         (is_a, as_a, dyn_cast): Add overloads for opt_mode.
13766         (mode_for_size): Return an opt_machine_mode.
13767         * stor-layout.c (mode_for_size): Likewise.
13768         (mode_for_size_tree): Update call accordingly.
13769         (bitwise_mode_for_mode): Likewise.
13770         (make_fract_type): Likewise.
13771         (make_accum_type): Likewise.
13772         * caller-save.c (replace_reg_with_saved_mem): Update call
13773         accordingly.
13774         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
13775         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
13776         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
13777         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
13778         * expmed.c (extract_bit_field_1): Likewise.
13779         * reload.c (get_secondary_mem): Likewise.
13780         * varasm.c (assemble_integer): Likewise.
13781         * lower-subreg.c (simplify_subreg_concatn): Likewise.  Move
13782         early-out.
13784 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
13786         * machmode.h (decimal_float_mode_for_size): New function.
13787         * real.h (REAL_VALUE_TO_TARGET_LONG_DOUBLE): Use float_mode_for_size.
13788         (REAL_VALUE_TO_TARGET_DOUBLE): Likewise.
13789         (REAL_VALUE_TO_TARGET_SINGLE): Likewise.
13790         (REAL_VALUE_TO_TARGET_DECIMAL128): Use decimal_float_mode_for_size.
13791         (REAL_VALUE_TO_TARGET_DECIMAL64): Likewise.
13792         (REAL_VALUE_TO_TARGET_DECIMAL32): Likewise.
13794 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
13796         * builtins.c (expand_builtin_powi): Use int_mode_for_size.
13797         (get_builtin_sync_mode): Likewise.
13798         (expand_ifn_atomic_compare_exchange): Likewise.
13799         (expand_builtin_atomic_clear): Likewise.
13800         (expand_builtin_atomic_test_and_set): Likewise.
13801         (fold_builtin_atomic_always_lock_free): Likewise.
13802         * calls.c (compute_argument_addresses): Likewise.
13803         (emit_library_call_value_1): Likewise.
13804         (store_one_arg): Likewise.
13805         * combine.c (combine_instructions): Likewise.
13806         * config/aarch64/aarch64.c (aarch64_function_value): Likewise.
13807         * config/arm/arm.c (arm_function_value): Likewise.
13808         (aapcs_allocate_return_reg): Likewise.
13809         * config/c6x/c6x.c (c6x_expand_movmem): Likewise.
13810         * config/i386/i386.c (construct_container): Likewise.
13811         (ix86_gimplify_va_arg): Likewise.
13812         (ix86_expand_sse_cmp): Likewise.
13813         (emit_memmov): Likewise.
13814         (emit_memset): Likewise.
13815         (expand_small_movmem_or_setmem): Likewise.
13816         (ix86_expand_pextr): Likewise.
13817         (ix86_expand_pinsr): Likewise.
13818         * config/lm32/lm32.c (lm32_block_move_inline): Likewise.
13819         * config/microblaze/microblaze.c (microblaze_block_move_straight):
13820         Likewise.
13821         * config/mips/mips.c (mips_function_value_1) Likewise.
13822         (mips_block_move_straight): Likewise.
13823         (mips_expand_ins_as_unaligned_store): Likewise.
13824         * config/powerpcspe/powerpcspe.c
13825         (rs6000_darwin64_record_arg_advance_flush): Likewise.
13826         (rs6000_darwin64_record_arg_flush): Likewise.
13827         * config/rs6000/rs6000.c
13828         (rs6000_darwin64_record_arg_advance_flush): Likewise.
13829         (rs6000_darwin64_record_arg_flush): Likewise.
13830         * config/sparc/sparc.c (sparc_function_arg_1): Likewise.
13831         (sparc_function_value_1): Likewise.
13832         * config/spu/spu.c (adjust_operand): Likewise.
13833         (spu_emit_branch_or_set): Likewise.
13834         (arith_immediate_p): Likewise.
13835         * emit-rtl.c (gen_lowpart_common): Likewise.
13836         * expr.c (expand_expr_real_1): Likewise.
13837         * function.c (assign_parm_setup_block): Likewise.
13838         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Likewise.
13839         * reload1.c (alter_reg): Likewise.
13840         * stor-layout.c (mode_for_vector): Likewise.
13841         (layout_type): Likewise.
13843 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
13845         * config/spu/spu.c (exp2_immediate_p): Use int_mode_for_mode.
13846         (spu_convert_move): Likewise.
13847         * lower-subreg.c (resolve_simple_move): Likewise.
13849 2017-09-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13851         PR target/81833
13852         * config/rs6000/altivec.md (altivec_vsum2sws): Convert from a
13853         define_insn to a define_expand.
13854         (altivec_vsum2sws_direct): New define_insn.
13855         (altivec_vsumsws): Convert from a define_insn to a define_expand.
13857 2017-09-05  Wilco Dijkstra  <wdijkstr@arm.com>
13859         * config/arm/arm.c (arm_option_params_internal): Improve setting of
13860         max_insns_skipped.
13862 2017-09-05  H.J. Lu  <hongjiu.lu@intel.com>
13864         PR target/59501
13865         PR target/81624
13866         PR target/81769
13867         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Don't
13868         realign stack if stack alignment needed is less than incoming
13869         stack boundary.
13871 2017-09-05  Marek Polacek  <polacek@redhat.com>
13873         PR sanitizer/82072
13874         * convert.c (convert_to_integer_1) <case NEGATE_EXPR>: Move the ubsan
13875         check earlier.
13877 2017-09-05  Wilco Dijkstra  <wdijkstr@arm.com>
13879         * explow.c (get_dynamic_stack_size): Improve dynamic alignment.
13881 2017-09-05  Richard Biener  <rguenther@suse.de>
13883         PR tree-optimization/82084
13884         * fold-const.c (can_native_encode_string_p): Handle wide characters.
13886 2017-09-05  Richard Biener  <rguenther@suse.de>
13888         PR tree-optimization/82102
13889         * tree-ssa-pre.c (fini_eliminate): Check if lhs is NULL.
13891 2017-09-05  Martin Liska  <mliska@suse.cz>
13893         PR tree-optimization/82032
13894         * tree-cfg.c (generate_range_test): New function.
13895         * tree-cfg.h (generate_range_test): Declared here.
13896         * tree-cfgcleanup.c (convert_single_case_switch): New function.
13897         (cleanup_control_expr_graph): Use it.
13898         * tree-switch-conversion.c (try_switch_expansion): Remove
13899         assert.
13900         (emit_case_nodes): Use generate_range_test.
13902 2017-09-04  Uros Bizjak  <ubizjak@gmail.com>
13904         PR target/82098
13905         * config/i386/i386.md (*<btsc><mode>_mask): Add
13906         TARGET_USE_BT to insn constraint.
13907         (*btr<mode>_mask): Ditto.
13909 2017-09-04  Wilco Dijkstra  <wdijkstr@arm.com>
13911         * config/arm/arm.c (arm_legitimate_index_p): Add comment.
13912         (thumb2_legitimate_index_p): Use correct range for DI/DF mode.
13914 2017-09-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13916         PR target/77308
13917         * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Split early except for
13918         TARGET_NEON and TARGET_IWMMXT.
13919         (anddi3, iordi3, xordi3, one_cmpldi2): Split while expanding except for
13920         TARGET_NEON and TARGET_IWMMXT.
13921         (*one_cmpldi2_insn): Moved the body of one_cmpldi2 here.
13923 2017-09-04  Uros Bizjak  <ubizjak@gmail.com>
13925         * config/i386/i386-protos.h (ix86_tls_address_pattern_p) New prototype.
13926         (ix86_rewrite_tls_address): Ditto.
13927         * config/i386/i386.c (ix86_tls_address_pattern_p) New function.
13928         (ix86_rewrite_tls_address_1): Ditto.
13929         (ix86_rewrite_tls_address): Ditto.
13930         * config/i386/predicates.md (tls_address_pattern): New predicate.
13931         * config/i386/i386.md (TLS address splitter): New splitter.
13933 2017-09-04  Richard Biener  <rguenther@suse.de>
13935         PR tree-optimization/82084
13936         * fold-const.h (can_native_encode_string_p): Declare.
13937         * fold-const.c (can_native_encode_string_p): Factor out from ...
13938         (native_encode_string): ... here.
13939         * tree-vect-stmts.c (vectorizable_store): Call it to avoid
13940         vectorizing stores from constants we later cannot handle.
13942 2017-09-04  Marek Polacek  <polacek@redhat.com>
13944         PR c/81783
13945         * doc/invoke.texi: Update -Wtautological-compare documentation.
13947 2017-09-04  Jeff Law  <law@redhat.com>
13949         PR tree-optimization/64910
13950         * tree-ssa-reassoc.c (reassociate_bb): For bitwise binary ops,
13951         swap the first and last operand if the last is a constant.
13953 2017-09-04  Marek Polacek  <polacek@redhat.com>
13955         PR sanitizer/82072
13956         * convert.c (do_narrow): When sanitizing signed integer overflows,
13957         bail out for signed types.
13958         (convert_to_integer_1) <case NEGATE_EXPR>: Likewise.
13960 2017-09-04  Richard Biener  <rguenther@suse.de>
13962         PR tree-optimization/82060
13963         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
13964         Move devirtualization after stmt folding and before EH/AB/noreturn
13965         cleanup to get the stmt refs canonicalized.  Use a bool instead
13966         of gimple_modified_p since that doesn't work for NOPs.  Schedule
13967         NOPs generated by folding for removal.
13969 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
13970             Alan Hayward  <alan.hayward@arm.com>
13971             David Sherwood  <david.sherwood@arm.com>
13973         * coretypes.h (pad_direction): New enum.
13974         * defaults.h (DEFAULT_FUNCTION_ARG_PADDING): Delete.
13975         (FUNCTION_ARG_PADDING): Likewise.
13976         * target.def (function_arg_padding): New hook.
13977         * targhooks.h (default_function_arg_padding): Declare.
13978         * targhooks.c (default_function_arg_padding): New function.
13979         * doc/tm.texi.in (FUNCTION_ARG_PADDING): Replace with...
13980         (TARGET_FUNCTION_ARG_PADDING): ...this.
13981         * doc/tm.texi: Regenerate.
13982         * calls.c (store_unaligned_arguments_into_pseudos): Use pad_direction
13983         instead of direction.
13984         (compute_argument_addresses): Likewise.
13985         (load_register_parameters): Likewise.
13986         (emit_library_call_value_1): Likewise.
13987         (store_one_arg): Use targetm.calls.function_arg_padding instead
13988         of FUNCTION_ARG_PADDING.
13989         (must_pass_in_stack_var_size_or_pad): Likewise.
13990         * expr.c (emit_group_load_1): Use pad_direction instead of direction.
13991         (emit_group_store): Likewise.
13992         (emit_single_push_insn_1): Use targetm.calls.function_arg_padding
13993         instead of FUNCTION_ARG_PADDING.
13994         (emit_push_insn): Likewise, and propagate enum change throughout
13995         function.
13996         * function.h (direction): Delete.
13997         (locate_and_pad_arg_data::where_pad): Use pad_direction instead
13998         of direction.
13999         * function.c (assign_parm_find_stack_rtl): Likewise.
14000         (assign_parm_setup_block_p): Likewise.
14001         (assign_parm_setup_block): Likewise.
14002         (gimplify_parameters): Likewise.
14003         (locate_and_pad_parm): Use targetm.calls.function_arg_padding
14004         instead of FUNCTION_ARG_PADDING, and propagate enum change throughout
14005         function.
14006         * config/aarch64/aarch64.h (FUNCTION_ARG_PADDING): Delete.
14007         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
14008         * config/aarch64/aarch64-protos.h (aarch64_pad_arg_upward): Delete.
14009         * config/aarch64/aarch64.c (aarch64_pad_arg_upward): Replace with...
14010         (aarch64_function_arg_padding): ...this new function.
14011         (aarch64_gimplify_va_arg_expr): Use pad_direction instead of direction.
14012         (TARGET_FUNCTION_ARG_PADDING): Redefine.
14013         * config/arm/arm.h (FUNCTION_ARG_PADDING): Delete.
14014         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
14015         * config/arm/arm-protos.h (arm_pad_arg_upward): Delete.
14016         * config/arm/arm.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
14017         (arm_pad_arg_upward): Replace with...
14018         (arm_function_arg_padding): ...this new function.
14019         * config/c6x/c6x.h (BLOCK_REG_PADDING): Use pad_direction instead
14020         of direction.
14021         * config/ia64/hpux.h (FUNCTION_ARG_PADDING): Delete.
14022         * config/ia64/ia64-protos.h (ia64_hpux_function_arg_padding): Delete.
14023         * config/ia64/ia64.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
14024         (ia64_hpux_function_arg_padding): Replace with...
14025         (ia64_function_arg_padding): ...this new function.  Use pad_direction
14026         instead of direction.  Check for TARGET_HPUX.
14027         * config/iq2000/iq2000.h (FUNCTION_ARG_PADDING): Delete.
14028         * config/iq2000/iq2000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
14029         (iq2000_function_arg_padding): New function.
14030         * config/mips/mips-protos.h (mips_pad_arg_upward): Delete.
14031         * config/mips/mips.c (mips_pad_arg_upward): Replace with...
14032         (mips_function_arg_padding): ...this new function.
14033         (mips_pad_reg_upward): Update accordingly.
14034         (TARGET_FUNCTION_ARG_PADDING): Redefine.
14035         * config/mips/mips.h (PAD_VARARGS_DOWN): Use
14036         targetm.calls.function_arg_padding.
14037         (FUNCTION_ARG_PADDING): Delete.
14038         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
14039         * config/nios2/nios2.h (FUNCTION_ARG_PADDING): Delete.
14040         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
14041         * config/nios2/nios2-protos.h (nios2_function_arg_padding): Delete.
14042         (nios2_block_reg_padding): Return pad_direction instead of direction.
14043         * config/nios2/nios2.c (nios2_block_reg_padding): Return pad_direction
14044         instead of direction.
14045         (nios2_function_arg_padding): Likewise.  Make static.
14046         (TARGET_FUNCTION_ARG_PADDING): Redefine.
14047         * config/pa/pa.h (FUNCTION_ARG_PADDING): Delete.
14048         (BLOCK_REG_PADDING): Use targetm.calls.function_arg_padding.
14049         * config/pa/pa-protos.h (pa_function_arg_padding): Delete.
14050         * config/pa/pa.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
14051         (pa_function_arg_padding): Make static.  Return pad_direction instead
14052         of direction.
14053         * config/powerpcspe/powerpcspe.h (FUNCTION_ARG_PADDING): Delete.
14054         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
14055         * config/powerpcspe/aix.h (BLOCK_REG_PADDING): Use pad_direction
14056         instead of direction.  Use targetm.calls.function_arg_padding.
14057         * config/powerpcspe/darwin.h (BLOCK_REG_PADDING): Likewise.
14058         * config/powerpcspe/freebsd64.h (BLOCK_REG_PADDING): Likewise.
14059         * config/powerpcspe/linux64.h (BLOCK_REG_PADDING): Likewise.
14060         * config/powerpcspe/powerpcspe-protos.h (function_arg_padding): Delete.
14061         * config/powerpcspe/powerpcspe.c (TARGET_FUNCTION_ARG_PADDING):
14062         Redefine.
14063         (function_arg_padding): Rename to...
14064         (rs6000_function_arg_padding): ...this.  Make static.  Return
14065         pad_direction instead of direction.
14066         (rs6000_return_in_msb): Use rs6000_function_arg_padding.
14067         * config/rs6000/rs6000.h (FUNCTION_ARG_PADDING): Delete.
14068         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
14069         * config/rs6000/aix.h (BLOCK_REG_PADDING): Use pad_direction
14070         instead of direction.  Use targetm.calls.function_arg_padding.
14071         * config/rs6000/darwin.h (BLOCK_REG_PADDING): Likewise.
14072         * config/rs6000/freebsd64.h (BLOCK_REG_PADDING): Likewise.
14073         * config/rs6000/linux64.h (BLOCK_REG_PADDING): Likewise.
14074         * config/rs6000/rs6000-protos.h (function_arg_padding): Delete.
14075         * config/rs6000/rs6000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
14076         (function_arg_padding): Rename to...
14077         (rs6000_function_arg_padding): ...this.  Make static.  Return
14078         pad_direction instead of direction.
14079         (rs6000_return_in_msb): Use rs6000_function_arg_padding.
14080         * config/s390/s390.h (FUNCTION_ARG_PADDING): Delete.
14081         * config/s390/s390.c (s390_function_arg_padding): New function.
14082         (TARGET_FUNCTION_ARG_PADDING): Redefine.
14083         * config/sparc/sparc.h (FUNCTION_ARG_PADDING): Delete.
14084         * config/sparc/sparc-protos.h (function_arg_padding): Delete.
14085         * config/sparc/sparc.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
14086         (function_arg_padding): Rename to...
14087         (sparc_function_arg_padding): ...this.  Make static.  Return
14088         pad_direction instead of direction.
14089         * config/spu/spu.h (FUNCTION_ARG_PADDING): Delete.
14090         * config/spu/spu.c (spu_function_arg_padding): New function.
14091         (TARGET_FUNCTION_ARG_PADDING): Redefine.
14092         * system.h (FUNCTION_ARG_PADDING): Poison.
14094 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
14095             Alan Hayward  <alan.hayward@arm.com>
14096             David Sherwood  <david.sherwood@arm.com>
14098         * target.def (modes_tieable_p): New hook.
14099         * doc/tm.texi (MODES_TIEABLE_P): Replace with...
14100         (TARGET_MODES_TIEABLE_P): ...this.
14101         * doc/tm.texi.in: Regenerate.
14102         * hooks.h (hook_bool_mode_mode_true): Declare.
14103         * hooks.c (hook_bool_mode_mode_true): New function.
14104         * combine.c (subst): Use targetm.modes_tieable_p instead of
14105         MODES_TIEABLE_P.
14106         * dse.c (find_shift_sequence): Likewise.
14107         * expmed.c (extract_low_bits): Likewise.
14108         * lower-subreg.c: Include target.h.
14109         (find_decomposable_subregs): Use targetm.modes_tieable_p instead of
14110         MODES_TIEABLE_P.
14111         * rtlanal.c (rtx_cost): Likewise.
14112         * config/aarch64/aarch64.h (MODES_TIEABLE_P): Delete.
14113         * config/aarch64/aarch64-protos.h (aarch64_modes_tieable_p): Delete.
14114         * config/aarch64/aarch64.c (aarch64_modes_tieable_p): Make static.
14115         (TARGET_MODES_TIEABLE_P): Redefine.
14116         * config/alpha/alpha.h (MODES_TIEABLE_P): Delete.
14117         * config/alpha/alpha.c (alpha_modes_tieable_p): New function.
14118         (TARGET_MODES_TIEABLE_P): Redefine.
14119         * config/arc/arc.h (MODES_TIEABLE_P): Delete.
14120         * config/arc/arc.c (TARGET_MODES_TIEABLE_P): Redefine.
14121         (arc_modes_tieable_p): New function.
14122         * config/arm/arm.h (MODES_TIEABLE_P): Delete.
14123         * config/arm/arm-protos.h (arm_modes_tieable_p): Delete.
14124         * config/arm/arm.c (TARGET_MODES_TIEABLE_P): Redefine.
14125         (arm_modes_tieable_p): Make static.
14126         * config/avr/avr.h (MODES_TIEABLE_P): Delete.
14127         * config/bfin/bfin.h (MODES_TIEABLE_P): Delete.
14128         * config/bfin/bfin.c (bfin_modes_tieable_p): New function.
14129         (TARGET_MODES_TIEABLE_P): Redefine.
14130         * config/c6x/c6x.h (MODES_TIEABLE_P): Delete.
14131         * config/c6x/c6x.c (c6x_modes_tieable_p): New function.
14132         (TARGET_MODES_TIEABLE_P): Redefine.
14133         * config/cr16/cr16.h (MODES_TIEABLE_P): Delete.
14134         * config/cr16/cr16.c (TARGET_MODES_TIEABLE_P): Redefine.
14135         (cr16_modes_tieable_p): New function.
14136         * config/cris/cris.h (MODES_TIEABLE_P): Delete.
14137         * config/epiphany/epiphany.h (MODES_TIEABLE_P): Delete.
14138         * config/fr30/fr30.h (MODES_TIEABLE_P): Delete.
14139         (TRULY_NOOP_TRUNCATION): Update comment.
14140         * config/frv/frv.h (MODES_TIEABLE_P): Delete.
14141         (TRULY_NOOP_TRUNCATION): Update comment.
14142         * config/frv/frv.c (TARGET_MODES_TIEABLE_P): Redefine.
14143         (frv_modes_tieable_p): New function.
14144         * config/ft32/ft32.h (MODES_TIEABLE_P): Delete.
14145         * config/h8300/h8300.h (MODES_TIEABLE_P): Delete.
14146         * config/h8300/h8300.c (h8300_modes_tieable_p): New function.
14147         (TARGET_MODES_TIEABLE_P): Redefine.
14148         * config/i386/i386.h (MODES_TIEABLE_P): Delete.
14149         * config/i386/i386-protos.h (ix86_modes_tieable_p): Delete.
14150         * config/i386/i386.c (ix86_modes_tieable_p): Make static.
14151         (TARGET_MODES_TIEABLE_P): Redefine.
14152         * config/ia64/ia64.h (MODES_TIEABLE_P): Delete.
14153         * config/ia64/ia64.c (TARGET_MODES_TIEABLE_P): Redefine.
14154         (ia64_modes_tieable_p): New function.
14155         * config/iq2000/iq2000.h (MODES_TIEABLE_P): Delete.
14156         * config/iq2000/iq2000.c (TARGET_MODES_TIEABLE_P): Redefine.
14157         (iq2000_modes_tieable_p): New function.
14158         * config/lm32/lm32.h (MODES_TIEABLE_P): Delete.
14159         * config/lm32/lm32.c (TARGET_MODES_TIEABLE_P): Redefine.
14160         (lm32_modes_tieable_p): New function.
14161         * config/m32c/m32c.h (MODES_TIEABLE_P): Delete.
14162         * config/m32c/m32c-protos.h (m32c_modes_tieable_p): Delete.
14163         * config/m32c/m32c.c (m32c_modes_tieable_p): Make static.
14164         (TARGET_MODES_TIEABLE_P): Redefine.
14165         * config/m32r/m32r.h (MODES_TIEABLE_P): Delete.
14166         * config/m32r/m32r.c (TARGET_MODES_TIEABLE_P): Redefine.
14167         (m32r_modes_tieable_p): New function.
14168         * config/m68k/m68k.h (MODES_TIEABLE_P): Delete.
14169         * config/m68k/m68k.c (TARGET_MODES_TIEABLE_P): Redefine.
14170         (m68k_modes_tieable_p): New function.
14171         * config/mcore/mcore.h (MODES_TIEABLE_P): Delete.
14172         * config/mcore/mcore.c (TARGET_MODES_TIEABLE_P): Redefine.
14173         (mcore_modes_tieable_p): New function.
14174         * config/microblaze/microblaze.h (MODES_TIEABLE_P): Delete.
14175         * config/microblaze/microblaze.c (microblaze_modes_tieable_p): New
14176         function.
14177         (TARGET_MODES_TIEABLE_P): Redefine.
14178         * config/mips/mips.h (MODES_TIEABLE_P): Delete.
14179         * config/mips/mips-protos.h (mips_modes_tieable_p): Delete.
14180         * config/mips/mips.c (mips_modes_tieable_p): Make static.
14181         (TARGET_MODES_TIEABLE_P): Redefine.
14182         * config/mmix/mmix.h (MODES_TIEABLE_P): Delete.
14183         * config/mn10300/mn10300.h (MODES_TIEABLE_P): Delete.
14184         * config/mn10300/mn10300-protos.h (mn10300_modes_tieable): Delete.
14185         * config/mn10300/mn10300.c (mn10300_modes_tieable): Rename to...
14186         (mn10300_modes_tieable_p): ...this and make static.
14187         (TARGET_MODES_TIEABLE_P): Redefine.
14188         * config/moxie/moxie.h (MODES_TIEABLE_P): Delete.
14189         * config/msp430/msp430.h (MODES_TIEABLE_P): Delete.
14190         * config/msp430/msp430-protos.h (msp430_modes_tieable_p): Delete.
14191         * config/msp430/msp430.c (TARGET_MODES_TIEABLE_P): Redefine.
14192         (msp430_modes_tieable_p): Make static.
14193         * config/nds32/nds32.h (MODES_TIEABLE_P): Delete.
14194         * config/nds32/nds32.c (nds32_modes_tieable_p): New function.
14195         (TARGET_MODES_TIEABLE_P): Redefine.
14196         * config/nios2/nios2.h (MODES_TIEABLE_P): Delete.
14197         * config/nvptx/nvptx.h (MODES_TIEABLE_P): Delete.
14198         * config/nvptx/nvptx.c (nvptx_modes_tieable_p): New function.
14199         (TARGET_MODES_TIEABLE_P): Redefine.
14200         * config/pa/pa.h (MODES_TIEABLE_P): Delete.
14201         * config/pa/pa-protos.h (pa_modes_tieable_p): Delete.
14202         * config/pa/pa.c (pa_modes_tieable_p): Make static.
14203         (TARGET_MODES_TIEABLE_P): Redefine.
14204         * config/pdp11/pdp11.h (MODES_TIEABLE_P): Delete.
14205         * config/pdp11/pdp11.c (TARGET_MODES_TIEABLE_P): Redefine.
14206         (pdp11_modes_tieable_p): New function.
14207         * config/powerpcspe/powerpcspe.h (MODES_TIEABLE_P): Delete.
14208         * config/powerpcspe/powerpcspe.c (TARGET_MODES_TIEABLE_P): Redefine.
14209         (rs6000_modes_tieable_p): New function.
14210         (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
14211         * config/powerpcspe/powerpcspe.md: Update comment.
14212         * config/riscv/riscv.h (MODES_TIEABLE_P): Delete.
14213         * config/riscv/riscv.c (riscv_modes_tieable_p): New function.
14214         (TARGET_MODES_TIEABLE_P): Redefine.
14215         * config/rl78/rl78.h (MODES_TIEABLE_P): Delete.
14216         * config/rl78/rl78.c (TARGET_MODES_TIEABLE_P): Redefine.
14217         (rl78_modes_tieable_p): New function.
14218         * config/rs6000/rs6000.h (MODES_TIEABLE_P): Delete.
14219         * config/rs6000/rs6000.c (TARGET_MODES_TIEABLE_P): Redefine.
14220         (rs6000_modes_tieable_p): New function.
14221         (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
14222         * config/rs6000/rs6000.md: Update comment.
14223         * config/rx/rx.h (MODES_TIEABLE_P): Delete.
14224         * config/rx/rx.c (rx_modes_tieable_p): New function.
14225         (TARGET_MODES_TIEABLE_P): Redefine.
14226         * config/s390/s390.h (MODES_TIEABLE_P): Delete.
14227         * config/s390/s390.c (s390_modes_tieable_p): New function.
14228         (TARGET_MODES_TIEABLE_P): Redefine.
14229         * config/sh/sh.h (MODES_TIEABLE_P): Delete.
14230         * config/sh/sh.c (TARGET_MODES_TIEABLE_P): Redefine.
14231         (sh_modes_tieable_p): New function.
14232         * config/sparc/sparc.h (MODES_TIEABLE_P): Delete.
14233         * config/sparc/sparc-protos.h (sparc_modes_tieable_p): Delete.
14234         * config/sparc/sparc.c (TARGET_MODES_TIEABLE_P): Redefine.
14235         (sparc_modes_tieable_p): Make static.
14236         * config/spu/spu.h (MODES_TIEABLE_P): Delete.
14237         * config/spu/spu.c (spu_modes_tieable_p): New function.
14238         (TARGET_MODES_TIEABLE_P): Redefine.
14239         * config/stormy16/stormy16.h (MODES_TIEABLE_P): Delete.
14240         * config/stormy16/stormy16.c (xstormy16_modes_tieable_p): New function.
14241         (TARGET_MODES_TIEABLE_P): Redefine.
14242         * config/tilegx/tilegx.h (MODES_TIEABLE_P): Delete.
14243         * config/tilepro/tilepro.h (MODES_TIEABLE_P): Delete.
14244         * config/v850/v850.h (MODES_TIEABLE_P): Delete.
14245         * config/v850/v850.c (v850_modes_tieable_p): New function.
14246         (TARGET_MODES_TIEABLE_P): Redefine.
14247         * config/vax/vax.h (MODES_TIEABLE_P): Delete.
14248         * config/visium/visium.h (MODES_TIEABLE_P): Delete.
14249         * config/visium/visium.c (TARGET_MODES_TIEABLE_P): Redefine.
14250         (visium_modes_tieable_p): New function.
14251         * config/xtensa/xtensa.h (MODES_TIEABLE_P): Delete.
14252         * config/xtensa/xtensa.c (TARGET_MODES_TIEABLE_P): Redefine.
14253         (xtensa_modes_tieable_p): New function.
14254         * system.h (MODES_TIEABLE_P): Poison.
14256 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
14257             Alan Hayward  <alan.hayward@arm.com>
14258             David Sherwood  <david.sherwood@arm.com>
14260         * target.def (hard_regno_mode_ok): New hook.
14261         * doc/tm.texi (HARD_REGNO_MODE_OK): Replace with...
14262         (TARGET_HARD_REGNO_MODE_OK): ...this.
14263         * doc/tm.texi.in: Regenerate.
14264         * hooks.h (hook_bool_uint_mode_true): Declare.
14265         * hooks.c (hook_bool_uint_mode_true): New function.
14266         * doc/md.texi: Refer to targetm.hard_regno_mode_ok instead of
14267         HARD_REGNO_MODE_OK.
14268         * genpreds.c (write_insn_preds_c): Add an include of target.h.
14269         * alias.c (init_alias_target): Use targetm.hard_regno_mode_ok
14270         instead of HARD_REGNO_MODE_OK.
14271         * caller-save.c: Include target.h.
14272         (reg_save_code): Use targetm.hard_regno_mode_ok instead of
14273         HARD_REGNO_MODE_OK.
14274         * combine.c (can_combine_p): Likewise.
14275         (combinable_i3pat): Likewise.
14276         (can_change_dest_mode): Likewise.
14277         * expr.c (init_expr_target): Likewise.
14278         (convert_move): Likewise.
14279         (convert_modes): Likewise.
14280         * ira.c (setup_prohibited_class_mode_regs): Likewise.
14281         (setup_prohibited_mode_move_regs): Likewise.
14282         * ira.h (target_ira): Likewise.
14283         * lra-assigns.c (find_hard_regno_for_1): Likewise.
14284         * lra-constraints.c (process_alt_operands): Likewise.
14285         (split_reg): Likewise.
14286         * recog.c (peep2_find_free_register): Likewise.
14287         * ree.c (combine_reaching_defs): Likewise.
14288         * regcprop.c (maybe_mode_change): Likewise.
14289         * reginfo.c (init_reg_sets_1): Likewise.
14290         (choose_hard_reg_mode): Likewise.
14291         (simplifiable_subregs): Likewise.
14292         * regrename.c (check_new_reg_p): Likewise.
14293         * reload.c (find_valid_class): Likewise.
14294         (find_valid_class_1): Likewise.
14295         (reload_inner_reg_of_subreg): Likewise.
14296         (push_reload): Likewise.
14297         (combine_reloads): Likewise.
14298         (find_dummy_reload): Likewise.
14299         (find_reloads): Likewise.
14300         * reload1.c (find_reg): Likewise.
14301         (set_reload_reg): Likewise.
14302         (allocate_reload_reg): Likewise.
14303         (choose_reload_regs): Likewise.
14304         (reload_adjust_reg_for_temp): Likewise.
14305         * rtlanal.c (subreg_size_offset_from_lsb): Likewise.
14306         (simplify_subreg_regno): Likewise.
14307         * sel-sched.c (init_regs_for_mode): Likewise.
14308         * varasm.c (make_decl_rtl): Likewise.
14309         * config/aarch64/aarch64.h (HARD_REGNO_MODE_OK): Delete.
14310         (MODES_TIEABLE_P): Use targetm.hard_regno_mode_ok instead of
14311         HARD_REGNO_MODE_OK.
14312         * config/aarch64/aarch64-protos.h (aarch64_hard_regno_mode_ok): Delete.
14313         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Make static.
14314         (TARGET_HARD_REGNO_MODE_OK): Redefine.
14315         * config/alpha/alpha.h (HARD_REGNO_MODE_OK): Delete.
14316         * config/alpha/alpha.c (alpha_hard_regno_mode_ok): New function.
14317         (TARGET_HARD_REGNO_MODE_OK): Redefine.
14318         * config/arc/arc.h (arc_hard_regno_mode_ok): Delete.
14319         (arc_mode_class): Delete.
14320         (HARD_REGNO_MODE_OK): Delete.
14321         * config/arc/arc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
14322         (arc_hard_regno_mode_ok): Rename old array to...
14323         (arc_hard_regno_mode_ok_modes): ...this.
14324         (arc_conditional_register_usage): Update accordingly.
14325         (arc_mode_class): Make static.
14326         (arc_hard_regno_mode_ok): New function.
14327         * config/arm/arm.h (HARD_REGNO_MODE_OK): Delete.
14328         * config/arm/arm-protos.h (arm_hard_regno_mode_ok): Delete.
14329         * config/arm/arm.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
14330         (arm_hard_regno_mode_ok): Make static.
14331         * config/arm/arm.md (movdi): Use targetm.hard_regno_mode_ok instead of
14332         HARD_REGNO_MODE_OK.
14333         * config/avr/avr-protos.h (avr_hard_regno_mode_ok): Delete.
14334         * config/avr/avr.h (HARD_REGNO_MODE_OK): Delete.
14335         * config/avr/avr.c (avr_hard_regno_mode_ok): Make static and
14336         return a bool.
14337         (TARGET_HARD_REGNO_MODE_OK): Redefine.
14338         * config/bfin/bfin-protos.h (hard_regno_mode_ok): Delete.
14339         * config/bfin/bfin.h (HARD_REGNO_MODE_OK): Delete.
14340         * config/bfin/bfin.c (hard_regno_mode_ok): Rename to...
14341         (bfin_hard_regno_mode_ok): ...this.  Make static and return a bool.
14342         (TARGET_HARD_REGNO_MODE_OK): Redefine.
14343         * config/bfin/predicates.md (valid_reg_operand): Use
14344         targetm.hard_regno_mode_ok instead of HARD_REGNO_MODE_OK.
14345         * config/c6x/c6x.h (HARD_REGNO_MODE_OK): Delete.
14346         * config/c6x/c6x.c (c6x_hard_regno_mode_ok): New function.
14347         (TARGET_HARD_REGNO_MODE_OK): Redefine.
14348         * config/cr16/cr16.h (HARD_REGNO_MODE_OK): Delete.
14349         * config/cr16/cr16-protos.h (cr16_hard_regno_mode_ok): Delete.
14350         * config/cr16/cr16.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
14351         (cr16_hard_regno_mode_ok): Make static and return a bool.
14352         * config/cris/cris.h (HARD_REGNO_MODE_OK): Delete.
14353         * config/cris/cris.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
14354         (cris_hard_regno_mode_ok): New function.
14355         * config/epiphany/epiphany.h (epiphany_hard_regno_mode_ok): Delete.
14356         (epiphany_mode_class): Delete.
14357         (HARD_REGNO_MODE_OK): Delete.
14358         * config/epiphany/epiphany-protos.h (hard_regno_mode_ok): Delete.
14359         * config/epiphany/epiphany.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
14360         (hard_regno_mode_ok): Rename to...
14361         (epiphany_hard_regno_mode_ok): ...this.  Make static and return a bool.
14362         * config/fr30/fr30.h (HARD_REGNO_MODE_OK): Delete.
14363         * config/fr30/fr30.md: Refer to targetm.hard_regno_mode_ok instead of
14364         HARD_REGNO_MODE_OK.
14365         * config/frv/frv.h (HARD_REGNO_MODE_OK): Delete.
14366         * config/frv/frv-protos.h (frv_hard_regno_mode_ok): Delete.
14367         * config/frv/frv.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
14368         (frv_hard_regno_mode_ok): Make static and return a bool.
14369         * config/frv/frv.md: Refer to targetm.hard_regno_mode_ok instead of
14370         HARD_REGNO_MODE_OK.
14371         * config/ft32/ft32.h (HARD_REGNO_MODE_OK): Delete.
14372         * config/h8300/h8300.h (HARD_REGNO_MODE_OK): Delete.
14373         * config/h8300/h8300-protos.h (h8300_hard_regno_mode_ok): Delete.
14374         * config/h8300/h8300.c (h8300_hard_regno_mode_ok): Make static
14375         and return a bool.
14376         (TARGET_HARD_REGNO_MODE_OK): Redefine.
14377         * config/i386/i386.h (HARD_REGNO_MODE_OK): Delete.
14378         * config/i386/i386-protos.h (ix86_hard_regno_mode_ok): Delete.
14379         * config/i386/i386.c (ix86_hard_regno_mode_ok): Make static and
14380         return a bool.
14381         (TARGET_HARD_REGNO_MODE_OK): Redefine.
14382         * config/ia64/ia64.h (HARD_REGNO_MODE_OK): Delete.
14383         * config/ia64/ia64.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
14384         (ia64_hard_regno_mode_ok): New function.
14385         * config/iq2000/iq2000.h (HARD_REGNO_MODE_OK): Delete.
14386         * config/iq2000/iq2000.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
14387         (iq2000_hard_regno_mode_ok): New function.
14388         * config/lm32/lm32.h (HARD_REGNO_MODE_OK): Delete.
14389         * config/lm32/lm32.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
14390         (lm32_hard_regno_mode_ok): New function.
14391         * config/m32c/m32c.h (HARD_REGNO_MODE_OK): Delete.
14392         * config/m32c/m32c-protos.h (m32c_hard_regno_ok): Delete.
14393         * config/m32c/m32c.c (class_can_hold_mode): Use m32c_hard_regno_mode_ok
14394         instead of HARD_REGNO_MODE_OK.
14395         (m32c_hard_regno_ok): Rename to...
14396         (m32c_hard_regno_mode_ok): ...this.  Make static and return a bool.
14397         (m32c_cannot_change_mode_class): Update accordingly.
14398         (TARGET_HARD_REGNO_MODE_OK): Redefine.
14399         * config/m32r/m32r.h (m32r_hard_regno_mode_ok): Delete.
14400         (m32r_mode_class): Delete.
14401         (HARD_REGNO_MODE_OK): Delete.
14402         * config/m32r/m32r.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
14403         (m32r_hard_regno_mode_ok): Rename to...
14404         (m32r_hard_regno_modes): ...this.
14405         (m32r_mode_class): Make static.
14406         (m32r_hard_regno_mode_ok): New function.
14407         * config/m68k/m68k.h (HARD_REGNO_MODE_OK): Delete.
14408         * config/m68k/m68k-protos.h (m68k_regno_mode_ok): Delete.
14409         * config/m68k/m68k.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
14410         (m68k_hard_regno_mode_ok): Make static.
14411         * config/mcore/mcore.h (HARD_REGNO_MODE_OK): Delete.
14412         * config/mcore/mcore.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
14413         (mcore_hard_regno_mode_ok): New function.
14414         * config/microblaze/microblaze.h (microblaze_hard_regno_mode_ok)
14415         (HARD_REGNO_MODE_OK): Delete.
14416         * config/microblaze/microblaze.c (microblaze_hard_regno_mode_ok):
14417         Rename to...
14418         (microblaze_hard_regno_mode_ok_p): ...this and make static.
14419         (microblaze_hard_regno_mode_ok): New function.
14420         (TARGET_HARD_REGNO_MODE_OK): Redefine.
14421         * config/mips/mips.h (HARD_REGNO_MODE_OK): Delete.
14422         (mips_hard_regno_mode_ok): Delete.
14423         * config/mips/mips.c (mips_hard_regno_mode_ok): Rename to...
14424         (mips_hard_regno_mode_ok_p): ...this and make static.
14425         (mips_hard_regno_mode_ok_p): Rename to...
14426         (mips_hard_regno_mode_ok_uncached): ...this.
14427         (mips_hard_regno_mode_ok): New function.
14428         (mips_class_max_nregs): Use mips_hard_regno_mode_ok instead
14429         of HARD_REGNO_MODE_OK.
14430         (mips_option_override): Update after above name changes.
14431         (TARGET_HARD_REGNO_MODE_OK): Redefine.
14432         * config/mmix/mmix.h (HARD_REGNO_MODE_OK): Delete.
14433         * config/mn10300/mn10300.h (HARD_REGNO_MODE_OK): Delete.
14434         * config/mn10300/mn10300-protos.h (mn10300_hard_regno_mode_ok): Delete.
14435         * config/mn10300/mn10300.c (mn10300_hard_regno_mode_ok): Make static.
14436         (TARGET_HARD_REGNO_MODE_OK): Redefine.
14437         * config/moxie/moxie.h (HARD_REGNO_MODE_OK): Delete.
14438         * config/msp430/msp430.h (HARD_REGNO_MODE_OK): Delete.
14439         * config/msp430/msp430-protos.h (msp430_hard_regno_mode_ok): Delete.
14440         * config/msp430/msp430.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
14441         (msp430_hard_regno_mode_ok): Make static and return a bool.
14442         * config/nds32/nds32.h (HARD_REGNO_MODE_OK): Delete.
14443         * config/nds32/nds32-protos.h (nds32_hard_regno_mode_ok): Delete.
14444         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Make static
14445         and return a bool.
14446         (TARGET_HARD_REGNO_MODE_OK): Redefine.
14447         * config/nios2/nios2.h (HARD_REGNO_MODE_OK): Delete.
14448         * config/nvptx/nvptx.h (HARD_REGNO_MODE_OK): Delete.
14449         * config/pa/pa.h (MODES_TIEABLE_P): Update commentary.
14450         * config/pa/pa32-regs.h (HARD_REGNO_MODE_OK): Rename to...
14451         (PA_HARD_REGNO_MODE_OK): ...this
14452         * config/pa/pa64-regs.h (HARD_REGNO_MODE_OK): Rename to...
14453         (PA_HARD_REGNO_MODE_OK): ...this.
14454         * config/pa/pa.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
14455         (pa_hard_regno_mode_ok): New function.
14456         * config/pdp11/pdp11.h (HARD_REGNO_MODE_OK): Delete.
14457         * config/pdp11/pdp11.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
14458         (pdp11_hard_regno_mode_ok): New function.
14459         * config/powerpcspe/powerpcspe.h (HARD_REGNO_MODE_OK): Delete.
14460         * config/powerpcspe/powerpcspe-protos.h (rs6000_hard_regno_mode_ok_p):
14461         Delete.
14462         * config/powerpcspe/powerpcspe.c (rs6000_hard_regno_mode_ok_p):
14463         Make static.
14464         (TARGET_HARD_REGNO_MODE_OK): Redefine.
14465         (rs6000_hard_regno_mode_ok): Rename to...
14466         (rs6000_hard_regno_mode_ok_uncached): ...this.
14467         (rs6000_init_hard_regno_mode_ok): Update accordingly.
14468         (rs6000_hard_regno_mode_ok): New function.
14469         * config/riscv/riscv.h (HARD_REGNO_MODE_OK): Delete.
14470         * config/riscv/riscv-protos.h (riscv_hard_regno_mode_ok_p): Delete.
14471         * config/riscv/riscv.c (riscv_hard_regno_mode_ok_p): Rename to...
14472         (riscv_hard_regno_mode_ok): ...this and make static.
14473         (TARGET_HARD_REGNO_MODE_OK): Redefine.
14474         * config/rl78/rl78.h (HARD_REGNO_MODE_OK): Delete.
14475         * config/rl78/rl78-protos.h (rl78_hard_regno_mode_ok): Delete.
14476         * config/rl78/rl78.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
14477         (rl78_hard_regno_mode_ok): Make static and return bool.
14478         * config/rs6000/rs6000.h (HARD_REGNO_MODE_OK): Delete.
14479         * config/rs6000/rs6000-protos.h (rs6000_hard_regno_mode_ok_p):
14480         Delete.
14481         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok_p): Make static.
14482         (TARGET_HARD_REGNO_MODE_OK): Redefine.
14483         (rs6000_hard_regno_mode_ok): Rename to...
14484         (rs6000_hard_regno_mode_ok_uncached): ...this.
14485         (rs6000_init_hard_regno_mode_ok): Update accordingly.
14486         (rs6000_hard_regno_mode_ok): New function.
14487         * config/rx/rx.h (HARD_REGNO_MODE_OK): Delete.
14488         * config/rx/rx.c (rx_hard_regno_mode_ok): New function.
14489         (TARGET_HARD_REGNO_MODE_OK): Redefine.
14490         * config/s390/s390.h (HARD_REGNO_MODE_OK): Delete.
14491         * config/s390/s390-protos.h (s390_hard_regno_mode_ok): Delete.
14492         * config/s390/s390.c (s390_hard_regno_mode_ok): Make static.
14493         (TARGET_HARD_REGNO_MODE_OK): Redefine.
14494         * config/sh/sh.h (HARD_REGNO_MODE_OK): Delete.
14495         * config/sh/sh-protos.h (sh_hard_regno_mode_ok): Delete.
14496         * config/sh/sh.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
14497         (sh_hard_regno_mode_ok): Make static.
14498         * config/sparc/constraints.md: Refer to targetm.hard_regno_mode_ok
14499         instead of HARD_REGNO_MODE_OK.
14500         * config/sparc/sparc.h (hard_regno_mode_classes): Delete.
14501         (sparc_mode_class): Delete.
14502         (HARD_REGNO_MODE_OK): Delete.
14503         * config/sparc/sparc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
14504         (hard_regno_mode_classes): Make static.
14505         (sparc_mode_class): Likewise.
14506         (sparc_hard_regno_mode_ok): New function.
14507         * config/spu/spu.h (HARD_REGNO_MODE_OK): Delete.
14508         * config/stormy16/stormy16.h (HARD_REGNO_MODE_OK): Delete.
14509         * config/stormy16/stormy16.c (xstormy16_hard_regno_mode_ok): New
14510         function.
14511         (TARGET_HARD_REGNO_MODE_OK): Redefine.
14512         * config/tilegx/tilegx.h (HARD_REGNO_MODE_OK): Delete.
14513         * config/tilepro/tilepro.h (HARD_REGNO_MODE_OK): Delete.
14514         * config/v850/v850.h (HARD_REGNO_MODE_OK): Delete.
14515         * config/v850/v850.c (v850_hard_regno_mode_ok): New function.
14516         (TARGET_HARD_REGNO_MODE_OK): Redefine.
14517         * config/vax/vax.h (HARD_REGNO_MODE_OK): Delete.
14518         * config/visium/visium.h (HARD_REGNO_MODE_OK): Delete.
14519         * config/visium/visium.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
14520         (visium_hard_regno_mode_ok): New function.
14521         * config/visium/visium.md: Refer to targetm.hard_regno_mode_ok
14522         instead of HARD_REGNO_MODE_OK.
14523         * config/xtensa/xtensa.h (xtensa_hard_regno_mode_ok): Delete.
14524         (HARD_REGNO_MODE_OK): Delete.
14525         * config/xtensa/xtensa.c (xtensa_hard_regno_mode_ok): Rename to...
14526         (xtensa_hard_regno_mode_ok_p): ...this and make static.
14527         (xtensa_option_override): Update accordingly.
14528         (TARGET_HARD_REGNO_MODE_OK): Redefine.
14529         (xtensa_hard_regno_mode_ok): New function.
14530         * system.h (HARD_REGNO_MODE_OK): Poison.
14532 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
14533             Alan Hayward  <alan.hayward@arm.com>
14534             David Sherwood  <david.sherwood@arm.com>
14536         * target.def (hard_regno_call_part_clobbered): New hook.
14537         * doc/tm.texi.in (HARD_REGNO_CALL_PART_CLOBBERED): Replace with...
14538         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): ...this hook.
14539         * doc/tm.texi: Regenerate.
14540         * hooks.h (hook_bool_uint_mode_false): Declare.
14541         * hooks.c (hook_bool_uint_mode_false): New function.
14542         * regs.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
14543         * cselib.c (cselib_process_insn): Use
14544         targetm.hard_regno_call_part_clobbered instead of
14545         HARD_REGNO_CALL_PART_CLOBBERED.
14546         * ira-conflicts.c (ira_build_conflicts): Likewise.
14547         * ira-costs.c (ira_tune_allocno_costs): Likewise.
14548         * lra-constraints.c (need_for_call_save_p): Likewise.
14549         * lra-lives.c: Include target.h.
14550         (check_pseudos_live_through_calls): Use
14551         targetm.hard_regno_call_part_clobbered instead of
14552         HARD_REGNO_CALL_PART_CLOBBERED.
14553         * regcprop.c: Include target.h.
14554         (copyprop_hardreg_forward_1): Use
14555         targetm.hard_regno_call_part_clobbered instead of
14556         HARD_REGNO_CALL_PART_CLOBBERED.
14557         * reginfo.c (choose_hard_reg_mode): Likewise.
14558         * regrename.c (check_new_reg_p): Likewise.
14559         * reload.c (find_equiv_reg): Likewise.
14560         * reload1.c (emit_reload_insns): Likewise.
14561         * sched-deps.c (deps_analyze_insn): Likewise.
14562         * sel-sched.c (init_regs_for_mode): Likewise.
14563         (mark_unavailable_hard_regs): Likewise.
14564         * targhooks.c (default_dwarf_frame_reg_mode): Likewise.
14565         * config/aarch64/aarch64.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
14566         * config/aarch64/aarch64.c (aarch64_hard_regno_call_part_clobbered):
14567         New function.
14568         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
14569         * config/avr/avr.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
14570         * config/avr/avr-protos.h (avr_hard_regno_call_part_clobbered):
14571         Delete.
14572         * config/avr/avr.c (avr_hard_regno_call_part_clobbered): Make static
14573         and return a bool.
14574         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
14575         * config/i386/i386.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
14576         * config/i386/i386.c (ix86_hard_regno_call_part_clobbered): New
14577         function.
14578         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
14579         * config/mips/mips.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
14580         * config/mips/mips.c (mips_hard_regno_call_part_clobbered): New
14581         function.
14582         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
14583         * config/powerpcspe/powerpcspe.h (HARD_REGNO_CALL_PART_CLOBBERED):
14584         Delete.
14585         * config/powerpcspe/powerpcspe.c
14586         (rs6000_hard_regno_call_part_clobbered): New function.
14587         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
14588         * config/rs6000/rs6000.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
14589         * config/rs6000/rs6000.c (rs6000_hard_regno_call_part_clobbered):
14590         New function.
14591         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
14592         * config/s390/s390.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
14593         * config/s390/s390.c (s390_hard_regno_call_part_clobbered): New
14594         function.
14595         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
14596         * config/sh/sh.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
14597         * system.h (HARD_REGNO_CALL_PART_CLOBBERED): Poison.
14599 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
14600             Alan Hayward  <alan.hayward@arm.com>
14601             David Sherwood  <david.sherwood@arm.com>
14603         * rtl.h (subreg_memory_offset): Declare.
14604         * emit-rtl.c (subreg_memory_offset): New function.
14605         * expmed.c (store_bit_field_1): Use it.
14606         * expr.c (undefined_operand_subword_p): Likewise.
14607         * simplify-rtx.c (simplify_subreg): Likewise.
14609 2017-09-04  Alexander Monakov  <amonakov@ispras.ru>
14611         PR rtl-optimization/57448
14612         PR target/67458
14613         PR target/81316
14614         * optabs.c (expand_atomic_load): Place compiler memory barriers if
14615         using atomic_load pattern.
14616         (expand_atomic_store): Likewise.
14618 2017-09-04  Jakub Jelinek  <jakub@redhat.com>
14620         PR sanitizer/81981
14621         * gimple-fold.c (gimple_fold_call): Optimize away useless UBSAN_PTR
14622         and UBSAN_BOUNDS internal calls.  Clean up IFN_UBSAN_OBJECT_SIZE
14623         handling.  Use replace_call_with_value with NULL instead of
14624         gsi_replace, unlink_stmt_vdef and release_defs.
14626         * gdbhooks.py (OptMachineModePrinter.to_string): Use 8 spaces
14627         instead of tab.
14629         * lra-remat.c (reg_overlap_for_remat_p): Fix a pasto.
14631 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
14633         PR bootstrap/82045
14634         * rtl.h (emit_library_call_value_1): Declare.
14635         (emit_library_call): Replace declaration with a series of overloads.
14636         Remove the parameter count argument.
14637         (emit_library_call_value): Likewise.
14638         * calls.c (emit_library_call_value_1): Make global.  Replace varargs
14639         with an "rtx_mode_t *".
14640         (emit_library_call_value): Delete.
14641         (emit_library_call): Likewise.
14642         * asan.c (asan_emit_stack_protection): Update calls accordingly.
14643         (asan_emit_allocas_unpoison): Likewise.
14644         * builtins.c (expand_builtin_powi): Likewise.
14645         (expand_asan_emit_allocas_unpoison): Likewise.
14646         * cfgexpand.c (expand_main_function): Likewise.
14647         * config/aarch64/aarch64.c (aarch64_trampoline_init): Likewise.
14648         * config/aarch64/aarch64.h (PROFILE_HOOK): Likewise.
14649         * config/alpha/alpha.c (alpha_trampoline_init): Likewise.
14650         * config/arm/arm.c (arm_trampoline_init): Likewise.
14651         (arm_call_tls_get_addr): Likewise.
14652         (arm_expand_divmod_libfunc): Likewise.
14653         * config/bfin/bfin.md (umulsi3_highpart): Likewise.
14654         (smulsi3_highpart): Likewise.
14655         * config/c6x/c6x.c (c6x_initialize_trampoline): Likewise.
14656         (c6x_expand_compare): Likewise.
14657         (c6x_expand_movmem): Likewise.
14658         * config/frv/frv.c (frv_trampoline_init): Likewise.
14659         * config/i386/i386.c (ix86_trampoline_init): Likewise.
14660         (ix86_expand_divmod_libfunc): Likewise.
14661         * config/ia64/ia64.c (ia64_expand_tls_address): Likewise.
14662         (ia64_expand_compare): Likewise.
14663         (ia64_profile_hook): Likewise.
14664         * config/ia64/ia64.md (save_stack_nonlocal): Likewise.
14665         (nonlocal_goto): Likewise.
14666         (restore_stack_nonlocal): Likewise.
14667         * config/m32r/m32r.c (block_move_call): Likewise.
14668         (m32r_trampoline_init): Likewise.
14669         * config/m68k/linux.h (FINALIZE_TRAMPOLINE): Likewise.
14670         * config/m68k/m68k.c (m68k_call_tls_get_addr): Likewise.
14671         (m68k_call_m68k_read_tp): Likewise.
14672         * config/microblaze/microblaze.c (microblaze_call_tls_get_addr)
14673         (microblaze_expand_divide): Likewise.
14674         * config/mips/mips.h (mips_args): Likewise.
14675         * config/mips/sdemtk.h (mips_sync_icache): Likewise.
14676         (MIPS_ICACHE_SYNC): Likewise.
14677         * config/nios2/nios2.c (nios2_emit_expensive_div): Likewise.
14678         (nios2_trampoline_init): Likewise.
14679         * config/pa/pa.c (hppa_tls_call): Likewise.
14680         (pa_trampoline_init): Likewise.
14681         * config/pa/pa.md (canonicalize_funcptr_for_compare): Likewise.
14682         * config/powerpcspe/powerpcspe.c (rs6000_legitimize_tls_address)
14683         (expand_strn_compare): Likewise.
14684         (rs6000_generate_compare): Likewise.
14685         (rs6000_expand_float128_convert): Likewise.
14686         (output_profile_hook): Likewise.
14687         (rs6000_trampoline_init): Likewise.
14688         * config/powerpcspe/powerpcspe.md (neg<mode>2): Likewise.
14689         * config/riscv/riscv.h (PROFILE_HOOK): Likewise.
14690         * config/rs6000/rs6000-string.c (expand_strn_compare): Likewise.
14691         * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise.
14692         (rs6000_generate_compare): Likewise.
14693         (rs6000_expand_float128_convert): Likewise.
14694         (output_profile_hook): Likewise.
14695         (rs6000_trampoline_init): Likewise.
14696         * config/rs6000/rs6000.md (neg<mode>2): Likewise.
14697         * config/sh/sh.c (sh_trampoline_init): Likewise.
14698         * config/sparc/sparc.c (emit_soft_tfmode_libcall): Likewise.
14699         (sparc_emit_float_lib_cmp): Likewise.
14700         (sparc32_initialize_trampoline): Likewise.
14701         (sparc64_initialize_trampoline): Likewise.
14702         (sparc_profile_hook): Likewise.
14703         * config/spu/spu.c (ea_load_store): Likewise.
14704         * config/spu/spu.md (floatunssidf2): Likewise.
14705         * config/tilegx/tilegx.c (tilegx_trampoline_init): Likewise.
14706         * config/tilepro/tilepro.c (tilepro_trampoline_init): Likewise.
14707         * config/visium/visium.c (expand_block_move_4): Likewise.
14708         (expand_block_move_2): Likewise.
14709         (expand_block_move_1): Likewise.
14710         (expand_block_set_4): Likewise.
14711         (expand_block_set_2): Likewise.
14712         (expand_block_set_1): Likewise.
14713         (visium_trampoline_init): Likewise.
14714         (visium_profile_hook): Likewise.
14715         * config/xtensa/xtensa.c (xtensa_expand_nonlocal_goto): Likewise.
14716         (xtensa_setup_frame_addresses): Likewise.
14717         (xtensa_trampoline_init): Likewise.
14718         * except.c (sjlj_emit_function_enter): Likewise.
14719         (sjlj_emit_function_exit): Likewise.
14720         * explow.c (allocate_dynamic_stack_space): Likewise.
14721         (probe_stack_range): Likewise.
14722         * expr.c (convert_mode_scalar): Likewise.
14723         * optabs.c (expand_binop): Likewise.
14724         (expand_twoval_binop_libfunc): Likewise.
14725         (expand_unop): Likewise.
14726         (prepare_cmp_insn): Likewise.
14727         (prepare_float_lib_cmp): Likewise.
14728         (expand_float): Likewise.
14729         (expand_fix): Likewise.
14730         (expand_fixed_convert): Likewise.
14731         (maybe_emit_sync_lock_test_and_set): Likewise.
14732         (expand_atomic_compare_and_swap): Likewise.
14733         (expand_mem_thread_fence): Likewise.
14734         (expand_atomic_fetch_op): Likewise.
14736 2017-09-03  Gerald Pfeifer  <gerald@pfeifer.com>
14738         * doc/generic.texi (OpenACC): Adjust URL.
14739         * doc/invoke.texi (C Dialect Options): Ditto.
14741 2017-09-03  Uros Bizjak  <ubizjak@gmail.com>
14743         * config/i386/i386.md (*bt<mode>): Use nonimmediate_operand
14744         predicate for operand 1.  Add (m,<S>) constraint.
14745         (*jcc_bt<mode>): Use nonimmediate_operand predicate for operand 1.
14746         Prevent memory operand 1 with register operand 2.
14748 2017-09-01  Segher Boessenkool  <segher@kernel.crashing.org>
14750         PR rtl-optimization/82024
14751         * combine.c (try_combine): If the combination result is a PARALLEL,
14752         and we only need to retain the SET in there that would be placed
14753         at I2, check that we can place that at I3 instead, before doing so.
14755 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
14757         PR target/81766
14758         * config/i386/i386.c (ix86_init_large_pic_reg): Return label
14759         instead of void.
14760         (ix86_init_pic_reg): Remember label from ix86_init_large_pic_reg,
14761         if non-NULL and preceded by NOTE_INSN_BASIC_BLOCK, swap the note
14762         and label.
14764 2017-09-01  Joerg Sonnenberger  <joerg@bec.de>
14765             Jeff Law  <law@redhat.com>
14767         * varasm.c (bss_initializer_p): Do not put constants into .bss
14768         (categorize_decl_for_section): Handle bss_initializer_p returning
14769         false when DECL_INITIAL is NULL.
14771 2017-09-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14773         PR target/82012
14774         * config/s390/s390.c (s390_can_inline_p): New function.
14776 2017-09-01  Jeff Law  <law@redhat.com>
14778         PR tree-optimization/82052
14779         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
14780         Always initialize the returned slot after a hash table miss
14781         when INSERT is true.
14783 2017-09-01  Alexander Monakov  <amonakov@ispras.ru>
14785         * config/s390/s390.md (mem_signal_fence): Remove.
14786         * doc/md.texi (mem_signal_fence): Remove.
14787         * optabs.c (expand_mem_signal_fence): Remove uses of mem_signal_fence.
14788         Update comments.
14789         * target-insns.def (mem_signal_fence): Remove.
14791 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
14793         PR sanitizer/81902
14794         * doc/invoke.texi: Document -fsanitize=pointer-overflow.
14796         PR sanitizer/81923
14797         * asan.c (create_odr_indicator): Strip name encoding from assembler
14798         name before appending it after __odr_asan_.
14800 2017-09-01  Martin Liska  <mliska@suse.cz>
14802         PR tree-optimization/82059
14803         * gimple-ssa-isolate-paths.c (isolate_path): Add profile and
14804         frequency only when an edge is redirected.
14806 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
14808         * config/arc/arc-c.c (__ARC_LPC_WIDTH__): Add builtin define.
14809         * config/arc/arc.c (ARC_MAX_LOOP_LENGTH): Define.
14810         (arc_conditional_register_usage): Remove ARC600 lp_count
14811         exception.
14812         (arc_file_start): Emit Tag_ARC_CPU_variation.
14813         (arc_can_use_doloop_p): New conditions to use ZOLs.
14814         (hwloop_fail): New function.
14815         (hwloop_optimize): Likewise.
14816         (hwloop_pattern_reg): Likewise.
14817         (arc_doloop_hooks): New struct, to be used with reorg_loops.
14818         (arc_reorg_loops): New function, calls reorg_loops.
14819         (arc_reorg): Call arc_reorg_loops.  Remove old ZOL handling.
14820         (arc600_corereg_hazard): Remove ZOL checking, case handled by
14821         hwloop_optimize.
14822         (arc_loop_hazard): Remove function, functionality moved into
14823         hwloop_optimize.
14824         (arc_hazard): Remove arc_loop_hazard call.
14825         (arc_adjust_insn_length): Remove ZOL handling, functionality moved
14826         into hwloop_optimize.
14827         (arc_label_align): Remove ZOL handling.
14828         * config/arc/arc.h (LOOP_ALIGN): Changed to 0.
14829         * config/arc/arc.md (doloop_begin): Remove pattern.
14830         (doloop_begin_i): Likewise.
14831         (doloop_end_i): Likewise.
14832         (doloop_fallback): Likewise.
14833         (doloop_fallback_m): Likewise.
14834         (doloop_end): Reimplement expand.
14835         (arc_lp): New pattern for LP instruction.
14836         (loop_end): New pattern.
14837         (loop_fail): Likewise.
14838         (decrement_and_branch_until_zero): Likewise.
14839         * config/arc/arc.opt (mlpc-width): New option.
14840         * doc/invoke.texi (mlpc-width): Document option.
14842 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
14844         * config/arc/arc.c (arc_ifcvt): Remove use of merge_blocks call.
14845         (arc_ccfsm_advance): Fix checking for delay slots.
14846         (arc_reorg): Add rtl dump after each call to arc_ifcvt.
14848 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
14850         * config/arc/arc.md (movqi_insn): Add stores to save constant long
14851         immediates.
14852         (movhi_insn): Update store instruction constraint which are saving
14853         6-bit short immediates.
14854         (movsi_insn): Consider also short scaled load operations.
14855         (zero_extendhisi2_i): Use Usd constraint instead of T.
14856         (extendhisi2_i): Add q constraint.
14857         (arc_clzsi2): Add type and length attributes.
14858         (arc_ctzsi2): Likewise.
14859         * config/arc/constraints.md (Usc): Update constraint, the
14860         assembler can parse two relocations for a single instruction.
14862 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
14864         * config/arc/arc.c (arc_use_anchors_for_symbol_p): New function.
14865         (TARGET_USE_ANCHORS_FOR_SYMBOL_P): Define.
14867 2017-08-31  Olivier Hainque  <hainque@adacore.com>
14869         * config.gcc (powerpc-wrs-vxworks|vxworksae|vxworksmils): Now
14870         match as powerpc-wrs-vxworks*.
14872 2017-08-31  James Greenhalgh  <james.greenhalgh@arm.com>
14874         * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): Fix
14875         register constraint for by-element operand.
14876         (aarch64_mls_elt_merge<mode>): Likewise.
14878 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
14880         * config/arc/arc.c (arc_can_follow_jump): Check for short
14881         branches.
14883 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
14885         * config.gcc: Use g.opt for arc.
14886         * config/arc/arc.c (LEGITIMATE_SCALED_ADDRESS_P): Deleted,
14887         functionality moved to ...
14888         (legitimate_scaled_address_p): New function, ...here.
14889         (LEGITIMATE_SMALL_DATA_OFFSET_P): New define.
14890         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Use the above define.
14891         (legitimate_offset_address_p): Delete TARGET_NO_SDATA_SET
14892         condition.
14893         (arc_override_options): Handle G option.
14894         (arc_output_pic_addr_const): Correct function definition.
14895         (arc_legitimate_address_p): Use legitimate_scaled_address_p.
14896         (arc_decl_anon_ns_mem_p): Delete.
14897         (arc_in_small_data_p): Overhaul this function to take into
14898         consideration the value given via G option.
14899         (arc_rewrite_small_data_1): Renamed and corrected old
14900         arc_rewrite_small_data function.
14901         (arc_rewrite_small_data): New function.
14902         (small_data_pattern): Don't use pic_offset_table_rtx.
14903         * config/arc/arc.h (CC1_SPEC): Recognize G option.
14904         * config/arc/simdext.md (movmisalignv2hi): Use
14905         prepare_move_operands function.
14906         (mov*): Likewise.
14907         (movmisalign*): Likewise.
14908         * doc/invoke.texi (ARC options): Document -G option.
14910 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
14912         * config/arc/arc-protos.h (compact_sda_memory_operand): Update
14913         prototype.
14914         * config/arc/arc.c (arc_print_operand): Output scalled address for
14915         sdata whenever is possible.
14916         (arc_in_small_data_p): Allow sdata for 64bit datum when double
14917         load/stores are available.
14918         (compact_sda_memory_operand): Check for the alignment required by
14919         code density instructions.
14920         * config/arc/arc.md (movsi_insn): Use newly introduced Us0
14921         constraint.
14922         * config/arc/constraints.md (Usd): Update constraint.
14923         (Us0): New constraint.
14924         (Usc): Update constraint.
14926 2017-08-31  Richard Biener  <rguenther@suse.de>
14928         PR middle-end/82054
14929         * dwarf2out.c (dwarf2out_early_global_decl): Process each
14930         function only once.
14932 2017-08-31  Tamar Christina  <tamar.christina@arm.com>
14934         * config/aarch64/aarch64-builtins.c (aarch64_init_simd_builtins):
14935         Resize type_signature.
14937 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
14938             Alan Hayward  <alan.hayward@arm.com>
14939             David Sherwood  <david.sherwood@arm.com>
14941         * config/aarch64/aarch64.c (aarch64_base_register_rtx_p): Only allow
14942         subregs whose inner modes can be stored in GPRs.
14943         (aarch64_classify_index): Likewise.
14945 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
14946             Alan Hayward  <alan.hayward@arm.com>
14947             David Sherwood  <david.sherwood@arm.com>
14949         * config/aarch64/iterators.md (V_cmp_result): Rename to...
14950         (V_INT_EQUIV): ...this.
14951         (v_cmp_result): Rename to...
14952         (v_int_equiv): ...this.
14953         * config/aarch64/aarch64.md (xorsign<mode>3): Update accordingly.
14954         * config/aarch64/aarch64-simd.md (xorsign<mode>3): Likewise.
14955         (copysign<mode>3): Likewise.
14956         (aarch64_simd_bsl<mode>_internal): Likewise.
14957         (aarch64_simd_bsl<mode>): Likewise.
14958         (vec_cmp<mode><mode>): Likewise.
14959         (vcond<mode><mode>): Likewise.
14960         (vcond<v_cmp_mixed><mode>): Likewise.
14961         (vcondu<mode><v_cmp_mixed>): Likewise.
14962         (aarch64_cm<optab><mode>): Likewise.
14963         (aarch64_cmtst<mode>): Likewise.
14964         (aarch64_fac<optab><mode>): Likewise.
14965         (vec_perm_const<mode>): Likewise.
14966         (vcond_mask_<mode><v_cmp_result>): Rename to...
14967         (vcond_mask_<mode><v_int_equiv>): ...this.
14968         (vec_cmp<mode><v_cmp_result>): Rename to...
14969         (vec_cmp<mode><v_int_equiv>): ...this.
14971 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
14972             Alan Hayward  <alan.hayward@arm.com>
14973             David Sherwood  <david.sherwood@arm.com>
14975         * config/aarch64/aarch64-modes.def: Remove 32-, 48- and 64-byte
14976         vector modes.
14977         * config/aarch64/iterators.md (VRL2, VRL3, VRL4): Delete.
14978         * config/aarch64/aarch64.md (UNSPEC_LD2_DREG, UNSPEC_LD3_DREG)
14979         (UNSPEC_LD4_DREG): New unspecs.
14980         * config/aarch64/aarch64-simd.md (aarch64_ld2<mode>_dreg_le)
14981         (aarch64_ld2<mode>_dreg_be): Replace with...
14982         (aarch64_ld2<mode>_dreg): ...this pattern and use the new DREG
14983         unspec.
14984         (aarch64_ld3<mode>_dreg_le)
14985         (aarch64_ld3<mode>_dreg_be): Replace with...
14986         (aarch64_ld3<mode>_dreg): ...this pattern and use the new DREG
14987         unspec.
14988         (aarch64_ld4<mode>_dreg_le)
14989         (aarch64_ld4<mode>_dreg_be): Replace with...
14990         (aarch64_ld4<mode>_dreg): ...this pattern and use the new DREG
14991         unspec.
14993 2017-08-30  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14995         PR tree-optimization/81987
14996         * gimple-ssa-strength-reduction.c (insert_initializers): Don't
14997         insert an initializer in a location not dominated by the stride
14998         definition.
15000 2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>
15002         * tree-eh.c (lower_try_finally_switch): Set the location of the finally
15003         on the entire header of the finally block in the fallthru case.
15005 2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>
15007         * varasm.c (decode_addr_const): Deal with INDIRECT_REF <INTEGER_CST>.
15009 2017-08-30  Pat Haugen  <pthaugen@us.ibm.com>
15011         * config/rs6000/rs6000.c (rs6000_emit_prologue_move_from_cr): Rename from
15012         rs6000_emit_move_from_cr and call renamed function.
15013         (rs6000_emit_prologue): Call renamed functions.
15014         * config/rs6000/rs6000.md (prologue_movesi_from_cr): Rename from
15015         movesi_from_cr, remove volatile CRs.
15017 2017-08-30  Jon Beniston  <jon@beniston.com>
15018             Richard Biener  <rguenther@suse.de>
15020         * tree-vect-patterns.c (vect_pattern_recog_1): Use VECTOR_TYPE_P instead
15021         of VECTOR_MODE_P check.
15022         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Allow single
15023         element vector types.
15025 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15027         * df.h (df_read_modify_subreg_p): Remove in favor of...
15028         * rtl.h (read_modify_subreg_p): ...this new function.  Take a
15029         const_rtx instead of an rtx.
15030         * cprop.c (local_cprop_find_used_regs): Update accordingly.
15031         * df-problems.c (df_word_lr_mark_ref): Likewise.
15032         * ira-lives.c (mark_pseudo_reg_live): Likewise.
15033         (mark_pseudo_reg_dead): Likewise.
15034         (mark_ref_dead): Likewise.
15035         * reginfo.c (init_subregs_of_mode): Likewise.
15036         * sched-deps.c (sched_analyze_1): Likewise.
15037         * df-scan.c (df_def_record_1): Likewise.
15038         (df_uses_record): Likewise.
15039         (df_read_modify_subreg_p): Remove in favor of...
15040         * rtlanal.c (read_modify_subreg_p): ...this new function.  Take a
15041         const_rtx instead of an rtx.
15043 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15044             Alan Hayward  <alan.hayward@arm.com>
15045             David Sherwood  <david.sherwood@arm.com>
15047         * rtl.h (partial_subreg_p): New function.
15048         * caller-save.c (save_call_clobbered_regs): Use it.
15049         * calls.c (expand_call): Likewise.
15050         * combine.c (combinable_i3pat): Likewise.
15051         (simplify_set): Likewise.
15052         (make_extraction): Likewise.
15053         (make_compound_operation_int): Likewise.
15054         (gen_lowpart_or_truncate): Likewise.
15055         (force_to_mode): Likewise.
15056         (make_field_assignment): Likewise.
15057         (reg_truncated_to_mode): Likewise.
15058         (record_truncated_value): Likewise.
15059         (move_deaths): Likewise.
15060         * cse.c (record_jump_cond): Likewise.
15061         (cse_insn): Likewise.
15062         * cselib.c (cselib_lookup_1): Likewise.
15063         * expmed.c (extract_bit_field_using_extv): Likewise.
15064         * function.c (assign_parm_setup_reg): Likewise.
15065         * ifcvt.c (noce_convert_multiple_sets): Likewise.
15066         * ira-build.c (create_insn_allocnos): Likewise.
15067         * lra-coalesce.c (merge_pseudos): Likewise.
15068         * lra-constraints.c (match_reload): Likewise.
15069         (simplify_operand_subreg): Likewise.
15070         (curr_insn_transform): Likewise.
15071         * lra-lives.c (process_bb_lives): Likewise.
15072         * lra.c (new_insn_reg): Likewise.
15073         (lra_substitute_pseudo): Likewise.
15074         * regcprop.c (mode_change_ok): Likewise.
15075         (maybe_mode_change): Likewise.
15076         (copyprop_hardreg_forward_1): Likewise.
15077         * reload.c (push_reload): Likewise.
15078         (find_reloads): Likewise.
15079         (find_reloads_subreg_address): Likewise.
15080         * reload1.c (alter_reg): Likewise.
15081         (eliminate_regs_1): Likewise.
15082         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
15084 2017-08-30  David Edelsohn  <dje.gcc@gmail.com>
15086         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Revert
15087         back to if statements, including unpack.
15089 2017-08-30  Martin Liska  <mliska@suse.cz>
15091         PR inline-asm/82001
15092         * ipa-icf-gimple.c (func_checker::compare_tree_list_operand):
15093         Rename to ...
15094         (func_checker::compare_asm_inputs_outputs): ... this function.
15095         (func_checker::compare_gimple_asm): Use the function to compare
15096         also ASM constrains.
15097         * ipa-icf-gimple.h: Rename the function.
15099 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15100             Alan Hayward  <alan.hayward@arm.com>
15101             David Sherwood  <david.sherwood@arm.com>
15103         * coretypes.h (complex_mode): New type.
15104         * gdbhooks.py (build_pretty_printer): Handle it.
15105         * machmode.h (complex_mode): New class.
15106         (complex_mode::includes_p): New function.
15107         (is_complex_int_mode): Likewise.
15108         (is_complex_float_mode): Likewise.
15109         * genmodes.c (get_mode_class): Handle complex mode classes.
15110         * function.c (expand_function_end): Use is_complex_int_mode.
15112 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15113             Alan Hayward  <alan.hayward@arm.com>
15114             David Sherwood  <david.sherwood@arm.com>
15116         * coretypes.h (scalar_mode_pod): New typedef.
15117         * gdbhooks.py (build_pretty_printer): Handle it.
15118         * machmode.h (gt_ggc_mx, gt_pch_nx): New functions.
15119         * fixed-value.h (fixed_value::mode): Change type to scalar_mode_pod.
15120         * fold-const.c (fold_convert_const_int_from_fixed): Use scalar_mode.
15121         * tree-streamer-in.c (unpack_ts_fixed_cst_value_fields): Use
15122         as_a <scalar_mode>.
15124 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15125             Alan Hayward  <alan.hayward@arm.com>
15126             David Sherwood  <david.sherwood@arm.com>
15128         * machmode.h (mode_for_vector): Take a scalar_mode instead
15129         of a machine_mode.
15130         * stor-layout.c (mode_for_vector): Likewise.
15131         * explow.c (promote_mode): Use as_a <scalar_mode>.
15132         * sdbout.c (sdbout_parms): Use is_a <scalar_mode>.
15134 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15135             Alan Hayward  <alan.hayward@arm.com>
15136             David Sherwood  <david.sherwood@arm.com>
15138         * target.def (preferred_simd_mode): Take a scalar_mode
15139         instead of a machine_mode.
15140         * targhooks.h (default_preferred_simd_mode): Likewise.
15141         * targhooks.c (default_preferred_simd_mode): Likewise.
15142         * config/arc/arc.c (arc_preferred_simd_mode): Likewise.
15143         * config/arm/arm.c (arm_preferred_simd_mode): Likewise.
15144         * config/c6x/c6x.c (c6x_preferred_simd_mode): Likewise.
15145         * config/epiphany/epiphany.c (epiphany_preferred_simd_mode): Likewise.
15146         * config/i386/i386.c (ix86_preferred_simd_mode): Likewise.
15147         * config/mips/mips.c (mips_preferred_simd_mode): Likewise.
15148         * config/nvptx/nvptx.c (nvptx_preferred_simd_mode): Likewise.
15149         * config/powerpcspe/powerpcspe.c (rs6000_preferred_simd_mode):
15150         Likewise.
15151         * config/rs6000/rs6000.c (rs6000_preferred_simd_mode): Likewise.
15152         * config/s390/s390.c (s390_preferred_simd_mode): Likewise.
15153         * config/sparc/sparc.c (sparc_preferred_simd_mode): Likewise.
15154         * config/aarch64/aarch64.c (aarch64_preferred_simd_mode): Likewise.
15155         (aarch64_simd_scalar_immediate_valid_for_move): Update accordingly.
15156         * doc/tm.texi: Regenerate.
15157         * optabs-query.c (can_vec_mask_load_store_p): Return false for
15158         non-scalar modes.
15160 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15161             Alan Hayward  <alan.hayward@arm.com>
15162             David Sherwood  <david.sherwood@arm.com>
15164         * target.def (scalar_mode_supported_p): Take a scalar_mode
15165         instead of a machine_mode.
15166         * targhooks.h (default_scalar_mode_supported_p): Likewise.
15167         * targhooks.c (default_scalar_mode_supported_p): Likewise.
15168         * config/aarch64/aarch64.c (aarch64_scalar_mode_supported_p): Likewise.
15169         * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
15170         * config/arm/arm.c (arm_scalar_mode_supported_p): Likewise.
15171         * config/avr/avr.c (avr_scalar_mode_supported_p): Likewise.
15172         * config/c6x/c6x.c (c6x_scalar_mode_supported_p): Likewise.
15173         * config/i386/i386.c (ix86_scalar_mode_supported_p): Likewise.
15174         * config/ia64/ia64.c (ia64_scalar_mode_supported_p): Likewise.
15175         * config/mips/mips.c (mips_scalar_mode_supported_p): Likewise.
15176         * config/msp430/msp430.c (msp430_scalar_mode_supported_p): Likewise.
15177         * config/pa/pa.c (pa_scalar_mode_supported_p): Likewise.
15178         * config/pdp11/pdp11.c (pdp11_scalar_mode_supported_p): Likewise.
15179         * config/powerpcspe/powerpcspe.c (rs6000_scalar_mode_supported_p):
15180         Likewise.
15181         * config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): Likewise.
15182         * config/s390/s390.c (s390_scalar_mode_supported_p): Likewise.
15183         * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
15184         * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
15185         * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p):
15186         Likewise.
15187         * doc/tm.texi: Regenerate.
15189 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15190             Alan Hayward  <alan.hayward@arm.com>
15191             David Sherwood  <david.sherwood@arm.com>
15193         * coretypes.h (opt_scalar_mode): New typedef.
15194         * gdbhooks.py (build_pretty_printers): Handle it.
15195         * machmode.h (mode_iterator::get_2xwider): Add overload for
15196         opt_mode<T>.
15197         * emit-rtl.c (init_emit_once): Use opt_scalar_mode when iterating
15198         over scalar modes.
15199         * expr.c (convert_mode_scalar): Likewise.
15200         * omp-low.c (omp_clause_aligned_alignment): Likewise.
15201         * optabs.c (expand_float): Likewise.
15202         (expand_fix): Likewise.
15203         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
15205 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15206             Alan Hayward  <alan.hayward@arm.com>
15207             David Sherwood  <david.sherwood@arm.com>
15209         * optabs.c (expand_float): Explicitly check for scalars before
15210         using a branching expansion.
15211         (expand_fix): Likewise.
15213 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15214             Alan Hayward  <alan.hayward@arm.com>
15215             David Sherwood  <david.sherwood@arm.com>
15217         * expr.c (convert_mode): Split scalar handling out into...
15218         (convert_mode_scalar): ...this new function.  Treat the modes
15219         as scalar_modes.
15221 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15222             Alan Hayward  <alan.hayward@arm.com>
15223             David Sherwood  <david.sherwood@arm.com>
15225         * omp-expand.c (expand_omp_atomic): Use is_int_mode, is_float_mode
15226         and scalar_mode.
15227         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Likewise.
15229 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15230             Alan Hayward  <alan.hayward@arm.com>
15231             David Sherwood  <david.sherwood@arm.com>
15233         * fixed-value.h (fixed_from_double_int): Take a scalar_mode
15234         rather than a machine_mode.
15235         (fixed_from_string): Likewise.
15236         (fixed_convert): Likewise.
15237         (fixed_convert_from_int): Likewise.
15238         (fixed_convert_from_real): Likewise.
15239         (real_convert_from_fixed): Likewise.
15240         * fixed-value.c (fixed_from_double_int): Likewise.
15241         (fixed_from_string): Likewise.
15242         (fixed_convert): Likewise.
15243         (fixed_convert_from_int): Likewise.
15244         (fixed_convert_from_real): Likewise.
15245         (real_convert_from_fixed): Likewise.
15246         * config/avr/avr.c (avr_out_round): Use as_a <scalar_mode>.
15248 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15249             Alan Hayward  <alan.hayward@arm.com>
15250             David Sherwood  <david.sherwood@arm.com>
15252         * emit-rtl.c (immed_double_const): Use is_a <scalar_mode> instead
15253         of separate mode class checks.  Do not allow vector modes here.
15254         (immed_wide_int_const): Use as_a <scalar_mode>.
15255         * explow.c (trunc_int_for_mode): Likewise.
15256         * rtl.h (wi::int_traits<rtx_mode_t>::get_precision): Likewise.
15257         (wi::shwi): Likewise.
15258         (wi::min_value): Likewise.
15259         (wi::max_value): Likewise.
15260         * dwarf2out.c (loc_descriptor): Likewise.
15261         * simplify-rtx.c (simplify_immed_subreg): Fix rtx_mode_t argument
15262         for CONST_WIDE_INT.
15264 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15265             Alan Hayward  <alan.hayward@arm.com>
15266             David Sherwood  <david.sherwood@arm.com>
15268         * tree.h (SCALAR_TYPE_MODE): New macro.
15269         * expr.c (expand_expr_addr_expr_1): Use it.
15270         (expand_expr_real_2): Likewise.
15271         * fold-const.c (fold_convert_const_fixed_from_fixed): Likeise.
15272         (fold_convert_const_fixed_from_int): Likewise.
15273         (fold_convert_const_fixed_from_real): Likewise.
15274         (native_encode_fixed): Likewise
15275         (native_encode_complex): Likewise
15276         (native_encode_vector): Likewise.
15277         (native_interpret_fixed): Likewise.
15278         (native_interpret_real): Likewise.
15279         (native_interpret_complex): Likewise.
15280         (native_interpret_vector): Likewise.
15281         * omp-simd-clone.c (simd_clone_adjust_return_type): Likewise.
15282         (simd_clone_adjust_argument_types): Likewise.
15283         (simd_clone_init_simd_arrays): Likewise.
15284         (simd_clone_adjust): Likewise.
15285         * stor-layout.c (layout_type): Likewise.
15286         * tree.c (build_minus_one_cst): Likewise.
15287         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
15288         * tree-inline.c (estimate_move_cost): Likewise.
15289         * tree-ssa-math-opts.c (convert_plusminus_to_widen): Likewise.
15290         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise.
15291         (vectorizable_reduction): Likewise.
15292         * tree-vect-patterns.c (vect_recog_widen_mult_pattern): Likewise.
15293         (vect_recog_mixed_size_cond_pattern): Likewise.
15294         (check_bool_pattern): Likewise.
15295         (adjust_bool_pattern): Likewise.
15296         (search_type_for_mask_1): Likewise.
15297         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
15298         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
15299         (vectorizable_load): Likewise.
15300         (vectorizable_store): Likewise.
15301         * ubsan.c (ubsan_encode_value): Likewise.
15302         * varasm.c (output_constant): Likewise.
15304 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15305             Alan Hayward  <alan.hayward@arm.com>
15306             David Sherwood  <david.sherwood@arm.com>
15308         * coretypes.h (scalar_mode): New class.
15309         * machmode.h (scalar_mode): Likewise.
15310         (scalar_mode::includes_p): New function.
15311         (mode_to_inner): Return a scalar_mode rather than a machine_mode.
15312         * gdbhooks.py (build_pretty_printers): Handle scalar_mode.
15313         * genmodes.c (get_mode_class): Handle remaining scalar modes.
15314         * cfgexpand.c (expand_debug_expr): Use scalar_mode.
15315         * expmed.c (store_bit_field_1): Likewise.
15316         (extract_bit_field_1): Likewise.
15317         * expr.c (write_complex_part): Likewise.
15318         (read_complex_part): Likewise.
15319         (emit_move_complex_push): Likewise.
15320         (expand_expr_real_2): Likewise.
15321         * function.c (assign_parm_setup_reg): Likewise.
15322         (assign_parms_unsplit_complex): Likewise.
15323         * optabs.c (expand_binop): Likewise.
15324         * rtlanal.c (subreg_get_info): Likewise.
15325         * simplify-rtx.c (simplify_immed_subreg): Likewise.
15326         * varasm.c (output_constant_pool_2): Likewise.
15328 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15329             Alan Hayward  <alan.hayward@arm.com>
15330             David Sherwood  <david.sherwood@arm.com>
15332         * expmed.c (extract_high_half): Use scalar_int_mode and remove
15333         assertion.
15334         (expmed_mult_highpart_optab): Likewise.
15335         (expmed_mult_highpart): Likewise.
15337 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15338             Alan Hayward  <alan.hayward@arm.com>
15339             David Sherwood  <david.sherwood@arm.com>
15341         * builtins.h (builtin_strncpy_read_str): Take a scalar_int_mode
15342         instead of a machine_mode.
15343         (builtin_memset_read_str): Likewise.
15344         * builtins.c (c_readstr): Likewise.
15345         (builtin_memcpy_read_str): Likewise.
15346         (builtin_strncpy_read_str): Likewise.
15347         (builtin_memset_read_str): Likewise.
15348         (builtin_memset_gen_str): Likewise.
15349         (expand_builtin_signbit): Use scalar_int_mode for local variables.
15350         * cfgexpand.c (convert_debug_memory_address): Take a scalar_int_mode
15351         instead of a machine_mode.
15352         * combine.c (simplify_if_then_else): Use scalar_int_mode for local
15353         variables.
15354         (make_extraction): Likewise.
15355         (try_widen_shift_mode): Take and return scalar_int_modes instead
15356         of machine_modes.
15357         * config/aarch64/aarch64.c (aarch64_libgcc_cmp_return_mode): Return
15358         a scalar_int_mode instead of a machine_mode.
15359         * config/avr/avr.c (avr_addr_space_address_mode): Likewise.
15360         (avr_addr_space_pointer_mode): Likewise.
15361         * config/cr16/cr16.c (cr16_unwind_word_mode): Likewise.
15362         * config/msp430/msp430.c (msp430_addr_space_pointer_mode): Likewise.
15363         (msp430_unwind_word_mode): Likewise.
15364         * config/spu/spu.c (spu_unwind_word_mode): Likewise.
15365         (spu_addr_space_pointer_mode): Likewise.
15366         (spu_addr_space_address_mode): Likewise.
15367         (spu_libgcc_cmp_return_mode): Likewise.
15368         (spu_libgcc_shift_count_mode): Likewise.
15369         * config/rl78/rl78.c (rl78_addr_space_address_mode): Likewise.
15370         (rl78_addr_space_pointer_mode): Likewise.
15371         (fl78_unwind_word_mode): Likewise.
15372         (rl78_valid_pointer_mode): Take a scalar_int_mode instead of a
15373         machine_mode.
15374         * config/alpha/alpha.c (vms_valid_pointer_mode): Likewise.
15375         * config/ia64/ia64.c (ia64_vms_valid_pointer_mode): Likewise.
15376         * config/mips/mips.c (mips_mode_rep_extended): Likewise.
15377         (mips_valid_pointer_mode): Likewise.
15378         * config/tilegx/tilegx.c (tilegx_mode_rep_extended): Likewise.
15379         * config/ft32/ft32.c (ft32_valid_pointer_mode): Likewise.
15380         (ft32_addr_space_pointer_mode): Return a scalar_int_mode instead
15381         of a machine_mode.
15382         (ft32_addr_space_address_mode): Likewise.
15383         * config/m32c/m32c.c (m32c_valid_pointer_mode): Take a
15384         scalar_int_mode instead of a machine_mode.
15385         (m32c_addr_space_pointer_mode): Return a scalar_int_mode instead
15386         of a machine_mode.
15387         (m32c_addr_space_address_mode): Likewise.
15388         * config/powerpcspe/powerpcspe.c (rs6000_abi_word_mode): Likewise.
15389         (rs6000_eh_return_filter_mode): Likewise.
15390         * config/rs6000/rs6000.c (rs6000_abi_word_mode): Likewise.
15391         (rs6000_eh_return_filter_mode): Likewise.
15392         * config/s390/s390.c (s390_libgcc_cmp_return_mode): Likewise.
15393         (s390_libgcc_shift_count_mode): Likewise.
15394         (s390_unwind_word_mode): Likewise.
15395         (s390_valid_pointer_mode): Take a scalar_int_mode rather than a
15396         machine_mode.
15397         * target.def (mode_rep_extended): Likewise.
15398         (valid_pointer_mode): Likewise.
15399         (addr_space.valid_pointer_mode): Likewise.
15400         (eh_return_filter_mode): Return a scalar_int_mode rather than
15401         a machine_mode.
15402         (libgcc_cmp_return_mode): Likewise.
15403         (libgcc_shift_count_mode): Likewise.
15404         (unwind_word_mode): Likewise.
15405         (addr_space.pointer_mode): Likewise.
15406         (addr_space.address_mode): Likewise.
15407         * doc/tm.texi: Regenerate.
15408         * dojump.c (prefer_and_bit_test): Take a scalar_int_mode rather than
15409         a machine_mode.
15410         (do_jump): Use scalar_int_mode for local variables.
15411         * dwarf2cfi.c (init_return_column_size): Take a scalar_int_mode
15412         rather than a machine_mode.
15413         * dwarf2out.c (convert_descriptor_to_mode): Likewise.
15414         (scompare_loc_descriptor_wide): Likewise.
15415         (scompare_loc_descriptor_narrow): Likewise.
15416         * emit-rtl.c (adjust_address_1): Use scalar_int_mode for local
15417         variables.
15418         * except.c (sjlj_emit_dispatch_table): Likewise.
15419         (expand_builtin_eh_copy_values): Likewise.
15420         * explow.c (convert_memory_address_addr_space_1): Likewise.
15421         Take a scalar_int_mode rather than a machine_mode.
15422         (convert_memory_address_addr_space): Take a scalar_int_mode rather
15423         than a machine_mode.
15424         (memory_address_addr_space): Use scalar_int_mode for local variables.
15425         * expmed.h (expand_mult_highpart_adjust): Take a scalar_int_mode
15426         rather than a machine_mode.
15427         * expmed.c (mask_rtx): Likewise.
15428         (init_expmed_one_conv): Likewise.
15429         (expand_mult_highpart_adjust): Likewise.
15430         (extract_high_half): Likewise.
15431         (expmed_mult_highpart_optab): Likewise.
15432         (expmed_mult_highpart): Likewise.
15433         (expand_smod_pow2): Likewise.
15434         (expand_sdiv_pow2): Likewise.
15435         (emit_store_flag_int): Likewise.
15436         (adjust_bit_field_mem_for_reg): Use scalar_int_mode for local
15437         variables.
15438         (extract_low_bits): Likewise.
15439         * expr.h (by_pieces_constfn): Take a scalar_int_mode rather than
15440         a machine_mode.
15441         * expr.c (pieces_addr::adjust):  Likewise.
15442         (can_store_by_pieces): Likewise.
15443         (store_by_pieces): Likewise.
15444         (clear_by_pieces_1): Likewise.
15445         (expand_expr_addr_expr_1): Likewise.
15446         (expand_expr_addr_expr): Use scalar_int_mode for local variables.
15447         (expand_expr_real_1): Likewise.
15448         (try_casesi): Likewise.
15449         * final.c (shorten_branches): Likewise.
15450         * fold-const.c (fold_convert_const_int_from_fixed): Change the
15451         type of "mode" to machine_mode.
15452         * internal-fn.c (expand_arith_overflow_result_store): Take a
15453         scalar_int_mode rather than a machine_mode.
15454         (expand_mul_overflow): Use scalar_int_mode for local variables.
15455         * loop-doloop.c (doloop_modify): Likewise.
15456         (doloop_optimize): Likewise.
15457         * optabs.c (expand_subword_shift): Take a scalar_int_mode rather
15458         than a machine_mode.
15459         (expand_doubleword_shift_condmove): Likewise.
15460         (expand_doubleword_shift): Likewise.
15461         (expand_doubleword_clz): Likewise.
15462         (expand_doubleword_popcount): Likewise.
15463         (expand_doubleword_parity): Likewise.
15464         (expand_absneg_bit): Use scalar_int_mode for local variables.
15465         (prepare_float_lib_cmp): Likewise.
15466         * rtl.h (convert_memory_address_addr_space_1): Take a scalar_int_mode
15467         rather than a machine_mode.
15468         (convert_memory_address_addr_space): Likewise.
15469         (get_mode_bounds): Likewise.
15470         (get_address_mode): Return a scalar_int_mode rather than a
15471         machine_mode.
15472         * rtlanal.c (get_address_mode): Likewise.
15473         * stor-layout.c (get_mode_bounds): Take a scalar_int_mode rather
15474         than a machine_mode.
15475         * targhooks.c (default_mode_rep_extended): Likewise.
15476         (default_valid_pointer_mode): Likewise.
15477         (default_addr_space_valid_pointer_mode): Likewise.
15478         (default_eh_return_filter_mode): Return a scalar_int_mode rather
15479         than a machine_mode.
15480         (default_libgcc_cmp_return_mode): Likewise.
15481         (default_libgcc_shift_count_mode): Likewise.
15482         (default_unwind_word_mode): Likewise.
15483         (default_addr_space_pointer_mode): Likewise.
15484         (default_addr_space_address_mode): Likewise.
15485         * targhooks.h (default_eh_return_filter_mode): Likewise.
15486         (default_libgcc_cmp_return_mode): Likewise.
15487         (default_libgcc_shift_count_mode): Likewise.
15488         (default_unwind_word_mode): Likewise.
15489         (default_addr_space_pointer_mode): Likewise.
15490         (default_addr_space_address_mode): Likewise.
15491         (default_mode_rep_extended): Take a scalar_int_mode rather than
15492         a machine_mode.
15493         (default_valid_pointer_mode): Likewise.
15494         (default_addr_space_valid_pointer_mode): Likewise.
15495         * tree-ssa-address.c (addr_for_mem_ref): Use scalar_int_mode for
15496         local variables.
15497         * tree-ssa-loop-ivopts.c (get_shiftadd_cost): Take a scalar_int_mode
15498         rather than a machine_mode.
15499         * tree-switch-conversion.c (array_value_type): Use scalar_int_mode
15500         for local variables.
15501         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
15502         * var-tracking.c (use_narrower_mode): Take a scalar_int_mode rather
15503         than a machine_mode.
15505 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15506             Alan Hayward  <alan.hayward@arm.com>
15507             David Sherwood  <david.sherwood@arm.com>
15509         * dojump.c (do_jump_by_parts_greater_rtx): Change the type of
15510         the mode argument to scalar_int_mode.
15511         (do_jump_by_parts_zero_rtx): Likewise.
15512         (do_jump_by_parts_equality_rtx): Likewise.
15513         (do_jump_by_parts_greater): Take a mode argument.
15514         (do_jump_by_parts_equality): Likewise.
15515         (do_jump_1): Update calls accordingly.
15517 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15518             Alan Hayward  <alan.hayward@arm.com>
15519             David Sherwood  <david.sherwood@arm.com>
15521         * is-a.h (safe_dyn_cast): New function.
15522         * rtl.h (rtx_jump_table_data::get_data_mode): New function.
15523         (jump_table_for_label): Likewise.
15524         * final.c (final_addr_vec_align): Take an rtx_jump_table_data *
15525         instead of an rtx_insn *.
15526         (shorten_branches): Use dyn_cast instead of LABEL_P and
15527         JUMP_TABLE_DATA_P.  Use jump_table_for_label and
15528         rtx_jump_table_data::get_data_mode.
15529         (final_scan_insn): Likewise.
15531 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15532             Alan Hayward  <alan.hayward@arm.com>
15533             David Sherwood  <david.sherwood@arm.com>
15535         * combine.c (try_combine): Use is_a <scalar_int_mode> when
15536         trying to combine a full-register integer set with a subreg
15537         integer set.
15539 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15540             Alan Hayward  <alan.hayward@arm.com>
15541             David Sherwood  <david.sherwood@arm.com>
15543         * expr.c (expand_expr_addr_expr): Add a new_tmode local variable
15544         that is always either address_mode or pointer_mode.
15546 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15547             Alan Hayward  <alan.hayward@arm.com>
15548             David Sherwood  <david.sherwood@arm.com>
15550         * expr.c (expand_expr_real_2): Use word_mode instead of innermode
15551         when the two are known to be equal.
15553 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15554             Alan Hayward  <alan.hayward@arm.com>
15555             David Sherwood  <david.sherwood@arm.com>
15557         * simplify-rtx.c (simplify_const_unary_operation): Use
15558         is_a <scalar_int_mode> instead of checking for a nonzero
15559         precision.  Forcibly convert op_mode to a scalar_int_mode
15560         in that case.  More clearly differentiate the operand and
15561         result modes and use the former when deciding what the value
15562         of a count-bits operation should be.  Use is_int_mode instead
15563         of checking for a MODE_INT.  Remove redundant check for whether
15564         this mode has a zero precision.
15566 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15567             Alan Hayward  <alan.hayward@arm.com>
15568             David Sherwood  <david.sherwood@arm.com>
15570         * optabs.c (widen_leading): Change the type of the mode argument
15571         to scalar_int_mode.  Use opt_scalar_int_mode for the mode iterator.
15572         (widen_bswap): Likewise.
15573         (expand_parity): Likewise.
15574         (expand_ctz): Change the type of the mode argument to scalar_int_mode.
15575         (expand_ffs): Likewise.
15576         (epand_unop): Check for scalar integer modes before calling the
15577         above routines.
15579 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15580             Alan Hayward  <alan.hayward@arm.com>
15581             David Sherwood  <david.sherwood@arm.com>
15583         * expr.c (const_scalar_mask_from_tree): Add a mode argument.
15584         Expand commentary.
15585         (expand_expr_real_1): Update call accordingly.
15587 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15588             Alan Hayward  <alan.hayward@arm.com>
15589             David Sherwood  <david.sherwood@arm.com>
15591         * expmed.c (store_bit_field_using_insv): Add op0_mode and
15592         value_mode arguments.  Use scalar_int_mode internally.
15593         (store_bit_field_1): Rename the new integer mode from imode
15594         to op0_mode and use it instead of GET_MODE (op0).  Update calls
15595         to store_split_bit_field, store_bit_field_using_insv and
15596         store_fixed_bit_field.
15597         (store_fixed_bit_field): Add op0_mode and value_mode arguments.
15598         Use scalar_int_mode internally.  Use a bit count rather than a mode
15599         when calculating the largest bit size for get_best_mode.
15600         Update calls to store_split_bit_field and store_fixed_bit_field_1.
15601         (store_fixed_bit_field_1): Add mode and value_mode arguments.
15602         Remove assertion that OP0 has a scalar integer mode.
15603         (store_split_bit_field): Add op0_mode and value_mode arguments.
15604         Update calls to extract_fixed_bit_field.
15605         (extract_bit_field_using_extv): Add an op0_mode argument.
15606         Use scalar_int_mode internally.
15607         (extract_bit_field_1): Rename the new integer mode from imode to
15608         op0_mode and use it instead of GET_MODE (op0).  Update calls to
15609         extract_split_bit_field, extract_bit_field_using_extv and
15610         extract_fixed_bit_field.
15611         (extract_fixed_bit_field): Add an op0_mode argument.  Update calls
15612         to extract_split_bit_field and extract_fixed_bit_field_1.
15613         (extract_fixed_bit_field_1): Add a mode argument.  Remove assertion
15614         that OP0 has a scalar integer mode.  Use as_a <scalar_int_mode>
15615         on the target mode.
15616         (extract_split_bit_field): Add an op0_mode argument.  Update call
15617         to extract_fixed_bit_field.
15619 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15620             Alan Hayward  <alan.hayward@arm.com>
15621             David Sherwood  <david.sherwood@arm.com>
15623         * cse.c (cse_insn): Use opt_scalar_int_mode for the mode iterator.
15624         * explow.c (hard_function_value): Likewise.
15625         * expmed.c (extract_fixed_bit_field_1): Likewise.  Move the
15626         convert_to_mode call outside the loop.
15627         * expr.c (alignment_for_piecewise_move): Use opt_scalar_int_mode
15628         for the mode iterator.  Require the mode specified by max_pieces
15629         to exist.
15630         (emit_block_move_via_movmem): Use opt_scalar_int_mode for the
15631         mode iterator.
15632         (copy_blkmode_to_reg): Likewise.
15633         (set_storage_via_setmem): Likewise.
15634         * optabs.c (prepare_cmp_insn): Likewise.
15635         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
15636         * stor-layout.c (finish_bitfield_representative): Likewise.
15638 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15639             Alan Hayward  <alan.hayward@arm.com>
15640             David Sherwood  <david.sherwood@arm.com>
15642         * rtl.h (subreg_unpromoted_mode, subreg_promoted_mode): New functions.
15643         * expr.c (convert_move): Use them.
15644         (convert_modes): Likewise.
15645         (store_expr_with_bounds): Likewise.
15647 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15648             Alan Hayward  <alan.hayward@arm.com>
15649             David Sherwood  <david.sherwood@arm.com>
15651         * rtl.h (rtl_hooks::reg_nonzero_bits): Add a scalar_int_mode
15652         parameter for the mode of "x".  Remove the "known_x", "known_mode"
15653         and "known_ret" arguments.  Change the type of the mode argument
15654         to scalar_int_mode.
15655         (rtl_hooks:reg_num_sign_bit_copies): Likewise.
15656         * combine.c (reg_nonzero_bits_for_combine): Update accordingly.
15657         (reg_num_sign_bit_copies_for_combine): Likewise.
15658         * rtlanal.c (nonzero_bits1): Likewise.
15659         (num_sign_bit_copies1): Likewise.
15660         * rtlhooks-def.h (reg_nonzero_bits_general): Likewise.
15661         (reg_num_sign_bit_copies_general): Likewise.
15662         * rtlhooks.c (reg_num_sign_bit_copies_general): Likewise.
15663         (reg_nonzero_bits_general): Likewise.
15665 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15666             Alan Hayward  <alan.hayward@arm.com>
15667             David Sherwood  <david.sherwood@arm.com>
15669         * rtlanal.c (num_sign_bit_copies): Handle VOIDmode here rather
15670         than in subroutines.  Return 1 for non-integer modes.
15671         (cached_num_sign_bit_copies): Change the type of the mode parameter
15672         to scalar_int_mode.
15673         (num_sign_bit_copies1): Likewise.  Remove early exit for other mode
15674         classes.  Handle CONST_INT_P first and then check whether X also
15675         has a scalar integer mode.  Check the same thing for inner registers
15676         of a SUBREG and for values that are being extended or truncated.
15678 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15679             Alan Hayward  <alan.hayward@arm.com>
15680             David Sherwood  <david.sherwood@arm.com>
15682         * rtlanal.c (nonzero_bits): Handle VOIDmode here rather than
15683         in subroutines.  Return the mode mask for non-integer modes.
15684         (cached_nonzero_bits): Change the type of the mode parameter
15685         to scalar_int_mode.
15686         (nonzero_bits1): Likewise.  Remove early exit for other mode
15687         classes.  Handle CONST_INT_P first and then check whether X
15688         also has a scalar integer mode.
15690 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15691             Alan Hayward  <alan.hayward@arm.com>
15692             David Sherwood  <david.sherwood@arm.com>
15694         * expr.c (widest_int_mode_for_size): Make the comment match the code.
15695         Return a scalar_int_mode and assert that the size is greater than
15696         one byte.
15697         (by_pieces_ninsns): Update accordingly and remove VOIDmode handling.
15698         (op_by_pieces_d::op_by_pieces_d): Likewise.
15699         (op_by_pieces_d::run): Likewise.
15700         (can_store_by_pieces): Likewise.
15702 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15703             Alan Hayward  <alan.hayward@arm.com>
15704             David Sherwood  <david.sherwood@arm.com>
15706         * combine.c (extract_left_shift): Add a mode argument and update
15707         recursive calls.
15708         (make_compound_operation_int): Change the type of the mode parameter
15709         to scalar_int_mode and update the call to extract_left_shift.
15711 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15712             Alan Hayward  <alan.hayward@arm.com>
15713             David Sherwood  <david.sherwood@arm.com>
15715         * combine.c (simplify_and_const_int): Change the type of the mode
15716         parameter to scalar_int_mode.
15717         (simplify_and_const_int_1): Likewise.  Update recursive call.
15719 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15720             Alan Hayward  <alan.hayward@arm.com>
15721             David Sherwood  <david.sherwood@arm.com>
15723         * combine.c (simplify_compare_const): Check that the mode is a
15724         scalar_int_mode (rather than VOIDmode) before testing its
15725         precision.
15726         (simplify_comparison): Move COMPARISON_P handling out of the
15727         loop and restrict the latter part of the loop to scalar_int_modes.
15728         Check is_a <scalar_int_mode> before calling HWI_COMPUTABLE_MODE_P
15729         and when considering SUBREG_REGs.  Use is_int_mode instead of
15730         checking GET_MODE_CLASS against MODE_INT.
15732 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15733             Alan Hayward  <alan.hayward@arm.com>
15734             David Sherwood  <david.sherwood@arm.com>
15736         * combine.c (try_widen_shift_mode): Move check for equal modes to...
15737         (simplify_shift_const_1): ...here.  Use scalar_int_mode for
15738         shift_unit_mode and for modes involved in scalar shifts.
15740 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15741             Alan Hayward  <alan.hayward@arm.com>
15742             David Sherwood  <david.sherwood@arm.com>
15744         * combine.c (force_int_to_mode): New function, split out from...
15745         (force_to_mode): ...here.  Keep xmode up-to-date and use it
15746         instead of GET_MODE (x).
15748 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15749             Alan Hayward  <alan.hayward@arm.com>
15750             David Sherwood  <david.sherwood@arm.com>
15752         * optabs-query.h (extraction_insn::struct_mode): Change type to
15753         opt_scalar_int_mode and update comment.
15754         (extraction_insn::field_mode): Change type to scalar_int_mode.
15755         (extraction_insn::pos_mode): Likewise.
15756         * combine.c (make_extraction): Update accordingly.
15757         * optabs-query.c (get_traditional_extraction_insn): Likewise.
15758         (get_optab_extraction_insn): Likewise.
15759         * recog.c (simplify_while_replacing): Likewise.
15760         * expmed.c (narrow_bit_field_mem): Change the type of the mode
15761         parameter to opt_scalar_int_mode.
15763 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15764             Alan Hayward  <alan.hayward@arm.com>
15765             David Sherwood  <david.sherwood@arm.com>
15767         * machmode.h (bit_field_mode_iterator::next_mode): Take a pointer
15768         to a scalar_int_mode instead of a machine_mode.
15769         (bit_field_mode_iterator::m_mode): Change type to opt_scalar_int_mode.
15770         (get_best_mode): Return a boolean and use a pointer argument to store
15771         the selected mode.  Replace the limit mode parameter with a bit limit.
15772         * expmed.c (adjust_bit_field_mem_for_reg): Use scalar_int_mode
15773         for the values returned by bit_field_mode_iterator::next_mode.
15774         (store_bit_field): Update call to get_best_mode.
15775         (store_fixed_bit_field): Likewise.
15776         (extract_fixed_bit_field): Likewise.
15777         * expr.c (optimize_bitfield_assignment_op): Likewise.
15778         * fold-const.c (optimize_bit_field_compare): Likewise.
15779         (fold_truth_andor_1): Likewise.
15780         * stor-layout.c (bit_field_mode_iterator::next_mode): As above.
15781         Update for new type of m_mode.
15782         (get_best_mode): As above.
15784 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15785             Alan Hayward  <alan.hayward@arm.com>
15786             David Sherwood  <david.sherwood@arm.com>
15788         * expmed.c (strict_volatile_bitfield_p): Change the type of fieldmode
15789         to scalar_int_mode.  Remove check for SCALAR_INT_MODE_P.
15790         (store_bit_field): Check is_a <scalar_int_mode> before calling
15791         strict_volatile_bitfield_p.
15792         (extract_bit_field): Likewise.
15794 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15795             Alan Hayward  <alan.hayward@arm.com>
15796             David Sherwood  <david.sherwood@arm.com>
15798         * target.def (cstore_mode): Return a scalar_int_mode.
15799         * doc/tm.texi: Regenerate.
15800         * config/sparc/sparc.c (sparc_cstore_mode): Return a scalar_int_mode.
15801         * targhooks.h (default_cstore_mode): Likewise.
15802         * targhooks.c (default_cstore_mode): Likewise, using a forced
15803         conversion.
15804         * expmed.c (emit_cstore): Expect the target of the cstore to be
15805         a scalar_int_mode.
15807 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15808             Alan Hayward  <alan.hayward@arm.com>
15809             David Sherwood  <david.sherwood@arm.com>
15811         * cfgloop.h (rtx_iv): Change type of extend_mode and mode to
15812         scalar_int_mode.
15813         (niter_desc): Likewise mode.
15814         (iv_analyze): Add a mode parameter.
15815         (biv_p): Likewise.
15816         (iv_analyze_expr): Pass the mode paraeter before the rtx it describes
15817         and change its type to scalar_int_mode.
15818         * loop-iv.c: Update commentary at head of file.
15819         (iv_constant): Pass the mode paraeter before the rtx it describes
15820         and change its type to scalar_int_mode.  Remove VOIDmode handling.
15821         (iv_subreg): Change the type of the mode parameter to scalar_int_mode.
15822         (iv_extend): Likewise.
15823         (shorten_into_mode): Likewise.
15824         (iv_add): Use scalar_int_mode.
15825         (iv_mult): Likewise.
15826         (iv_shift): Likewise.
15827         (canonicalize_iv_subregs): Likewise.
15828         (get_biv_step_1): Pass the outer_mode parameter before the rtx
15829         it describes and change its mode to scalar_int_mode.   Also change
15830         the type of the returned inner_mode to scalar_int_mode.
15831         (get_biv_step): Likewise, turning outer_mode from a pointer
15832         into a direct parameter.  Update call to get_biv_step_1.
15833         (iv_analyze_biv): Add an outer_mode parameter.  Update calls to
15834         iv_constant and get_biv_step.
15835         (iv_analyze_expr): Pass the mode parameter before the rtx it describes
15836         and change its type to scalar_int_mode.  Don't initialise iv->mode
15837         to VOIDmode and remove later checks for its still being VOIDmode.
15838         Update calls to iv_analyze_op and iv_analyze_expr.  Check
15839         is_a <scalar_int_mode> when changing the mode under consideration.
15840         (iv_analyze_def): Ignore registers that don't have a scalar_int_mode.
15841         Update call to iv_analyze_expr.
15842         (iv_analyze_op): Add a mode parameter.  Reject subregs whose
15843         inner register is not also a scalar_int_mode.  Update call to
15844         iv_analyze_biv.
15845         (iv_analyze): Add a mode parameter.  Update call to iv_analyze_op.
15846         (biv_p): Add a mode parameter.  Update call to iv_analyze_biv.
15847         (iv_number_of_iterations): Use is_a <scalar_int_mode> instead of
15848         separate mode class checks.  Update calls to iv_analyze.  Remove
15849         fix-up of VOIDmodes after iv_analyze_biv.
15850         * loop-unroll.c (analyze_iv_to_split_insn): Reject registers that
15851         don't have a scalar_int_mode.  Update call to biv_p.
15853 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15854             Alan Hayward  <alan.hayward@arm.com>
15855             David Sherwood  <david.sherwood@arm.com>
15857         * cfgexpand.c (convert_debug_memory_address): Use
15858         as_a <scalar_int_mode>.
15859         * combine.c (expand_compound_operation): Likewise.
15860         (make_extraction): Likewise.
15861         (change_zero_ext): Likewise.
15862         (simplify_comparison): Likewise.
15863         * cse.c (cse_insn): Likewise.
15864         * dwarf2out.c (minmax_loc_descriptor): Likewise.
15865         (mem_loc_descriptor): Likewise.
15866         (loc_descriptor): Likewise.
15867         * expmed.c (init_expmed_one_mode): Likewise.
15868         (synth_mult): Likewise.
15869         (emit_store_flag_1): Likewise.
15870         (expand_divmod): Likewise.  Use HWI_COMPUTABLE_MODE_P instead
15871         of a comparison with size.
15872         * expr.c (expand_assignment): Use as_a <scalar_int_mode>.
15873         (reduce_to_bit_field_precision): Likewise.
15874         * function.c (expand_function_end): Likewise.
15875         * internal-fn.c (expand_arith_overflow_result_store): Likewise.
15876         * loop-doloop.c (doloop_modify): Likewise.
15877         * optabs.c (expand_binop): Likewise.
15878         (expand_unop): Likewise.
15879         (expand_copysign_absneg): Likewise.
15880         (prepare_cmp_insn): Likewise.
15881         (maybe_legitimize_operand): Likewise.
15882         * recog.c (const_scalar_int_operand): Likewise.
15883         * rtlanal.c (get_address_mode): Likewise.
15884         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
15885         (simplify_cond_clz_ctz): Likewise.
15886         * tree-nested.c (get_nl_goto_field): Likewise.
15887         * tree.c (build_vector_type_for_mode): Likewise.
15888         * var-tracking.c (use_narrower_mode): Likewise.
15890 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15891             Alan Hayward  <alan.hayward@arm.com>
15892             David Sherwood  <david.sherwood@arm.com>
15894         * tree.h (SCALAR_INT_TYPE_MODE): New macro.
15895         * builtins.c (expand_builtin_signbit): Use it.
15896         * cfgexpand.c (expand_debug_expr): Likewise.
15897         * dojump.c (do_jump): Likewise.
15898         (do_compare_and_jump): Likewise.
15899         * dwarf2cfi.c (expand_builtin_init_dwarf_reg_sizes): Likewise.
15900         * expmed.c (make_tree): Likewise.
15901         * expr.c (expand_expr_real_2): Likewise.
15902         (expand_expr_real_1): Likewise.
15903         (try_casesi): Likewise.
15904         * fold-const-call.c (fold_const_call_ss): Likewise.
15905         * fold-const.c (unextend): Likewise.
15906         (extract_muldiv_1): Likewise.
15907         (fold_single_bit_test): Likewise.
15908         (native_encode_int): Likewise.
15909         (native_encode_string): Likewise.
15910         (native_interpret_int): Likewise.
15911         * gimple-fold.c (gimple_fold_builtin_memset): Likewise.
15912         * internal-fn.c (expand_addsub_overflow): Likewise.
15913         (expand_neg_overflow): Likewise.
15914         (expand_mul_overflow): Likewise.
15915         (expand_arith_overflow): Likewise.
15916         * match.pd: Likewise.
15917         * stor-layout.c (layout_type): Likewise.
15918         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
15919         * tree-ssa-math-opts.c (convert_mult_to_widen): Likewise.
15920         * tree-ssanames.c (get_range_info): Likewise.
15921         * tree-switch-conversion.c (array_value_type) Likewise.
15922         * tree-vect-patterns.c (vect_recog_rotate_pattern): Likewise.
15923         (vect_recog_divmod_pattern): Likewise.
15924         (vect_recog_mixed_size_cond_pattern): Likewise.
15925         * tree-vrp.c (extract_range_basic): Likewise.
15926         (simplify_float_conversion_using_ranges): Likewise.
15927         * tree.c (int_fits_type_p): Likewise.
15928         * ubsan.c (instrument_bool_enum_load): Likewise.
15929         * varasm.c (mergeable_string_section): Likewise.
15930         (narrowing_initializer_constant_valid_p): Likewise.
15931         (output_constant): Likewise.
15933 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15934             Alan Hayward  <alan.hayward@arm.com>
15935             David Sherwood  <david.sherwood@arm.com>
15937         * machmode.h (NARROWEST_INT_MODE): New macro.
15938         * expr.c (alignment_for_piecewise_move): Use it instead of
15939         GET_CLASS_NARROWEST_MODE (MODE_INT).
15940         (push_block): Likewise.
15941         * stor-layout.c (bit_field_mode_iterator::bit_field_mode_iterator):
15942         Likewise.
15943         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
15945 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15946             Alan Hayward  <alan.hayward@arm.com>
15947             David Sherwood  <david.sherwood@arm.com>
15949         * postreload.c (move2add_valid_value_p): Change the type of the
15950         mode parameter to scalar_int_mode.
15951         (move2add_use_add2_insn): Add a mode parameter and use it instead
15952         of GET_MODE (reg).
15953         (move2add_use_add3_insn): Likewise.
15954         (reload_cse_move2add): Update accordingly.
15956 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15957             Alan Hayward  <alan.hayward@arm.com>
15958             David Sherwood  <david.sherwood@arm.com>
15960         * expr.c (expand_expr_real_2): Use scalar_int_mode for the
15961         double-word mode.
15962         * lower-subreg.c (resolve_shift_zext): Use is_a <scalar_int_mode>.
15963         * optabs.c (expand_unop): Likewise.
15965 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15966             Alan Hayward  <alan.hayward@arm.com>
15967             David Sherwood  <david.sherwood@arm.com>
15969         * dwarf2out.c (typed_binop): Change mode parameter to scalar_int_mode.
15970         (clz_loc_descriptor): Likewise.  Remove SCALAR_INT_MODE_P check.
15971         (popcount_loc_descriptor): Likewise.
15972         (bswap_loc_descriptor): Likewise.
15973         (rotate_loc_descriptor): Likewise.
15974         (mem_loc_descriptor): Add is_a <scalar_int_mode> checks before
15975         calling the functions above.
15977 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15978             Alan Hayward  <alan.hayward@arm.com>
15979             David Sherwood  <david.sherwood@arm.com>
15981         * combine.c (sign_extend_short_imm): Add is_a <scalar_int_mode>
15982         checks.
15983         (try_combine): Likewise.
15984         (simplify_if_then_else): Likewise.
15985         * cse.c (cse_insn): Likewise.
15986         * dwarf2out.c (mem_loc_descriptor): Likewise.
15987         * emit-rtl.c (gen_lowpart_common): Likewise.
15988         * simplify-rtx.c (simplify_truncation): Likewise.
15989         (simplify_binary_operation_1): Likewise.
15990         (simplify_const_relational_operation): Likewise.
15991         (simplify_ternary_operation): Likewise.
15992         * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise.
15994 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
15995             Alan Hayward  <alan.hayward@arm.com>
15996             David Sherwood  <david.sherwood@arm.com>
15998         * cse.c (cse_insn): Add is_a <scalar_int_mode> checks.
15999         * reload.c (push_reload): Likewise.
16000         (find_reloads): Likewise.
16002 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16003             Alan Hayward  <alan.hayward@arm.com>
16004             David Sherwood  <david.sherwood@arm.com>
16006         * combine.c (find_split_point): Add is_a <scalar_int_mode> checks.
16007         (make_compound_operation_int): Likewise.
16008         (change_zero_ext): Likewise.
16009         * expr.c (convert_move): Likewise.
16010         (convert_modes): Likewise.
16011         * fwprop.c (forward_propagate_subreg): Likewise.
16012         * loop-iv.c (get_biv_step_1): Likewise.
16013         * optabs.c (widen_operand): Likewise.
16014         * postreload.c (move2add_valid_value_p): Likewise.
16015         * recog.c (simplify_while_replacing): Likewise.
16016         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
16017         (simplify_binary_operation_1): Likewise.  Remove redundant
16018         mode equality check.
16020 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16021             Alan Hayward  <alan.hayward@arm.com>
16022             David Sherwood  <david.sherwood@arm.com>
16024         * combine.c (combine_simplify_rtx): Add checks for
16025         is_a <scalar_int_mode>.
16026         (simplify_if_then_else): Likewise.
16027         (make_field_assignment): Likewise.
16028         (simplify_comparison): Likewise.
16029         * ifcvt.c (noce_try_bitop): Likewise.
16030         * loop-invariant.c (canonicalize_address_mult): Likewise.
16031         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
16033 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16034             Alan Hayward  <alan.hayward@arm.com>
16035             David Sherwood  <david.sherwood@arm.com>
16037         * gimple-fold.c (gimple_fold_builtin_memory_op): Use
16038         is_a <scalar_int_mode> instead of != BLKmode.
16040 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16041             Alan Hayward  <alan.hayward@arm.com>
16042             David Sherwood  <david.sherwood@arm.com>
16044         * cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>
16045         instead of != VOIDmode.
16046         * combine.c (if_then_else_cond): Likewise.
16047         (change_zero_ext): Likewise.
16048         * dwarf2out.c (mem_loc_descriptor): Likewise.
16049         (loc_descriptor): Likewise.
16050         * rtlanal.c (canonicalize_condition): Likewise.
16051         * simplify-rtx.c (simplify_relational_operation_1): Likewise.
16053 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16054             Alan Hayward  <alan.hayward@arm.com>
16055             David Sherwood  <david.sherwood@arm.com>
16057         * simplify-rtx.c (simplify_binary_operation_1): Use
16058         is_a <scalar_int_mode> instead of !VECTOR_MODE_P.
16060 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16061             Alan Hayward  <alan.hayward@arm.com>
16062             David Sherwood  <david.sherwood@arm.com>
16064         * wide-int.h (int_traits<unsigned char>) New class.
16065         (int_traits<unsigned short>) Likewise.
16066         * cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>.
16067         Use GET_MODE_UNIT_PRECISION and remove redundant test for
16068         SCALAR_INT_MODE_P.
16069         * combine.c (set_nonzero_bits_and_sign_copies): Use
16070         is_a <scalar_int_mode>.
16071         (find_split_point): Likewise.
16072         (combine_simplify_rtx): Likewise.
16073         (simplify_logical): Likewise.
16074         (expand_compound_operation): Likewise.
16075         (expand_field_assignment): Likewise.
16076         (make_compound_operation): Likewise.
16077         (extended_count): Likewise.
16078         (change_zero_ext): Likewise.
16079         (simplify_comparison): Likewise.
16080         * dwarf2out.c (scompare_loc_descriptor): Likewise.
16081         (ucompare_loc_descriptor): Likewise.
16082         (minmax_loc_descriptor): Likewise.
16083         (mem_loc_descriptor): Likewise.
16084         (loc_descriptor): Likewise.
16085         * expmed.c (init_expmed_one_mode): Likewise.
16086         * lra-constraints.c (lra_constraint_offset): Likewise.
16087         * optabs.c (prepare_libcall_arg): Likewise.
16088         * postreload.c (move2add_note_store): Likewise.
16089         * reload.c (operands_match_p): Likewise.
16090         * rtl.h (load_extend_op): Likewise.
16091         * rtlhooks.c (gen_lowpart_general): Likewise.
16092         * simplify-rtx.c (simplify_truncation): Likewise.
16093         (simplify_unary_operation_1): Likewise.
16094         (simplify_binary_operation_1): Likewise.
16095         (simplify_const_binary_operation): Likewise.
16096         (simplify_const_relational_operation): Likewise.
16097         (simplify_subreg): Likewise.
16098         * stor-layout.c (bitwise_mode_for_mode): Likewise.
16099         * var-tracking.c (adjust_mems): Likewise.
16100         (prepare_call_arguments): Likewise.
16102 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16103             Alan Hayward  <alan.hayward@arm.com>
16104             David Sherwood  <david.sherwood@arm.com>
16106         * machmode.h (is_int_mode): New fuction.
16107         * combine.c (find_split_point): Use it.
16108         (combine_simplify_rtx): Likewise.
16109         (simplify_if_then_else): Likewise.
16110         (simplify_set): Likewise.
16111         (simplify_shift_const_1): Likewise.
16112         (simplify_comparison): Likewise.
16113         * config/aarch64/aarch64.c (aarch64_rtx_costs): Likewise.
16114         * cse.c (notreg_cost): Likewise.
16115         (cse_insn): Likewise.
16116         * cselib.c (cselib_lookup_1): Likewise.
16117         * dojump.c (do_jump_1): Likewise.
16118         (do_compare_rtx_and_jump): Likewise.
16119         * dse.c (get_call_args): Likewise.
16120         * dwarf2out.c (rtl_for_decl_init): Likewise.
16121         (native_encode_initializer): Likewise.
16122         * expmed.c (emit_store_flag_1): Likewise.
16123         (emit_store_flag): Likewise.
16124         * expr.c (convert_modes): Likewise.
16125         (store_field): Likewise.
16126         (expand_expr_real_1): Likewise.
16127         * fold-const.c (fold_read_from_constant_string): Likewise.
16128         * gimple-ssa-sprintf.c (get_format_string): Likewise.
16129         * optabs-libfuncs.c (gen_int_libfunc): Likewise.
16130         * optabs.c (expand_binop): Likewise.
16131         (expand_unop): Likewise.
16132         (expand_abs_nojump): Likewise.
16133         (expand_one_cmpl_abs_nojump): Likewise.
16134         * simplify-rtx.c (mode_signbit_p): Likewise.
16135         (val_signbit_p): Likewise.
16136         (val_signbit_known_set_p): Likewise.
16137         (val_signbit_known_clear_p): Likewise.
16138         (simplify_relational_operation_1): Likewise.
16139         * tree.c (vector_type_mode): Likewise.
16141 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16142             Alan Hayward  <alan.hayward@arm.com>
16143             David Sherwood  <david.sherwood@arm.com>
16145         * machmode.h (smallest_mode_for_size): Fix formatting.
16146         (smallest_int_mode_for_size): New function.
16147         * cfgexpand.c (expand_debug_expr): Use smallest_int_mode_for_size
16148         instead of smallest_mode_for_size.
16149         * combine.c (make_extraction): Likewise.
16150         * config/arc/arc.c (arc_expand_movmem): Likewise.
16151         * config/arm/arm.c (arm_expand_divmod_libfunc): Likewise.
16152         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
16153         * config/s390/s390.c (s390_expand_insv): Likewise.
16154         * config/sparc/sparc.c (assign_int_registers): Likewise.
16155         * config/spu/spu.c (spu_function_value): Likewise.
16156         (spu_function_arg): Likewise.
16157         * coverage.c (get_gcov_type): Likewise.
16158         (get_gcov_unsigned_t): Likewise.
16159         * dse.c (find_shift_sequence): Likewise.
16160         * expmed.c (store_bit_field_1): Likewise.
16161         * expr.c (convert_move): Likewise.
16162         (store_field): Likewise.
16163         * internal-fn.c (expand_arith_overflow): Likewise.
16164         * optabs-query.c (get_best_extraction_insn): Likewise.
16165         * optabs.c (expand_twoval_binop_libfunc): Likewise.
16166         * stor-layout.c (layout_type): Likewise.
16167         (initialize_sizetypes): Likewise.
16168         * targhooks.c (default_get_mask_mode): Likewise.
16169         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Likewise.
16171 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16172             Alan Hayward  <alan.hayward@arm.com>
16173             David Sherwood  <david.sherwood@arm.com>
16175         * machmode.h (opt_mode::else_blk): New function.
16176         (int_mode_for_mode): Declare.
16177         * stor-layout.c (int_mode_for_mode): Return an opt_scalar_int_mode.
16178         * builtins.c (expand_builtin_signbit): Adjust for new int_mode_for_mode
16179         return type.
16180         * cfgexpand.c (expand_debug_expr): Likewise.
16181         * combine.c (gen_lowpart_or_truncate): Likewise.
16182         (gen_lowpart_for_combine): Likewise.
16183         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Likewise.
16184         * config/avr/avr.c (avr_to_int_mode): Likewise.
16185         (avr_out_plus_1): Likewise.
16186         (avr_out_plus): Likewise.
16187         (avr_out_round): Likewise.
16188         * config/i386/i386.c (ix86_split_to_parts): Likewise.
16189         * config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
16190         (s390_expand_vcond): Likewise.
16191         * config/spu/spu.c (spu_split_immediate): Likewise.
16192         (spu_expand_mov): Likewise.
16193         * dse.c (get_stored_val): Likewise.
16194         * expmed.c (store_bit_field_1): Likewise.
16195         (convert_extracted_bit_field): Use int_mode_for_mode instead of
16196         int_mode_for_size.
16197         (extract_bit_field_1): Adjust for new int_mode_for_mode return type.
16198         (extract_low_bits): Likewise.
16199         * expr.c (emit_group_load_1): Likewise.  Separate out the BLKmode
16200         handling rather than repeating the check.
16201         (emit_group_store): Likewise.
16202         (emit_move_via_integer): Adjust for new int_mode_for_mode return type.
16203         * optabs.c (expand_absneg_bit): Likewise.
16204         (expand_copysign_absneg): Likewise.
16205         (expand_copysign_bit): Likewise.
16206         * tree-if-conv.c (ifcvt_can_use_mask_load_store): Likewise.
16207         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
16208         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
16209         * var-tracking.c (prepare_call_arguments):  Likewise.
16210         * config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Use
16211         int_mode_for_mode instead of mode_for_size.
16212         * config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
16214 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16215             Alan Hayward  <alan.hayward@arm.com>
16216             David Sherwood  <david.sherwood@arm.com>
16218         * machmode.h (int_mode_for_size): New function.
16219         * builtins.c (set_builtin_user_assembler_name): Use int_mode_for_size
16220         instead of mode_for_size.
16221         * calls.c (save_fixed_argument_area): Likewise.  Make use of BLKmode
16222         explicit.
16223         * combine.c (expand_field_assignment): Use int_mode_for_size
16224         instead of mode_for_size.
16225         (make_extraction): Likewise.
16226         (simplify_shift_const_1): Likewise.
16227         (simplify_comparison): Likewise.
16228         * dojump.c (do_jump): Likewise.
16229         * dwarf2out.c (mem_loc_descriptor): Likewise.
16230         * emit-rtl.c (init_derived_machine_modes): Likewise.
16231         * expmed.c (flip_storage_order): Likewise.
16232         (convert_extracted_bit_field): Likewise.
16233         * expr.c (copy_blkmode_from_reg): Likewise.
16234         * graphite-isl-ast-to-gimple.c (max_mode_int_precision): Likewise.
16235         * internal-fn.c (expand_mul_overflow): Likewise.
16236         * lower-subreg.c (simple_move): Likewise.
16237         * optabs-libfuncs.c (init_optabs): Likewise.
16238         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
16239         * tree.c (vector_type_mode): Likewise.
16240         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
16241         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Likewise.
16242         * tree-vect-generic.c (expand_vector_parallel): Likewise.
16243         * tree-vect-stmts.c (vectorizable_load): Likewise.
16244         (vectorizable_store): Likewise.
16246 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16247             Alan Hayward  <alan.hayward@arm.com>
16248             David Sherwood  <david.sherwood@arm.com>
16250         * coretypes.h (pod_mode): New type.
16251         (scalar_int_mode_pod): New typedef.
16252         * machmode.h (pod_mode): New class.
16253         (int_n_data_t::m): Change type to scalar_int_mode_pod.
16254         * genmodes.c (emit_mode_int_n): Update accordingly.
16255         * lower-subreg.h (target_lower_subreg): Change type to
16256         scalar_int_mode_pod.
16257         * gdbhooks.py (build_pretty_printer): Handle pod_mode and
16258         scalar_int_mode_pod.
16260 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16261             Alan Hayward  <alan.hayward@arm.com>
16262             David Sherwood  <david.sherwood@arm.com>
16264         * config/powerpcspe/powerpcspe.h (rs6000_pmode): Change type from
16265         machine_mode to scalar_int_mode.
16266         * config/powerpcspe/powerpcspe.c (rs6000_pmode): Likewise.
16267         (rs6000_option_override_internal): Remove cast to int.
16268         * config/rs6000/rs6000.h (rs6000_pmode): Change type from
16269         machine_mode to scalar_int_mode.
16270         * config/rs6000/rs6000.c (rs6000_pmode): Likewise.
16271         (rs6000_option_override_internal): Remove cast to int.
16272         * config/s390/s390.h (Pmode): Remove cast to machine_mode.
16273         * config/epiphany/epiphany.h (RTX_OK_FOR_OFFSET_P): Add cast
16274         to machine_mode.
16275         * config/s390/s390.c (s390_expand_builtin): Likewise.
16276         * coretypes.h (scalar_int_mode): New type.
16277         (opt_scalar_int_mode): New typedef.
16278         * machmode.h (scalar_int_mode): New class.
16279         (scalar_int_mode::includes_p): New function.
16280         (byte_mode): Change type to scalar_int_mode.
16281         (word_mode): Likewise.
16282         (ptr_mode): Likewise.
16283         * emit-rtl.c (byte_mode): Likewise.
16284         (word_mode): Likewise.
16285         (ptr_mode): Likewise.
16286         (init_derived_machine_modes): Update accordingly.
16287         * genmodes.c (get_mode_class): Return scalar_int_mode for MODE_INT
16288         and MODE_PARTIAL_INT.
16289         * gdbhooks.py (build_pretty_printer): Handle scalar_int_mode and
16290         opt_scalar_int_mode.
16292 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16293             Alan Hayward  <alan.hayward@arm.com>
16294             David Sherwood  <david.sherwood@arm.com>
16296         * target.def (libgcc_floating_mode_supported_p): Take a
16297         scalar_float_mode.
16298         * doc/tm.texi: Regenerate.
16299         * targhooks.h (default_libgcc_floating_mode_supported_p): Take a
16300         scalar_float_mode.
16301         * targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
16302         * config/aarch64/aarch64.c (aarch64_libgcc_floating_mode_supported_p):
16303         Likewise.
16305 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16306             Alan Hayward  <alan.hayward@arm.com>
16307             David Sherwood  <david.sherwood@arm.com>
16309         * target.def (default_floatn_mode): Return an opt_scalar_float_mode.
16310         * doc/tm.texi: Regenerate.
16311         * config/arm/arm.c (arm_floatn_mode): Return an opt_scalar_float_mode.
16312         * config/powerpcspe/powerpcspe.c (rs6000_floatn_mode): Likewise.
16313         * config/rs6000/rs6000.c (rs6000_floatn_mode): Likewise.
16314         * targhooks.h (default_floatn_mode): Likewise.
16315         * targhooks.c (default_floatn_mode): Likewise.
16316         * tree.c (build_common_tree_nodes): Update accordingly.
16318 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16319             Alan Hayward  <alan.hayward@arm.com>
16320             David Sherwood  <david.sherwood@arm.com>
16322         * machmode.h (mode_iterator::start): Provide overload for opt_modes.
16323         (mode_iterator::iterate_p): Likewise.
16324         (mode_iterator::get_wider): Likewise.
16325         * expr.c (init_expr_target): Use opt_scalar_float_mode.
16327 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16328             Alan Hayward  <alan.hayward@arm.com>
16329             David Sherwood  <david.sherwood@arm.com>
16331         * coretypes.h (opt_scalar_float_mode): New typedef.
16332         * machmode.h (float_mode_for_size): New function.
16333         * emit-rtl.c (double_mode): Delete.
16334         (init_emit_once): Use float_mode_for_size.
16335         * stor-layout.c (layout_type): Likewise.
16336         * gdbhooks.py (build_pretty_printer): Handle opt_scalar_float_mode.
16338 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16339             Alan Hayward  <alan.hayward@arm.com>
16340             David Sherwood  <david.sherwood@arm.com>
16342         * output.h (assemble_real): Take a scalar_float_mode.
16343         * config/arm/arm.c (arm_assemble_integer): Update accordingly.
16344         * config/arm/arm.md (consttable_4): Likewise.
16345         (consttable_8): Likewise.
16346         (consttable_16): Likewise.
16347         * config/mips/mips.md (consttable_float): Likewise.
16348         * config/s390/s390.c (s390_output_pool_entry): Likewise.
16349         * varasm.c (assemble_real): Take a scalar_float_mode.
16350         (output_constant_pool_2): Update accordingly.
16351         (output_constant): Likewise.
16353 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16354             Alan Hayward  <alan.hayward@arm.com>
16355             David Sherwood  <david.sherwood@arm.com>
16357         * tree.h (SCALAR_FLOAT_TYPE_MODE): New macro.
16358         * builtins.c (expand_builtin_signbit): Use it instead of TYPE_MODE.
16359         * fold-const.c (fold_convert_const_real_from_fixed): Likewise.
16360         (native_encode_real): Likewise.
16361         (native_interpret_real): Likewise.
16362         * hsa-brig.c (emit_immediate_scalar_to_buffer): Likewise.
16363         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
16365 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16366             Alan Hayward  <alan.hayward@arm.com>
16367             David Sherwood  <david.sherwood@arm.com>
16369         * optabs-libfuncs.c (gen_trunc_conv_libfunc): Use is_a
16370         <scalar_float_mode>.  Simplify.
16371         (gen_extend_conv_libfunc): Likewise.
16373 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16374             Alan Hayward  <alan.hayward@arm.com>
16375             David Sherwood  <david.sherwood@arm.com>
16377         * coretypes.h (scalar_float_mode): New type.
16378         * machmode.h (mode_traits::from_int): Use machine_mode if
16379         USE_ENUM_MODES is defined.
16380         (is_a): New function.
16381         (as_a): Likewise.
16382         (dyn_cast): Likewise.
16383         (scalar_float_mode): New class.
16384         (scalar_float_mode::includes_p): New function.
16385         (is_float_mode): Likewise.
16386         * gdbhooks.py (MachineModePrinter): New class.
16387         (build_pretty_printer): Use it for scalar_float_mode.
16388         * real.h (FLOAT_MODE_FORMAT): Use as_a <scalar_float_mode>.
16389         (format_helper::format_helper): Turn into a template.
16390         * genmodes.c (get_mode_class): New function.
16391         (emit_insn_modes_h): Give modes the class returned by get_mode_class,
16392         or machine_mode if none.
16393         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Use
16394         as_a <scalar_float_mode>.
16395         * dwarf2out.c (mem_loc_descriptor): Likewise.
16396         (insert_float): Likewise.
16397         (add_const_value_attribute): Likewise.
16398         * simplify-rtx.c (simplify_immed_subreg): Likewise.
16399         * optabs.c (expand_absneg_bit): Take a scalar_float_mode.
16400         (expand_unop): Update accordingly.
16401         (expand_abs_nojump): Likewise.
16402         (expand_copysign_absneg): Take a scalar_float_mode.
16403         (expand_copysign_bit): Likewise.
16404         (expand_copysign): Update accordingly.
16406 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16407             Alan Hayward  <alan.hayward@arm.com>
16408             David Sherwood  <david.sherwood@arm.com>
16410         * coretypes.h (opt_mode): New class.
16411         * machmode.h (opt_mode): Likewise.
16412         (opt_mode::else_void): New function.
16413         (opt_mode::require): Likewise.
16414         (opt_mode::exists): Likewise.
16415         (GET_MODE_WIDER_MODE): Turn into a function and return an opt_mode.
16416         (GET_MODE_2XWIDER_MODE): Likewise.
16417         (mode_iterator::get_wider): Update accordingly.
16418         (mode_iterator::get_2xwider): Likewise.
16419         (mode_iterator::get_known_wider): Likewise, turning into a template.
16420         * combine.c (make_extraction): Update use of GET_MODE_WIDER_MODE,
16421         forcing a wider mode to exist.
16422         * config/cr16/cr16.h (LONG_REG_P): Likewise.
16423         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
16424         * config/c6x/c6x.c (c6x_rtx_costs): Update use of
16425         GET_MODE_2XWIDER_MODE, forcing a wider mode to exist.
16426         * lower-subreg.c (init_lower_subreg): Likewise.
16427         * optabs-libfuncs.c (init_sync_libfuncs_1): Likewise, but not
16428         on the final iteration.
16429         * config/i386/i386.c (ix86_expand_set_or_movmem): Check whether
16430         a wider mode exists before asking for a move pattern.
16431         (get_mode_wider_vector): Update use of GET_MODE_WIDER_MODE,
16432         forcing a wider mode to exist.
16433         (expand_vselect_vconcat): Update use of GET_MODE_2XWIDER_MODE,
16434         returning false if no such mode exists.
16435         * config/ia64/ia64.c (expand_vselect_vconcat): Likewise.
16436         * config/mips/mips.c (mips_expand_vselect_vconcat): Likewise.
16437         * expmed.c (init_expmed_one_mode): Update use of GET_MODE_WIDER_MODE.
16438         Avoid checking for a MODE_INT if we already know the mode is not a
16439         SCALAR_INT_MODE_P.
16440         (extract_high_half): Update use of GET_MODE_WIDER_MODE,
16441         forcing a wider mode to exist.
16442         (expmed_mult_highpart_optab): Likewise.
16443         (expmed_mult_highpart): Likewise.
16444         * expr.c (expand_expr_real_2): Update use of GET_MODE_WIDER_MODE,
16445         using else_void.
16446         * lto-streamer-in.c (lto_input_mode_table): Likewise.
16447         * optabs-query.c (find_widening_optab_handler_and_mode): Likewise.
16448         * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
16449         * internal-fn.c (expand_mul_overflow): Update use of
16450         GET_MODE_2XWIDER_MODE.
16451         * omp-low.c (omp_clause_aligned_alignment): Likewise.
16452         * tree-ssa-math-opts.c (convert_mult_to_widen): Update use of
16453         GET_MODE_WIDER_MODE.
16454         (convert_plusminus_to_widen): Likewise.
16455         * tree-switch-conversion.c (array_value_type): Likewise.
16456         * var-tracking.c (emit_note_insn_var_location): Likewise.
16457         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
16458         Return false inside rather than outside the loop if no wider mode
16459         exists
16460         * optabs.c (expand_binop): Update use of GET_MODE_WIDER_MODE
16461         and GET_MODE_2XWIDER_MODE
16462         (can_compare_p): Use else_void.
16463         * gdbhooks.py (OptMachineModePrinter): New class.
16464         (build_pretty_printer): Use it for opt_mode.
16466 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16467             Alan Hayward  <alan.hayward@arm.com>
16468             David Sherwood  <david.sherwood@arm.com>
16470         * tree-switch-conversion.c (array_value_type): Only read TYPE_MODE
16471         once.  Use get_narrowest_mode instead of GET_CLASS_NARROWEST_MODE.
16473 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16474             Alan Hayward  <alan.hayward@arm.com>
16475             David Sherwood  <david.sherwood@arm.com>
16477         * machmode.h (mode_traits): New structure.
16478         (get_narrowest_mode): New function.
16479         (mode_iterator::start): Likewise.
16480         (mode_iterator::iterate_p): Likewise.
16481         (mode_iterator::get_wider): Likewise.
16482         (mode_iterator::get_known_wider): Likewise.
16483         (mode_iterator::get_2xwider): Likewise.
16484         (FOR_EACH_MODE_IN_CLASS): New mode iterator.
16485         (FOR_EACH_MODE): Likewise.
16486         (FOR_EACH_MODE_FROM): Likewise.
16487         (FOR_EACH_MODE_UNTIL): Likewise.
16488         (FOR_EACH_WIDER_MODE): Likewise.
16489         (FOR_EACH_2XWIDER_MODE): Likewise.
16490         * builtins.c (expand_builtin_strlen): Use new mode iterators.
16491         * combine.c (simplify_comparison): Likewise
16492         * config/i386/i386.c (type_natural_mode): Likewise.
16493         * cse.c (cse_insn): Likewise.
16494         * dse.c (find_shift_sequence): Likewise.
16495         * emit-rtl.c (init_derived_machine_modes): Likewise.
16496         (init_emit_once): Likewise.
16497         * explow.c (hard_function_value): Likewise.
16498         * expmed.c (extract_fixed_bit_field_1): Likewise.
16499         (extract_bit_field_1): Likewise.
16500         (expand_divmod): Likewise.
16501         (emit_store_flag_1): Likewise.
16502         * expr.c (init_expr_target): Likewise.
16503         (convert_move): Likewise.
16504         (alignment_for_piecewise_move): Likewise.
16505         (widest_int_mode_for_size): Likewise.
16506         (emit_block_move_via_movmem): Likewise.
16507         (copy_blkmode_to_reg): Likewise.
16508         (set_storage_via_setmem): Likewise.
16509         (compress_float_constant): Likewise.
16510         * omp-low.c (omp_clause_aligned_alignment): Likewise.
16511         * optabs-query.c (get_best_extraction_insn): Likewise.
16512         * optabs.c (expand_binop): Likewise.
16513         (expand_twoval_unop): Likewise.
16514         (expand_twoval_binop): Likewise.
16515         (widen_leading): Likewise.
16516         (widen_bswap): Likewise.
16517         (expand_parity): Likewise.
16518         (expand_unop): Likewise.
16519         (prepare_cmp_insn): Likewise.
16520         (prepare_float_lib_cmp): Likewise.
16521         (expand_float): Likewise.
16522         (expand_fix): Likewise.
16523         (expand_sfix_optab): Likewise.
16524         * postreload.c (move2add_use_add2_insn): Likewise.
16525         * reg-stack.c (reg_to_stack): Likewise.
16526         * reginfo.c (choose_hard_reg_mode): Likewise.
16527         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
16528         * stor-layout.c (mode_for_size): Likewise.
16529         (smallest_mode_for_size): Likewise.
16530         (mode_for_vector): Likewise.
16531         (finish_bitfield_representative): Likewise.
16532         * tree-ssa-math-opts.c (target_supports_divmod_p): Likewise.
16533         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
16534         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
16535         * var-tracking.c (prepare_call_arguments): Likewise.
16537 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16538             Alan Hayward  <alan.hayward@arm.com>
16539             David Sherwood  <david.sherwood@arm.com>
16541         * genconditions.c (write_header): Add a "#define USE_ENUM_MODES".
16542         * genmodes.c (emit_insn_modes_h): Define FOOmode to E_FOOmode if
16543         USE_ENUM_MODES is defined and to ((void) 0, E_FOOmode) otherwise.
16544         * machmode.h (mode_size): Move earlier in file.
16545         (mode_precision): Likewise.
16546         (mode_inner): Likewise.
16547         (mode_nunits): Likewise.
16548         (mode_unit_size): Likewise.
16549         (unit_unit_precision): Likewise.
16550         (mode_wider): Likewise.
16551         (mode_2xwider): Likewise.
16552         (machine_mode): New class.
16553         (mode_to_bytes): New function.
16554         (mode_to_bits): Likewise.
16555         (mode_to_precision): Likewise.
16556         (mode_to_inner): Likewise.
16557         (mode_to_unit_size): Likewise.
16558         (mode_to_unit_precision): Likewise.
16559         (mode_to_nunits): Likewise.
16560         (GET_MODE_SIZE): Use mode_to_bytes.
16561         (GET_MODE_BITSIZE): Use mode_to_bits.
16562         (GET_MODE_PRECISION): Use mode_to_precision.
16563         (GET_MODE_INNER): Use mode_to_inner.
16564         (GET_MODE_UNIT_SIZE): Use mode_to_unit_size.
16565         (GET_MODE_UNIT_PRECISION): Use mode_to_unit_precision.
16566         (GET_MODE_NUNITS): Use mode_to_nunits.
16567         * system.h (ALWAYS_INLINE): New macro.
16568         * config/powerpcspe/powerpcspe-c.c
16569         (altivec_resolve_overloaded_builtin): Use machine_mode instead of
16570         int for arg1_mode and arg2_mode.
16572 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16573             Alan Hayward  <alan.hayward@arm.com>
16574             David Sherwood  <david.sherwood@arm.com>
16576         * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
16577         Prefix mode names with E_ in case statements.
16578         * config/aarch64/aarch64-elf.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
16579         * config/aarch64/aarch64.c (aarch64_split_simd_combine): Likewise.
16580         (aarch64_split_simd_move): Likewise.
16581         (aarch64_gen_storewb_pair): Likewise.
16582         (aarch64_gen_loadwb_pair): Likewise.
16583         (aarch64_gen_store_pair): Likewise.
16584         (aarch64_gen_load_pair): Likewise.
16585         (aarch64_get_condition_code_1): Likewise.
16586         (aarch64_constant_pool_reload_icode): Likewise.
16587         (get_rsqrte_type): Likewise.
16588         (get_rsqrts_type): Likewise.
16589         (get_recpe_type): Likewise.
16590         (get_recps_type): Likewise.
16591         (aarch64_gimplify_va_arg_expr): Likewise.
16592         (aarch64_simd_container_mode): Likewise.
16593         (aarch64_emit_load_exclusive): Likewise.
16594         (aarch64_emit_store_exclusive): Likewise.
16595         (aarch64_expand_compare_and_swap): Likewise.
16596         (aarch64_gen_atomic_cas): Likewise.
16597         (aarch64_emit_bic): Likewise.
16598         (aarch64_emit_atomic_swap): Likewise.
16599         (aarch64_emit_atomic_load_op): Likewise.
16600         (aarch64_evpc_trn): Likewise.
16601         (aarch64_evpc_uzp): Likewise.
16602         (aarch64_evpc_zip): Likewise.
16603         (aarch64_evpc_ext): Likewise.
16604         (aarch64_evpc_rev): Likewise.
16605         (aarch64_evpc_dup): Likewise.
16606         (aarch64_gen_ccmp_first): Likewise.
16607         (aarch64_gen_ccmp_next): Likewise.
16608         * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
16609         (alpha_emit_xfloating_libcall): Likewise.
16610         (emit_insxl): Likewise.
16611         (alpha_arg_type): Likewise.
16612         * config/arc/arc.c (arc_vector_mode_supported_p): Likewise.
16613         (arc_preferred_simd_mode): Likewise.
16614         (arc_secondary_reload): Likewise.
16615         (get_arc_condition_code): Likewise.
16616         (arc_print_operand): Likewise.
16617         (arc_legitimate_constant_p): Likewise.
16618         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
16619         * config/arc/arc.md (casesi_load): Likewise.
16620         (casesi_compact_jump): Likewise.
16621         * config/arc/predicates.md (proper_comparison_operator): Likewise.
16622         (cc_use_register): Likewise.
16623         * config/arm/aout.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
16624         * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
16625         (arm_init_iwmmxt_builtins): Likewise.
16626         * config/arm/arm.c (thumb1_size_rtx_costs): Likewise.
16627         (neon_expand_vector_init): Likewise.
16628         (arm_attr_length_move_neon): Likewise.
16629         (maybe_get_arm_condition_code): Likewise.
16630         (arm_emit_vector_const): Likewise.
16631         (arm_preferred_simd_mode): Likewise.
16632         (arm_output_iwmmxt_tinsr): Likewise.
16633         (thumb1_output_casesi): Likewise.
16634         (thumb2_output_casesi): Likewise.
16635         (arm_emit_load_exclusive): Likewise.
16636         (arm_emit_store_exclusive): Likewise.
16637         (arm_expand_compare_and_swap): Likewise.
16638         (arm_evpc_neon_vuzp): Likewise.
16639         (arm_evpc_neon_vzip): Likewise.
16640         (arm_evpc_neon_vrev): Likewise.
16641         (arm_evpc_neon_vtrn): Likewise.
16642         (arm_evpc_neon_vext): Likewise.
16643         (arm_validize_comparison): Likewise.
16644         * config/arm/neon.md (neon_vc<cmp_op><mode>): Likewise.
16645         * config/avr/avr-c.c (avr_resolve_overloaded_builtin): Likewise.
16646         * config/avr/avr.c (avr_rtx_costs_1): Likewise.
16647         * config/c6x/c6x.c (c6x_vector_mode_supported_p): Likewise.
16648         (c6x_preferred_simd_mode): Likewise.
16649         * config/epiphany/epiphany.c (get_epiphany_condition_code): Likewise.
16650         (epiphany_rtx_costs): Likewise.
16651         * config/epiphany/predicates.md (proper_comparison_operator):
16652         Likewise.
16653         * config/frv/frv.c (condexec_memory_operand): Likewise.
16654         (frv_emit_move): Likewise.
16655         (output_move_single): Likewise.
16656         (output_condmove_single): Likewise.
16657         (frv_hard_regno_mode_ok): Likewise.
16658         (frv_matching_accg_mode): Likewise.
16659         * config/h8300/h8300.c (split_adds_subs): Likewise.
16660         (h8300_rtx_costs): Likewise.
16661         (h8300_print_operand): Likewise.
16662         (compute_mov_length): Likewise.
16663         (output_logical_op): Likewise.
16664         (compute_logical_op_length): Likewise.
16665         (compute_logical_op_cc): Likewise.
16666         (h8300_shift_needs_scratch_p): Likewise.
16667         (output_a_shift): Likewise.
16668         (compute_a_shift_length): Likewise.
16669         (compute_a_shift_cc): Likewise.
16670         (expand_a_rotate): Likewise.
16671         (output_a_rotate): Likewise.
16672         * config/i386/i386.c (classify_argument): Likewise.
16673         (function_arg_advance_32): Likewise.
16674         (function_arg_32): Likewise.
16675         (function_arg_64): Likewise.
16676         (function_value_64): Likewise.
16677         (ix86_gimplify_va_arg): Likewise.
16678         (ix86_legitimate_constant_p): Likewise.
16679         (put_condition_code): Likewise.
16680         (split_double_mode): Likewise.
16681         (ix86_avx256_split_vector_move_misalign): Likewise.
16682         (ix86_expand_vector_logical_operator): Likewise.
16683         (ix86_split_idivmod): Likewise.
16684         (ix86_expand_adjust_ufix_to_sfix_si): Likewise.
16685         (ix86_build_const_vector): Likewise.
16686         (ix86_build_signbit_mask): Likewise.
16687         (ix86_match_ccmode): Likewise.
16688         (ix86_cc_modes_compatible): Likewise.
16689         (ix86_expand_branch): Likewise.
16690         (ix86_expand_sse_cmp): Likewise.
16691         (ix86_expand_sse_movcc): Likewise.
16692         (ix86_expand_int_sse_cmp): Likewise.
16693         (ix86_expand_vec_perm_vpermi2): Likewise.
16694         (ix86_expand_vec_perm): Likewise.
16695         (ix86_expand_sse_unpack): Likewise.
16696         (ix86_expand_int_addcc): Likewise.
16697         (ix86_split_to_parts): Likewise.
16698         (ix86_vectorize_builtin_gather): Likewise.
16699         (ix86_vectorize_builtin_scatter): Likewise.
16700         (avx_vpermilp_parallel): Likewise.
16701         (inline_memory_move_cost): Likewise.
16702         (ix86_tieable_integer_mode_p): Likewise.
16703         (x86_maybe_negate_const_int): Likewise.
16704         (ix86_expand_vector_init_duplicate): Likewise.
16705         (ix86_expand_vector_init_one_nonzero): Likewise.
16706         (ix86_expand_vector_init_one_var): Likewise.
16707         (ix86_expand_vector_init_concat): Likewise.
16708         (ix86_expand_vector_init_interleave): Likewise.
16709         (ix86_expand_vector_init_general): Likewise.
16710         (ix86_expand_vector_set): Likewise.
16711         (ix86_expand_vector_extract): Likewise.
16712         (emit_reduc_half): Likewise.
16713         (ix86_emit_i387_round): Likewise.
16714         (ix86_mangle_type): Likewise.
16715         (ix86_expand_round_sse4): Likewise.
16716         (expand_vec_perm_blend): Likewise.
16717         (canonicalize_vector_int_perm): Likewise.
16718         (ix86_expand_vec_one_operand_perm_avx512): Likewise.
16719         (expand_vec_perm_1): Likewise.
16720         (expand_vec_perm_interleave3): Likewise.
16721         (expand_vec_perm_even_odd_pack): Likewise.
16722         (expand_vec_perm_even_odd_1): Likewise.
16723         (expand_vec_perm_broadcast_1): Likewise.
16724         (ix86_vectorize_vec_perm_const_ok): Likewise.
16725         (ix86_expand_vecop_qihi): Likewise.
16726         (ix86_expand_mul_widen_hilo): Likewise.
16727         (ix86_expand_sse2_abs): Likewise.
16728         (ix86_expand_pextr): Likewise.
16729         (ix86_expand_pinsr): Likewise.
16730         (ix86_preferred_simd_mode): Likewise.
16731         (ix86_simd_clone_compute_vecsize_and_simdlen): Likewise.
16732         * config/i386/sse.md (*andnot<mode>3): Likewise.
16733         (<mask_codefor><code><mode>3<mask_name>): Likewise.
16734         (*<code><mode>3): Likewise.
16735         * config/ia64/ia64.c (ia64_expand_vecint_compare): Likewise.
16736         (ia64_expand_atomic_op): Likewise.
16737         (ia64_arg_type): Likewise.
16738         (ia64_mode_to_int): Likewise.
16739         (ia64_scalar_mode_supported_p): Likewise.
16740         (ia64_vector_mode_supported_p): Likewise.
16741         (expand_vec_perm_broadcast): Likewise.
16742         * config/iq2000/iq2000.c (iq2000_move_1word): Likewise.
16743         (iq2000_function_arg_advance): Likewise.
16744         (iq2000_function_arg): Likewise.
16745         * config/m32c/m32c.c (m32c_preferred_reload_class): Likewise.
16746         * config/m68k/m68k.c (output_dbcc_and_branch): Likewise.
16747         (m68k_libcall_value): Likewise.
16748         (m68k_function_value): Likewise.
16749         (sched_attr_op_type): Likewise.
16750         * config/mcore/mcore.c (mcore_output_move): Likewise.
16751         * config/microblaze/microblaze.c (microblaze_function_arg_advance):
16752         Likewise.
16753         (microblaze_function_arg): Likewise.
16754         * config/mips/mips.c (mips16_build_call_stub): Likewise.
16755         (mips_print_operand): Likewise.
16756         (mips_mode_ok_for_mov_fmt_p): Likewise.
16757         (mips_vector_mode_supported_p): Likewise.
16758         (mips_preferred_simd_mode): Likewise.
16759         (mips_expand_vpc_loongson_even_odd): Likewise.
16760         (mips_expand_vec_unpack): Likewise.
16761         (mips_expand_vi_broadcast): Likewise.
16762         (mips_expand_vector_init): Likewise.
16763         (mips_expand_vec_reduc): Likewise.
16764         (mips_expand_msa_cmp): Likewise.
16765         * config/mips/mips.md (casesi_internal_mips16_<mode>): Likewise.
16766         * config/mn10300/mn10300.c (mn10300_print_operand): Likewise.
16767         (cc_flags_for_mode): Likewise.
16768         * config/msp430/msp430.c (msp430_print_operand): Likewise.
16769         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Likewise.
16770         (nds32_output_casesi_pc_relative): Likewise.
16771         * config/nds32/nds32.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
16772         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Likewise.
16773         (nvptx_gen_unpack): Likewise.
16774         (nvptx_gen_pack): Likewise.
16775         (nvptx_gen_shuffle): Likewise.
16776         (nvptx_gen_wcast): Likewise.
16777         (nvptx_preferred_simd_mode): Likewise.
16778         * config/pa/pa.c (pa_secondary_reload): Likewise.
16779         * config/pa/predicates.md (base14_operand): Likewise.
16780         * config/powerpcspe/powerpcspe-c.c
16781         (altivec_resolve_overloaded_builtin): Likewise.
16782         * config/powerpcspe/powerpcspe.c (rs6000_setup_reg_addr_masks):
16783         Likewise.
16784         (rs6000_preferred_simd_mode): Likewise.
16785         (output_vec_const_move): Likewise.
16786         (rs6000_expand_vector_extract): Likewise.
16787         (rs6000_split_vec_extract_var): Likewise.
16788         (reg_offset_addressing_ok_p): Likewise.
16789         (rs6000_legitimate_offset_address_p): Likewise.
16790         (rs6000_legitimize_address): Likewise.
16791         (rs6000_emit_set_const): Likewise.
16792         (rs6000_const_vec): Likewise.
16793         (rs6000_emit_move): Likewise.
16794         (spe_build_register_parallel): Likewise.
16795         (rs6000_darwin64_record_arg_recurse): Likewise.
16796         (swap_selector_for_mode): Likewise.
16797         (spe_init_builtins): Likewise.
16798         (paired_init_builtins): Likewise.
16799         (altivec_init_builtins): Likewise.
16800         (do_load_for_compare): Likewise.
16801         (rs6000_generate_compare): Likewise.
16802         (rs6000_expand_float128_convert): Likewise.
16803         (emit_load_locked): Likewise.
16804         (emit_store_conditional): Likewise.
16805         (rs6000_output_function_epilogue): Likewise.
16806         (rs6000_handle_altivec_attribute): Likewise.
16807         (rs6000_function_value): Likewise.
16808         (emit_fusion_gpr_load): Likewise.
16809         (emit_fusion_p9_load): Likewise.
16810         (emit_fusion_p9_store): Likewise.
16811         * config/powerpcspe/predicates.md (easy_fp_constant): Likewise.
16812         (fusion_gpr_mem_load): Likewise.
16813         (fusion_addis_mem_combo_load): Likewise.
16814         (fusion_addis_mem_combo_store): Likewise.
16815         * config/rs6000/predicates.md (easy_fp_constant): Likewise.
16816         (fusion_gpr_mem_load): Likewise.
16817         (fusion_addis_mem_combo_load): Likewise.
16818         (fusion_addis_mem_combo_store): Likewise.
16819         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
16820         Likewise.
16821         * config/rs6000/rs6000-string.c (do_load_for_compare): Likewise.
16822         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
16823         (rs6000_preferred_simd_mode): Likewise.
16824         (output_vec_const_move): Likewise.
16825         (rs6000_expand_vector_extract): Likewise.
16826         (rs6000_split_vec_extract_var): Likewise.
16827         (reg_offset_addressing_ok_p): Likewise.
16828         (rs6000_legitimate_offset_address_p): Likewise.
16829         (rs6000_legitimize_address): Likewise.
16830         (rs6000_emit_set_const): Likewise.
16831         (rs6000_const_vec): Likewise.
16832         (rs6000_emit_move): Likewise.
16833         (rs6000_darwin64_record_arg_recurse): Likewise.
16834         (swap_selector_for_mode): Likewise.
16835         (paired_init_builtins): Likewise.
16836         (altivec_init_builtins): Likewise.
16837         (rs6000_expand_float128_convert): Likewise.
16838         (emit_load_locked): Likewise.
16839         (emit_store_conditional): Likewise.
16840         (rs6000_output_function_epilogue): Likewise.
16841         (rs6000_handle_altivec_attribute): Likewise.
16842         (rs6000_function_value): Likewise.
16843         (emit_fusion_gpr_load): Likewise.
16844         (emit_fusion_p9_load): Likewise.
16845         (emit_fusion_p9_store): Likewise.
16846         * config/rx/rx.c (rx_gen_move_template): Likewise.
16847         (flags_from_mode): Likewise.
16848         * config/s390/predicates.md (s390_alc_comparison): Likewise.
16849         (s390_slb_comparison): Likewise.
16850         * config/s390/s390.c (s390_handle_vectorbool_attribute): Likewise.
16851         (s390_vector_mode_supported_p): Likewise.
16852         (s390_cc_modes_compatible): Likewise.
16853         (s390_match_ccmode_set): Likewise.
16854         (s390_canonicalize_comparison): Likewise.
16855         (s390_emit_compare_and_swap): Likewise.
16856         (s390_branch_condition_mask): Likewise.
16857         (s390_rtx_costs): Likewise.
16858         (s390_secondary_reload): Likewise.
16859         (__SECONDARY_RELOAD_CASE): Likewise.
16860         (s390_expand_cs): Likewise.
16861         (s390_preferred_simd_mode): Likewise.
16862         * config/s390/vx-builtins.md (vec_packsu_u<mode>): Likewise.
16863         * config/sh/sh.c (sh_print_operand): Likewise.
16864         (dump_table): Likewise.
16865         (sh_secondary_reload): Likewise.
16866         * config/sh/sh.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
16867         * config/sh/sh.md (casesi_worker_1): Likewise.
16868         (casesi_worker_2): Likewise.
16869         * config/sparc/predicates.md (icc_comparison_operator): Likewise.
16870         (fcc_comparison_operator): Likewise.
16871         * config/sparc/sparc.c (sparc_expand_move): Likewise.
16872         (emit_soft_tfmode_cvt): Likewise.
16873         (sparc_preferred_simd_mode): Likewise.
16874         (output_cbranch): Likewise.
16875         (sparc_print_operand): Likewise.
16876         (sparc_expand_vec_perm_bmask): Likewise.
16877         (vector_init_bshuffle): Likewise.
16878         * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
16879         (spu_vector_mode_supported_p): Likewise.
16880         (spu_expand_insv): Likewise.
16881         (spu_emit_branch_or_set): Likewise.
16882         (spu_handle_vector_attribute): Likewise.
16883         (spu_builtin_splats): Likewise.
16884         (spu_builtin_extract): Likewise.
16885         (spu_builtin_promote): Likewise.
16886         (spu_expand_sign_extend): Likewise.
16887         * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
16888         (tilegx_simd_int): Likewise.
16889         * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p): Likewise.
16890         (tilepro_simd_int): Likewise.
16891         * config/v850/v850.c (const_double_split): Likewise.
16892         (v850_print_operand): Likewise.
16893         (ep_memory_offset): Likewise.
16894         * config/vax/vax.c (vax_rtx_costs): Likewise.
16895         (vax_output_int_move): Likewise.
16896         (vax_output_int_add): Likewise.
16897         (vax_output_int_subtract): Likewise.
16898         * config/visium/predicates.md (visium_branch_operator): Likewise.
16899         * config/visium/visium.c (rtx_ok_for_offset_p): Likewise.
16900         (visium_print_operand_address): Likewise.
16901         * config/visium/visium.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
16902         * config/xtensa/xtensa.c (xtensa_mem_offset): Likewise.
16903         (xtensa_expand_conditional_branch): Likewise.
16904         (xtensa_copy_incoming_a7): Likewise.
16905         (xtensa_output_literal): Likewise.
16906         * dfp.c (decimal_real_maxval): Likewise.
16907         * targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
16909 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16910             Alan Hayward  <alan.hayward@arm.com>
16911             David Sherwood  <david.sherwood@arm.com>
16913         * genmodes.c (mode_size_inline): Add an E_ prefix to mode names.
16914         (mode_nunits_inline): Likewise.
16915         (mode_inner_inline): Likewise.
16916         (mode_unit_size_inline): Likewise.
16917         (mode_unit_precision_inline): Likewise.
16918         (emit_insn_modes_h): Likewise.  Also emit a #define of the
16919         unprefixed name.
16920         (emit_mode_wider): Add an E_ prefix to mode names.
16921         (emit_mode_complex): Likewise.
16922         (emit_mode_inner): Likewise.
16923         (emit_mode_adjustments): Likewise.
16924         (emit_mode_int_n): Likewise.
16925         * config/aarch64/aarch64-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP)
16926         (v2si_UP, v2sf_UP, v1df_UP, di_UP, df_UP, v16qi_UP, v8hi_UP, v8hf_UP)
16927         (v4si_UP, v4sf_UP, v2di_UP, v2df_UP, ti_UP, oi_UP, ci_UP, xi_UP)
16928         (si_UP, sf_UP, hi_UP, hf_UP, qi_UP): Likewise.
16929         (CRC32_BUILTIN, ENTRY): Likewise.
16930         * config/aarch64/aarch64.c (aarch64_push_regs): Likewise.
16931         (aarch64_pop_regs): Likewise.
16932         (aarch64_process_components): Likewise.
16933         * config/alpha/alpha.c (alpha_emit_conditional_move): Likewise.
16934         * config/arm/arm-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP, v2si_UP)
16935         (v2sf_UP, di_UP, v16qi_UP, v8hi_UP, v8hf_UP, v4si_UP, v4sf_UP)
16936         (v2di_UP, ti_UP, ei_UP, oi_UP, hf_UP, si_UP, void_UP): Likewise.
16937         * config/arm/arm.c (arm_init_libfuncs): Likewise.
16938         * config/i386/i386-builtin-types.awk (ix86_builtin_type_vect_mode):
16939         Likewise.
16940         * config/i386/i386-builtin.def (pcmpestr): Likewise.
16941         (pcmpistr): Likewise.
16942         * config/microblaze/microblaze.c (double_memory_operand): Likewise.
16943         * config/mmix/mmix.c (mmix_output_condition): Likewise.
16944         * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
16945         Likewise.
16946         * config/rl78/rl78.c (mduc_regs): Likewise.
16947         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
16948         (htm_expand_builtin): Likewise.
16949         * config/sh/sh.h (REGISTER_NATURAL_MODE): Likewise.
16950         * config/sparc/sparc.c (emit_save_or_restore_regs): Likewise.
16951         * config/xtensa/xtensa.c (print_operand): Likewise.
16952         * expmed.h (NUM_MODE_PARTIAL_INT): Likewise.
16953         (NUM_MODE_VECTOR_INT): Likewise.
16954         * genoutput.c (null_operand): Likewise.
16955         (output_operand_data): Likewise.
16956         * genrecog.c (print_parameter_value): Likewise.
16957         * lra.c (debug_operand_data): Likewise.
16959 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16961         * dwarf2out.c (scompare_loc_descriptor_wide)
16962         (scompare_loc_descriptor_narrow): New functions, split out from...
16963         (scompare_loc_descriptor): ...here.
16964         * expmed.c (emit_store_flag_int): New function, split out from...
16965         (emit_store_flag): ...here.
16967 2017-08-30  Richard Biener  <rguenther@suse.de>
16969         * dwarf2out.c (dwarf2out_finish): Remove setting AT_pubnames.
16970         (dwarf2out_early_finish): Move setting of AT_pubnames from
16971         early debug output to early finish.
16973 2017-08-30  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
16975         * gcc/config/msp430/msp430.h: Pass -mcode/data-region to the linker
16976         and -mdata-region to the assembler.
16978 2017-08-30  Richard Biener  <rguenther@suse.de>
16980         * dwarf2out.c (add_dwarf_attr): Check we don't add duplicate
16981         attributes.
16982         (gen_subprogram_die): Add DW_AT_object_pointer only early.
16983         (dwarf2out_early_global_decl): Only generate a DIE for the
16984         abstract origin if it doesn't already exist or is a declaration DIE.
16985         (resolve_addr): Do not add the linkage name twice when
16986         generating a stub DIE for the DW_TAG_GNU_call_site target.
16988 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
16990         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
16991         Use machine_mode rather than int for arg1_mode.
16993 2017-08-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
16995         PR target/82015
16996         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Insure
16997         that the second argument of the built-in functions to unpack
16998         128-bit scalar types to 64-bit values is 0 or 1.  Change to use a
16999         switch statement instead a lot of if statements.
17000         * config/rs6000/rs6000.md (unpack<mode>, FMOVE128_VSX iterator):
17001         Allow 64-bit values to be in Altivec registers as well as
17002         traditional floating point registers.
17003         (pack<mode>, FMOVE128_VSX iterator): Likewise.
17005 2017-08-29  Alexander Monakov  <amonakov@ispras.ru>
17007         * ira-costs.c (record_address_regs): Handle both operands of PLUS for
17008         MAX_REGS_PER_ADDRESS == 1.
17010 2017-08-29  Uros Bizjak  <ubizjak@gmail.com>
17012         * config/i386/i386.opt (flag_fentry): Do not init to -1.
17013         * config/i386/i386.c (ix86_option_override_internal): Simplify
17014         setting of opts->x_flag_entry.
17016 2017-08-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17017             Jakub Jelinek  <jakub@redhat.com>
17018             Richard Biener  <rguenther@suse.de>
17020         PR tree-optimization/81503
17021         * gimple-ssa-strength-reduction.c (replace_mult_candidate): Ensure
17022         folded constant fits in the target type; reorder tests for clarity.
17024 2017-08-29  Martin Liska  <mliska@suse.cz>
17026         * passes.def: Include pass_lower_switch.
17027         * stmt.c (dump_case_nodes): Remove and move to
17028         tree-switch-conversion.
17029         (case_values_threshold): Likewise.
17030         (expand_switch_as_decision_tree_p): Likewise.
17031         (emit_case_decision_tree): Likewise.
17032         (expand_case): Likewise.
17033         (balance_case_nodes): Likewise.
17034         (node_has_low_bound): Likewise.
17035         (node_has_high_bound): Likewise.
17036         (node_is_bounded): Likewise.
17037         (emit_case_nodes): Likewise.
17038         (struct simple_case_node): New struct.
17039         (add_case_node): Remove.
17040         (emit_case_dispatch_table): Use vector instead of case_list.
17041         (reset_out_edges_aux): Remove.
17042         (compute_cases_per_edge): Likewise.
17043         (expand_case): Build list of simple_case_node.
17044         (expand_sjlj_dispatch_table): Use it.
17045         * tree-switch-conversion.c (struct case_node): Moved from
17046         stmt.c and adjusted.
17047         (emit_case_nodes): Likewise.
17048         (node_has_low_bound): Likewise.
17049         (node_has_high_bound): Likewise.
17050         (node_is_bounded): Likewise.
17051         (case_values_threshold): Likewise.
17052         (reset_out_edges_aux): Likewise.
17053         (compute_cases_per_edge): Likewise.
17054         (add_case_node): Likewise.
17055         (dump_case_nodes): Likewise.
17056         (balance_case_nodes): Likewise.
17057         (expand_switch_as_decision_tree_p): Likewise.
17058         (emit_jump): Likewise.
17059         (emit_case_decision_tree): Likewise.
17060         (try_switch_expansion): Likewise.
17061         (do_jump_if_equal): Likewise.
17062         (emit_cmp_and_jump_insns): Likewise.
17063         (fix_phi_operands_for_edge): New function.
17064         (record_phi_operand_mapping): Likewise.
17065         (class pass_lower_switch): New pass.
17066         (pass_lower_switch::execute): New function.
17067         (make_pass_lower_switch): Likewise.
17068         (conditional_probability):
17069         * timevar.def: Add TV_TREE_SWITCH_LOWERING.
17070         * tree-pass.h: Add make_pass_lower_switch.
17072 2017-08-29  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
17074         PR target/80993
17075         * gcc/config/msp430/msp430.c (msp430_attr): Mark interrupt
17076         handlers as used.
17078 2017-08-29  Richard Biener  <rguenther@suse.de>
17080         * dwarf2out.c (add_dwarf_attr): When checking is enabled verify
17081         we do not add a DW_AT_inline attribute twice.
17082         (gen_subprogram_die): Remove code setting DW_AT_inline on
17083         DECL_ABSTRACT_P nodes.
17085 2017-08-29  Richard Sandiford  <richard.sandiford@linaro.org>
17087         * gimplify.c (gimplify_call_expr): Copy the nothrow flag to
17088         calls to internal functions.
17089         (gimplify_modify_expr): Likewise.
17090         * tree-call-cdce.c (use_internal_fn): Likewise.
17091         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
17092         (convert_to_divmod): Set the nothrow flag.
17093         * tree-if-conv.c (predicate_mem_writes):  Likewise.
17094         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
17095         (vectorizable_call): Likewise.
17096         (vectorizable_store): Likewise.
17097         (vectorizable_load): Likewise.
17098         * tree-vect-patterns.c (vect_recog_pow_pattern): Likewise.
17099         (vect_recog_mask_conversion_pattern): Likewise.
17101 2017-08-29  Martin Liska  <mliska@suse.cz>
17103         PR other/39851
17104         * gcc.c (driver_handle_option): Add new argument.
17105         * opts-common.c (handle_option): Pass
17106         target_option_override_hook.
17107         * opts-global.c (lang_handle_option): Add new option.
17108         (set_default_handlers):  Add new argument.
17109         (decode_options): Likewise.
17110         * opts.c (target_handle_option): Likewise.
17111         (common_handle_option): Call target_option_override_hook.
17112         * opts.h (struct cl_option_handler_func): Add hook for
17113         target option override.
17114         (struct cl_option_handlers): Likewise.
17115         (set_default_handlers): Add new argument.
17116         (decode_options): Likewise.
17117         (common_handle_option): Likewise.
17118         (target_handle_option): Likewise.
17119         * toplev.c (toplev::main): Pass targetm.target_option.override
17120         hook.
17122 2017-08-29  Richard Biener  <rguenther@suse.de>
17123         Dominik Infuehr <dominik.infuehr@theobroma-systems.com>
17125         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Properly confine
17126         life to the active subtree.
17128 2017-08-28  Jeff Law  <law@redhat.com>
17130         * tree-ssa-dom.c (edge_info::record_simple_equiv): Call
17131         derive_equivalences.
17132         (derive_equivalences_from_bit_ior, record_temporary_equivalences):
17133         Code moved into....
17134         (edge_info::derive_equivalences): New private member function
17136         * tree-ssa-dom.c (class edge_info): Changed from a struct
17137         to a class.  Add ctor/dtor, methods and data members.
17138         (edge_info::edge_info): Renamed from allocate_edge_info.
17139         Initialize additional members.
17140         (edge_info::~edge_info): New.
17141         (free_dom_edge_info): Delete the edge info.
17142         (record_edge_info): Use new class & associated member functions.
17143         Tighten forms for testing for edge equivalences.
17144         (record_temporary_equivalences): Iterate over the simple
17145         equivalences rather than assuming there's only one per edge.
17146         (cprop_into_successor_phis): Iterate over the simple
17147         equivalences rather than assuming there's only one per edge.
17148         (optimize_stmt): Use operand_equal_p rather than pointer
17149         equality for mini-DSE code.
17151 2017-08-28  Nathan Sidwell  <nathan@acm.org>
17153         * gcc.c (execute): Fold SIGPIPE handling into switch
17154         statement.  Adjust internal error message.
17156 2017-08-28  Richard Biener  <rguenther@suse.de>
17158         PR debug/81993
17159         * dwarf2out.c (gen_remaining_tmpl_value_param_die_attributes):
17160         Do nothing for removed DIEs.
17162 2017-08-28  Richard Biener  <rguenther@suse.de>
17164         PR tree-optimization/81977
17165         * tree-ssa-sccvn.c (vn_reference_lookup_3): Fix look through
17166         memcpy.
17168 2017-08-28  Alexander Monakov  <amonakov@ispras.ru>
17170         PR target/80640
17171         * doc/md.texi (mem_thread_fence): Remove mention of mode.  Rewrite.
17172         * optabs.c (expand_mem_thread_fence): Emit a compiler barrier when
17173         using targetm.gen_mem_thread_fence.
17175 2017-08-27  Uros Bizjak  <ubizjak@gmail.com>
17177         PR target/81995
17178         * config/i386/i386.md (*<btsc><mode>): Change operand 2
17179         predicate to register_operand.  Reorder operands.
17180         (*btr<mode>): Ditto.
17181         (*<btsc><mode>_mask): Change operand 3 predicate to register_operand.
17182         (*btr<mode>_mask): Ditto.
17184 2017-08-25  Steven Munroe  <munroesj@gcc.gnu.org>
17186         * config.gcc (powerpc*-*-*): Add xmmintrin.h and mm_malloc.h.
17187         * config/rs6000/xmmintrin.h: New file.
17188         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include xmmintrin.h.
17190 2017-08-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17192         PR target/81504
17193         * config/rs6000/rs6000-p8swap.c (find_alignment_op): Add reference
17194         parameter and_insn and return it.
17195         (recombine_lvx_pattern): Insert a copy to ensure availability of
17196         the base register of the copied masking operation at the point of
17197         the instruction replacement.
17198         (recombine_stvx_pattern): Likewise.
17200 2017-08-25  Michael Meissner  <meissner@linux.vnet.ibm.com>
17202         * config/rs6000/rs6000.opt (-mpower9-dform-scalar): Delete
17203         undocumented switches.
17204         (-mpower9-dform-vector): Likewise.
17205         (-mpower9-dform): Likewise.
17206         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
17207         comments to delete references to -mpower9-dform* switches.
17208         * config/rs6000/predicates.md (vsx_quad_dform_memory_operand):
17209         Delete reference to -mpower9-dform* switches, test for
17210         -mpower9-vector instead.
17211         * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Likewise.
17212         (OTHER_P9_VECTOR_MASKS): Likewise.
17213         (POWERPC_MASKS): Likewise.
17214         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Change
17215         tests against -mpower9-dform* to -mpower9-vector.  Delete code
17216         that checked for -mpower9-dform* consistancy with other options.
17217         Add test for -mpower9-misc to enable other power9 switches.
17218         (rs6000_init_hard_regno_mode_ok): Likewise.
17219         (rs6000_option_override_internal): Likewise.
17220         (rs6000_emit_prologue): Likewise.
17221         (rs6000_emit_epilogue): Likewise.
17222         (rs6000_opt_masks): Delete -mpower9-dform-{scalar,vector}.
17223         (rs6000_disable_incompatiable_switches): Delete -mpower9-dform.
17224         (emit_fusion_p9_load): Change tests for -mpower9-dform-scalar
17225         -mpower9-vector.
17226         (emit_fusion_p9_store): Likewise.
17227         * config/rs6000/rs6000.h (TARGET_P9_DFORM_SCALAR): Delete
17228         resetting these macros if the assembler does not support ISA 3.0
17229         instructions.
17230         (TARGET_P9_DFORM_VECTOR): Likewise.
17231         * config/rs6000/rs6000.md (peepholes to optimize altivec memory):
17232         Change to use -mpower9-vector instead of -mpower9-dform-scalar.
17234 2017-08-25  Alan Modra  <amodra@gmail.com>
17236         PR rtl-optimization/81747
17237         * cse.c (cse_extended_basic_block): Don't attempt to record
17238         equivalences for degenerate conditional branches that branch
17239         to their fall-through.
17241 2017-08-24  Martin Sebor  <msebor@redhat.com>
17243         PR middle-end/81908
17244         * gimple-fold.c (size_must_be_zero_p): New function.
17245         (gimple_fold_builtin_memory_op): Call it.
17247 2017-08-24  Steven Munroe  <munroesj@gcc.gnu.org>
17249         * config/rs6000/mm_malloc.h: New file.
17251 2017-08-24  Bin Cheng  <bin.cheng@arm.com>
17253         PR tree-optimization/81913
17254         * tree-ssa-loop-niter.c (number_of_iterations_cond): Skip niter
17255         analysis when either IVs in condition can wrap.
17257 2017-08-24  Uros Bizjak  <ubizjak@gmail.com>
17259         * dwarf2out.c (MAX_ARTIFICIAL_LABEL_BYTES): Increase to 40.
17260         * dwarf2cfi.c (MAX_ARTIFICIAL_LABEL_BYTES): Remove.
17262 2017-08-24  Richard Biener  <rguenther@suse.de>
17264         PR target/81921
17265         * targhooks.c (default_target_can_inline_p): Properly
17266         use target_option_default_node when no DECL_FUNCTION_SPECIFIC_TARGET
17267         is present and always compare.
17268         * config/i386/i386.c (ix86_valid_target_attribute_tree): Do not
17269         infer -mfpmath=sse from TARGET_SSE_P.
17270         (ix86_can_inline_p): Properly use target_option_default_node when
17271         no DECL_FUNCTION_SPECIFIC_TARGET is present and always compare.
17273 2017-08-24  Richard Biener  <rguenther@suse.de>
17275         PR debug/81936
17276         * dwarf2out.c (output_die): Handle flag_generate_offload like
17277         flag_generate_lto.
17278         (output_comp_unit): Likewise.
17279         (gen_array_type_die): Likewise.
17280         (dwarf2out_early_finish): Likewise.
17281         (note_variable_value_in_expr): Likewise.
17282         (dwarf2out_finish): Likewise.  Adjust assert.
17283         * cgraphunit.c (symbol_table::compile): Move setting of
17284         flag_generate_offload earlier ...
17285         (symbol_table::finalize_compilation_unit): ... here, before
17286         early debug finalization.
17288 2017-08-24  Richard Biener  <rguenther@suse.de>
17290         * config/i386/i386.c: Include symbol-summary.h, ipa-prop.h
17291         and ipa-fnsummary.h.
17292         (ix86_can_inline_p): When ix86_fpmath flags do not match
17293         check whether the callee uses FP math at all.
17295 2017-08-24  Aldy Hernandez  <aldyh@redhat.com>
17297         PR middle-end/81931
17298         * tree-ssanames.c (get_nonzero_bits): Use element_precision
17299         instead of TYPE_PRECISION.
17301 2017-08-24  Richard Sandiford  <richard.sandiford@linaro.org>
17302             Alan Hayward  <alan.hayward@arm.com>
17303             David Sherwood  <david.sherwood@arm.com>
17305         * combine.c (make_extraction): Use subreg_offset_from_lsb.
17307 2017-08-23  Daniel Santos  <daniel.santos@pobox.com>
17309         * config/i386/i386.h (ix86_frame::stack_realign_allocate_offset):
17310         Remove field.
17311         (ix86_frame::stack_realign_allocate): New field.
17312         (struct machine_frame_state): Modify comments.
17313         (machine_frame_state::sp_realigned_fp_end): New field.
17314         * config/i386/i386.c (ix86_compute_frame_layout): Rework stack frame
17315         layout calculation.
17316         (sp_valid_at): Add assertion to assure no attempt to access invalid
17317         offset of a realigned stack.
17318         (fp_valid_at): Likewise.
17319         (choose_baseaddr): Modify comments.
17320         (ix86_emit_outlined_ms2sysv_save): Adjust to changes in
17321         ix86_expand_prologue.
17322         (ix86_expand_prologue): Modify stack realignment and allocation.
17323         (ix86_expand_epilogue): Modify comments.
17324         * doc/sourcebuild.texi: Add documentation for target selectors avx2,
17325         avx2_runtime, avx512f, and avx512f_runtime.
17327 2017-08-23  Uros Bizjak  <ubizjak@gmail.com>
17329         * config/i386/i386.opt: Remove unneeded Init(0) initializations.
17330         (mstackrealign): Do not init to -1.
17331         * config/i386/i386.c (ix86_option_override_internal):
17332         Check opts_set, not opts when setting default value of
17333         opts->x_ix86_force_align_arg_pointer.
17335 2017-08-23  Richard Biener  <rguenther@suse.de>
17337         * function.c (fndecl_name): Use verbosity 1 (no arguments) for
17338         lang_hooks.decl_printable_name.
17339         * print-rtl-function.c (print_rtx_function): Likewise.
17340         * tree-pretty-print.c (dump_function_header): Likewise.
17342 2017-08-23  Richard Biener  <rguenther@suse.de>
17344         PR lto/81940
17345         * dwarf2out.c (dwarf2out_abstract_function): Handle LTO with
17346         -g0 at compile-time.
17348 2017-08-23  Tamar Christina  <tamar.christina@arm.com>
17350         PR middle-end/19706
17351         * doc/sourcebuild.texi (Other hardware attributes):
17352         Document xorsign.
17354 2017-08-23  Tamar Christina  <tamar.christina@arm.com>
17356         PR middle-end/19706
17357         * tree-ssa-math-opts.c (convert_expand_mult_copysign):
17358         Fix single-use check.
17360 2017-08-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>
17362         * gcc.c (execute): Only test for SIGKILL and SIGQUIT if available.
17364 2017-08-22  Daniel Santos  <daniel.santos@pobox.com>
17366         * doc/install.texi: Modify to add more details on running selected
17367         tests.
17369 2017-08-22  Daniel Santos  <daniel.santos@pobox.com>
17371         * config/i386/i386.c (ix86_option_override_internal): Error when -mx32
17372         is combined with -mabi=ms.
17373         (ix86_function_type_abi): Limit errors for mixing -mx32 with attribute
17374         ms_abi.
17376 2017-08-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17378         PR tree-optimization/81488
17379         * gimple-ssa-strength-reduction (struct slsr_cand_d): Add visited
17380         and cached_basis fields.
17381         (MAX_SPREAD): New constant.
17382         (alloc_cand_and_find_basis): Initialize new fields.
17383         (clear_visited): New function.
17384         (create_phi_basis_1): Rename from create_phi_basis, set visited
17385         and cached_basis fields.
17386         (create_phi_basis): New wrapper function.
17387         (phi_add_costs_1): Rename from phi_add_costs, add spread
17388         parameter, set visited field, short-circuit when limits reached.
17389         (phi_add_costs): New wrapper function.
17390         (record_phi_increments_1): Rename from record_phi_increments, set
17391         visited field.
17392         (record_phi_increments): New wrapper function.
17393         (phi_incr_cost_1): Rename from phi_incr_cost, set visited field.
17394         (phi_incr_cost): New wrapper function.
17395         (all_phi_incrs_profitable_1): Rename from
17396         all_phi_incrs_profitable, set visited field.
17397         (all_phi_incrs_profitable): New wrapper function.
17399 2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
17400             Alan Hayward  <alan.hayward@arm.com>
17401             David Sherwood  <david.sherwood@arm.com>
17403         * rtl.h (paradoxical_subreg_p): Define inline, and add a version
17404         that takes the outer and inner modes.
17405         * doc/rtl.texi: Use paradoxical_subreg_p instead of a GET_MODE_SIZE
17406         comparison as the canonical test for a paradoxical subreg.
17407         * combine.c (simplify_set): Use paradoxical_subreg_p.
17408         (make_extraction): Likewise.
17409         (force_to_mode): Likewise.
17410         (rtx_equal_for_field_assignment_p): Likewise.
17411         (gen_lowpart_for_combine): Likewise.
17412         (simplify_comparison): Likewise.
17413         * cse.c (equiv_constant): Likewise.
17414         * expmed.c (store_bit_field_1): Likewise.
17415         * final.c (alter_subreg): Likewise.
17416         * fwprop.c (propagate_rtx): Likewise.
17417         (forward_propagate_subreg): Likewise.
17418         * ira-conflicts.c (ira_build_conflicts): Likewise.
17419         * lower-subreg.c (simplify_gen_subreg_concatn): Likewise.
17420         * lra-constraints.c (curr_insn_transform): Likewise.
17421         (split_reg): Likewise.
17422         * lra-eliminations.c (move_plus_up): Likewise.
17423         (lra_eliminate_regs_1): Likewise.
17424         * recog.c (general_operand): Likewise.
17425         * ree.c (combine_reaching_defs): Likewise.
17426         * reload.c (push_reload): Likewise.
17427         (find_reloads): Likewise.
17428         * reload1.c (elimination_effects): Likewise.
17429         (compute_reload_subreg_offset): Likewise.
17430         (choose_reload_regs): Likewise.
17431         * rtlanal.c (subreg_lsb_1): Likewise.
17432         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
17433         (simplify_subreg): Likewise.
17434         * var-tracking.c (track_loc_p): Likewise.
17435         * emit-rtl.c (byte_lowpart_offset): Likewise.
17436         (paradoxical_subreg_p): Delete out-of-line definition.
17438 2017-08-22  Jeff Law  <law@redhat.com>
17440         PR tree-optimization/81741
17441         PR tree-optimization/71947
17442         * tree-ssa-dom.c: Include tree-inline.h.
17443         (record_temporary_equivalences): Only record SSA_NAME = SSA_NAME
17444         equivalences if one is more expensive to compute than the other.
17445         * tree-ssa-scopedtables.h (class const_or_copies): Make
17446         record_const_or_copy_raw method private.
17447         (class avail_exprs_stack): New method simplify_binary_operation.
17448         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr): Call
17449         avail_exprs_stack::simplify_binary_operation as needed.
17450         (avail_exprs_stack::simplify_binary_operation): New function.
17452 2017-08-22  Sebastian Huber  <sebastian.huber@embedded-brains.de>
17454         * config.gcc (powerpc-*-rtems*): Add rs6000/linux64.opt.
17455         * config/rs6000/rtems.h (ASM_PREFERRED_EH_DATA_FORMAT): New define.
17456         (DOT_SYMBOLS): Likewise.
17457         (MINIMAL_TOC_SECTION_ASM_OP): Likewise.
17458         (RELOCATABLE_NEEDS_FIXUP): Likewise.
17459         (RS6000_ABI_NAME): Likewise.
17460         (TARGET_CMODEL): Likewise.
17461         (TOC_SECTION_ASM_OP): Likewise.
17462         (SET_CMODEL): New macro.
17463         (SUBSUBTARGET_OVERRIDE_OPTIONS): Evaluate cmodel options.
17465 2017-08-22  Richard Biener  <rguenther@suse.de>
17467         * tree-inline.c (remap_type_1): Change asserts on TYPE_SIZE[_UNIT]
17468         to allow for free-lang-data replacements similar to verify_type_variant.
17470 2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
17471             Alan Hayward  <alan.hayward@arm.com>
17472             David Sherwood  <david.sherwood@arm.com>
17474         * config/aarch64/aarch64.md (casesi): Use DImode rather than
17475         VOIDmode for the LABEL_REF.
17477 2017-08-22  Richard Biener  <rguenther@suse.de>
17479         * tree-cfg.c (gimple_split_edge): Avoid reallocating target PHI nodes.
17481 2017-08-22  Richard Biener  <rguenther@suse.de>
17483         * common.opt (feliminate-dwarf2-dups): Ignore.
17484         * doc/invoke.texi (feliminate-dwarf2-dups): Remove documentation.
17485         * dwarf2out.c (push_new_compile_unit, pop_compile_unit,
17486         same_die_p_wrap, compute_section_prefix,
17487         is_symbol_die, assign_symbol_names, break_out_includes): Remove.
17488         (comdat_symbol_id, comdat_symbol_number): Likewise.
17489         (cu_hash_table_entry, cu_hash_table_entry_hasher, cu_hash_type):
17490         Likewise.
17491         (check_duplicate_cu, record_comdat_symbol_number): Likewise.
17492         (output_die): Mark unreachable path unreachable.
17493         (dwarf2out_start_source_file): Do not create DW_TAG_GNU_BINCL.
17494         (dwarf2out_end_source_file): Do not create DW_TAG_GNU_EINCL.
17495         (dwarf2out_init): Remove code handling flag_eliminate_dwarf2_dups.
17496         (dwarf2out_early_finish): Likewise.
17498 2017-08-22  Aldy Hernandez  <aldyh@redhat.com>
17500         * wide-int.h (hwi_with_prec::hwi_with_prec): Sign extend.
17502 2017-08-22  Georg-Johann Lay  <avr@gjlay.de>
17504         PR target/81910
17505         * config/avr/avr.c (avr_handle_addr_attribute): Early return if
17506         not VAR_P. Filter attribute warnings with OPT_Wattributes.
17507         (avr_attribute_table) <io, io_low, address>: Initialize
17508         .decl_required with true.
17510 2017-08-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
17512         * config/rs6000/rs6000-cpus.def (-mvsx-scalar-float): Delete
17513         undocumented debugging options.
17514         (-mvsx-scalar-double): Likewise.
17515         (-mallow-df-permute): Likewise.
17516         (-mvectorize-builtins): Likewise.
17517         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
17518         (rs6000_builtin_vectorized_function): Likewise.
17519         (rs6000_builtin_md_vectorized_function): Likewise.
17520         (rs6000_opt_vars): Likewise.
17522 2017-08-21  Uros Bizjak  <ubizjak@gmail.com>
17524         PR target/46091
17525         * config/i386/i386.md (*btsq_imm): Rename from *btsq.
17526         (*btrq_imm): Rename from *btrq.
17527         (*btcq_imm): Rename from *btcq.
17528         (btsc): New code attribute.
17529         (*<btsc><mode>): New insn pattern.
17530         (*btr<mode>): Ditto.
17531         (*<btsc><mode>_mask): New insn_and_split pattern.
17532         (*btr<mode>_mask): Ditto.
17534 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
17535             Alan Hayward  <alan.hayward@arm.com>
17536             David Sherwood  <david.sherwood@arm.com>
17538         * function.c (pad_below): Simplify padding calculation.
17540 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
17541             Alan Hayward  <alan.hayward@arm.com>
17542             David Sherwood  <david.sherwood@arm.com>
17544         * target.def (function_prologue): Remove frame size argument.
17545         (function_epilogue): Likewise.
17546         * doc/tm.texi: Regenerate.
17547         * final.c (final_start_function): Update call to function_prologue.
17548         (final_end_function): Update call to function_epilogue.
17549         (default_function_pro_epilogue): Remove frame size argument.
17550         * output.h (default_function_pro_epilogue): Likewise.
17551         * config/arm/arm.c (arm_output_function_epilogue): Likewise.
17552         (arm_output_function_prologue): Likewise.
17553         * config/frv/frv.c (frv_function_prologue): Likewise.
17554         (frv_function_epilogue): Likewise.
17555         * config/i386/i386.c (ix86_output_function_epilogue): Likewise.
17556         * config/ia64/ia64.c (ia64_output_function_prologue): Likewise.
17557         (ia64_output_function_epilogue): Likewise.
17558         * config/m32r/m32r.c (m32r_output_function_prologue): Likewise.
17559         (m32r_output_function_epilogue): Likewise.
17560         * config/microblaze/microblaze.c (microblaze_function_prologue)
17561         (microblaze_function_epilogue): Likewise.
17562         * config/mips/mips.c (mips_output_function_prologue): Likewise.
17563         (mips_output_function_epilogue): Likewise.
17564         * config/mmix/mmix.c (mmix_target_asm_function_prologue): Likewise.
17565         (mmix_target_asm_function_epilogue): Likewise.
17566         * config/msp430/msp430.c (msp430_start_function): Likewise.
17567         * config/nds32/nds32.c (nds32_asm_function_prologue): Likewise.
17568         (nds32_asm_function_epilogue): Likewise.
17569         * config/nios2/nios2.c (nios2_asm_function_prologue): Likewise.
17570         * config/pa/pa.c (pa_output_function_prologue): Likewise.
17571         (pa_output_function_epilogue): Likewise.
17572         * config/powerpcspe/powerpcspe.c (rs6000_output_function_prologue)
17573         (rs6000_output_function_epilogue): Likewise.
17574         * config/rl78/rl78.c (rl78_start_function): Likewise.
17575         * config/rs6000/rs6000.c (rs6000_output_function_prologue): Likewise.
17576         (rs6000_output_function_epilogue): Likewise.
17577         * config/rx/rx.c (rx_output_function_prologue): Likewise.
17578         * config/sh/sh.c (sh_output_function_epilogue): Likewise.
17579         * config/sparc/sparc.c (sparc_asm_function_prologue): Likewise.
17580         (sparc_asm_function_epilogue): Likewise.
17582 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
17584         * tree.h (type_has_mode_precision_p): New function.
17585         * convert.c (convert_to_integer_1): Use it.
17586         * expr.c (expand_expr_real_2): Likewise.
17587         (expand_expr_real_1): Likewise.
17588         * fold-const.c (fold_single_bit_test_into_sign_test): Likewise.
17589         * match.pd: Likewise.
17590         * tree-ssa-forwprop.c (simplify_rotate): Likewise.
17591         * tree-ssa-math-opts.c (convert_mult_to_fma): Likewise.
17592         * tree-tailcall.c (process_assignment): Likewise.
17593         * tree-vect-loop.c (vectorizable_reduction): Likewise.
17594         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern)
17595         (vect_recog_mult_pattern, vect_recog_divmod_pattern): Likewise.
17596         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
17597         (vectorizable_assignment): Likewise.
17598         (vectorizable_shift): Likewise.
17599         (vectorizable_operation): Likewise.
17600         * tree-vrp.c (register_edge_assert_for_2): Likewise.
17602 2017-08-21  Wilco Dijkstra  <wdijkstr@arm.com>
17604         * match.pd: Add pow (C, x) simplification.
17606 2017-08-21  Richard Biener  <rguenther@suse.de>
17608         PR tree-optimization/81900
17609         * tree-ssa-pre.c (compute_antic_aux): Properly compute changed
17610         for blocks with abnormal predecessors.
17611         (compute_antic): Do not set visited flag prematurely.
17613 2017-08-21  Georg-Johann Lay  <avr@gjlay.de>
17615         PR target/79883
17616         * config/avr/avr.c (avr_set_current_function): Typo in diagnostic.
17618 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
17620         * stor-layout.h (vector_type_mode): Move to...
17621         * tree.h (vector_type_mode): ...here.
17622         * stor-layout.c (vector_type_mode): Move to...
17623         * tree.c (vector_type_mode): ...here.  Include rtl.h and regs.h.
17625 2017-08-21  Richard Biener  <rguenther@suse.de>
17627         * debug.h (struct gcc_debug_hooks): Add die_ref_for_decl and
17628         register_external_die hooks.
17629         (debug_false_tree_charstarstar_uhwistar): Declare.
17630         (debug_nothing_tree_charstar_uhwi): Likewise.
17631         * debug.c (do_nothing_debug_hooks): Adjust.
17632         (debug_false_tree_charstarstar_uhwistar): New do nothing.
17633         (debug_nothing_tree_charstar_uhwi): Likewise.
17634         * dbxout.c (dbx_debug_hooks): Adjust.
17635         (xcoff_debug_hooks): Likewise.
17636         * sdbout.c (sdb_debug_hooks): Likewise.
17637         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
17638         * dwarf2out.c (macinfo_label_base): New global.
17639         (dwarf2out_register_external_die): New function for the
17640         register_external_die hook.
17641         (dwarf2out_die_ref_for_decl): Likewise for die_ref_for_decl.
17642         (dwarf2_debug_hooks): Use them.
17643         (dwarf2_lineno_debug_hooks): Adjust.
17644         (struct die_struct): Add with_offset flag.
17645         (DEBUG_LTO_DWO_INFO_SECTION, DEBUG_LTO_INFO_SECTION,
17646         DEBUG_LTO_DWO_ABBREV_SECTION, DEBUG_LTO_ABBREV_SECTION,
17647         DEBUG_LTO_DWO_MACINFO_SECTION, DEBUG_LTO_MACINFO_SECTION,
17648         DEBUG_LTO_DWO_MACRO_SECTION, DEBUG_LTO_MACRO_SECTION,
17649         DEBUG_LTO_LINE_SECTION, DEBUG_LTO_DWO_STR_OFFSETS_SECTION,
17650         DEBUG_LTO_STR_DWO_SECTION, DEBUG_STR_LTO_SECTION): New macros
17651         defining section names for the early LTO debug variants.
17652         (reset_indirect_string): New helper.
17653         (add_AT_external_die_ref): Helper for dwarf2out_register_external_die.
17654         (print_dw_val): Add support for offsetted symbol references.
17655         (get_ultimate_context): Split out from is_cxx.
17656         (is_cxx): Use get_ultimate_context.
17657         (is_fortran): Add decl overload.
17658         (compute_comp_unit_symbol): Split out worker from
17659         compute_section_prefix.
17660         (compute_section_prefix): Call compute_comp_unit_symbol and
17661         set comdat_type_p here.
17662         (output_die): Skip DIE symbol output for the LTO added one.
17663         Handle DIE symbol references with offset.
17664         (output_comp_unit): Guard section name mangling properly.
17665         For LTO debug sections emit a symbol at the section beginning
17666         which we use to refer to its DIEs.
17667         (add_abstract_origin_attribute): For DIEs registered via
17668         dwarf2out_register_external_die directly refer to the early
17669         DIE rather than indirectly through the shadow one we created.
17670         Remove obsolete call to dwarf2out_abstract_function for
17671         non-function/block origins.
17672         (gen_array_type_die): When generating early LTO debug do
17673         not emit DW_AT_string_length.
17674         (gen_formal_parameter_die): Do not re-create DIEs for PARM_DECLs
17675         late when in LTO.  As suggested place a gcc_unreachable for
17676         the DECL_ABSTRACT_P case.
17677         (gen_subprogram_die): Avoid another specification DIE
17678         for early built declarations/definitions for the late LTO case.
17679         (gen_variable_die): Add type references for late duplicated VLA dies
17680         when in late LTO.
17681         (gen_inlined_subroutine_die): Do not call dwarf2out_abstract_function,
17682         we have the abstract instance already.
17683         (process_scope_var): Adjust decl DIE contexts in LTO which
17684         first puts them in limbo.
17685         (gen_decl_die): Do not generate type DIEs late apart from
17686         types for VLAs or for decls we do not yet have a DIE.  Do not
17687         call dwarf2out_abstract_function late.
17688         (dwarf2out_early_global_decl): Make sure to create DIEs
17689         for abstract instances of a decl first.
17690         (dwarf2out_late_global_decl): Adjust comment.
17691         (output_macinfo_op): With multiple macro sections use
17692         macinfo_label_base to distinguish labels.
17693         (output_macinfo): Likewise.  Update macinfo_label_base.
17694         Pass in the line info label.
17695         (note_variable_value_in_expr): When generating LTO resolve
17696         all variable values here by generating DIEs as needed.
17697         (init_sections_and_labels): Add early LTO debug flag parameter
17698         and generate different sections and names if set.  Add generation
17699         counter for the labels so we can have multiple of them.
17700         (reset_dies): Helper to allow DIEs to be output multiple times.
17701         (dwarf2out_finish): When outputting DIEs to the fat part of an
17702         LTO object first reset DIEs.
17703         (dwarf2out_early_finish): Output early DIEs when generating LTO.
17704         (modified_type_die): Check for decl_ultimate_origin being self
17705         before recursing.
17706         (gen_type_die_with_usage): Likewise.
17707         (gen_typedef_die): Allow decl_ultimate_origin being self.
17708         (set_decl_abstract_flags): Remove.
17709         (set_block_abstract_flags): Likewise.
17710         (dwarf2out_abstract_function): Treat the early generated DIEs
17711         as the abstract copy and only add DW_AT_inline and
17712         DW_AT_artificial here and call set_decl_origin_self.
17713         If the DIE has an abstract origin don't do anything.
17714         * tree.c (free_lang_data): Build a dummy TRANSLATION_UNIT_DECL
17715         if we have none yet (Go fails to build one, PR78628).
17716         (variably_modified_type_p): Prevent endless recursion for Ada
17717         cyclic pointer types.
17718         * lto-streamer-in.c: Include debug.h.
17719         (dref_queue): New global.
17720         (lto_read_tree_1): Stream in DIE references.
17721         (lto_input_tree): Register DIE references.
17722         (input_function): Stream DECL_DEBUG_ARGS.
17723         * lto-streamer-out.c: Include debug.h.
17724         (lto_write_tree_1): Output DIE references.
17725         (DFS::DFS_write_tree_body): Follow DECL_ABSTRACT_ORIGIN.
17726         Force a TRANSLATION_UNIT_DECL DECL_CONTEXT for file-scope decls.
17727         (output_function): Stream DECL_DEBUG_ARGS.
17728         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
17729         Stream DECL_ABSTRACT_ORIGIN.
17730         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
17731         (write_ts_decl_minimal_tree_pointers): Force a TRANSLATION_UNIT_DECL
17732         DECL_CONTEXT for file-scope decls.
17733         * lto-streamer.h (struct dref_entry): Declare.
17734         (dref_queue): Likewise.
17735         * cfgexpand.c (pass_expand::execute): Do not call the
17736         outlining_inline_function hook here.
17737         * lto-wrapper.c (debug_obj): New global.
17738         (tool_cleanup): Unlink it if required.
17739         (debug_objcopy): New function.
17740         (run_gcc): Handle early debug sections in the IL files by
17741         extracting them to separate files, partially linkin them and
17742         feeding the result back as result to the linker.
17743         * config/darwin.h (DEBUG_LTO_INFO_SECTION, DEBUG_LTO_ABBREV_SECTION,
17744         DEBUG_LTO_MACINFO_SECTION, DEBUG_LTO_LINE_SECTION,
17745         DEBUG_STR_LTO_SECTION, DEBUG_LTO_MACRO_SECTION): Put early debug
17746         sections into a separate segment.
17747         * config/darwin.c (darwin_asm_named_section): Handle __GNU_DWARF_LTO
17748         segments.
17749         (darwin_asm_dwarf_section): Likewise.
17750         (darwin_asm_output_dwarf_offset): Likewise.
17751         * config/i386/i386.c (make_resolver_func): Set DECL_IGNORED_P.
17753 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
17754             Alan Hayward  <alan.hayward@arm.com>
17755             David Sherwood  <david.sherwood@arm.com>
17757         * read-md.h (md_reader::record_potential_iterator_use): Replace
17758         pointer argument with an rtx and an index.
17759         * read-rtl.c (iterator_group::apply_iterator): Likewise.
17760         (apply_mode_iterator): Likewise.
17761         (apply_code_iterator): Likewise.
17762         (apply_int_iterator): Likewise.
17763         (apply_subst_iterator): Likewise.
17764         (record_iterator_use): Likewise.
17765         (record_attribute_use): Likewise.
17766         (md_reader::record_potential_iterator_use): Likewise.  Update calls
17767         to record_iterator_use and apply_iterator.
17768         (iterator_use): Replace ptr with x and index.
17769         (attribute_use): Likewise.
17770         (apply_attribute_uses): Update calls to apply_iterator.
17771         (apply_iterators): Likewise.  Update initialization of iterator_use.
17772         (rtx_reader::read_rtx_code): Update calls to record_iterator_use
17773         and record_potential_iterator_use.
17774         (rtx_reader::read_rtx_operand): Likewise.
17776 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
17777             Alan Hayward  <alan.hayward@arm.com>
17778             David Sherwood  <david.sherwood@arm.com>
17780         * varasm.c (const_rtx_hash_1): Don't hash in the mode of a
17781         CONST_WIDE_INT.
17783 2017-08-21  Richard Biener  <rguenther@suse.de>
17785         PR middle-end/81884
17786         * tree-ssa-alias.c (stmt_kills_ref_p): Handle array accesses
17787         at struct end conservatively when comparing common bases.
17789 2017-08-21  Richard Biener  <rguenther@suse.de>
17791         * tree-ssa-loop-im.c (struct lim_aux_data): Add ref index member.
17792         (mem_ref_in_stmt): Remove.
17793         (determine_max_movement): Use ref index to get at the reference.
17794         (invariantness_dom_walker::before_dom_children): Deal with
17795         lim data already initialized.
17796         (gather_mem_refs_stmt): Initialize lim data and record ref index.
17798 2017-08-19  Uros Bizjak  <ubizjak@gmail.com>
17800         * config/i386/i386.h (OPTION_MASK_ISA_ROUND): Remove.
17801         (TARGET_ISA_ROUND): Ditto.
17802         (TARGET_ROUND): Ditto.
17803         * config/i386/i386.c: Substitute TARGET_ROUND with TARGET_SSE4_1.
17804         * config/i386/i386.md: Ditto.
17805         * config/i386/sse.md: Ditto.
17806         * config/i386/i386-builtin.def: Substitute OPTION_MASK_ISA_ROUND
17807         with OPTION_MASK_ISA_SSE4_1.
17809 2017-08-19  Uros Bizjak  <ubizjak@gmail.com>
17811         PR target/81894
17812         * doc/extend.texi (x86 Built-in Functions): Correct the name of
17813         __builtin_ia32_lzcnt_u16.
17815 2017-08-18  Peter Bergner  <bergner@vnet.ibm.com>
17817         PR target/80210
17818         * config/rs6000/rs6000.c (rs6000_activate_target_options): New function.
17819         (rs6000_set_current_function): Rewrite function to use it.
17821 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
17823         PR c/53037
17824         * print-tree.c (print_node): Support DECL_WARN_IF_NOT_ALIGN
17825         and TYPE_WARN_IF_NOT_ALIGN.
17826         * stor-layout.c (do_type_align): Merge DECL_WARN_IF_NOT_ALIGN.
17827         (handle_warn_if_not_align): New.
17828         (place_union_field): Call handle_warn_if_not_align.
17829         (place_field): Call handle_warn_if_not_align.
17830         Copy TYPE_WARN_IF_NOT_ALIGN.
17831         (finish_builtin_struct): Copy TYPE_WARN_IF_NOT_ALIGN.
17832         (layout_type): Likewise.
17833         * tree-core.h (tree_type_common): Add warn_if_not_align.  Set
17834         spare to 18.
17835         (tree_decl_common): Add warn_if_not_align.
17836         * tree.c (build_range_type_1): Copy TYPE_WARN_IF_NOT_ALIGN.
17837         * tree.h (TYPE_WARN_IF_NOT_ALIGN): New.
17838         (SET_TYPE_WARN_IF_NOT_ALIGN): Likewise.
17839         (DECL_WARN_IF_NOT_ALIGN): Likewise.
17840         (SET_DECL_WARN_IF_NOT_ALIGN): Likewise.
17841         * doc/extend.texi: Document warn_if_not_aligned attribute.
17842         * doc/invoke.texi: Document -Wif-not-aligned and -Wpacked-not-aligned.
17844 2017-08-17  Martin Liska  <mliska@suse.cz>
17846         PR bootstrap/81864
17847         * tree-loop-distribution.c (ddrs_table): Change type to pointer type.
17848         (get_data_dependence): Use it as pointer type.
17849         (distribute_loop): Likewise.
17851 2017-08-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17853         * config/rs6000/altivec.md (UNSPEC_VMRGOW_DIRECT): New constant.
17854         (p8_vmrgew_v4sf_direct): Generalize to p8_vmrgew_<mode>_direct.
17855         (p8_vmrgow_<mode>_direct): New define_insn.
17856         * config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Properly
17857         handle endianness for vmrgew and vmrgow permute patterns.
17859 2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>
17861         * config/rs6000/altivec.md (VParity): Remove TARGET_VSX_TIMODE.
17862         * config/rs6000/rs6000-cpus.def: Remove comment.
17863         (ISA_2_7_MASKS_SERVER): Delete OPTION_MASK_VSX_TIMODE;
17864         (POWERPC_MASKS): Likewise.
17865         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Remove unneeded
17866         use of TARGET_VSX_TIMODE.
17867         (rs6000_setup_reg_addr_masks): Change TARGET_VSX_TIMODE to TARGET_VSX.
17868         (rs6000_init_hard_regno_mode_ok): Remove unneeded uses of
17869         TARGET_VSX_TIMODE.  Change use of TARGET_VSX_TIMODE to TARGET_VSX.
17870         (rs6000_option_override_internal): Remove dead code.
17871         (rs6000_legitimize_address): Change TARGET_VSX_TIMODE to TARGET_VSX.
17872         (rs6000_legitimize_reload_address): Likewise.
17873         (rs6000_legitimate_address_p): Likewise.
17874         (rs6000_opt_masks): Delete "vsx-timode".
17875         (rs6000_disable_incompatible_switches): Remove mention of -mvsx-timode
17876         from function comment.
17877         * config/rs6000/rs6000.h (MASK_VSX_TIMODE): Delete.
17878         * config/rs6000/rs6000.md (FMOVE128_GPR): Remove TARGET_VSX_TIMODE.
17879         (V16QI, V8HI, V4SI, V4SF, V2DI, V2DF, V1TI): Remove useless empty
17880         condition.
17881         * config/rs6000/rs6000.opt (mvsx-timode): Replace with stub.
17882         * config/rs6000/vector.md (VEC_IP): Remove TARGET_VSX_TIMODE.
17883         * config/rs6000/vsx.md (VSX_LE_128): Likewise.
17884         (VSX_TI): Likewise.
17885         (VSX_M): Likewise.
17886         (define_peephole2): Likewise.
17888 2017-08-17  Martin Sebor  <msebor@redhat.com>
17890         PR c/81859
17891         * pretty-print.c (pp_format): Use strnlen in %.*s to avoid reading
17892         past the end of an array.
17893         (test_pp_format): Add test cases.
17895 2017-08-17  Richard Sandiford  <richard.sandiford@linaro.org>
17897         * internal-fn.def (CLRSB, CLZ, CTZ, FFS, PARITY, POPCOUNT): Add
17898         missing ECF_NOTHROW flags.
17900 2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>
17902         PR target/72804
17903         * config/rs6000/vsx.md (*vsx_le_permute_<mode>): Add support for
17904         operands residing in integer registers.
17905         (*vsx_le_perm_load_<mode>): Likewise.
17906         (*vsx_le_perm_store_<mode>): Likewise.
17907         (define_peephole2): Add peepholes to optimize the above.
17909 2017-08-17  Marek Polacek  <polacek@redhat.com>
17911         PR middle-end/81814
17912         * fold-const.c (operand_equal_for_comparison_p): Remove code that used
17913         to mimic what shorten_compare did.  Change the return type to bool.
17914         (fold_cond_expr_with_comparison): Update call to
17915         operand_equal_for_comparison_p.
17916         (fold_ternary_loc): Likewise.
17918 2017-08-17  Jackson Woodruff  <jackson.woodruff@arm.com>
17920         * aarch64-simd.md (mov<mode>): No longer force zero immediate into
17921         register.
17922         (*aarch64_simd_mov<mode>): Add new case for stp using zero immediate.
17924 2017-08-17  Richard Biener  <rguenther@suse.de>
17926         * tree-ssa-structalias.c (solve_graph): When propagating
17927         to successors update the graphs succ edges and avoid duplicate work.
17929 2017-08-17  Maxim Ostapenko  <m.ostapenko@samsung.com>
17931         PR target/81861
17932         * config/i386/i386.c (ix86_option_override_internal): Save target
17933         specific options after ix86_stack_protector_guard_reg was changed.
17935 2017-08-17  Richard Biener  <rguenther@suse.de>
17937         PR tree-optimization/81827
17938         * tree-ssa-structalias.c (struct variable_info): Add is_reg_var flag.
17939         (new_var_info): Initialize it conservatively.
17940         (get_call_vi): Mark register vars.
17941         (new_scalar_tmp_constraint_exp): Likewise.
17942         (handle_rhs_call): Likewise.
17943         (handle_const_call): Likewise.
17944         (create_function_info_for): Likewise.
17945         (solve_constraints): Sort varinfos to separate register from
17946         non-register vars to pack points-to solution bitmaps during
17947         iteration.
17949 2017-08-17  Marek Polacek  <polacek@redhat.com>
17951         * gimplify.c (gimplify_adjust_omp_clauses): Compare with 0 instead of 1.
17953 2017-08-17  Richard Biener  <rguenther@suse.de>
17955         * tree-vrp.c (vrp_int_const_binop): Do not set *overflow_p
17956         to true when overflow is undefined and we saturated the result.
17958 2017-08-17  Alan Modra  <amodra@gmail.com>
17960         PR target/80938
17961         * config/rs6000/rs6000.c (rs6000_savres_strategy): Revert 2017-08-09.
17962         Don't use store multiple if only one reg needs saving.
17963         (interesting_frame_related_regno): New function.
17964         (rs6000_frame_related): Don't emit frame info for regs that
17965         don't need saving.
17966         (rs6000_emit_epilogue): Likewise.
17968 2017-08-16  Nathan Sidwell  <nathan@acm.org>
17970         * tree-core.h (tree_type_non_common): Rename binfo to lang_1.
17971         * tree.h (TYPE_BINFO): Use type_non_common.maxval.
17972         (TYPE_LANG_SLOT_1): Use type_non_common.lang_1, for any type.
17973         * tree.c (free_lang_data_in_type): Use else-if chain.  Always
17974         clear TYPE_LANG_1.  Remove obsolete member-function stripping.
17975         (find_decls_types_r): Comment about TYPE_MAX_VALUES_RAW.
17976         (verify_type): Adjust for TYPE_BINFO move.
17977         * lto-streamer-out.c (DFS::DFS_write_tree_body): No need to
17978         process TYPE_BINFO directly.
17979         (hash_tree): Likewise.
17980         * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
17981         Likewise.
17982         * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
17983         Likewise.
17985 2017-08-16  David Malcolm  <dmalcolm@redhat.com>
17987         * diagnostic-show-locus.c (colorizer::m_caret): Remove unused field.
17989 2017-08-16  Uros Bizjak  <ubizjak@gmail.com>
17991         PR target/46091
17992         * config/i386/i386.md (*anddi_1_btr): Change predicates of
17993         operand 0 and operand 1 to nomimmediate_operand. Add "m" constraint.
17994         Add ix86_binary_operator_ok to insn constraint.
17995         (*iordi_1_bts): Ditto.
17996         (*xordi_1_btc): Ditto.
17997         (*btsq): Change predicate of operand 0 to nonimmediate_operand.
17998         Update corresponding peephole2 pattern.
17999         (*btrq): Ditto.
18000         (*btcq): Ditto.
18002 2017-08-16  Bin Cheng  <bin.cheng@arm.com>
18004         PR tree-optimization/81832
18005         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Don't
18006         copy loop header which has IFN_LOOP_DIST_ALIAS call.
18008 2017-08-16  Marek Polacek  <polacek@redhat.com>
18010         PR middle/81695
18011         * fold-const.c (fold_indirect_ref_1): Restore original behavior
18012         regarding size_zero_node.
18014 2017-08-16  Martin Liska  <mliska@suse.cz>
18016         PR target/81753
18017         * config.gcc: Respect previously set extra_objs in case
18018         of darwin target.
18020 2017-08-16  Richard Sandiford  <richard.sandiford@linaro.org>
18022         PR tree-optimization/81835
18023         * tree-vect-loop.c (vect_is_simple_reduction): Simply checks for
18024         the phi SSA_NAME.  Check that the condition in a COND_EXPR does
18025         not depend on the phi.
18027 2017-08-16  Alan Modra  <amodra@gmail.com>
18029         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Delete
18030         dead code.
18032 2017-08-16  Alan Modra  <amodra@gmail.com>
18034         * config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p): Merge..
18035         (save_reg_p): ..into this.  Update all callers.
18036         (first_reg_to_save): Simplify.
18038 2017-08-16  Alan Modra  <amodra@gmail.com>
18040         * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't restore
18041         fixed regs.
18043 2017-08-15  Joseph Myers  <joseph@codesourcery.com>
18045         PR target/78460
18046         PR target/67712
18047         * config/sh/sh-mem.cc (sh_expand_cmpnstr): Only unroll for
18048         constant count if that count is less than 32.
18050 2017-08-15  Nathan Sidwell  <nathan@acm.org>
18052         * gcc.c (execute): Emit friendlier message if inferior is killed
18053         by an external cause.
18055 2017-08-15  Richard Biener  <rguenther@suse.de>
18057         PR tree-optimization/81790
18058         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Handle both
18059         CONSTRUCTORs from simplifying and VN.
18061 2017-08-14  Martin Sebor  <msebor@redhat.com>
18063         * builtin-attrs.def: Add comments.
18065 2017-08-14  Martin Sebor  <msebor@redhat.com>
18067         PR c/81117
18068         * doc/extend.texi (attribute nonstring): Document new attribute.
18070 2017-08-14  Martin Sebor  <msebor@redhat.com>
18072         PR c/81117
18073         * tree-diagnostic.c (default_tree_printer): Handle %G.
18074         * gimple-pretty-print.h (percent_G_format): Declare new function.
18075         * gimple-pretty-print.c (percent_G_format): Define.
18076         * tree-pretty-print.c (percent_K_format): Add argument.
18078 2017-08-14  Martin Sebor  <msebor@redhat.com>
18080         PR translation/79998
18081         * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call):
18082         Remove a stray space.
18084 2017-08-14  Uros Bizjak  <ubizjak@gmail.com>
18086         PR target/46091
18087         * config/i386/i386.md (*anddi_1_btr): New insn_and_split pattern.
18088         (*iordi_1_bts): Ditto.
18089         (*xordi_1_btc): Ditto.
18091 2017-08-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18093         PR target/79845
18094         * config/rs6000/linux64.h (INVALID_64BIT): Use quoted strings.
18095         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
18096         Likewise.
18097         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Use
18098         quoted strings, and make more translator-friendly.
18099         (darwin_rs6000_override_options): Likewise.
18100         (rs6000_option_override_internal): Likewise.
18101         (rs6000_return_in_memory): Fix overlong line.
18102         (init_cmulative_args): Use quoted strings, and make more
18103         translator-friendly.
18104         (rs6000_pass_by_reference): Fix overlong line.
18105         (def_builtin): Use quoted strings.
18106         (altivec_expand_predicate_builtin): Use quoted strings, and make
18107         more translator-friendly.
18108         (htm_expand_builtin): Use quoted strings.
18109         (cpu_expand_builtin): Use quoted strings, and make more
18110         translator-friendly.
18111         (altivec_expand_builtin): Likewise.
18112         (paired_expand_predicate_builtin): Likewise.
18113         (rs6000_invalid_builtin): Likewise.
18114         (builtin_function_type): Use quoted strings.
18115         (rs6000_expand_split_stack_prologue): Use quoted strings, and make
18116         more translator-friendly.
18117         (rs6000_trampoline_init): Likewise.
18118         (rs6000_handle_altivec_attribute): Likewise.
18119         (rs6000_inner_target_options): Use quoted strings.
18120         (rs6000_disable_incompatible_switches): Likewise.
18121         * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Use quoted
18122         strings, and make more translator-friendly.
18123         (SUBSUBTARGET_OVERRIDE_OPTIONS): Use quoted strings.
18125 2017-08-14  Bin Cheng  <bin.cheng@arm.com>
18127         PR tree-optimization/81799
18128         * tree-loop-distribution.c (version_loop_by_alias_check): Force
18129         cond_expr to simple gimple operand.
18131 2017-08-14  Wilco Dijkstra  <wdijkstr@arm.com>
18133         PR middle-end/46932
18134         * doc/sourcebuild.texi (autoincdec): Add autoincdec description.
18136 2017-08-14  Georg-Johann Lay  <avr@gjlay.de>
18138         PR target/81754
18139         PR target/81268
18140         * config/avr/avr.opt (mgas-isr-prologues): New Var avr_gasisr_prologues.
18141         * config/avr/avr.md (gasisr, *gasisr): Use it instead of
18142         TARGET_GASISR_PROLOGUES.
18143         * config/avr/avr.c (avr_option_override): Same.
18144         (avr_pass_pre_proep::execute): Same.
18146 2017-08-13  H.J. Lu  <hongjiu.lu@intel.com>
18148         PR target/81820
18149         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Replace
18150         frame pointer with stack pointer - UNITS_PER_WORD in debug insns.
18152 2017-08-13  Uros Bizjak  <ubizjak@gmail.com>
18154         * config/i386/i386.md (*load_tp_<mode>): Redefine as
18155         define_insn_and_split.  Split to a memory load from 0 in
18156         DEFAULT_TLS_SEG_REG address space.  Merge with *load_tp_x32
18157         using PTR mode iterator.
18158         (*load_tp_x32_zext"): Redefine as define_insn_and_split.
18159         Split to a memory load from 0 in DEFAULT_TLS_SEG_REG address space.
18160         (*add_tp_<mode>): Redefine as define_insn_and_split.
18161         Split to an add with a memory load from 0 in DEFAULT_TLS_SEG_REG
18162         address space.  Merge with *add_tp_x32 using PTR mode iterator.
18163         (*add_tp_x32_zext"): Redefine as define_insn_and_split.
18164         Split to an add with a  memory load from 0 in
18165         DEFAULT_TLS_SEG_REG address space.
18167 2017-08-12  Andrew Pinski  <apinski@cavium.com>
18169         * config/aarch64/aarch64-option-extensions.def (rdma):
18170         Fix feature string to what Linux prints out in /proc/cpuinfo.
18172 2017-08-12  Pierre-Marie de Rodat  <derodat@adacore.com>
18174         PR ada/79542
18175         * dwarf2out.c (modified_type_die): For C typedef types that have
18176         an ultimate origin, process the ultimate origin instead of the
18177         input type.
18178         (gen_typedef_die): Assert that input DECLs have no ultimate
18179         origin.
18180         (gen_type_die_with_usage): For typedef variants that have an
18181         ultimate origin, just call gen_decl_die on the original DECL.
18182         (process_scope_var): Avoid creating DIEs for local typedefs and
18183         concrete static variables.
18185 2017-08-12  Alan Modra  <amodra@gmail.com>
18187         PR target/81170
18188         PR target/81295
18189         * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
18190         match gnu-user.h startfile.
18191         (ENDFILE_LINUX_SPEC): Similarly.
18193 2017-08-11  Thomas Schwinge  <thomas@codesourcery.com>
18195         PR lto/81430
18196         * config/nvptx/nvptx.c (nvptx_override_options_after_change):
18197         Remove function.
18198         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Remove definition.
18200 2017-08-11  Tamar Christina  <tamar.christina@arm.com>
18201         * config/aarch64/aarch64.md (mov<mode>): Change.
18202         (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
18203         aarch64_reg_or_fp_float into aarch64_reg_or_fp_zero.
18204         * config/aarch64/predicates.md (aarch64_reg_or_fp_float): Removed.
18206 2017-08-11  Eric Botcazou  <ebotcazou@adacore.com>
18208         * tree-sra.c (build_access_from_expr_1): Use more precise diagnostics
18209         for storage order barriers.
18211 2017-08-11  Martin Liska  <mliska@suse.cz>
18213         PR tree-opt/79987
18214         * tree-chkp.c (chkp_get_bounds_for_decl_addr): Do not instrument
18215         variables of void type.
18217 2017-08-11  Martin Liska  <mliska@suse.cz>
18219         * asan.c (asan_protect_global): Replace ASM_OUTPUT_DEF with
18220         TARGET_SUPPORTS_ALIASES.
18221         * cgraph.c (cgraph_node::create_same_body_alias): Likewise.
18222         * ipa-visibility.c (can_replace_by_local_alias): Likewise.
18223         (optimize_weakref): Likewise.
18224         * symtab.c (symtab_node::noninterposable_alias): Likewise.
18225         * varpool.c (varpool_node::create_extra_name_alias): Likewise.
18226         * defaults.h: Introduce TARGET_SUPPORTS_ALIASES.
18228 2017-08-11  Martin Liska  <mliska@suse.cz>
18230         PR ipa/81213
18231         * config/i386/i386.c (make_resolver_func): Do complete
18232         refactoring of the function.
18234 2017-08-10  Uros Bizjak  <ubizjak@gmail.com>
18236         PR target/81708
18237         * config/i386/i386.opt (mstack-protector-guard-symbol=): New option
18238         * config/i386/i386.c (ix86_stack_protect_guard): Use
18239         ix86_stack_protect_guard_symbol_str to generate varible declaration.
18240         * doc/invoke.texi (x86 Options): Document
18241         -mstack-protector-guard-symbol= option.
18243 2017-08-10  Uros Bizjak  <ubizjak@gmail.com>
18245         * config/i386/i386-protos.h (ix86_split_stack_guard): New prototype.
18246         * config/i386/i386.c (ix86_split_stack_guard): New function.
18247         (ix86_xpand_split_stack_prologue): Call ix86_split_stack_guard.
18248         (ix86_legitimate_address_p) <case UNSPEC_STACK_CHECK>: Remove.
18249         (i386_asm_output_addr_const_extra) <case UNSPEC_STACK_CHECK>: Ditto.
18250         (optput_pic_addr_const): Remove UNSPEC_STACK_CHECK handling.
18251         * config/i386/i386.md (unspec): Remove UNSPEC_STACK_CHECK.
18252         (split_stack_space_check): Call ix86_split_stack_guard.
18254 2017-08-10  Martin Sebor  <msebor@redhat.com>
18256         * print-tree.c (print_node): Print location using the established
18257         format %s:%i%i.
18258         Replace spaces with colons.
18259         (debug_raw, debug): Ditto.
18261 2017-08-10  Martin Sebor  <msebor@redhat.com>
18263         PR c++/81586
18264         * pretty-print.c (pp_format): Correct the handling of %s precision.
18266 2017-08-10  H.J. Lu  <hongjiu.lu@intel.com>
18268         PR target/81736
18269         * config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
18270         to ...
18271         (ix86_finalize_stack_frame_flags): This.  Also clear
18272         frame_pointer_needed if -fno-omit-frame-pointer is used without
18273         stack access.
18274         (ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
18275         with ix86_finalize_stack_frame_flags.
18276         (ix86_expand_epilogue): Likewise.
18277         (ix86_expand_split_stack_prologue): Likewise.
18278         * doc/invoke.texi: Add a note for -fno-omit-frame-pointer.
18280 2017-08-10  Martin Liska  <mliska@suse.cz>
18282         PR c++/81355
18283         * c-attribs.c (handle_target_attribute):
18284         Report warning for an empty string argument of target attribute.
18286 2017-08-09  Jakub Jelinek  <jakub@redhat.com>
18288         PR c/81687
18289         * omp-low.c (omp_copy_decl): Don't remap FORCED_LABEL or DECL_NONLOCAL
18290         LABEL_DECLs.
18291         * tree-cfg.c (move_stmt_op): Don't adjust DECL_CONTEXT of FORCED_LABEL
18292         or DECL_NONLOCAL labels.
18293         (move_stmt_r) <case GIMPLE_LABEL>: Adjust DECL_CONTEXT of FORCED_LABEL
18294         or DECL_NONLOCAL labels here.
18296 2017-08-09  Will Schmidt  <will_schmidt@vnet.ibm.com>
18298         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add blurb
18299         to indicate when early gimple folding has been disabled.
18300         (rs6000_gimple_fold_builtin): Add debug content.
18301         (rs6000_invalid_builtin): Fix whitespace.
18302         (rs6000_expand_builtin): Fix whitespace.
18303         * config/rs6000/rs6000.opt: Add option for -mfold-gimple.
18305 2017-08-09  Segher Boessenkool  <segher@kernel.crashing.org>
18307         PR target/80938
18308         * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't use
18309         SAVE_MULTIPLE if not all the registers that saves, should be saved.
18311 2017-08-09  Jim Wilson  <jim.wilson@linaro.org>
18313         * config/aarch64/aarch64-cores.def (falkor): Use falkor pipeline.
18314         (qdf24xx): Likewise.
18315         * config/aarch64/aarch64.md: Include falkor.md.
18316         * config/aarch64/falkor.md: New.
18318 2017-08-09  Marek Polacek  <polacek@redhat.com>
18320         PR c/81233
18321         * diagnostic-core.h (emit_diagnostic_valist): Add declaration.
18322         * diagnostic.c (emit_diagnostic): Add a comment.
18323         (emit_diagnostic_valist): New function.
18325 2017-08-09  Marek Polacek  <polacek@redhat.com>
18327         PR c/81417
18328         * input.c (make_location): New overload.
18329         * input.h (make_location): Declare.
18331 2017-08-08  Alan Modra  <amodra@gmail.com>
18332             H.J. Lu  <hongjiu.lu@intel.com>
18334         PR driver/81523
18335         * gcc.c (NO_PIE_SPEC): Delete.
18336         (PIE_SPEC): Define as !no-pie/pie.  Move static|shared|r
18337         exclusion..
18338         (LINK_PIE_SPEC): ..to here.
18339         (LINK_COMMAND_SPEC): Support -no-pie.
18340         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct
18341         chain of crtbegin*.o selection, update for PIE_SPEC changes and
18342         format.
18343         (GNU_USER_TARGET_ENDFILE_SPEC): Similarly.
18344         * config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly.
18345         (ENDFILE_CRTEND_SPEC): Similarly.
18347 2017-08-08  Uros Bizjak  <ubizjak@gmail.com>
18349         PR target/81708
18350         * config/i386/i386.opt (mstack-protector-guard-reg=): New option
18351         (mstack-protector-guard-offset=): Ditto.
18352         * config/i386/i386.c (ix86_option_override): Handle
18353         -mstack-protector-guard-reg= and -mstack-protector-guard-offset=
18354         options.
18355         (ix86_stack_protect_guard): Use ix86_stack_protect_guard_reg and
18356         ix86_stack_protect_guard_offset variables.
18357         (TARGET_STACK_PROTECT_GUARD): Always define.
18358         * doc/invoke.texi (x86 Options): Document -mstack-protector-guard-reg=
18359         and -mstack-protector-guard-offset= options.
18361 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
18363         * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): Handle
18364         boundary case for the last candidate.
18366 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
18368         * doc/invoke.texi: Document -ftree-loop-distribution for O3.
18369         * opts.c (default_options_table): Add OPT_ftree_loop_distribution.
18371 2017-08-08  Tamar Christina  <tamar.christina@arm.com>
18373         PR middle-end/19706
18374         * config/aarch64/aarch64.md (xorsign<mode>3): New optabs.
18375         * config/aarch64/aarch64-builtins.c
18376         (aarch64_builtin_vectorized_function): Added CASE_CFN_XORSIGN.
18377         * config/aarch64/aarch64-simd-builtins.def: Added xorsign BINOP.
18378         * config/aarch64/aarch64-simd.md: Added xorsign<mode>3
18380 2017-08-08  Tamar Christina  <tamar.christina@arm.com>
18381             Andrew Pinski <pinskia@gmail.com>
18383         PR middle-end/19706
18384         * internal-fn.def (XORSIGN): New.
18385         * optabs.def (xorsign_optab): New.
18386         * tree-ssa-math-opts.c (is_copysign_call_with_1): New.
18387         (convert_expand_mult_copysign): New.
18388         (pass_optimize_widening_mul::execute): Call
18389         convert_expand_mult_copysign.
18391 2017-08-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18393         PR tree-optimization/81354
18394         * gimple-ssa-strength-reduction.c (create_add_on_incoming_edge):
18395         Insert on edges rather than explicitly creating landing pads.
18396         (analyze_candidates_and_replace): Commit edge inserts.
18398 2017-08-08  Richard Biener  <rguenther@suse.de>
18400         PR middle-end/81719
18401         * tree-ssa-loop-niter.c: Include tree-dfa.h.
18402         (expand_simple_operations): Also look through ADDR_EXPRs with
18403         MEM_REF bases treating them as POINTER_PLUS_EXPR.
18405 2017-08-08  Richard Biener  <rguenther@suse.de>
18407         PR tree-optimization/81723
18408         * tree-vect-slp.c (struct bst_traits): New hash traits.
18409         (bst_fail): New global.
18410         (vect_build_slp_tree_2): New worker, split out from ...
18411         (vect_build_slp_tree): ... this now wrapping it with using
18412         bst_fail set to cache SLP tree build fails.  Properly handle
18413         max_tree_size.
18414         (vect_analyze_slp_instance): Allocate and free bst_fail.
18416 2017-08-08  Martin Liska  <mliska@suse.cz>
18418         PR tree-opt/81696
18419         * ipa-icf-gimple.c (func_checker::compare_cst_or_decl): Consider
18420         LABEL_DECLs that can be from a different function.
18422 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
18424         PR tree-optimization/81744
18425         * tree-predcom.c (prepare_finalizers_chain): Deep copy expr of
18426         loop's number of iterations.
18428 2017-08-08  Martin Liska  <mliska@suse.cz>
18430         * asan.c: Include header files.
18431         * attribs.c (build_decl_attribute_variant): New function moved
18432         from tree.[ch].
18433         (build_type_attribute_qual_variant): Likewise.
18434         (cmp_attrib_identifiers): Likewise.
18435         (simple_cst_list_equal): Likewise.
18436         (omp_declare_simd_clauses_equal): Likewise.
18437         (attribute_value_equal): Likewise.
18438         (comp_type_attributes): Likewise.
18439         (build_type_attribute_variant): Likewise.
18440         (lookup_ident_attribute): Likewise.
18441         (remove_attribute): Likewise.
18442         (merge_attributes): Likewise.
18443         (merge_type_attributes): Likewise.
18444         (merge_decl_attributes): Likewise.
18445         (merge_dllimport_decl_attributes): Likewise.
18446         (handle_dll_attribute): Likewise.
18447         (attribute_list_equal): Likewise.
18448         (attribute_list_contained): Likewise.
18449         * attribs.h (lookup_attribute): New function moved from tree.[ch].
18450         (lookup_attribute_by_prefix): Likewise.
18451         * bb-reorder.c: Include header files.
18452         * builtins.c: Likewise.
18453         * calls.c: Likewise.
18454         * cfgexpand.c: Likewise.
18455         * cgraph.c: Likewise.
18456         * cgraphunit.c: Likewise.
18457         * convert.c: Likewise.
18458         * dwarf2out.c: Likewise.
18459         * final.c: Likewise.
18460         * fold-const.c: Likewise.
18461         * function.c: Likewise.
18462         * gimple-expr.c: Likewise.
18463         * gimple-fold.c: Likewise.
18464         * gimple-pretty-print.c: Likewise.
18465         * gimple.c: Likewise.
18466         * gimplify.c: Likewise.
18467         * hsa-common.c: Likewise.
18468         * hsa-gen.c: Likewise.
18469         * internal-fn.c: Likewise.
18470         * ipa-chkp.c: Likewise.
18471         * ipa-cp.c: Likewise.
18472         * ipa-devirt.c: Likewise.
18473         * ipa-fnsummary.c: Likewise.
18474         * ipa-inline.c: Likewise.
18475         * ipa-visibility.c: Likewise.
18476         * ipa.c: Likewise.
18477         * lto-cgraph.c: Likewise.
18478         * omp-expand.c: Likewise.
18479         * omp-general.c: Likewise.
18480         * omp-low.c: Likewise.
18481         * omp-offload.c: Likewise.
18482         * omp-simd-clone.c: Likewise.
18483         * opts-global.c: Likewise.
18484         * passes.c: Likewise.
18485         * predict.c: Likewise.
18486         * sancov.c: Likewise.
18487         * sanopt.c: Likewise.
18488         * symtab.c: Likewise.
18489         * toplev.c: Likewise.
18490         * trans-mem.c: Likewise.
18491         * tree-chkp.c: Likewise.
18492         * tree-eh.c: Likewise.
18493         * tree-into-ssa.c: Likewise.
18494         * tree-object-size.c: Likewise.
18495         * tree-parloops.c: Likewise.
18496         * tree-profile.c: Likewise.
18497         * tree-ssa-ccp.c: Likewise.
18498         * tree-ssa-live.c: Likewise.
18499         * tree-ssa-loop.c: Likewise.
18500         * tree-ssa-sccvn.c: Likewise.
18501         * tree-ssa-structalias.c: Likewise.
18502         * tree-ssa.c: Likewise.
18503         * tree-streamer-in.c: Likewise.
18504         * tree-vectorizer.c: Likewise.
18505         * tree-vrp.c: Likewise.
18506         * tsan.c: Likewise.
18507         * ubsan.c: Likewise.
18508         * varasm.c: Likewise.
18509         * varpool.c: Likewise.
18510         * tree.c: Remove functions moved to attribs.[ch].
18511         * tree.h: Likewise.
18512         * config/aarch64/aarch64.c: Add attrs.h header file.
18513         * config/alpha/alpha.c: Likewise.
18514         * config/arc/arc.c: Likewise.
18515         * config/arm/arm.c: Likewise.
18516         * config/avr/avr.c: Likewise.
18517         * config/bfin/bfin.c: Likewise.
18518         * config/c6x/c6x.c: Likewise.
18519         * config/cr16/cr16.c: Likewise.
18520         * config/cris/cris.c: Likewise.
18521         * config/darwin.c: Likewise.
18522         * config/epiphany/epiphany.c: Likewise.
18523         * config/fr30/fr30.c: Likewise.
18524         * config/frv/frv.c: Likewise.
18525         * config/ft32/ft32.c: Likewise.
18526         * config/h8300/h8300.c: Likewise.
18527         * config/i386/winnt.c: Likewise.
18528         * config/ia64/ia64.c: Likewise.
18529         * config/iq2000/iq2000.c: Likewise.
18530         * config/lm32/lm32.c: Likewise.
18531         * config/m32c/m32c.c: Likewise.
18532         * config/m32r/m32r.c: Likewise.
18533         * config/m68k/m68k.c: Likewise.
18534         * config/mcore/mcore.c: Likewise.
18535         * config/microblaze/microblaze.c: Likewise.
18536         * config/mips/mips.c: Likewise.
18537         * config/mmix/mmix.c: Likewise.
18538         * config/mn10300/mn10300.c: Likewise.
18539         * config/moxie/moxie.c: Likewise.
18540         * config/msp430/msp430.c: Likewise.
18541         * config/nds32/nds32-isr.c: Likewise.
18542         * config/nds32/nds32.c: Likewise.
18543         * config/nios2/nios2.c: Likewise.
18544         * config/nvptx/nvptx.c: Likewise.
18545         * config/pa/pa.c: Likewise.
18546         * config/pdp11/pdp11.c: Likewise.
18547         * config/powerpcspe/powerpcspe.c: Likewise.
18548         * config/riscv/riscv.c: Likewise.
18549         * config/rl78/rl78.c: Likewise.
18550         * config/rx/rx.c: Likewise.
18551         * config/s390/s390.c: Likewise.
18552         * config/sh/sh.c: Likewise.
18553         * config/sol2.c: Likewise.
18554         * config/sparc/sparc.c: Likewise.
18555         * config/spu/spu.c: Likewise.
18556         * config/stormy16/stormy16.c: Likewise.
18557         * config/tilegx/tilegx.c: Likewise.
18558         * config/tilepro/tilepro.c: Likewise.
18559         * config/v850/v850.c: Likewise.
18560         * config/vax/vax.c: Likewise.
18561         * config/visium/visium.c: Likewise.
18562         * config/xtensa/xtensa.c: Likewise.
18564 2017-08-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
18566         PR target/81593
18567         * config/rs6000/vsx.md (vsx_concat_<mode>, VSX_D): Cleanup
18568         constraints since the -mupper-regs-* switches have been
18569         eliminated.
18570         (vsx_concat_<mode>_1): New combiner insns to recognize inserting
18571         into a vector from a double word element that was extracted from
18572         another vector, and eliminate extra XXPERMDI instructions.
18573         (vsx_concat_<mode>_2): Likewise.
18574         (vsx_concat_<mode>_3): Likewise.
18575         (vsx_set_<mode>, VSX_D): Rewrite vector set in terms of vector
18576         concat to allow optimizing inserts from previous extracts.
18578 2017-08-07  Uros Bizjak  <ubizjak@gmail.com>
18580         * config/i386/i386.c (ix86_stack_protect_guard): Generate
18581         memory reference to a SSP offset in TLS address space.
18582         (ix86_print_operand) <case '@'>: Remove.
18583         (ix86_print_operand_punct_valid_p): Remove '@' code.
18584         * config/i386/i386.md (unspec): Remove UNSPEC_SP_TLS_SET and
18585         UNSPEC_SP_TLS_TEST.
18586         (stack_tls_protect_set_<mode>): Remove.
18587         (stack_protect_set): Do not call gen_stack_tls_protect_set_<mode>.
18588         (stack_tls_protect_test_<mode>): Remove.
18589         (stack_protect_test): Do not call gen_stack_tls_protect_test_<mode>.
18591 2017-08-07  Olivier Hainque  <hainque@adacore.com>
18593         PR target/81755
18594         * config/vxworksae.h (VXWORKS_HAVE_TLS): Define.
18596 2017-08-07  Douglas Rupp  <rupp@adacore.com>
18598         * Makefile.in (install-mkheaders): Fix typo, where the multi_dir
18599         variable was referenced as multidir in command.
18601 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
18603         PR c/69389
18604         * gimplify.c (goa_stabilize_expr): Handle BIT_INSERT_EXPR and
18605         BIT_FIELD_REF.
18607 2017-08-07  Martin Liska  <mliska@suse.cz>
18609         * config/m32c/m32c.c: Add include of stringpool.h and attribs.h.
18610         * config/rl78/rl78.c: Add include of attribs.h.
18611         * config/sh/sh.c: Likewise.
18612         * config/v850/v850.c: Likewise.
18614 2017-08-07  Tom de Vries  <tom@codesourcery.com>
18616         PR middle-end/78266
18617         * omp-expand.c (expand_oacc_for): Ensure diff_type is large enough.
18619 2017-08-07  Martin Liska  <mliska@suse.cz>
18621         * config/mips/mips.c: Include attribs.h.
18623 2017-08-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
18625         PR fortran/68829
18626         * doc/invoke.texi: Document change in behvaior for -Ofast for
18627         Fortran.
18629 2017-08-07  Wilco Dijkstra  <wdijkstr@arm.com>
18631         * config/aarch64/aarch64.c (aarch64_pushwb_single_reg):
18632         Use gen_frame_mem.
18633         (aarch64_pop_regs): Likewise.
18634         (aarch64_gen_load_pair): Likewise.
18635         (aarch64_save_callee_saves): Likewise.
18636         (aarch64_restore_callee_saves): Likewise.
18638 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
18640         * config/i386/i386.c: Revert the last change.
18642 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
18644         PR target/81736
18645         * config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
18646         to ...
18647         (ix86_finalize_stack_frame_flags): This.  Also clear
18648         frame_pointer_needed if -fno-omit-frame-pointer is used without
18649         stack access.
18650         (ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
18651         with ix86_finalize_stack_frame_flags.
18652         (ix86_expand_epilogue): Likewise.
18653         (ix86_expand_split_stack_prologue): Likewise.
18655 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
18657         PR target/81743
18658         * config/i386/i386.c (get_builtin_code_for_version): Set priority
18659         to P_AES for Westmere.
18661 2017-08-07  Jonathan Yong  <10walls@gmail.com>
18663         * config/i386/mingw.opt (fset-stack-executable): Removed.
18664         * config/i386/cygming.opt (fset-stack-executable): Moved
18665         from mingw.opt.
18666         * config/i386/cygwin.h: Define CHECK_EXECUTE_STACK_ENABLED.
18668 2017-08-07  Segher Boessenkool  <segher@kernel.crashing.org>
18670         * print-rtl.c (print_exp): Print NOT as "~" instead of as "!".
18672 2017-08-07  Marek Polacek  <polacek@redhat.com>
18674         PR middle-end/81737
18675         * fold-const.c (fold_indirect_ref_1): Check type_domain.
18677 2017-08-07  Martin Liska  <mliska@suse.cz>
18679         * attribs.h (canonicalize_attr_name): New function.
18680         (cmp_attribs): Move from c-format.c and adjusted.
18681         (is_attribute_p): Moved from tree.h.
18682         * tree-inline.c: Add new includes.
18683         * tree.c (cmp_attrib_identifiers): Use cmp_attribs.
18684         (private_is_attribute_p): Remove.
18685         (private_lookup_attribute): Likewise.
18686         (private_lookup_attribute_by_prefix): Simplify.
18687         (remove_attribute): Use is_attribute_p.
18688         * tree.h: Remove removed declarations.
18690 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
18692         PR middle-end/81698
18693         * stmt.c (emit_case_dispatch_table): Add DEFAULT_EDGE argument,
18694         instead of computing it in the function.  Formatting fix.
18695         (expand_case): Don't rely on default_edge being the first edge,
18696         clear it if removing it, pass default_edge to
18697         emit_case_dispatch_table.
18698         (expand_sjlj_dispatch_table): Pass NULL as DEFAULT_EDGE, formatting
18699         fix.
18701 2017-08-06  Uros Bizjak  <ubizjak@gmail.com>
18703         * config/alpha/alpha.c (alpha_reorg): If trap is the last active
18704         insn in the function, emit NOP after the insn.
18706 2017-08-06  Tom de Vries  <tom@codesourcery.com>
18708         * omp-expand.c (expand_oacc_for): Add missing edge probability for tile
18709         and element loops.
18711 2017-08-06  Tom de Vries  <tom@codesourcery.com>
18713         * omp-expand.c (expand_oacc_for): Add missing edge probability for chunk
18714         loop.
18716 2017-08-04  Yury Gribov  <tetra2005@gmail.com>
18718         PR tree-optimization/57371
18719         * match.pd: New pattern.
18721 2017-08-04  Marek Polacek  <polacek@redhat.com>
18723         PR middle-end/81695
18724         * fold-const.c (fold_indirect_ref_1): For ((int *)&a + 4 -> a[1],
18725         perform the computation in offset_int.
18727 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
18729         PR tree-optimization/81136
18730         * tree-vectorizer.h: Include tree-hash-traits.h.
18731         (vec_base_alignments): New typedef.
18732         (vec_info): Add a base_alignments field.
18733         (vect_record_base_alignments): Declare.
18734         * tree-data-ref.h (data_reference): Add an is_conditional_in_stmt
18735         field.
18736         (DR_IS_CONDITIONAL_IN_STMT): New macro.
18737         (create_data_ref): Add an is_conditional_in_stmt argument.
18738         * tree-data-ref.c (create_data_ref): Likewise.  Use it to initialize
18739         the is_conditional_in_stmt field.
18740         (data_ref_loc): Add an is_conditional_in_stmt field.
18741         (get_references_in_stmt): Set the is_conditional_in_stmt field.
18742         (find_data_references_in_stmt): Update call to create_data_ref.
18743         (graphite_find_data_references_in_stmt): Likewise.
18744         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Likewise.
18745         * tree-vect-data-refs.c (vect_analyze_data_refs): Likewise.
18746         (vect_record_base_alignment): New function.
18747         (vect_record_base_alignments): Likewise.
18748         (vect_compute_data_ref_alignment): Adjust base_addr and aligned_to
18749         for nested statements even if we fail to compute a misalignment.
18750         Use pooled base alignments for unconditional references.
18751         (vect_find_same_alignment_drs): Compare base addresses instead
18752         of base objects.
18753         (vect_analyze_data_refs_alignment): Call vect_record_base_alignments.
18754         * tree-vect-slp.c (vect_slp_analyze_bb_1): Likewise.
18756 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
18758         * tree-vectorizer.h (vec_info): Add a constructor and destructor.
18759         Add an explicit name for the enum.  Use auto_vec for slp_instances
18760         and grouped_stores.
18761         (_loop_vec_info): Add a constructor and destructor.  Use auto_vec
18762         for all vectors.
18763         (_bb_vec_info): Add a constructor and destructor.
18764         (vinfo_for_stmt): Return NULL for uids of -1 as well.
18765         (destroy_loop_vec_info): Delete.
18766         (vect_destroy_datarefs): Likewise.
18767         * tree-vectorizer.c (vect_destroy_datarefs): Delete.
18768         (vec_info::vec_info): New function.
18769         (vec_info::~vec_info): Likewise.
18770         (vectorize_loops): Use delete instead of destroy_loop_vec_info.
18771         * tree-parloops.c (gather_scalar_reductions): Use delete instead of
18772         destroy_loop_vec_info.
18773         * tree-vect-loop.c (new_loop_vec_info): Replace with...
18774         (_loop_vec_info::_loop_vec_info): ...this.
18775         (destroy_loop_vec_info): Replace with...
18776         (_loop_vec_info::~_loop_vec_info): ...this.  Unconditionally delete
18777         the stmt_vec_infos.  Leave handling of vec_info information to its
18778         destructor.  Remove explicit vector releases.
18779         (vect_analyze_loop_form): Use new instead of new_loop_vec_info.
18780         (vect_analyze_loop): Use delete instead of destroy_loop_vec_info.
18781         * tree-vect-slp.c (new_bb_vec_info): Replace with...
18782         (_bb_vec_info::_bb_vec_info): ...this.  Don't reserve space in
18783         BB_VINFO_GROUPED_STORES or BB_VINFO_SLP_INSTANCES.
18784         (destroy_bb_vec_info): Replace with...
18785         (_bb_vec_info::~_bb_vec_info): ...this.  Leave handling of vec_info
18786         information to its destructor.
18787         (vect_slp_analyze_bb_1): Use new and delete instead of
18788         new_bb_vec_info and destroy_bb_vec_info.
18789         (vect_slp_bb): Replace 2 calls to destroy_bb_vec_info with a
18790         single delete.
18792 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
18794         * tree-data-ref.h (subscript): Add access_fn field.
18795         (data_dependence_relation): Add could_be_independent_p.
18796         (SUB_ACCESS_FN, DDR_COULD_BE_INDEPENDENT_P): New macros.
18797         (same_access_functions): Move to tree-data-ref.c.
18798         * tree-data-ref.c (ref_contains_union_access_p): New function.
18799         (access_fn_component_p): Likewise.
18800         (access_fn_components_comparable_p): Likewise.
18801         (dr_analyze_indices): Add a reference to access_fn_component_p.
18802         (dump_data_dependence_relation): Use SUB_ACCESS_FN instead of
18803         DR_ACCESS_FN.
18804         (constant_access_functions): Likewise.
18805         (add_other_self_distances): Likewise.
18806         (same_access_functions): Likewise.  (Moved from tree-data-ref.h.)
18807         (initialize_data_dependence_relation): Use XCNEW and remove
18808         explicit zeroing of DDR_REVERSED_P.  Look for a subsequence
18809         of access functions that have the same type.  Allow the
18810         subsequence to end with different bases in some circumstances.
18811         Record the chosen access functions in SUB_ACCESS_FN.
18812         (build_classic_dist_vector_1): Replace ddr_a and ddr_b with
18813         a_index and b_index.  Use SUB_ACCESS_FN instead of DR_ACCESS_FN.
18814         (subscript_dependence_tester_1): Likewise dra and drb.
18815         (build_classic_dist_vector): Update calls accordingly.
18816         (subscript_dependence_tester): Likewise.
18817         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Check
18818         DDR_COULD_BE_INDEPENDENT_P.
18819         * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Test
18820         comp_alias_ddrs instead of may_alias_ddrs.
18821         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
18822         New function.
18823         (vect_analyze_data_ref_dependence): Use it if
18824         DDR_COULD_BE_INDEPENDENT_P, but fall back to using the recorded
18825         distance vectors if that fails.
18826         (dependence_distance_ge_vf): New function.
18827         (vect_prune_runtime_alias_test_list): Use it.  Don't clear
18828         LOOP_VINFO_MAY_ALIAS_DDRS.
18830 2017-08-04  Richard Biener  <rguenther@suse.de>
18832         PR middle-end/81705
18833         * fold-const.c (fold_binary_loc): Properly restrict
18834         minus_var0 && minus_var1 case when associating undefined overflow
18835         entities.
18837 2017-08-04  Tom de Vries  <tom@codesourcery.com>
18839         * omp-simd-clone.c (simd_clone_adjust): Add missing edge probability.
18841 2017-08-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
18843         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
18844         Don't start diagnostic messages with a capital letter.
18845         * config/rs6000/rs6000.c (rs6000_option_override_internal):
18846         Likewise.
18847         (rs6000_invalid_builtin): Likewise.
18848         (rs6000_trampoline_init): Likewise.
18850 2017-08-03  Jakub Jelinek  <jakub@redhat.com>
18852         PR target/81621
18853         * bb-reorder.c (pass_partition_blocks::execute): Return TODO_df_finish
18854         after setting changeable df flags.
18856 2017-08-03  Richard Biener  <rguenther@suse.de>
18858         * tree-ssa-reassoc.c (should_break_up_subtract): Also break
18859         up if the use is in USE - X.
18861 2017-08-03  Alexander Monakov  <amonakov@ispras.ru>
18863         * toplev.c (dumpfile.h): New include.
18864         (internal_error_reentered): New static function.  Use it...
18865         (internal_error_function): ...here to handle reentered internal_error.
18867 2017-08-03  Richard Biener  <rguenther@suse.de>
18869         PR middle-end/81148
18870         * fold-const.c (split_tree): Add minus_var and minus_con
18871         arguments, remove unused loc arg.  Never generate NEGATE_EXPRs
18872         here but always use minus_*.
18873         (associate_trees): Assert we never associate with MINUS_EXPR
18874         and NULL first operand.  Do not recurse for PLUS_EXPR operands
18875         when associating as MINUS_EXPR either.
18876         (fold_binary_loc): Track minus_var and minus_con.
18878 2017-08-03  Tom de Vries  <tom@codesourcery.com>
18880         PR lto/81430
18881         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers): If
18882         ACCEL_COMPILER, apply finish_options on
18883         DECL_FUNCTION_SPECIFIC_OPTIMIZATION.
18885 2017-08-03  Tom de Vries  <tom@codesourcery.com>
18887         PR target/81662
18888         * config/nvptx/nvptx.c (nvptx_option_override): Emit sorry if
18889         function_entry_patch_area_size > 0.
18891 2017-08-03  Jakub Jelinek  <jakub@redhat.com>
18893         PR driver/81650
18894         * calls.c (alloc_max_size): Use HOST_WIDE_INT_UC (10??)
18895         instead of 10??LU, perform unit multiplication in wide_int,
18896         don't change alloc_object_size_limit if the limit is larger
18897         than SSIZE_MAX.
18899         PR tree-optimization/81655
18900         PR tree-optimization/81588
18901         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Handle also
18902         the case when ranges[i].low and high are 1 for unsigned type with
18903         precision 1.
18905         PR middle-end/81052
18906         * omp-low.c (diagnose_sb_0): Handle flag_openmp_simd like flag_openmp.
18907         (pass_diagnose_omp_blocks::gate): Enable also for flag_openmp_simd.
18909 2017-08-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18911         * tree-vrp.h: Add include guard.
18913 2017-08-02  Uros Bizjak  <ubizjak@gmail.com>
18915         PR target/81644
18916         * config/i386/i386.md (unspecv): Add UNSPECV_UD2.
18917         (ud2): New insn pattern.
18918         * config/i386/i386.c (ix86_expand_epilogue):
18919         For naked functions, generate ud2 instead of trap insn.
18921 2017-08-02  Marek Polacek  <polacek@redhat.com>
18923         PR other/81667
18924         * alloc-pool.h (base_pool_allocator): Initialize m_elt_size.
18926 2017-08-02  Tom de Vries  <tom@codesourcery.com>
18927             Cesar Philippidis  <cesar@codesourcery.com>
18929         * config/nvptx/nvptx.c (nvptx_lockless_update, nvptx_lockfull_update):
18930         Add missing edge probabilities.
18932 2017-08-02  Tamar Christina  <tamar.christina@arm.com>
18934         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
18935         Correct endianness.
18937 2017-08-02  Jakub Jelinek  <jakub@redhat.com>
18939         PR middle-end/79499
18940         * function.c (thread_prologue_and_epilogue_insns): Determine blocks
18941         for find_many_sub_basic_blocks bitmap by looking up BLOCK_FOR_INSN
18942         of first NONDEBUG_INSN_P in each of the split_prologue_seq and
18943         prologue_seq sequences - if any.
18945 2017-08-02  Richard Biener  <rguenther@suse.de>
18947         * tree-vect-stmts.c (vectorizable_store): Perform vector extracts
18948         via vectors if supported, integer extracts via punning if supported
18949         or otherwise vector extracts.
18951 2017-08-02  Richard Biener  <rguenther@suse.de>
18953         * tree-ssa-pre.c (bitmap_insert_into_set_1): Remove and inline
18954         into ...
18955         (bitmap_insert_into_set): ... this.
18957 2017-08-02  Richard Biener  <rguenther@suse.de>
18959         PR tree-optimization/81633
18960         Revert
18961         2015-08-17  Alan Hayward  <alan.hayward@arm.com>
18963         PR tree-optimization/71752
18964         * tree-vect-slp.c (vect_get_slp_defs): Handle null operands.
18966 2017-08-01  Daniel Santos  <daniel.santos@pobox.com>
18968         * config/i386/i386.h (ix86_frame::outlined_save_offset): Remove field.
18969         (machine_function::call_ms2sysv_pad_out): Remove field.
18970         * config/i386/i386.c (xlogue_layout::get_stack_space_used): Modify.
18971         (ix86_compute_frame_layout): Likewise.
18973 2017-08-01  H.J. Lu  <hongjiu.lu@intel.com>
18975         PR target/81654
18976         * config/i386/i386.c (ix86_set_func_type): Disallow naked
18977         attribute with interrupt attribute.
18979 2017-08-01  Andrew Pinski  <apinski@cavium.com>
18981         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Check
18982         BIT_INSERT_EXPR's operand 1
18983         to see if the types precision matches.
18985 2017-08-01  Martin Liska  <mliska@suse.cz>
18987         PR middle-end/70140
18988         * builtins.c (expand_builtin_memcpy_args): Remove.
18989         (expand_builtin_memcpy): Call newly added function
18990         expand_builtin_memory_copy_args.
18991         (expand_builtin_memcpy_with_bounds): Likewise.
18992         (expand_builtin_mempcpy): Remove last argument.
18993         (expand_builtin_mempcpy_with_bounds): Likewise.
18994         (expand_builtin_memory_copy_args): New function created from
18995         expand_builtin_mempcpy_args with small modifications.
18996         (expand_builtin_mempcpy_args): Remove.
18997         (expand_builtin_stpcpy): Remove unused argument.
18998         (expand_builtin): Likewise.
18999         (expand_builtin_with_bounds): Likewise.
19001 2017-08-01  Martin Liska  <mliska@suse.cz>
19003         Revert r250771
19004         Make mempcpy more optimal (PR middle-end/70140).
19006 2017-08-01  Jakub Jelinek  <jakub@redhat.com>
19008         PR target/81622
19009         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
19010         __builtin_vec_cmpne verify both arguments are compatible vectors
19011         before looking at TYPE_MODE on the element type.  For __builtin_vec_ld
19012         verify arg1_type is a pointer or array type.  For __builtin_vec_st,
19013         move computation of aligned to after checking the argument types.
19014         Formatting fixes.
19016         PR target/80846
19017         * config/rs6000/vsx.md (vextract_fp_from_shorth,
19018         vextract_fp_from_shortl): Add element mode after mode in gen_vec_init*
19019         calls.
19021 2017-08-01  Jerome Lambourg  <lambourg@adacore.com>
19022             Doug Rupp  <rupp@adacore.com>
19023             Olivier Hainque  <hainque@adacore.com>
19025         * config.gcc (arm-wrs-vxworks*): Rework to handle arm-wrs-vxworks7 as
19026         well as arm-wrs-vxworks. Update target_cpu_name from arm6 (arch v3) to
19027         arm8 (arch v4).
19028         * config/arm/vxworks.h (MAYBE_TARGET_BPABI_CPP_BUILTINS): New, helper
19029         for TARGET_OS_CPP_BUILTIN.
19030         (TARGET_OS_CPP_BUILTIN): Invoke MAYBE_TARGET_BPABI_CPP_BUILTINS(),
19031         refine CPU definitions for arm_arch5 and add those for arm_arch6 and
19032         arm_arch7.
19033         (MAYBE_ASM_ABI_SPEC): New, helper for SUBTARGET_EXTRA_ASM_SPEC,
19034         passing required abi options to the assembler for EABI configurations.
19035         (EXTRA_CC1_SPEC): New macro, to help prevent the implicit production
19036         of .text.hot and .text.unlikely sections for kernel modules when
19037         using ARM style exceptions.
19038         (CC1_SPEC): Remove obsolete attempt at mimicking Diab toolchain
19039         options. Add EXTRA_CC1_SPEC.
19040         (VXWORKS_ENDIAN_SPEC): Adjust comment and remove handling of Diab
19041         toolchain options.
19042         (DWARF2_UNWIND_INFO): Redefine to handle the pre/post VxWorks 7
19043         transition.
19044         (ARM_TARGET2_DWARF_FORMAT): Define.
19045         * config/arm/t-vxworks: Adjust multilib control to removal of the
19046         Diab command line options.
19048 2017-08-01  Martin Liska  <mliska@suse.cz>
19050         PR gcov-profile/81561
19051         * gcov.c (unblock): Make unblocking safe as we need to preserve
19052         index correspondence of blocks and block_lists.
19054 2017-08-01  Richard Biener  <rguenther@suse.de>
19056         PR tree-optimization/81181
19057         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
19058         (compute_antic): ... end of iteration here.
19060 2017-08-01  James Greenhalgh  <james.greenhalgh@arm.com>
19062         * common.opt (ftree-vectorize): No longer set flag_tree_vectorize.
19063         (ftree-loop-vectorize): Set as EnabledBy ftree-vectorize.
19064         (ftree-slp-vectorize): Likewise.
19065         * omp-expand (expand_omp_simd): Remove flag_tree_vectorize, as it
19066         can no longer be set independent of flag_tree_loop_vectorize.
19067         * omp-general.c (emp_max_vf): Likewise.
19068         * opts.c (enable_fdo_optimizations): Remove references to
19069         flag_tree_vectorize, these are now implicit.
19070         (common_handle_option): Remove handling for OPT_ftree_vectorize,
19071         and leave it for the options machinery.
19073 2017-08-01  Martin Liska  <mliska@suse.cz>
19075         PR middle-end/70140
19076         * builtins.c (expand_builtin_memcpy_args): Remove.
19077         (expand_builtin_memcpy): Call newly added function
19078         expand_builtin_memory_copy_args.
19079         (expand_builtin_memcpy_with_bounds): Likewise.
19080         (expand_builtin_mempcpy): Remove last argument.
19081         (expand_builtin_mempcpy_with_bounds): Likewise.
19082         (expand_builtin_memory_copy_args): New function created from
19083         expand_builtin_mempcpy_args with small modifications.
19084         (expand_builtin_mempcpy_args): Remove.
19085         (expand_builtin_stpcpy): Remove unused argument.
19086         (expand_builtin): Likewise.
19087         (expand_builtin_with_bounds): Likewise.
19089 2017-08-01  Uros Bizjak  <ubizjak@gmail.com>
19091         PR target/81641
19092         * config/i386/i386.c (ix86_print_operand_address_as): For -masm=intel
19093         print "ds:" only for immediates in generic address space.
19095 2017-08-01  Uros Bizjak  <ubizjak@gmail.com>
19097         PR target/81639
19098         * config/i386/i386.c (ix86_funciton_naked): New prototype.
19099         (ix86_function_ok_for_sibcall): Return false for naked functions.
19101 2017-08-01  Richard Biener  <rguenther@suse.de>
19103         * tree-ssa-pre.c (print_pre_expr): Handle NULL expr.
19104         (compute_antic): Seed worklist with exit block predecessors.
19105         * cfganal.c (dfs_find_deadend): For a cycle return the source
19106         of the edge closing it.
19108 2017-08-01  Tamar Christina  <tamar.christina@arm.com>
19110         * config/aarch64/aarch64.c
19111         (aarch64_can_const_movi_rtx_p): Move 0 check.
19113 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
19115         * tree.h (POINTER_TYPE_OVERFLOW_UNDEFINED): Delete.
19116         * fold-const.c (fold_comparison, fold_binary_loc): Delete use of
19117         above macro.
19118         * match.pd: Ditto in address comparison pattern.
19120 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
19122         PR tree-optimization/81627
19123         * tree-predcom.c (prepare_finalizers): Always rewrite into loop
19124         closed ssa form for store-store chain.
19126 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
19128         PR tree-optimization/81620
19129         * tree-predcom.c (add_ref_to_chain): Don't set has_max_use_after
19130         for store-store chain.
19132 2017-08-01  Jakub Jelinek  <jakub@redhat.com>
19134         PR tree-optimization/81588
19135         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If
19136         ranges[i].in_p, invert comparison code ccode.  For >/>=,
19137         swap rhs1 and rhs2 and comparison code unconditionally,
19138         for </<= don't do that.  Don't swap rhs1/rhs2 again if
19139         ranges[i].in_p, instead invert comparison code ccode if
19140         opcode or oe->rank is BIT_IOR_EXPR.
19142         PR target/80846
19143         * optabs.def (vec_extract_optab, vec_init_optab): Change from
19144         a direct optab to conversion optab.
19145         * optabs.c (expand_vector_broadcast): Use convert_optab_handler
19146         with GET_MODE_INNER as last argument instead of optab_handler.
19147         * expmed.c (extract_bit_field_1): Likewise.  Use vector from
19148         vector extraction if possible and optab is available.
19149         * expr.c (store_constructor): Use convert_optab_handler instead
19150         of optab_handler.  Use vector initialization from smaller
19151         vectors if possible and optab is available.
19152         * tree-vect-stmts.c (vectorizable_load): Likewise.
19153         * doc/md.texi (vec_extract, vec_init): Document that the optabs
19154         now have two modes.
19155         * config/i386/i386.c (ix86_expand_vector_init): Handle expansion
19156         of vec_init from half-sized vectors with the same element mode.
19157         * config/i386/sse.md (ssehalfvecmode): Add V4TI case.
19158         (ssehalfvecmodelower, ssescalarmodelower): New mode attributes.
19159         (reduc_plus_scal_v8df, reduc_plus_scal_v4df, reduc_plus_scal_v2df,
19160         reduc_plus_scal_v16sf, reduc_plus_scal_v8sf, reduc_plus_scal_v4sf,
19161         reduc_<code>_scal_<mode>, reduc_umin_scal_v8hi): Add element mode
19162         after mode in gen_vec_extract* calls.
19163         (vec_extract<mode>): Renamed to ...
19164         (vec_extract<mode><ssescalarmodelower>): ... this.
19165         (vec_extract<mode><ssehalfvecmodelower>): New expander.
19166         (rotl<mode>3, rotr<mode>3, <shift_insn><mode>3, ashrv2di3): Add
19167         element mode after mode in gen_vec_init* calls.
19168         (VEC_INIT_HALF_MODE): New mode iterator.
19169         (vec_init<mode>): Renamed to ...
19170         (vec_init<mode><ssescalarmodelower>): ... this.
19171         (vec_init<mode><ssehalfvecmodelower>): New expander.
19172         * config/i386/mmx.md (vec_extractv2sf): Renamed to ...
19173         (vec_extractv2sfsf): ... this.
19174         (vec_initv2sf): Renamed to ...
19175         (vec_initv2sfsf): ... this.
19176         (vec_extractv2si): Renamed to ...
19177         (vec_extractv2sisi): ... this.
19178         (vec_initv2si): Renamed to ...
19179         (vec_initv2sisi): ... this.
19180         (vec_extractv4hi): Renamed to ...
19181         (vec_extractv4hihi): ... this.
19182         (vec_initv4hi): Renamed to ...
19183         (vec_initv4hihi): ... this.
19184         (vec_extractv8qi): Renamed to ...
19185         (vec_extractv8qiqi): ... this.
19186         (vec_initv8qi): Renamed to ...
19187         (vec_initv8qiqi): ... this.
19188         * config/rs6000/vector.md (VEC_base_l): New mode attribute.
19189         (vec_init<mode>): Renamed to ...
19190         (vec_init<mode><VEC_base_l>): ... this.
19191         (vec_extract<mode>): Renamed to ...
19192         (vec_extract<mode><VEC_base_l>): ... this.
19193         * config/rs6000/paired.md (vec_initv2sf): Renamed to ...
19194         (vec_initv2sfsf): ... this.
19195         * config/rs6000/altivec.md (splitter, altivec_copysign_v4sf3,
19196         vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
19197         vec_unpacku_lo_v8hi, mulv16qi3, altivec_vreve<mode>2): Add
19198         element mode after mode in gen_vec_init* calls.
19199         * config/aarch64/aarch64-simd.md (vec_init<mode>): Renamed to ...
19200         (vec_init<mode><Vel>): ... this.
19201         (vec_extract<mode>): Renamed to ...
19202         (vec_extract<mode><Vel>): ... this.
19203         * config/aarch64/iterators.md (Vel): New mode attribute.
19204         * config/s390/s390.c (s390_expand_vec_strlen, s390_expand_vec_movstr):
19205         Add element mode after mode in gen_vec_extract* calls.
19206         * config/s390/vector.md (non_vec_l): New mode attribute.
19207         (vec_extract<mode>): Renamed to ...
19208         (vec_extract<mode><non_vec_l>): ... this.
19209         (vec_init<mode>): Renamed to ...
19210         (vec_init<mode><non_vec_l>): ... this.
19211         * config/s390/s390-builtins.def (s390_vlgvb, s390_vlgvh, s390_vlgvf,
19212         s390_vlgvf_flt, s390_vlgvg, s390_vlgvg_dbl): Add element mode after
19213         vec_extract mode.
19214         * config/arm/iterators.md (V_elem_l): New mode attribute.
19215         * config/arm/neon.md (vec_extract<mode>): Renamed to ...
19216         (vec_extract<mode><V_elem_l>): ... this.
19217         (vec_extractv2di): Renamed to ...
19218         (vec_extractv2didi): ... this.
19219         (vec_init<mode>): Renamed to ...
19220         (vec_init<mode><V_elem_l>): ... this.
19221         (reduc_plus_scal_<mode>, reduc_plus_scal_v2di, reduc_smin_scal_<mode>,
19222         reduc_smax_scal_<mode>, reduc_umin_scal_<mode>,
19223         reduc_umax_scal_<mode>, neon_vget_lane<mode>, neon_vget_laneu<mode>):
19224         Add element mode after gen_vec_extract* calls.
19225         * config/mips/mips-msa.md (vec_init<mode>): Renamed to ...
19226         (vec_init<mode><unitmode>): ... this.
19227         (vec_extract<mode>): Renamed to ...
19228         (vec_extract<mode><unitmode>): ... this.
19229         * config/mips/loongson.md (vec_init<mode>): Renamed to ...
19230         (vec_init<mode><unitmode>): ... this.
19231         * config/mips/mips-ps-3d.md (vec_initv2sf): Renamed to ...
19232         (vec_initv2sfsf): ... this.
19233         (vec_extractv2sf): Renamed to ...
19234         (vec_extractv2sfsf): ... this.
19235         (reduc_plus_scal_v2sf, reduc_smin_scal_v2sf, reduc_smax_scal_v2sf):
19236         Add element mode after gen_vec_extract* calls.
19237         * config/mips/mips.md (unitmode): New mode iterator.
19238         * config/spu/spu.c (spu_expand_prologue, spu_allocate_stack,
19239         spu_builtin_extract): Add element mode after gen_vec_extract* calls.
19240         * config/spu/spu.md (inner_l): New mode attribute.
19241         (vec_init<mode>): Renamed to ...
19242         (vec_init<mode><inner_l>): ... this.
19243         (vec_extract<mode>): Renamed to ...
19244         (vec_extract<mode><inner_l>): ... this.
19245         * config/sparc/sparc.md (veltmode): New mode iterator.
19246         (vec_init<VMALL:mode>): Renamed to ...
19247         (vec_init<VMALL:mode><VMALL:veltmode>): ... this.
19248         * config/ia64/vect.md (vec_initv2si): Renamed to ...
19249         (vec_initv2sisi): ... this.
19250         (vec_initv2sf): Renamed to ...
19251         (vec_initv2sfsf): ... this.
19252         (vec_extractv2sf): Renamed to ...
19253         (vec_extractv2sfsf): ... this.
19254         * config/powerpcspe/vector.md (VEC_base_l): New mode attribute.
19255         (vec_init<mode>): Renamed to ...
19256         (vec_init<mode><VEC_base_l>): ... this.
19257         (vec_extract<mode>): Renamed to ...
19258         (vec_extract<mode><VEC_base_l>): ... this.
19259         * config/powerpcspe/paired.md (vec_initv2sf): Renamed to ...
19260         (vec_initv2sfsf): ... this.
19261         * config/powerpcspe/altivec.md (splitter, altivec_copysign_v4sf3,
19262         vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
19263         vec_unpacku_lo_v8hi, mulv16qi3): Add element mode after mode in
19264         gen_vec_init* calls.
19266 2017-08-01  Richard Biener  <rguenther@suse.de>
19268         PR tree-optimization/81297
19269         * tree-vrp.c (get_single_symbol): Remove assert, instead drop
19270         TREE_OVERFLOW from INTEGER_CSTs.
19272 2017-07-31  Segher Boessenkool  <segher@kernel.crashing.org>
19274         * config/rs6000/rs6000.c (enum rs6000_reg_type): Delete trailing comma.
19276 2017-07-31  Carl Love  <cel@us.ibm.com>
19278         * config/rs6000/rs6000-c: Add support for built-in functions
19279         vector signed char vec_xl_be (signed long long, signed char *);
19280         vector unsigned char vec_xl_be (signed long long, unsigned char *);
19281         vector signed int vec_xl_be (signed long long, signed int *);
19282         vector unsigned int vec_xl_be (signed long long, unsigned int *);
19283         vector signed long long vec_xl_be (signed long long, signed long long *);
19284         vector unsigned long long vec_xl_be (signed long long, unsigned long long *);
19285         vector signed short vec_xl_be (signed long long, signed short *);
19286         vector unsigned short vec_xl_be (signed long long, unsigned short *);
19287         vector double vec_xl_be (signed long long, double *);
19288         vector float vec_xl_be (signed long long, float *);
19289         * config/rs6000/altivec.h (vec_xl_be): Add #define.
19290         * config/rs6000/rs6000-builtin.def (XL_BE_V16QI, XL_BE_V8HI, XL_BE_V4SI)
19291         XL_BE_V2DI, XL_BE_V4SF, XL_BE_V2DF, XL_BE): Add definitions
19292         for the builtins.
19293         * config/rs6000/rs6000.c (altivec_expand_xl_be_builtin): Add function.
19294         (altivec_expand_builtin): Add switch statement to call
19295         altivec_expand_xl_be for each builtin.
19296         (altivec_init_builtins): Add def_builtin for _builtin_vsx_le_be_v8hi,
19297         __builtin_vsx_le_be_v4si, __builtin_vsx_le_be_v2di,
19298         __builtin_vsx_le_be_v4sf, __builtin_vsx_le_be_v2df,
19299         __builtin_vsx_le_be_v16qi.
19300         * doc/extend.texi: Update the built-in documentation file for the
19301         new built-in functions.
19303 2017-07-31  Uros Bizjak  <ubizjak@gmail.com>
19305         PR target/25967
19306         * config/i386/i386.c (ix86_allocate_stack_slots_for_args):
19307         New function.
19308         (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
19310 2017-07-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
19312         * config.gcc: Add z14.
19313         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
19314         CPU model numbers for z13s and z14.
19315         * config/s390/s390-c.c (s390_resolve_overloaded_builtin): Replace
19316         arch12 with z14.
19317         * config/s390/s390-opts.h (enum processor_type): Rename
19318         PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
19319         * config/s390/s390.c (processor_table): Add field for CPU name to
19320         be passed to Binutils.
19321         (s390_asm_output_machine_for_arch): Use the new field in
19322         processor_table for Binutils.
19323         (s390_expand_builtin): Replace arch12 with z14.
19324         (s390_issue_rate): Rename PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
19325         (s390_get_sched_attrmask): Likewise.
19326         (s390_get_unit_mask): Likewise.
19327         * config/s390/s390.opt: Add z14 to processor_type enum.
19329 2017-07-31  Martin Jambor  <mjambor@suse.cz>
19331         PR hsa/81477
19332         * ipa-fnsummary.c (ipa_fn_summary_generate): Set versionable
19333         regardless of optimization level.
19335 2017-07-31  Jan Hubicka <hubicka@ucw.cz>
19336             Martin Liska  <mliska@suse.cz>
19338         * predict.def: Remove old comment and adjust probability.
19339         * gimplify.c (should_warn_for_implicit_fallthrough): Ignore
19340         PREDICT statements.
19342 2017-07-31  Uros Bizjak  <ubizjak@gmail.com>
19344         PR target/25967
19345         * config/i386/i386.c (ix86_function_naked): New function.
19346         (ix86_can_use_return_insn_p): Return false for naked functions.
19347         (ix86_expand_prologue): Skip prologue for naked functions.
19348         (ix86_expand_epilogue): Skip epilogue for naked functions
19349         and emit trap instruction.
19350         (ix86_warn_func_return): New function.
19351         (ix86_attribute_table): Add "naked" attribute specification.
19352         (TARGET_WARN_FUNC_RETURN): Define.
19353         * doc/extend.texi (x86 Function Attributes) <naked>: Document it.
19355 2017-07-31  Martin Liska  <mliska@suse.cz>
19357         * gimple-pretty-print.c (dump_gimple_label): Never dump BB info.
19358         (dump_gimple_bb_header): Always dump BB info.
19359         (pp_cfg_jump): Do not append info about BB when dumping a jump.
19361 2017-07-31  Martin Liska  <mliska@suse.cz>
19363         PR sanitize/81530
19364         * convert.c (convert_to_integer_1): Guard condition with flag_sanitize_p
19365         also with current_function_decl non-null equality.
19367 2017-07-31  Jakub Jelinek  <jakub@redhat.com>
19369         PR sanitizer/81604
19370         * ubsan.c (ubsan_type_descriptor): For UBSAN_PRINT_ARRAY don't
19371         change type to the element type, instead add eltype variable and
19372         use it where we are interested in the element type.
19374         PR tree-optimization/81603
19375         * ipa-polymorphic-call.c
19376         (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Perform
19377         offset arithmetic in offset_int, bail out if the resulting bit offset
19378         doesn't fit into shwi.
19380 2017-07-31  Martin Liska  <mliska@suse.cz>
19382         * gimplify.c (mostly_copy_tree_r): Remove Java specific hunk.
19383         (gimplify_save_expr): Fix comment.
19385 2017-07-30  H.J. Lu  <hongjiu.lu@intel.com>
19387         PR target/79793
19388         * config/i386/i386.c (ix86_function_arg): Update arguments for
19389         exception handler.
19390         (ix86_compute_frame_layout): Set the initial stack offset to
19391         INCOMING_FRAME_SP_OFFSET.  Update red-zone offset with
19392         INCOMING_FRAME_SP_OFFSET.
19393         (ix86_expand_epilogue): Don't pop the 'ERROR_CODE' off the
19394         stack before exception handler returns.
19395         * config/i386/i386.h (INCOMING_FRAME_SP_OFFSET): Add the
19396         the 'ERROR_CODE' for exception handler.
19398 2017-07-30  Uros Bizjak  <ubizjak@gmail.com>
19400         * config/i386/i386.h (ASM_PRINTF_EXTENSIONS): New macro.
19401         (ASM_OUTPUT_REG_PUSH): Rewrite with new operand modifiers.
19402         (ASM_OUTPUT_REG_POP): Ditto.
19403         * config/i386/i386.c (ix86_asm_output_function_label): Use fputs
19404         instead of asm_fprintf to output pure string.
19406 2017-07-29  Jakub Jelinek  <jakub@redhat.com>
19408         * debug.h (struct gcc_debug_hooks): Add IMPLICIT argument
19409         to imported_module_or_decl hook.
19410         (debug_nothing_tree_tree_tree_bool): Remove.
19411         (debug_nothing_tree_tree_tree_bool_bool): New declaration.
19412         * debug.c (do_nothing_debug_hooks): Use
19413         debug_nothing_tree_tree_tree_bool_bool instead of
19414         debug_nothing_tree_tree_tree_bool.
19415         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
19416         * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
19417         * sdbout.c (sdb_debug_hooks): Likewise.
19418         * dwarf2out.c (dwarf2_lineno_debug_hooks): Likewise.
19419         (gen_namespace_die): Add DW_AT_export_symbols attribute if
19420         langhook wants it.
19421         (dwarf2out_imported_module_or_decl): Add IMPLICIT argument,
19422         if true, -gdwarf-5 and decl will have DW_AT_export_symbols
19423         attribute, don't add anything.
19425 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19427         * fold-const.c (fold_build1_stat_loc): Remove _stat from name.
19428         (fold_build2_stat_loc): Likewise.
19429         (fold_build3_stat_loc): Likewise.
19430         * fold-const.h (fold_build1, fold_build2, fold_build3): Adjust.
19431         (fold_build1_loc): Remove macro.
19432         (fold_build2_loc): Likewise.
19433         (fold_build3_loc): Likewise.
19435 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19437         * gimple.c (gimple_build_debug_bind_stat): Remove _stat from name.
19438         (gimple_build_debug_bind_source_stat): Likewise.
19439         * gimple.h (gimple_build_debug_bind): Remove macro.
19440         (gimple_build_debug_bind_source): Likewise.
19442 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19444         * bitmap.c (bitmap_alloc): Adjust.
19445         (bitmap_gc_alloc): Likewise.
19446         * bitmap.h (bitmap_initialize_stat): Remove _stat from name.
19448 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19450         * bitmap.c (bitmap_obstack_alloc_stat): Rename to bitmap_alloc.
19451         (bitmap_gc_alloc_stat): Rename to bitmap_gc_alloc.
19452         * bitmap.h (bitmap_obstack_alloc_stat): Adjust prototype.
19453         (bitmap_gc_alloc_stat): Likewise.
19454         (BITMAP_ALLOC, BITMAP_GGC_ALLOC): Adjust.
19456 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19458         * rtl.c (shallow_copy_rtx_stat): Remove _stat from name.
19459         * rtl.h (shallow_copy_rtx): Remove macro.
19461 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19463         * emit-rtl.c (gen_raw_REG): Adjust.
19464         * gengenrtl.c (gendef): Likewise.
19465         * rtl.c (rtx_alloc_stat): Remove _stat from name.
19466         * rtl.h (rtx_alloc): Remove macro.
19468 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19470         * tree.c (build_tree_list_vec_stat): Remove _stat from name.
19471         (build_tree_list_stat): Likewise.
19472         * tree.h (build_tree_list): Remove macro.
19473         (build_tree_list_vec): Likewise.
19475 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19477         * tree.c (make_vector_stat): Remove _stat from name.
19478         (build_vector_stat): Likewise.
19479         * tree.h (make_vector_stat): Remove macro.
19480         (build_vector_stat): Likewise.
19482 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19484         * tree.h (build_var_debug_value): Remove prototype.
19486 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19488         * tree.c (tree_cons_stat): Remove _stat from name.
19489         * tree.h (tree_cons): Remove macro.
19491 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19493         * tree.c (build_vl_exp_stat): Remove _stat from name.
19494         * tree.h (build_vl_exp): Remove macro.
19496 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19498         * tree.c (build_decl_stat): Remove _stat from name.
19499         * tree.h (build_decl): Remove macro.
19501 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19503         * gimple.c (gimple_build_with_ops_stat): Adjust.
19504         (gimple_alloc_stat): Remove _stat from name.
19505         * gimple.h (gimple_alloc): Remove macro.
19507 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19509         * tree.c (make_tree_vec_stat): Remove _stat from name.
19510         (grow_tree_vec_stat): Likewise.
19511         * tree.h (make_tree_vec_stat): Adjust prototype.
19512         (grow_tree_vec_stat): Likewise.
19513         (make_tree_vec): Remove macro.
19514         (grow_tree_vec): Likewise.
19516 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19518         * fold-const.c (fold_build1_stat_loc): Adjust.
19519         (fold_build2_stat_loc): Likewise.
19520         (fold_build3_stat_loc): Likewise.
19521         * tree.c (build0_stat): Remove _stat from name.
19522         (build1_stat): Likewise.
19523         (build2_stat): Likewise.
19524         (build3_stat): Likewise.
19525         (build4_stat): Likewise.
19526         (build5_stat): Likewise.
19527         * tree.h (build1_loc): Remove macro, and rename _stat function
19528         to this.
19529         (build2_loc): Likewise.
19530         (build3_loc): Likewise.
19531         (build4_loc): Likewise.
19532         (build5_loc): Likewise.
19534 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19536         * tree.c (make_int_cst_stat): Remove _stat from name.
19537         * tree.h (make_int_cst_stat): Adjust prototype.
19538         (make_int_cst): Remove macro.
19540 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19542         * tree.c (make_tre_binfo_stat): Remove _stat from name.
19543         * tree.h (make_tree_binfo_stat): Adjust prototype.
19544         (make_tree_binfo): Remove.
19546 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19548         * tree.c (copy_node_stat): Rename to copy_node.
19549         (build_distinct_type_copy): Adjust.
19550         * tree.h (copy_node_stat): Adjust prototype.
19551         (copy_node): Remove macro.
19553 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19555         * tree.c (make_node_stat): rename to make_node.
19556         (build_tree_list_stat): Adjust.
19557         (build0_stat): Likewise.
19558         (build2_stat): Likewise.
19559         (build3_stat): Likewise.
19560         (build4_stat): Likewise.
19561         (build5_stat): Likewise.
19562         (build_decl_stat): Likewise.
19563         * tree.h (make_node_stat): Adjust prototype.
19564         (make_node): remove macro.
19566 2017-07-28  Peter Bergner  <bergner@vnet.ibm.com>
19568         * config/rs6000/ppc-auxv.h (PPC_FEATURE2_DARN): New define.
19569         (PPC_FEATURE2_SCV): Likewise.
19570         * config/rs6000/rs6000.c (cpu_supports_info): Use them.
19572 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
19574         * config/aarch64/aarch64.c
19575         (aarch64_internal_mov_immediate): Add new special pattern.
19576         * config/aarch64/aarch64.md (*movdi_aarch64):
19577         Add reg/32bit const mov case.
19579 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
19580             Richard Sandiford <richard.sandiford@linaro.org>
19582         * config/aarch64/aarch64.md (mov<mode>): Generalize.
19583         (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
19584         Add integer and movi cases.
19585         (movi-split-hf-df-sf split, fp16): New.
19586         (enabled): Added TARGET_FP_F16INST.
19587         * config/aarch64/iterators.md (GPF_HF): New.
19588         * config/aarch64/predicates.md (aarch64_reg_or_fp_float): New.
19590 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
19592         * config/aarch64/aarch64.c
19593         (aarch64_simd_container_mode): Add prototype.
19594         (aarch64_expand_mov_immediate): Add HI support.
19595         (aarch64_reinterpret_float_as_int, aarch64_float_const_rtx_p: New.
19596         (aarch64_can_const_movi_rtx_p): New.
19597         (aarch64_preferred_reload_class):
19598         Remove restrictions of using FP registers for certain SIMD operations.
19599         (aarch64_rtx_costs): Added new cost for CONST_DOUBLE moves.
19600         (aarch64_valid_floating_const): Add integer move validation.
19601         (aarch64_simd_imm_scalar_p): Remove.
19602         (aarch64_output_scalar_simd_mov_immediate): Generalize function.
19603         (aarch64_legitimate_constant_p): Expand list of supported cases.
19604         * config/aarch64/aarch64-protos.h
19605         (aarch64_float_const_rtx_p, aarch64_can_const_movi_rtx_p): New.
19606         (aarch64_reinterpret_float_as_int): New.
19607         (aarch64_simd_imm_scalar_p): Remove.
19608         * config/aarch64/constraints.md (Uvi): New.
19609         (Dd): Split into Ds and new Dd.
19610         * config/aarch64/aarch64.md (*movsi_aarch64):
19611         Add SIMD mov case.
19612         (*movdi_aarch64): Add SIMD mov case.
19614 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
19616         * tree-predcom.c: (struct chain): Handle store-store chain in which
19617         stores for elimination only store loop invariant values.
19618         (execute_pred_commoning_chain): Ditto.
19619         (prepare_initializers_chain_store_elim): Ditto.
19620         (prepare_finalizers): Ditto.
19621         (is_inv_store_elimination_chain): New function.
19622         (initialize_root_vars_store_elim_1): New function.
19624 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
19626         * tree-predcom.c: Revise general description of the pass.
19627         (enum chain_type): New enum type for store elimination.
19628         (struct chain): New field supporting store elimination.
19629         (struct component): Ditto.
19630         (dump_chain): Dump store-stores chain.
19631         (release_chain): Release resources.
19632         (split_data_refs_to_components): Compute and create component
19633         contains only stores for elimination.
19634         (get_chain_last_ref_at): New function.
19635         (make_invariant_chain): Initialization.
19636         (make_rooted_chain): Specify chain type in parameter and record it.
19637         (add_looparound_copies): Skip for store-stores chain.
19638         (determine_roots_comp): Compute type of chain and pass it to
19639         make_rooted_chain.
19640         (initialize_root_vars_store_elim_2): New function.
19641         (finalize_eliminated_stores): New function.
19642         (remove_stmt): Handle store for elimination.
19643         (execute_pred_commoning_chain): Execute predictive commoning on
19644         store-store chains.
19645         (determine_unroll_factor): Skip unroll for store-stores chain.
19646         (prepare_initializers_chain_store_elim): New function.
19647         (prepare_initializers_chain): Hanlde store-store chain.
19648         (prepare_finalizers_chain, prepare_finalizers): New function.
19649         (tree_predictive_commoning_loop): Return integer value indicating
19650         if loop is unrolled or lcssa form is corrupted.
19651         (tree_predictive_commoning): Rewrite for lcssa form if necessary.
19653 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
19655         * tree-predcom.c (initialize_root): Delete.
19656         (execute_pred_commoning_chain): Initialize root vars and replace
19657         reference of non-combined chain directly, rather than call above
19658         function.
19660 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
19662         * tree-predcom.c (ref_at_iteration): Add parameter NITERS.  Compute
19663         memory reference to DR at (NITERS + ITERS)-th iteration of loop.
19665 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
19667         * tree-predcom.c (struct chain): New field init_seq.
19668         (release_chain): Release init_seq.
19669         (prepare_initializers_chain): Record intialization stmts in above
19670         field.
19671         (insert_init_seqs): New function.
19672         (tree_predictive_commoning_loop): Call insert_init_seqs.
19674 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
19676         * tree-predcom.c (determine_roots_comp): Skip trivial components.
19678 2017-07-28  Richard Biener  <rguenther@suse.de>
19680         * match.pd: Remove superfluous :c.
19681         * genmatch.c (simplify::id): Add member.
19682         (lower_commutative, lower_opt_convert, lower_cond, lower_for):
19683         Copy id.
19684         (current_id): New global.
19685         (dt_node::parent): Move from ...
19686         (dt_operand::parent): ... here.  Add for_id member.
19687         (is_a_helper <dt_operand *>::test): DT_TRUE is also a dt_operand.
19688         (decision_tree::find_node): Relax order requirement when
19689         merging DT_TRUE nodes to ones inbetween the current simplify
19690         and the one we try to merge with.  Add diagnostic whenever
19691         we need to enforce pattern order by not merging.
19692         (decision_tree::insert): Set current_id.
19693         (decision_tree::print_node): Dump parent node and for_id.
19694         (parser::last_id): Add member.
19695         (parser::push_simplify): Assign unique id.
19696         (parser::parser): Initialize last_id.
19698 2017-07-28  Martin Liska  <mliska@suse.cz>
19700         PR sanitizer/81340
19701         * sanopt.c (sanitize_rewrite_addressable_params): Set VALUE_EXPR after
19702         gimple_build_debug_bind.
19704 2017-07-28  Richard Biener  <rguenther@suse.de>
19706         PR tree-optimization/81502
19707         * match.pd: Add pattern combining BIT_INSERT_EXPR with
19708         BIT_FIELD_REF.
19709         * tree-cfg.c (verify_expr): Verify types of BIT_FIELD_REF
19710         size/pos operands.
19711         (verify_gimple_assign_ternary): Likewise for BIT_INSERT_EXPR pos.
19712         * gimple-fold.c (maybe_canonicalize_mem_ref_addr): Use bitsizetype
19713         for BIT_FIELD_REF args.
19714         * fold-const.c (make_bit_field_ref): Likewise.
19715         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
19717 2017-07-28  Jakub Jelinek  <jakub@redhat.com>
19719         PR sanitizer/80998
19720         * sanopt.c (pass_sanopt::execute): Handle IFN_UBSAN_PTR.
19721         * tree-ssa-alias.c (call_may_clobber_ref_p_1): Likewise.
19722         * flag-types.h (enum sanitize_code): Add SANITIZER_POINTER_OVERFLOW.
19723         Or it into SANITIZER_UNDEFINED.
19724         * ubsan.c: Include gimple-fold.h and varasm.h.
19725         (ubsan_expand_ptr_ifn): New function.
19726         (instrument_pointer_overflow): New function.
19727         (maybe_instrument_pointer_overflow): New function.
19728         (instrument_object_size): Formatting fix.
19729         (pass_ubsan::execute): Call instrument_pointer_overflow
19730         and maybe_instrument_pointer_overflow.
19731         * internal-fn.c (expand_UBSAN_PTR): New function.
19732         * ubsan.h (ubsan_expand_ptr_ifn): Declare.
19733         * sanitizer.def (__ubsan_handle_pointer_overflow,
19734         __ubsan_handle_pointer_overflow_abort): New builtins.
19735         * tree-ssa-tail-merge.c (merge_stmts_p): Handle IFN_UBSAN_PTR.
19736         * internal-fn.def (UBSAN_PTR): New internal function.
19737         * opts.c (sanitizer_opts): Add pointer-overflow.
19738         * lto-streamer-in.c (input_function): Handle IFN_UBSAN_PTR.
19739         * fold-const.c (build_range_check): Compute pointer range check in
19740         integral type if pointer arithmetics would be needed.  Formatting
19741         fixes.
19743 2017-07-28  Martin Liska  <mliska@suse.cz>
19745         PR sanitizer/81460
19746         * sanopt.c (sanitize_rewrite_addressable_params): Do not rewrite
19747         parameters that are of a variable-length.
19749 2017-07-28  Sebastian Huber  <sebastian.huber@embedded-brains.de>
19751         * config.gcc (powerpc-*-rtems*): Remove rs6000/eabi.h.  Add
19752         rs6000/biarch64.h.
19753         * config/rs6000/rtems.h (ASM_DECLARE_FUNCTION_SIZE): New macro.
19754         (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise.
19755         (CRT_CALL_STATIC_FUNCTION): Likewise.
19756         (ASM_DEFAULT_SPEC): New define.
19757         (ASM_SPEC32): Likewise.
19758         (ASM_SPEC64): Likewise.
19759         (ASM_SPEC_COMMON): Likewise.
19760         (ASM_SPEC): Likewise.
19761         (INVALID_64BIT): Likewise.
19762         (LINK_OS_DEFAULT_SPEC): Likewise.
19763         (LINK_OS_SPEC32): Likewise.
19764         (LINK_OS_SPEC64): Likewise.
19765         (POWERPC_LINUX): Likewise.
19766         (PTRDIFF_TYPE): Likewise.
19767         (RESTORE_FP_PREFIX): Likewise.
19768         (RESTORE_FP_SUFFIX): Likewise.
19769         (SAVE_FP_PREFIX): Likewise.
19770         (SAVE_FP_SUFFIX): Likewise.
19771         (SIZE_TYPE): Likewise.
19772         (SUBSUBTARGET_OVERRIDE_OPTIONS): Likewise.
19773         (TARGET_64BIT): Likewise.
19774         (TARGET_64BIT): Likewise.
19775         (TARGET_AIX): Likewise.
19776         (WCHAR_TYPE_SIZE): Likewise.
19777         (WCHAR_TYPE): Undefine.
19778         (TARGET_OS_CPP_BUILTINS): Add 64-bit PowerPC defines.
19779         (CPP_OS_DEFAULT_SPEC): Use previous CPP_OS_RTEMS_SPEC.
19780         (CPP_OS_RTEMS_SPEC): Delete.
19781         (SUBSUBTARGET_EXTRA_SPECS): Remove cpp_os_rtems.  Add
19782         asm_spec_common, asm_spec32, asm_spec64, link_os_spec32, and
19783         link_os_spec64.
19784         * config/rs6000/t-rtems: Add mcpu=e6500/m64 multilibs.
19786 2017-07-28  Jakub Jelinek  <jakub@redhat.com>
19788         PR tree-optimization/81578
19789         * tree-parloops.c (build_new_reduction): Bail out if
19790         reduction_code isn't one of the standard OpenMP reductions.
19791         Move the details printing after that decision.
19793 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
19795         * config/rs6000/predicates.md (volatile_mem_operand): Remove code
19796         related to reload_in_progress.
19797         (splat_input_operand): Likewise.
19798         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_rtx):
19799         Delete prototype.
19800         * config/rs6000/rs6000.c (machine_function): Remove sdmode_stack_slot
19801         field.
19802         (TARGET_EXPAND_TO_RTL_HOOK): Delete.
19803         (TARGET_INSTANTIATE_DECLS): Likewise.
19804         (legitimate_indexed_address_p): Delete reload_in_progress code.
19805         (rs6000_debug_legitimate_address_p): Likewise.
19806         (rs6000_eliminate_indexed_memrefs): Likewise.
19807         (rs6000_emit_le_vsx_store): Likewise.
19808         (rs6000_emit_move_si_sf_subreg): Likewise.
19809         (rs6000_emit_move): Likewise.
19810         (register_to_reg_type): Likewise.
19811         (rs6000_pre_atomic_barrier): Likewise.
19812         (rs6000_machopic_legitimize_pic_address): Likewise.
19813         (rs6000_allocate_stack_temp): Likewise.
19814         (rs6000_address_for_fpconvert): Likewise.
19815         (rs6000_address_for_altivec): Likewise.
19816         (rs6000_secondary_memory_needed_rtx): Delete function.
19817         (rs6000_check_sdmode): Likewise.
19818         (rs6000_alloc_sdmode_stack_slot): Likewise.
19819         (rs6000_instantiate_decls): Likewise.
19820         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_RTX): Delete.
19821         * config/rs6000/rs6000.md (splitter for *movsi_got_internal):
19822         Delete reload_in_progress.
19823         (*vec_reload_and_plus_<mptrsize>): Likewise.
19824         * config/rs6000/vsx.md (vsx_mul_v2di): Likewise.
19825         (vsx_div_v2di): Likewise.
19826         (vsx_udiv_v2di): Likewise.
19828 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
19830         * config/rs6000/rs6000.opt (mlra): Replace with stub.
19831         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete OPTION_MASK_LRA.
19832         * config/rs6000/rs6000.c (TARGET_LRA_P): Delete.
19833         (rs6000_debug_reg_global): Delete print of LRA status.
19834         (rs6000_option_override_internal): Delete dead LRA related code.
19835         (rs6000_lra_p): Delete function.
19836         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mlra.
19838 2017-07-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
19840         * config.gcc (riscv*-*-elf*): Add (riscv*-*-rtems*).
19841         * config/riscv/rtems.h: New file.
19843 2017-07-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19844             Sudakshina Das  <sudi.das@arm.com>
19846         * config/aarch64/aarch64.md
19847         (define_split for and<mode>3nr_compare): Move
19848         non aarch64_logical_operand to a register.
19849         (define_split for and_<SHIFT:optab><mode>3nr_compare0): Move non
19850         register immediate operand to a register.
19851         * config/aarch64/predicates.md (aarch64_mov_imm_operand): New.
19853 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
19855         PR middle-end/81564
19856         * tree-cfg.c (group_case_labels_stmt): Handle already deleted blocks.
19858 2017-07-27  Richard Biener  <rguenther@suse.de>
19860         PR tree-optimization/81573
19861         PR tree-optimization/81494
19862         * tree-vect-loop.c (vect_create_epilog_for_reduction): Handle
19863         multi defuse cycle case.
19865 2017-07-27  Richard Biener  <rguenther@suse.de>
19867         PR tree-optimization/81571
19868         * tree-vect-slp.c (vect_build_slp_tree): Properly verify reduction
19869         PHIs.
19871 2017-07-27  Eric Botcazou  <ebotcazou@adacore.com>
19873         * config/sparc/sparc.c (sparc_option_override): Set MASK_FSMULD flag
19874         earlier and only if MASK_FPU is set.  Adjust formatting.
19876 2017-07-27  Martin Liska  <mliska@suse.cz>
19878         * opt-functions.awk: Add validation of value of Init.
19879         * optc-gen.awk: Pass new argument.
19881 2017-07-27  Martin Liska  <mliska@suse.cz>
19883         * auto-profile.c (autofdo_source_profile::update_inlined_ind_target):
19884         Fix wrong condition.
19886 2017-07-27  Martin Liska  <mliska@suse.cz>
19888         * auto-profile.c (afdo_annotate_cfg): Assign zero counts to
19889         BBs and edges seen by autoFDO.
19891 2017-07-27  Richard Biener  <rguenther@suse.de>
19893         PR tree-optimization/81502
19894         * tree-ssa.c (non_rewritable_lvalue_p): Handle BIT_INSERT_EXPR
19895         with incompatible but same sized type.
19896         (execute_update_addresses_taken): Likewise.
19898 2017-07-27  James Greenhalgh  <james.greenhalgh@arm.com>
19900         * tree-ssa-loop-ch.c (pass_ch::process_loop_p): Guard on
19901         flag_tree_loop_vectorize rather than flag_tree_vectorize.
19903 2017-07-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
19905         PR target/81534
19906         * config/s390/s390.md ("*atomic_compare_and_swap<mode>_1")
19907         ("*atomic_compare_and_swapdi_2", "*atomic_compare_and_swapsi_3"):
19908         Change s_operand to memory_operand.
19910 2017-07-27  Richard Sandiford  <richard.sandiford@linaro.org>
19912         * config/rs6000/rs6000-protos.h (rs6000_emit_le_vsx_permute): Declare.
19913         * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Replace with...
19914         (rs6000_emit_le_vsx_permute): ...this.  Take the destination as input.
19915         Emit instructions rather than returning an expression.  Handle TFmode
19916         and KFmode by casting to TImode.
19917         (rs6000_emit_le_vsx_load): Update to use rs6000_emit_le_vsx_permute.
19918         (rs6000_emit_le_vsx_store): Likewise.
19919         * config/rs6000/vsx.md (VSX_TI): New iterator.
19920         (*vsx_le_permute_<mode>): Use it instead of VSX_LE_128.
19921         (*vsx_le_undo_permute_<mode>): Likewise.
19922         (*vsx_le_perm_load_<mode>): Use rs6000_emit_le_vsx_permute to
19923         emit the split sequence.
19924         (*vsx_le_perm_store_<mode>): Likewise.
19926 2017-07-27  Jakub Jelinek  <jakub@redhat.com>
19928         PR tree-optimization/81555
19929         PR tree-optimization/81556
19930         * tree-ssa-reassoc.c (rewrite_expr_tree): Add NEXT_CHANGED argument,
19931         if true, force CHANGED for the recursive invocation.
19932         (reassociate_bb): Remember original length of ops array, pass
19933         len != orig_len as NEXT_CHANGED in rewrite_expr_tree call.
19935         * attribs.c (decl_attributes): Imply noinline, noclone and no_icf
19936         attributes for noipa attribute.  For naked attribute use
19937         lookup_attribute first before lookup_attribute_spec.
19938         * final.c (rest_of_handle_final): Disable IPA RA for functions with
19939         noipa attribute.
19940         * ipa-visibility.c (non_local_p): Fix comment typos.  Return true
19941         for functions with noipa attribute.
19942         (cgraph_externally_visible_p): Return true for functions with noipa
19943         attribute.
19944         * cgraph.c (cgraph_node::get_availability): Return AVAIL_INTERPOSABLE
19945         for functions with noipa attribute.
19946         * doc/extend.texi: Document noipa function attribute.
19947         * tree-ssa-structalias.c (refered_from_nonlocal_fn): Set *nonlocal_p
19948         also for functions with noipa attribute.
19949         (ipa_pta_execute): Set nonlocal_p also for nodes with noipa attribute.
19951 2017-07-26  Andrew Pinski  <apinski@cavium.com>
19953         * config/aarch64/aarch64.c (thunderx_vector_cost): Decrease cost of
19954         vec_unalign_load_cost and vec_unalign_store_cost.
19956 2017-07-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
19958         * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Delete
19959         -mvsx-small-integer option.
19960         (ISA_3_0_MASKS_IEEE): Likewise.
19961         (OTHER_VSX_VECTOR_MASKS): Likewise.
19962         (POWERPC_MASKS): Likewise.
19963         * config/rs6000/rs6000.opt (-mvsx-small-integer): Likewise.
19964         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Simplify
19965         code, only testing for DImode being allowed in non-VSX floating
19966         point registers.
19967         (rs6000_init_hard_regno_mode_ok): Change TARGET_VSX_SMALL_INTEGER
19968         to TARGET_P8_VECTOR test.  Remove redundant VSX test inside of
19969         another VSX test.
19970         (rs6000_option_override_internal): Delete -mvsx-small-integer.
19971         (rs6000_expand_vector_set): Change TARGET_VSX_SMALL_INTEGER to
19972         TARGET_P8_VECTOR test.
19973         (rs6000_secondary_reload_simple_move): Likewise.
19974         (rs6000_preferred_reload_class): Delete TARGET_VSX_SMALL_INTEGER,
19975         since TARGET_P9_VECTOR was already tested.
19976         (rs6000_opt_masks): Remove -mvsx-small-integer.
19977         * config/rs6000/vsx.md (vsx_extract_<mode>): Delete
19978         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
19979         used.
19980         (vsx_extract_<mode>_p9): Delete TARGET_VSX_SMALL_INTEGER, since a
19981         test for TARGET_VEXTRACTUB was used, and that uses
19982         TARGET_P9_VECTOR.
19983         (p9 extract splitter): Likewise.
19984         (vsx_extract_<mode>_di_p9): Likewise.
19985         (vsx_extract_<mode>_store_p9): Likewise.
19986         (vsx_extract_si): Delete TARGET_VSX_SMALL_INTEGER, since a test
19987         for TARGET_P9_VECTOR was used.  Delete code that is now dead with
19988         the elimination of TARGET_VSX_SMALL_INTEGER.
19989         (vsx_extract_<mode>_p8): Likewise.
19990         (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_fl_<FL_CONV:mode>): Likewise.
19991         (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_ufl_<FL_CONV:mode>): Likewise.
19992         (vsx_set_<mode>_p9): Likewise.
19993         (vsx_set_v4sf_p9): Likewise.
19994         (vsx_set_v4sf_p9_zero): Likewise.
19995         (vsx_insert_extract_v4sf_p9): Likewise.
19996         (vsx_insert_extract_v4sf_p9_2): Likewise.
19997         * config/rs6000/rs6000.md (sign extend splitter): Change
19998         TARGET_VSX_SMALL_INTEGER to TARGET_P8_VECTOR test.
19999         (floatsi<mode>2_lfiwax_mem): Likewise.
20000         (floatunssi<mode>2_lfiwzx_mem): Likewise.
20001         (float<QHI:mode><FP_ISA3:mode>2): Delete TARGET_VSX_SMALL_INTEGER,
20002         since a test for TARGET_P9_VECTOR was used.
20003         (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
20004         (floatuns<QHI:mode><FP_ISA3:mode>2): Likewise.
20005         (floatuns<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
20006         (fix_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to
20007         TARGET_P8_VECTOR test.
20008         (fix_trunc<mode>si2_stfiwx): Likewise.
20009         (fix_trunc<mode>si2_internal): Likewise.
20010         (fix_trunc<SFDF:mode><QHI:mode>2): Delete
20011         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
20012         used.
20013         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
20014         (fixuns_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to
20015         TARGET_P8_VECTOR test.
20016         (fixuns_trunc<mode>si2_stfiwx): Likewise.
20017         (fixuns_trunc<SFDF:mode><QHI:mode>2): Delete
20018         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
20019         used.
20020         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
20021         (fctiw<u>z_<mode>_smallint): Delete TARGET_VSX_SMALL_INTEGER,
20022         since a test for TARGET_P9_VECTOR was used.
20023         (splitter for loading small constants): Likewise.
20025 2017-07-26  Andrew Pinski  <apinski@cavium.com>
20027         * config/aarch64/aarch64.c (thunderx_vector_cost): Fix
20028         vec_fp_stmt_cost.
20030 2017-07-26  H.J. Lu  <hongjiu.lu@intel.com>
20032         PR target/81563
20033         * config/i386/i386.c (sp_valid_at): Properly check CFA offset.
20034         (fp_valid_at): Likewise.
20036 2017-07-26  James Greenhalgh  <james.greenhalgh@arm.com>
20038         * config/aarch64/aarch64.c (cortexa57_addrcost_table): Remove.
20039         (qdf24xx_addrcost_table): Likewise.
20040         (cortexa57_tunings): Update to use generic_branch_cost.
20041         (cortexa72_tunings): Likewise.
20042         (cortexa73_tunings): Likewise.
20043         (qdf24xx_tunings): Likewise.
20045 2017-07-26  James Greenhalgh  <james.greenhalgh@arm.com>
20047         * config/aarch64/aarch64.c (cortexa57_branch_cost): Remove.
20048         (thunderx2t99_branch_cost): Likewise.
20049         (cortexa35_tunings): Update to use generic_branch_cost.
20050         (cortexa53_tunings): Likewise.
20051         (cortexa57_tunings): Likewise.
20052         (cortexa72_tunings): Likewise.
20053         (cortexa73_tunings): Likewise.
20054         (thunderx2t99_tunings): Likewise.
20056 2017-07-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
20058         * config/sparc/sparc.c (dump_target_flag_bits): Dump MASK_FSMULD.
20059         (sparc_option_override): Honour MASK_FSMULD.
20060         * config/sparc/sparc.h (MASK_FEATURES): Add MASK_FSMULD.
20061         * config/sparc/sparc.md (muldf3_extend): Use TARGET_FSMULD.
20062         * config/sparc/sparc.opt (mfsmuld): New option.
20063         * doc/invoke.texi (mfsmuld): Document option.
20065 2017-07-26  Marek Polacek  <polacek@redhat.com>
20067         PR middle-end/70992
20068         * tree.c (build2_stat): Don't set TREE_CONSTANT on divisions by zero.
20070 2017-07-26  Richard Biener  <rguenther@suse.de>
20072         * gimple-match-head.c (do_valueize): Return OP if valueize
20073         returns NULL_TREE.
20074         (get_def): New helper to get at the def stmt of a SSA name
20075         if valueize allows.
20076         * genmatch.c (dt_node::gen_kids_1): Use get_def instead of
20077         do_valueize to get at the def stmt.
20078         (dt_operand::gen_gimple_expr): Simplify do_valueize calls.
20080 2017-07-26  Wilco Dijkstra  <wdijkstr@arm.com>
20082         PR middle-end/46932
20083         * auto-inc-dec.c (parse_add_or_inc): Block autoinc on sfp.
20085 2017-07-26  Martin Liska  <mliska@suse.cz>
20087         PR sanitize/81186
20088         * function.c (expand_function_start): Make expansion of
20089         nonlocal_goto_save_area after parm_birth_insn.
20091 2017-07-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
20093         * config/sparc/sparc.c (sparc_option_override): Remove MASK_FPU
20094         from all CPU target flags enable members.
20096 2017-07-26  Richard Biener  <rguenther@suse.de>
20098         * genmatch.c (dt_simplify::gen): Make iterator vars const.
20099         (decision_tree::gen): Make 'type' const.
20100         (write_predicate): Likewise.
20102 2017-07-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
20104         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok):
20105         Eliminate TARGET_UPPER_REGS_{DF,DI,SF} usage.
20106         (rs6000_option_override_internal): Likewise.
20107         (rs6000_expand_vector_set): Likewise.
20108         * config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Delete.
20109         (TARGET_UPPER_REGS_SF): Likewise.
20110         (TARGET_UPPER_REGS_DI): Likewise.
20111         (TARGET_VEXTRACTUB): Eliminate TARGET_UPPER_REGS_{DF,DI,SF}.
20112         (TARGET_DIRECT_MOVE_64BIT): Likewise.
20113         * config/rs6000/rs6000.md (ALTIVEC_DFORM): Likewise.
20114         (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
20115         (Splitters for DI constants in Altivec registers): Likewise.
20116         * config/rs6000/vsx.md (vsx_set_<mode>_p9): Likewise.
20117         (vsx_set_v4sf_p9): Likewise.
20118         (vsx_set_v4sf_p9_zero): Likewise.
20119         (vsx_insert_extract_v4sf_p9): Likewise.
20120         (vsx_insert_extract_v4sf_p9_2): Likewise.
20122 2017-07-25  Carl Love  <cel@us.ibm.com>
20124         * doc/extend.texi: Update the built-in documentation file for the
20125         existing built-in functions
20126         vector signed char vec_cnttz (vector signed char);
20127         vector unsigned char vec_cnttz (vector unsigned char);
20128         vector signed short vec_cnttz (vector signed short);
20129         vector unsigned short vec_cnttz (vector unsigned short);
20130         vector signed int vec_cnttz (vector signed int);
20131         vector unsigned int vec_cnttz (vector unsigned int);
20132         vector signed long long vec_cnttz (vector signed long long);
20133         vector unsigned long long vec_cnttz (vector unsigned long long);
20135 2017-07-25  Andrew Pinski  <apinski@cavium.com>
20137         * tree-ssa-uninit.c (warn_uninitialized_vars): Don't warn about memory
20138         accesses where the use is for the first operand of a BIT_INSERT.
20140 2017-07-25  Jim Wilson  <jim.wilson@linaro.org>
20142         PR bootstrap/81521
20143         * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
20144         for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
20146 2017-07-25  Jim Wilson  <jim.wilson@linaro.org>
20148         * config/i386/gstabs.h: Delete.
20149         * config/i386/openbsd.h, config/i386/t-openbsd: Likewise.
20151 2017-07-25  Uros Bizjak  <ubizjak@gmail.com>
20153         * config/i386/i386.c (ix86_decompose_address): Do not check for
20154         register RTX when looking at index_reg or base_reg.
20155         * config/i386/i386.h (INCOMING_RETURN_ADDR_RTX): Use stack_pointer_rtx.
20157 2017-07-25  Eric Botcazou  <ebotcazou@adacore.com>
20159         * gimple.c (gimple_assign_set_rhs_with_ops): Do not ask gsi_replace
20160         to update EH info here.
20162 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
20164         * match.pd ((X * CST1) * CST2): Simplify to X * (CST1 * CST2).
20166 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
20168         * match.pd ((X * CST) * Y): Reassociate to (X * Y) * CST.
20170 2017-07-25  Torsten Duwe  <duwe@suse.de>
20172         * common.opt: Introduce -fpatchable-function-entry
20173         command line option, and its variables function_entry_patch_area_size
20174         and function_entry_patch_area_start.
20175         * opts.c (common_handle_option): Add -fpatchable_function_entry_ case,
20176         including a two-value parser.
20177         * target.def (print_patchable_function_entry): New target hook.
20178         * targhooks.h (default_print_patchable_function_entry): New function.
20179         * targhooks.c (default_print_patchable_function_entry): Likewise.
20180         * toplev.c (process_options): Switch off IPA-RA if
20181         patchable function entries are being generated.
20182         * varasm.c (assemble_start_function): Look at the
20183         patchable-function-entry command line switch and current
20184         function attributes and maybe generate NOP instructions by
20185         calling the print_patchable_function_entry hook.
20186         * doc/extend.texi: Document patchable_function_entry attribute.
20187         * doc/invoke.texi: Document -fpatchable_function_entry
20188         command line option.
20189         * doc/tm.texi.in (TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY):
20190         New target hook.
20191         * doc/tm.texi: Re-generate.
20193 2017-07-25  Jakub Jelinek  <jakub@redhat.com>
20195         PR target/81532
20196         * config/i386/constraints.md (Yd, Ye): Use ALL_SSE_REGS for
20197         TARGET_AVX512DQ rather than TARGET_AVX512BW.
20199 2017-07-25  Tamar Christina  <tamar.christina@arm.com>
20201         * config/arm/parsecpu.awk (all_cores): Remove duplicates.
20203 2017-07-25  Richard Biener  <rguenther@suse.de>
20205         PR tree-optimization/81455
20206         * tree-ssa-loop-unswitch.c (find_loop_guard): Make sure to
20207         not walk in cycles when looking for guards.
20209 2017-07-25  Richard Biener  <rguenther@suse.de>
20211         PR tree-optimization/81529
20212         * tree-vect-stmts.c (process_use): Disregard live induction PHIs
20213         when optimizing backedge uses.
20215 2017-07-25  David Edelsohn  <dje.gcc@gmail.com>
20217         * dwarf2asm.c (dw2_asm_output_nstring): Encode double quote
20218         character for AIX.
20219         * dwarf2out.c (output_macinfo): Copy debug_line_section_label
20220         to dl_section_ref.  On AIX, append an expression to subtract
20221         the size of the section length to dl_section_ref.
20223 2017-07-25  Segher Boessenkool  <segher@kernel.crashing.org>
20225         * configure.ac: If any of the config.* scripts fail, exit 1.
20226         * configure: Regenerate.
20228 2017-07-25  Richard Biener  <rguenther@suse.de>
20230         PR middle-end/81546
20231         * tree-ssa-operands.c (verify_imm_links): Remove cap on number
20232         of immediate uses, be more verbose on errors.
20234 2017-07-25  Richard Biener  <rguenther@suse.de>
20236         PR tree-optimization/81510
20237         * tree-vect-loop.c (vect_is_simple_reduction): When the
20238         reduction stmt is not inside the loop bail out.
20240 2017-07-25  Richard Biener  <rguenther@suse.de>
20242         PR tree-optimization/81303
20243         * tree-vect-loop-manip.c (vect_loop_versioning): Build
20244         profitability check against LOOP_VINFO_NITERSM1.
20246 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
20248         * domwalk.c (cmp_bb_postorder): Simplify.
20249         (sort_bbs_postorder): New function.  Use it...
20250         (dom_walker::walk): ...here to optimize common cases.
20252 2017-07-25  Martin Liska  <mliska@suse.cz>
20254         PR ipa/81520
20255         * ipa-visibility.c (function_and_variable_visibility): Make the
20256         redirection just on target that supports aliasing.
20257         Fix GNU coding style.
20259 2017-07-25  Sebastian Huber  <sebastian.huber@embedded-brains.de>
20261         PR libgcc/61152
20262         * config/aarch64/rtems.h: Add GCC Runtime Library Exception.
20263         Format changes.
20264         * config/arm/rtems.h: Likewise.
20265         * config/bfin/rtems.h: Likewise.
20266         * config/i386/rtemself.h: Likewise.
20267         * config/lm32/rtems.h: Likewise.
20268         * config/m32c/rtems.h: Likewise.
20269         * config/m68k/rtemself.h: Likewise.
20270         * config/microblaze/rtems.h: Likewise.
20271         * config/mips/rtems.h: Likewise.
20272         * config/moxie/rtems.h: Likewise.
20273         * config/nios2/rtems.h: Likewise.
20274         * config/powerpcspe/rtems.h: Likewise.
20275         * config/rs6000/rtems.h: Likewise.
20276         * config/rtems.h: Likewise.
20277         * config/sh/rtems.h: Likewise.
20278         * config/sh/rtemself.h: Likewise.
20279         * config/sparc/rtemself.h: Likewise.
20281 2017-07-25  Georg-Johann Lay  <avr@gjlay.de>
20283         PR 81487
20284         * hsa-brig.c (brig_init): Use xasprintf instead of asprintf.
20285         * gimple-pretty-print.c (dump_profile, dump_probability): Same.
20286         * tree-ssa-structalias.c (alias_get_name): Same.
20288 2017-07-25  Bin Cheng  <bin.cheng@arm.com>
20290         PR target/81414
20291         * config/aarch64/cortex-a57-fma-steering.c (analyze): Skip fmul/fmac
20292         instructions if no du chain is found.
20294 2017-07-25  Georg-Johann Lay  <avr@gjlay.de>
20296         * config/avr/avr-log.c (avr_log_vadump) ['T']: Print NULL-TREE.
20298 2017-07-25  Richard Biener  <rguenther@suse.de>
20300         PR middle-end/81505
20301         * fold-const.c (fold_negate_const): TREE_OVERFLOW should be
20302         sticky.
20304 2017-07-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
20306         * config/rs6000/rs6000-cpus.def (ISA_2_6_MASKS_SERVER): Delete
20307         upper-regs options.
20308         (ISA_2_7_MASKS_SERVER): Likewise.
20309         (ISA_3_0_MASKS_IEEE): Likewise.
20310         (OTHER_P8_VECTOR_MASKS): Likewise.
20311         (OTHER_VSX_VECTOR_MASKS): Likewise.
20312         (POWERPC_MASKS): Likewise.
20313         (power7 cpu): Use ISA_2_6_MASKS_SERVER instead of using a
20314         duplicate list of options.
20315         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove
20316         explicit -mupper-regs options.
20317         * config/rs6000/rs6000.opt (-mvsx-scalar-memory): Delete
20318         -mupper-regs* options.  Delete -mvsx-scalar-memory, which was an
20319         alias for -mupper-regs-df.
20320         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
20321         (rs6000_init_hard_regno_mode_ok): Likewise.
20322         (rs6000_option_override_internal): Likewise.
20323         (rs6000_opt_masks): Likewise.
20324         * config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Define upper regs
20325         options in terms of whether -mvsx or -mpower8-vector was used.
20326         (TARGET_UPPER_REGS_DI): Likewise.
20327         (TARGET_UPPER_REGS_SF): Likewise.
20328         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete the
20329         -mupper-regs-* options.
20331 2017-07-24  Segher Boessenkool  <segher@kernel.crashing.org>
20333         * passes.c (emergency_dump_function): Print some empty lines and a
20334         header before the RTL dump.
20336 2017-07-24  Segher Boessenkool  <segher@kernel.crashing.org>
20338         * cfgrtl.c (rtl_dump_bb): Don't call NEXT_INSN on NULL.
20340 2017-07-24  Wilco Dijkstra  <wdijkstr@arm.com>
20342         PR target/79041
20343         * config/aarch64/aarch64.c (aarch64_classify_symbol):
20344         Avoid SYMBOL_SMALL_ABSOLUTE for literals with pc-relative literals.
20346 2017-07-24  Carl Love  <cel@us.ibm.com>
20348         * config/rs6000/rs6000-c.c: Add support for built-in functions
20349         vector float vec_extract_fp32_from_shorth (vector unsigned short);
20350         vector float vec_extract_fp32_from_shortl (vector unsigned short);
20351         * config/rs6000/altivec.h (vec_extract_fp_from_shorth,
20352         vec_extract_fp_from_shortl): Add defines for the two builtins.
20353         * config/rs6000/rs6000-builtin.def (VEXTRACT_FP_FROM_SHORTH,
20354         VEXTRACT_FP_FROM_SHORTL): Add BU_P9V_OVERLOAD_1 and BU_P9V_VSX_1
20355         new builtins.
20356         * config/rs6000/vsx.md vsx_xvcvhpsp): Add define_insn.
20357         (vextract_fp_from_shorth, vextract_fp_from_shortl): Add define_expands.
20358         * doc/extend.texi: Update the built-in documentation file for the
20359         new built-in function.
20361 2017-07-24  Jakub Jelinek  <jakub@redhat.com>
20363         PR bootstrap/81521
20364         * tree.def: Remove TYPE_METHODS documentation, adjust TYPE_FIELDS
20365         documentation.
20366         * doc/generic.texi: Likewise.
20367         * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
20368         for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
20370 2017-07-24  Jackson Woodruff  <jackson.woodruff@arm.com>
20372         * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): New.
20373         (aarch64_mls_elt_merge<mode>): Likewise.
20375 2017-07-23  Krister Walfridsson  <krister.walfridsson@gmail.com>
20377         * config.gcc (*-*-netbsd*): Remove check for NetBSD versions not
20378         having __cxa_atexit.
20380 2017-07-23  Michael Collison  <michael.collison@arm.com>
20382         * config/arm/arm.c (arm_option_override): Deprecate
20383         use of -mstructure-size-boundary.
20384         * config/arm/arm.opt: Deprecate -mstructure-size-boundary.
20385         * doc/invoke.texi: Deprecate -mstructure-size-boundary.
20387 2017-07-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20389         PR target/80695
20390         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
20391         Reduce cost estimate for direct moves.
20393 2017-07-23  Uros Bizjak  <ubizjak@gmail.com>
20395         PR target/80569
20396         * config/i386/i386.c (ix86_option_override_internal): Disable
20397         BMI, BMI2 and TBM instructions for -m16.
20399 2017-07-21  Carl Love  <cel@us.ibm.com>
20401         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
20402         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
20403         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
20404         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
20405         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
20406         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
20407         VMULOSW): New enum "unspec" values.
20408         (altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
20409         altivec_vmulosw): New patterns.
20410         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
20411         VMULOSW): Add definitions.
20413 2017-07-21  Jim Wilson  <jim.wilson@linaro.org>
20415         * config/aarch64/aarch64-cores.def (falkor): Add AARCH64_FL_RDMA.
20416         (qdf24xx): Likewise.
20417         * config/aarch64/aarch64-options-extensions.def (rdma); New.
20418         * config/aarch64/aarch64.h (AARCH64_FL_RDMA): New.
20419         (AARCH64_FL_V8_1): Renumber.
20420         (AARCH64_FL_FOR_ARCH8_1): Add AARCH64_FL_RDMA.
20421         (AARCH64_ISA_RDMA): Use AARCH64_FL_RDMA.
20422         * config/aarch64/arm_neon.h: Use +rdma instead of arch=armv8.1-a.
20423         * doc/invoke.texi (AArch64 Options): Mention +rmda in -march docs.  Add
20424         rdma to feature modifiers list.
20426 2017-07-21  Yury Gribov  <tetra2005@gmail.com>
20428         PR middle-end/56727
20429         * ipa-visibility (function_and_variable_visibility): Convert
20430         recursive PLT call to direct call if appropriate.
20432 2017-07-21  Andrew Pinski  <apinski@cavium.com>
20434         * tree-ssa-sccvn.c (vn_nary_op_eq): Check BIT_INSERT_EXPR's
20435         operand 1 to see if the types precision matches.
20436         * fold-const.c (operand_equal_p): Likewise.
20438 2017-07-21  Richard Biener  <rguenther@suse.de>
20440         PR tree-optimization/81303
20441         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Pass
20442         in datarefs vector.  Allow NULL dr0 for no peeling cost estimate.
20443         (vect_peeling_hash_get_lowest_cost): Adjust.
20444         (vect_enhance_data_refs_alignment): Likewise.  Use
20445         vect_get_peeling_costs_all_drs to compute the penalty for no
20446         peeling to match up costs.
20448 2017-07-21  Richard Biener  <rguenther@suse.de>
20450         PR tree-optimization/81500
20451         * tree-vect-loop.c (vect_is_simple_reduction): Properly fail if
20452         we didn't identify a reduction path.
20454 2017-07-21  Tom de Vries  <tom@codesourcery.com>
20455             Cesar Philippidis  <cesar@codesourcery.com>
20457         PR gcov-profile/81442
20458         * config/nvptx/nvptx.c (nvptx_goacc_reduction_init): Add missing edge
20459         probabilities.
20461 2017-07-21  Tom de Vries  <tom@codesourcery.com>
20463         PR lto/81430
20464         * config/nvptx/nvptx.c (nvptx_override_options_after_change): New
20465         function.
20466         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define to
20467         nvptx_override_options_after_change.
20469 2017-07-21  Ulrich Drepper  <drepper@redhat.com>
20471         * dwarf2out.c (output_file_names): Avoid double testing for
20472         dwarf_version >= 5.
20474 2017-07-21  Georg-Johann Lay  <avr@gjlay.de>
20476         * doc/invoke.texi (AVR Built-in Functions): Re-layout section.
20478 2016-07-21  Jan Hubicka  <hubicka@ucw.cz>
20480         * cfgcleanup.c (flow_find_cross_jump): Do not crossjump across
20481         hot/cold regions.
20482         (try_crossjump_to_edge): Do not punt on partitioned functions.
20484 2016-07-21  Jan Hubicka  <hubicka@ucw.cz>
20486         * bb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges):
20487         Put all BBs reachable only via paths crossing cold region to cold
20488         region.
20489         * cfgrtl.c (find_bbs_reachable_by_hot_paths): New function.
20491 2016-07-21  Richard Biener  <rguenther@suse.de>
20493         PR tree-optimization/81303
20494         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Take
20495         into account prologue and epilogue iterations when raising
20496         min_profitable_iters to sth at least covering one vector iteration.
20498 2017-07-21  Tamar Christina  <tamar.christina@arm.com>
20500         * config/arm/arm.c (arm_test_cpu_arch_dat):
20501         Check for overlap.
20503 2017-07-20  Nathan Sidwell  <nathan@acm.org>
20505         Remove TYPE_METHODS.
20506         * tree.h (TYPE_METHODS): Delete.
20507         * dwarf2out.c (gen_member_die): Member fns are on TYPE_FIELDS.
20508         * dbxout.c (dbxout_type_fields): Ignore FUNCTION_DECLs.
20509         (dbxout_type_methods): Scan TYPE_FIELDS.
20510         (dbxout_type): Don't check TYPE_METHODS here.
20511         * function.c (use_register_for_decl): Always ignore register for
20512         class types when not optimizing.
20513         * ipa-devirt.c (odr_types_equivalent_p): Delete TYPE_METHODS scan.
20514         * tree.c (free_lang_data_in_type): Stitch out member functions and
20515         templates from TYPE_FIELDS.
20516         (build_distinct_type_copy, verify_type_variant,
20517         verify_type): Member fns are on TYPE_FIELDS.
20518         * tree-dump.c (dequeue_and_dump): No TYPE_METHODS.
20519         * tree-pretty-print.c (dump_generic_node): Likewise.
20521 2017-07-20  Jakub Jelinek  <jakub@redhat.com>
20523         PR target/80846
20524         * config/i386/i386.c (ix86_expand_vector_init_general): Handle
20525         V2TImode and V4TImode.
20526         (ix86_expand_vector_extract): Likewise.
20527         * config/i386/sse.md (VMOVE): Enable V4TImode even for just
20528         TARGET_AVX512F, instead of only for TARGET_AVX512BW.
20529         (ssescalarmode): Handle V4TImode and V2TImode.
20530         (VEC_EXTRACT_MODE): Add V4TImode and V2TImode.
20531         (*vec_extractv2ti, *vec_extractv4ti): New insns.
20532         (VEXTRACTI128_MODE): New mode iterator.
20533         (splitter for *vec_extractv?ti first element): New.
20534         (VEC_INIT_MODE): New mode iterator.
20535         (vec_init<mode>): Consolidate 3 expanders into one using
20536         VEC_INIT_MODE mode iterator.
20538 2017-07-20  Alexander Monakov  <amonakov@ispras.ru>
20540         * lra-assigns.c (pseudo_compare_func): Fix comparison step based on
20541         non_spilled_static_chain_regno_p.
20543 2017-07-20  Alexander Monakov  <amonakov@ispras.ru>
20545         * gimple-ssa-store-merging.c (sort_by_bitpos): Return 0 on equal bitpos.
20547 2017-07-20  Jan Hubicka  <hubicka@ucw.cz>
20549         * bb-reorder.c (connect_traces): Allow copying of blocks within
20550         single partition.
20552 2017-07-20  Richard Biener  <rguenther@suse.de>
20554         * gimple.h (gimple_phi_result): Add gphi * overload.
20555         (gimple_phi_result_ptr): Likewise.
20556         (gimple_phi_arg): Likewise.  Adjust index assert to only
20557         allow actual argument accesses rather than all slots available
20558         by capacity.
20559         (gimple_phi_arg_def): Add gphi * overload.
20560         * tree-phinodes.c (make_phi_node): Initialize only actual
20561         arguments.
20562         (resize_phi_node): Clear memory not covered by old node,
20563         do not initialize excess argument slots.
20564         (reserve_phi_args_for_new_edge): Initialize new argument slot
20565         completely.
20567 2017-07-20  Bin Cheng  <bin.cheng@arm.com>
20569         PR tree-optimization/81388
20570         Revert r238585:
20571         2016-07-21  Bin Cheng  <bin.cheng@arm.com>
20573         * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Clean up
20574         by removing computation of may_be_zero.
20576 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
20577             Tom de Vries  <tom@codesourcery.com>
20579         PR middle-end/81030
20580         * cfgbuild.c (find_many_sub_basic_blocks): Update REG_BR_PROB note
20581         when gimple level profile disagrees with what RTL expander did.
20583 2017-07-20  Richard Biener  <rguenther@suse.de>
20585         PR tree-optimization/61171
20586         * tree-vectorizer.h (slp_instance): Add reduc_phis member.
20587         (vect_analyze_stmt): Add slp instance parameter.
20588         (vectorizable_reduction): Likewise.
20589         * tree-vect-loop.c (vect_analyze_loop_operations): Adjust.
20590         (vect_is_simple_reduction): Deal with chains not detected
20591         as SLP reduction chain, specifically not properly associated
20592         chains containing a mix of plus/minus.
20593         (get_reduction_op): Remove.
20594         (get_initial_defs_for_reduction): Simplify, pass in whether
20595         this is a reduction chain, pass in the SLP node for the PHIs.
20596         (vect_create_epilog_for_reduction): Get the SLP instance as
20597         arg and adjust.
20598         (vectorizable_reduction): Get the SLP instance as arg.
20599         During analysis remember the SLP node with the PHIs in the
20600         instance.  Simplify getting at the vectorized reduction PHIs.
20601         * tree-vect-slp.c (vect_slp_analyze_node_operations): Pass
20602         through SLP instance.
20603         (vect_slp_analyze_operations): Likewise.
20604         * tree-vect-stms.c (vect_analyze_stmt): Likewise.
20605         (vect_transform_stmt): Likewise.
20607 2017-07-20  Tom de Vries  <tom@codesourcery.com>
20609         PR tree-optimization/81489
20610         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Move
20611         read of phi arg location to before loop that modifies phi.
20613 2017-07-20  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
20615         * match.pd (((m1 >/</>=/<= m2) * d -> (m1 >/</>=/<= m2) ? d : 0):
20616         New pattern.
20618 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
20620         PR middle-end/81331
20621         * except.c (execute): Fix ordering issue.
20623 2018-07-19  Segher Boessenkool  <segher@kernel.crashing.org>
20625         PR rtl-optimization/81423
20626         * combine.c (make_compound_operation_int): Don't try to optimize
20627         the AND of a SUBREG of an LSHIFTRT if that SUBREG is paradoxical.
20629 2017-07-19  Segher Boessenkool  <segher@kernel.crashing.org>
20631         PR rtl-optimization/81423
20632         * simplify-rtx.c (simplify_truncation): Handle truncating an IOR
20633         with a constant that is -1 in the truncated to mode.
20635 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
20637         * predict.c (propagate_unlikely_bbs_forward): Break out from ...
20638         (determine_unlikely_bbs): ... here.
20639         * predict.h (propagate_unlikely_bbs_forward): Declare.
20640         * cfgexpand.c (pass_expand::execute): Use it.
20641         * bb-reorder.c (sanitize_hot_paths): Do not consider known to be
20642         unlikely edges.
20643         (find_rarely_executed_basic_blocks_and_crossing_edges): Use
20644         propagate_unlikely_bbs_forward.
20646 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
20648         PR middle-end/81331
20649         * except.c (maybe_add_nop_after_section_switch): New function.
20650         (execute): Use it.
20652 2017-07-19  Tom de Vries  <tom@codesourcery.com>
20654         * gimple.h (gimple_phi_set_arg): Make assert more strict.
20656 2017-07-19  Tom de Vries  <tom@codesourcery.com>
20658         * gimple.h (gimple_phi_arg): Make assert more strict.
20660 2017-07-19  Steven Munroe  <munroesj@gcc.gnu.org>
20662         * config.gcc (powerpc*-*-*): Add mmintrin.h.
20663         * config/rs6000/mmintrin.h: New file.
20664         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include mmintrin.h.
20666 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
20668         PR tree-optimization/81346
20669         * match.pd: Optimize (X - 1U) <= INT_MAX-1U into (int) X > 0.
20671 2017-07-19  Tom de Vries  <tom@codesourcery.com>
20673         * config/nvptx/nvptx.md (VECIM): Add V2DI.
20675 2017-07-19  Tom de Vries  <tom@codesourcery.com>
20677         * config/nvptx/nvptx-modes.def: Add V2DImode.
20678         * config/nvptx/nvptx-protos.h (nvptx_data_alignment): Declare.
20679         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2DImode.
20680         (nvptx_output_mov_insn): Handle lack of mov.b128.
20681         (nvptx_print_operand): Handle 'H' and 'L' codes.
20682         (nvptx_vector_mode_supported): Allow V2DImode.
20683         (nvptx_preferred_simd_mode): New function.
20684         (nvptx_data_alignment): New function.
20685         (TARGET_VECTORIZE_PREFERRED_SIMD_MODE): Redefine to
20686         nvptx_preferred_simd_mode.
20687         * config/nvptx/nvptx.h (STACK_BOUNDARY, BIGGEST_ALIGNMENT): Change from
20688         64 to 128 bits.
20689         (DATA_ALIGNMENT): Define.  Set to nvptx_data_alignment.
20691 2017-07-19  Tom de Vries  <tom@codesourcery.com>
20693         * config/nvptx/nvptx-modes.def: New file.  Add V2SImode.
20694         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2SImode.
20695         (nvptx_vector_mode_supported): New function.  Allow V2SImode.
20696         (TARGET_VECTOR_MODE_SUPPORTED_P): Redefine to nvptx_vector_mode_supported.
20697         * config/nvptx/nvptx.md (VECIM): New mode iterator. Add V2SI.
20698         (mov<VECIM>_insn): New define_insn.
20699         (define_expand "mov<VECIM>): New define_expand.
20701 2017-07-19  Tom de Vries  <tom@codesourcery.com>
20703         * config/nvptx/nvptx.c (nvptx_print_operand): Handle v2 vector mode.
20705 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
20707         PR tree-optimization/81346
20708         * fold-const.h (fold_div_compare, range_check_type): Declare.
20709         * fold-const.c (range_check_type): New function.
20710         (build_range_check): Use range_check_type.
20711         (fold_div_compare): No longer static, rewritten into
20712         a match.pd helper function.
20713         (fold_comparison): Don't call fold_div_compare here.
20714         * match.pd (X / C1 op C2): New optimization using fold_div_compare
20715         as helper function.
20717 2017-07-19  Nathan Sidwell  <nathan@acm.org>
20719         * tree.h (TYPE_MINVAL, TYPE_MAXVAL): Rename to ...
20720         (TYPE_MIN_VALUE_RAW, TYPE_MAX_VALUE_RAW): ... these.
20721         * tree.c (find_decls_types_r, verify_type): Use
20722         TYPE_{MIN,MAX}_VALUE_RAW.
20723         * lto-streamer-out.c (DFS::DFS_write_tree_body): Likewise.
20724         (hash_tree): Likewise.
20725         * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
20726         Likewise.
20727         * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
20728         Likewise.
20730 2017-07-18  Tom de Vries  <tom@codesourcery.com>
20732         PR middle-end/81464
20733         * omp-expand.c (expand_omp_for_static_chunk): Handle
20734         equal-argument loop exit phi.
20736 2017-07-18  Uros Bizjak  <ubizjak@gmail.com>
20738         PR target/81471
20739         * config/i386/i386.md (rorx_immediate_operand): New mode attribute.
20740         (*bmi2_rorx<mode>3_1): Use rorx_immediate_operand as
20741         operand 2 predicate.
20742         (*bmi2_rorxsi3_1_zext): Use const_0_to_31_operand as
20743         operand 2 predicate.
20744         (ror,rol -> rorx splitters): Use const_int_operand as
20745         operand 2 predicate.
20747 2017-06-18  Richard Biener  <rguenther@suse.de>
20749         PR tree-optimization/81410
20750         * tree-vect-stmts.c (vectorizable_load): Properly adjust for
20751         the gap in the ! slp_perm SLP case after each group.
20753 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
20755         PR middle-end/81463
20756         * cfgloopmanip.c (scale_loop_profile): Watch out for zero frequency
20757         again.
20759 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
20761         PR middle-end/81462
20762         * predict.c (set_even_probabilities): Cleanup; do not affect
20763         probabilities that are already known.
20764         (combine_predictions_for_bb): Call even when count is set.
20766 2017-07-18  Nathan Sidwell  <nathan@acm.org>
20768         * tree-parloops.c (try_transform_to_exit_first_loop_alt): Use
20769         TYPE_MAX_VALUE.
20771 2017-07-18  Bin Cheng  <bin.cheng@arm.com>
20773         PR target/81408
20774         * tree-ssa-loop-niter.c (number_of_iterations_exit): Dump missed
20775         optimization for loop niter analysis.
20777 2017-07-18  Georg-Johann Lay  <avr@gjlay.de>
20779         PR target/81473
20780         * config/avr/avr.c (avr_optimize_casesi): Don't use
20781         INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX.
20783 2017-07-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
20785         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Remove
20786         body_cost_vec from _vect_peel_extended_info.
20787         (vect_peeling_hash_get_lowest_cost): Do not set body_cost_vec.
20788         (vect_peeling_hash_choose_best_peeling): Remove body_cost_vec and
20789         npeel.
20791 2017-07-18  Bin Cheng  <bin.cheng@arm.com>
20793         * config/arm/arm.c (emit_unlikely_jump): Remove unused var.
20795 2017-07-18  Richard Biener  <rguenther@suse.de>
20797         PR tree-optimization/80620
20798         PR tree-optimization/81403
20799         * tree-ssa-pre.c (phi_translate_1): Clear range and points-to
20800         info when re-using a VN table entry.
20802 2017-07-18  Richard Biener  <rguenther@suse.de>
20804         PR tree-optimization/81418
20805         * tree-vect-loop.c (vectorizable_reduction): Properly compute
20806         vectype_in.  Verify that with lane-reducing reduction operations
20807         we have a single def-use cycle.
20809 2017-07-17  Carl Love  <cel@us.ibm.com>
20811         Revert commit r249424   2017-06-20  Carl Love  <cel@us.ibm.com>
20813         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
20814         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
20815         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
20816         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
20817         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
20818         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
20819         VMULOSW): New enum "unspec" values.
20820         (vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
20821         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
20822         altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
20823         altivec_vmulosw): New patterns.
20824         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
20825         VMULOSW): Add definitions.
20827 2017-07-17  Uros Bizjak  <ubizjak@gmail.com>
20829         * config/alpha/alpha.c: Include predict.h.
20831 2017-07-17  Yury Gribov  <tetra2005@gmail.com>
20833         * tree-vrp.c (compare_assert_loc): Fix comparison function
20834         to return predictable results.
20836 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
20838         * config/arc/arc.md (adddi3): Remove support for mexpand-adddi
20839         option.
20840         (subdi3): Likewise.
20841         * config/arc/arc.opt (mexpand-adddi): Deprecate it.
20842         * doc/invoke.texi (mexpand-adddi): Update text.
20844 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
20846         * config/arc/arc.md (clzsi2): Expand to an arc_clzsi2 instruction
20847         that also clobbers the CC register. The old expand code is moved
20848         to ...
20849         (*arc_clzsi2): ... here.
20850         (ctzsi2): Expand to an arc_ctzsi2 instruction that also clobbers
20851         the CC register. The old expand code is moved to ...
20852         (arc_ctzsi2): ... here.
20854 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
20856         * config/arc/arc.opt (mindexed-loads): Use initial value
20857         TARGET_INDEXED_LOADS_DEFAULT.
20858         (mauto-modify-reg): Use initial value
20859         TARGET_AUTO_MODIFY_REG_DEFAULT.
20860         * config/arc/elf.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
20861         (TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
20862         * config/arc/linux.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
20863         (TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
20865 2017-07-17  Martin Liska  <mliska@suse.cz>
20867         PR sanitizer/81302
20868         * opts.c (finish_options): Do not allow -fgnu-tm
20869         w/ -fsanitize={kernel-,}address.  Say sorry.
20871 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
20873         PR target/81369
20874         * tree-loop-distribution.c (classify_partition): Only assert on
20875         numer of iterations.
20876         (merge_dep_scc_partitions): Delete prameter.  Update function call.
20877         (distribute_loop): Remove code handling loop with unknown niters.
20878         (pass_loop_distribution::execute): Skip loop with unknown niters.
20880 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
20882         PR target/81369
20883         * tree-loop-distribution.c (merge_dep_scc_partitions): Sink call to
20884         function sort_partitions_by_post_order.
20886 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
20888         PR tree-optimization/81374
20889         * tree-loop-distribution.c (pass_loop_distribution::execute): Record
20890         the max index of basic blocks, rather than number of basic blocks.
20892 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
20894         * config/arc/arc-protos.h (arc_legitimate_pc_offset_p): Remove
20895         proto.
20896         (arc_legitimate_pic_operand_p): Likewise.
20897         * config/arc/arc.c (arc_legitimate_pic_operand_p): Remove
20898         function.
20899         (arc_needs_pcl_p): Likewise.
20900         (arc_legitimate_pc_offset_p): Likewise.
20901         (arc_legitimate_pic_addr_p): Remove LABEL_REF case, as this
20902         function is also used in constrains.md.
20903         (arc_legitimate_constant_p): Use arc_legitimate_pic_addr_p to
20904         validate pic constants. Handle CONST_INT, CONST_DOUBLE, MINUS and
20905         PLUS.  Only return true/false in known cases, otherwise assert.
20906         (arc_legitimate_address_p): Remove arc_legitimate_pic_addr_p as it
20907         is already called in arc_legitimate_constant_p.
20908         * config/arc/arc.h (CONSTANT_ADDRESS_P): Consider also LABEL for
20909         pic addresses.
20910         (LEGITIMATE_PIC_OPERAND_P): Use
20911         arc_raw_symbolic_reference_mentioned_p function.
20912         * config/arc/constraints.md (Cpc): Use arc_legitimate_pic_addr_p
20913         function.
20914         (Cal): Likewise.
20915         (C32): Likewise.
20917 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
20918         Andrew Burgess  <andrew.burgess@embecosm.com>
20920         * config/arc/arc-protos.h (arc_compute_function_type): Change prototype.
20921         (arc_return_address_register): New function.
20922         * config/arc/arc.c (arc_handle_fndecl_attribute): New function.
20923         (arc_handle_fndecl_attribute): Add naked attribute.
20924         (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
20925         (TARGET_WARN_FUNC_RETURN): Likewise.
20926         (arc_allocate_stack_slots_for_args): New function.
20927         (arc_warn_func_return): Likewise.
20928         (machine_function): Change type fn_type.
20929         (arc_compute_function_type): Consider new naked function type,
20930         change function return type.
20931         (arc_must_save_register): Adapt to handle new
20932         arc_compute_function_type's return type.
20933         (arc_expand_prologue): Likewise.
20934         (arc_expand_epilogue): Likewise.
20935         (arc_return_address_regs): Delete.
20936         (arc_return_address_register): New function.
20937         (arc_epilogue_uses): Use above function.
20938         * config/arc/arc.h (arc_return_address_regs): Delete prototype.
20939         (arc_function_type): Change encoding, add naked type.
20940         (ARC_INTERRUPT_P): Change to handle the new encoding.
20941         (ARC_FAST_INTERRUPT_P): Likewise.
20942         (ARC_NORMAL_P): Define.
20943         (ARC_NAKED_P): Likewise.
20944         (arc_compute_function_type): Delete prototype.
20945         * config/arc/arc.md (in_ret_delay_slot): Use
20946         arc_return_address_register function.
20947         (simple_return): Likewise.
20948         (p_return_i): Likewise.
20950 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
20952         PR tree-optimization/81428
20953         * match.pd (X / X -> one): Don't optimize _Fract divisions, as 1
20954         can't be built for those types.
20956 2017-07-17  Georg-Johann Lay  <avr@gjlay.de>
20958         Remove stuff dead since r239246.
20960         * config/avr/avr-arch.h (avr_inform_devices): Remove dead proto.
20961         * config/avr/avr-devices.c (mcu_name, comparator, avr_mcus_str)
20962         (avr_inform_devices): Remove dead stuff.
20964 2017-07-17  Tamar Christina  <tamar.christina@arm.com>
20966         * config/arm/arm_neon.h: Fix softp typo.
20968 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
20970         PR tree-optimization/81365
20971         * tree-ssa-phiprop.c (propagate_with_phi): When considering hoisting
20972         aggregate moves onto bb predecessor edges, make sure there are no
20973         loads that could alias the lhs in between the start of bb and the
20974         loads from *phi.
20976 2017-07-17  Georg-Johann Lay  <avr@gjlay.de>
20978         PR 80929
20979         * config/avr/avr.c (avr_mul_highpart_cost): New static function.
20980         (avr_rtx_costs_1) [TRUNCATE]: Use it to compute mul_highpart cost.
20981         [LSHIFTRT, outer_code = TRUNCATE]: Same.
20983 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
20985         PR tree-optimization/81396
20986         * tree-ssa-math-opts.c (struct symbolic_number): Add n_ops field.
20987         (init_symbolic_number): Initialize it to 1.
20988         (perform_symbolic_merge): Add n_ops from both operands into the new
20989         n_ops.
20990         (find_bswap_or_nop): Don't consider n->n == cmpnop computations
20991         without base_addr as useless if they need more than one operation.
20992         (bswap_replace): Handle !bswap case for NULL base_addr.
20994 2017-07-17  Tom de Vries  <tom@codesourcery.com>
20996         PR target/81069
20997         * config/nvptx/nvptx.c (nvptx_single): Insert diverging branch as late
20998         as possible.
21000 2017-07-17  Sebastian Huber  <sebastian.huber@embedded-brains.de>
21002         * config/sparc/rtemself.h (TARGET_OS_CPP_BUILTINS): Add
21003         conditional builtin define __FIX_LEON3FT_B2BST.
21005 2017-07-17  Daniel Cederman  <cederman@gaisler.com>
21007         * config/sparc/t-rtems: Add mfix-gr712rc multilibs. Replace
21008         MULTILIB_EXCEPTIONS with MULTILIB_REQUIRED. Match -mfix-gr712rc
21009         with -mfix-ut700.
21011 2017-07-16  Eric Botcazou  <ebotcazou@adacore.com>
21013         PR rtl-optimization/81424
21014         * optabs.c (prepare_cmp_insn): Use copy_to_reg instead of force_reg
21015         to remove potential trapping from operands if -fnon-call-exceptions.
21017 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
21019         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Use
21020         profile_proability for scalling.
21021         * scale_profile_for_vect_loop.c (scale_profile_for_vect_loop): Likewise.
21023 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
21025         * cgraph.c (cgraph_edge::redirect_call_stmt_to_caller): Cleanup.
21027 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
21029         * cfgloopmanip.c (scale_loop_profile): Avoid use of REG_BR_PROB_BASE
21030         fixpoint arithmetics.
21032 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
21034         * tree-ssa-loop-unswitch.c (hoist_guard): Avoid use of REG_BR_PROB_BASE
21035         fixpoint arithmetics.
21037 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
21039         * asan.c (create_cond_insert_point): Avoid use of REG_BR_PROB_BASE
21040         fixpoint arithmetics.
21042 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
21044         * profile-count.h (profile_probability::from_reg_br_prob_note,
21045         profile_probability::to_reg_br_prob_note): New functions.
21046         * doc/rtl.texi (REG_BR_PROB_NOTE): Update documentation.
21047         * reg-notes.h (REG_BR_PROB, REG_BR_PRED): Update docs.
21048         * predict.c (probability_reliable_p): Update.
21049         (edge_probability_reliable_p): Update.
21050         (br_prob_note_reliable_p): Update.
21051         (invert_br_probabilities): Update.
21052         (add_reg_br_prob_note): New function.
21053         (combine_predictions_for_insn): Update.
21054         * asan.c (asan_clear_shadow): Update.
21055         * cfgbuild.c (compute_outgoing_frequencies): Update.
21056         * cfgrtl.c (force_nonfallthru_and_redirect): Update.
21057         (update_br_prob_note): Update.
21058         (rtl_verify_edges): Update.
21059         (purge_dead_edges): Update.
21060         (fixup_reorder_chain): Update.
21061         * emit-rtl.c (try_split): Update.
21062         * ifcvt.c (cond_exec_process_insns): Update.
21063         (cond_exec_process_if_block): Update.
21064         (dead_or_predicable): Update.
21065         * internal-fn.c (expand_addsub_overflow): Update.
21066         (expand_neg_overflow): Update.
21067         (expand_mul_overflow): Update.
21068         * loop-doloop.c (doloop_modify): Update.
21069         * loop-unroll.c (compare_and_jump_seq): Update.
21070         * optabs.c (emit_cmp_and_jump_insn_1): Update.
21071         * predict.h: Update.
21072         * reorg.c (mostly_true_jump): Update.
21073         * rtl.h: Update.
21074         * config/aarch64/aarch64.c (aarch64_emit_unlikely_jump): Update.
21075         * config/alpha/alpha.c (emit_unlikely_jump): Update.
21076         * config/arc/arc.c: (emit_unlikely_jump): Update.
21077         * config/arm/arm.c: (emit_unlikely_jump): Update.
21078         * config/bfin/bfin.c (cbranch_predicted_taken_p): Update.
21079         * config/frv/frv.c (frv_print_operand_jump_hint): Update.
21080         * config/i386/i386.c (ix86_expand_split_stack_prologue): Update.
21081         (ix86_print_operand): Update.
21082         (ix86_split_fp_branch): Update.
21083         (predict_jump): Update.
21084         * config/ia64/ia64.c (ia64_print_operand): Update.
21085         * config/mmix/mmix.c (mmix_print_operand): Update.
21086         * config/powerpcspe/powerpcspe.c (output_cbranch): Update.
21087         (rs6000_expand_split_stack_prologue): Update.
21088         * config/rs6000/rs6000.c: Update.
21089         * config/s390/s390.c (s390_expand_vec_strlen): Update.
21090         (s390_expand_vec_movstr): Update.
21091         (s390_expand_cs_tdsi): Update.
21092         (s390_expand_split_stack_prologue): Update.
21093         * config/sh/sh.c (sh_print_operand): Update.
21094         (expand_cbranchsi4): Update.
21095         (expand_cbranchdi4): Update.
21096         * config/sparc/sparc.c (output_v9branch): Update.
21097         * config/spu/spu.c (get_branch_target): Update.
21098         (ea_load_store_inline): Update.
21099         * config/tilegx/tilegx.c (cbranch_predicted_p): Update.
21100         * config/tilepro/tilepro.c: Update.
21102 2017-07-16  Eric Botcazou  <ebotcazou@adacore.com>
21104         * gimplify.c (mostly_copy_tree_r): Revert latest change.
21105         (gimplify_save_expr): Likewise.
21107 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
21109         * ipa-visibility.c (function_and_variable_visibility): Fix pasto.
21111 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
21113         * ipa-fnsummary.c (pass_data_ipa_fn_summary): Use
21114         TV_IPA_FNSUMMARY.
21115         * timevar.def (TV_IPA_FNSUMMARY): Define.
21117 2017-07-16  Daniel Cederman  <cederman@gaisler.com>
21119         * config/sparc/sparc.md (divdf3_fix): Add NOP to prevent back
21120         to back store errata sensitive sequence from being generated.
21121         (sqrtdf2_fix): Likewise.
21123 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
21125         * tree-ssa-threadupdate.c (compute_path_counts,
21126         update_joiner_offpath_counts): Use profile_probability.
21128 2017-07-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21130         Revert:
21131         2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21133         * config/arm/arm-c.c (arm_cpu_builtins): Define
21134         __ARM_FEATURE_NUMERIC_MAXMIN solely based on TARGET_VFP5.
21136 2017-07-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21138         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
21139         array entries to represent __ieee128 versions of the
21140         scalar_test_data_class, scalar_test_neg, scalar_extract_exp,
21141         scalar_extract_sig, and scalar_insert_exp built-in functions.
21142         (altivec_resolve_overloaded_builtin): Add special case handling
21143         for the __builtin_scalar_insert_exp function, as represented by
21144         the P9V_BUILTIN_VEC_VSIEDP constant.
21145         * config/rs6000/rs6000-builtin.def (VSEEQP): Add scalar extract
21146         exponent support for __ieee128 argument.
21147         (VSESQP): Add scalar extract signature support for __ieee128
21148         argument.
21149         (VSTDCNQP): Add scalar test negative support for __ieee128
21150         argument.
21151         (VSIEQP): Add scalar insert exponent support for __int128 argument
21152         with __ieee128 result.
21153         (VSIEQPF): Add scalar insert exponent support for __ieee128
21154         argument with __ieee128 result.
21155         (VSTDCQP): Add scalar test data class support for __ieee128
21156         argument.
21157         (VSTDCNQP): Add overload support for scalar test negative with
21158         __ieee128 argument.
21159         (VSTDCQP): Add overload support for scalar test data class
21160         __ieee128 argument.
21161         * config/rs6000/vsx.md (UNSPEC_VSX_SXSIG) Replace
21162         UNSPEC_VSX_SXSIGDP.
21163         (UNSPEC_VSX_SIEXPQP): New constant.
21164         (xsxexpqp): New insn for VSX scalar extract exponent quad
21165         precision.
21166         (xsxsigqp): New insn for VSX scalar extract significand quad
21167         precision.
21168         (xsiexpqpf): New insn for VSX scalar insert exponent quad
21169         precision with floating point argument.
21170         (xststdcqp): New expand for VSX scalar test data class quad
21171         precision.
21172         (xststdcnegqp): New expand for VSX scalar test negative quad
21173         precision.
21174         (xststdcqp): New insn to match expansions for VSX scalar test data
21175         class quad precision and VSX scalar test negative quad precision.
21176         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
21177         special case operand checking to enforce that second operand of
21178         VSX scalar test data class with quad precision argument is a 7-bit
21179         unsigned literal.
21180         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
21181         prototypes and descriptions of __ieee128 versions of
21182         scalar_extract_exp, scalar_extract_sig, scalar_insert_exp,
21183         scalar_test_data_class, and scalar_test_neg built-in functions.
21185 2016-07-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21187         PR tree-optimization/81162
21188         * gimple-ssa-strength-reduction.c (replace_mult_candidate): Don't
21189         replace a negate with an add.
21191 2017-07-14  James Greenhalgh  <james.greenhalgh@arm.com>
21193         * doc/invoke.texi (arm/-mcpu): Document +crypto.
21195 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21197         * config/arm/arm-c.c (arm_cpu_builtins): Define
21198         __ARM_FEATURE_NUMERIC_MAXMIN solely based on TARGET_VFP5.
21200 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21202         * config/arm/arm-cpus.in (cortex-r52): Add new entry.
21203         (armv8-r): Set ARM Cortex-R52 as default CPU.
21204         * config/arm/arm-tables.opt: Regenerate.
21205         * config/arm/arm-tune.md: Regenerate.
21206         * config/arm/driver-arm.c (arm_cpu_table): Add entry for ARM
21207         Cortex-R52.
21208         * doc/invoke.texi: Mention -mtune=cortex-r52 and availability of fp.dp
21209         extension for -mcpu=cortex-r52.
21211 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21213         * config/arm/arm-isa.h (isa_bit_FP_ARMv8): Delete enumerator.
21214         (ISA_FP_ARMv8): Define as ISA_FPv5 and ISA_FP_D32.
21215         * config/arm/arm-cpus.in (armv8-r): Define fp.sp as enabling FPv5.
21216         (fp-armv8): Define it as FP_ARMv8 only.
21217         config/arm/arm.h (TARGET_FPU_ARMV8): Delete.
21218         (TARGET_VFP_FP16INST): Define using TARGET_VFP5 rather than
21219         TARGET_FPU_ARMV8.
21220         config/arm/arm.c (arm_rtx_costs_internal): Replace checks against
21221         TARGET_FPU_ARMV8 by checks against TARGET_VFP5.
21222         * config/arm/arm-builtins.c (arm_builtin_vectorized_function): Define
21223         first ARM_CHECK_BUILTIN_MODE definition using TARGET_VFP5 rather
21224         than TARGET_FPU_ARMV8.
21225         * config/arm/arm-c.c (arm_cpu_builtins): Likewise for
21226         __ARM_FEATURE_NUMERIC_MAXMIN macro definition.
21227         * config/arm/arm.md (cmov<mode>): Condition on TARGET_VFP5 rather than
21228         TARGET_FPU_ARMV8.
21229         * config/arm/neon.md (neon_vrint): Likewise.
21230         (neon_vcvt): Likewise.
21231         (neon_<fmaxmin_op><mode>): Likewise.
21232         (<fmaxmin><mode>3): Likewise.
21233         * config/arm/vfp.md (l<vrint_pattern><su_optab><mode>si2): Likewise.
21234         * config/arm/predicates.md (arm_cond_move_operator): Check against
21235         TARGET_VFP5 rather than TARGET_FPU_ARMV8 and fix spacing.
21237 2017-07-14  Jackson Woodruff  <jackson.woodruff@arm.com>
21239         * config/aarch64/aarch64.c (aarch64_print_operand): Move comments
21240         to top of function.
21242 2017-07-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21244         * gimple-ssa-store-merging.c (clear_bit_region): Replace reference to
21245         loop in comment with memset.
21247 2017-07-14  Martin Liska  <mliska@suse.cz>
21249         * cfgexpand.c (expand_gimple_basic_block): Remove dead comment.
21250         * dwarf2out.c (is_java): Remove the function.
21251         (output_pubname): Remove usage of the function.
21252         (lower_bound_default): Remove usage of DW_LANG_Java.
21253         (gen_compile_unit_die): Likewise.
21254         * gcc.c: Remove compiler defaults for .java and .zip files.
21255         * gimple-expr.c (remove_suffix): Change as there's no longer
21256         extension than 4-letter one.
21257         * gimplify.c (mostly_copy_tree_r): Remove Java-special part.
21258         (gimplify_save_expr): Likewise.
21259         * ipa-utils.h (polymorphic_type_binfo_p): Remove the comment
21260         as it's possible even for other languages than Java.
21261         * langhooks.h (struct lang_hooks): Remove Java from a comment.
21262         * lto-opts.c (lto_write_options): Remove reference to Java.
21263         * opts.c (strip_off_ending): Update file extension handling.
21264         * tree-cfg.c (verify_gimple_call): Remove comment with Java.
21265         * tree-eh.c (lower_resx): Likewise.
21266         * tree.c (free_lang_data_in_type): Remove dead code.
21267         (find_decls_types_r): Likewise.
21268         (build_common_builtin_nodes): Remove Java from a comment.
21269         (verify_type): Remove dead code.
21270         * varasm.c (assemble_external): Remove Java from a comment.
21272 2017-07-14  Martin Liska  <mliska@suse.cz>
21274         * opts.c (finish_options): Add quotes.
21275         (common_handle_option): Likewise.
21277 2017-07-14  Martin Liska  <mliska@suse.cz>
21279         * dbxout.c (get_lang_number): Do not handle GNU Pascal.
21280         * dbxout.h (extern void dbxout_stab_value_internal_label_diff):
21281         Remove N_SO_PASCAL.
21282         * dwarf2out.c (lower_bound_default): Do not handle
21283         DW_LANG_Pascal83.
21284         (gen_compile_unit_die): Likewise.
21285         * gcc.c: Remove default extension binding for GNU Pascal.
21286         * stmt.c: Remove Pascal language from a comment.
21287         * xcoffout.c: Likewise.
21289 2017-07-13  David Malcolm  <dmalcolm@redhat.com>
21291         PR c/81405
21292         * diagnostic-show-locus.c (fixit_cmp): New function.
21293         (layout::layout): Sort m_fixit_hints.
21294         (column_range::column_range): Assert that the values are valid.
21295         (struct char_span): New struct.
21296         (correction::overwrite): New method.
21297         (struct source_line): New struct.
21298         (line_corrections::add_hint): Add assertions.  Reimplement memcpy
21299         calls in terms of classes source_line and char_span, and
21300         correction::overwrite.
21301         (selftest::test_overlapped_fixit_printing_2): New function.
21302         (selftest::diagnostic_show_locus_c_tests): Call it.
21304 2017-07-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
21306         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Return
21307         early if there is no lhs.
21309 2017-07-13  Martin Liska  <mliska@suse.cz>
21311         * dwarf2out.c (gen_pointer_type_die): Remove dead code.
21312         (gen_reference_type_die): Likewise.
21313         * stor-layout.c: Remove Pascal-related comment.
21315 2017-07-13  Martin Liska  <mliska@suse.cz>
21317         * opts.c (finish_options): Add quotes to error messages.
21318         (parse_sanitizer_options): Likewise.
21320 2017-07-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21322         * doc/invoke.texi (armv8-r): Document +fp.sp ARMv8-R extension.
21324 2017-07-13  Richard Earnshaw  <rearnsha@arm.com>
21326         * config/arm/vxworks.h (TARGET_ENDIAN_DEFAULT): Define.
21328 2017-07-13  Maxim Ostapenko  <m.ostapenko@samsung.com>
21330         * asan.c (asan_emit_allocas_unpoison): Use ptr_mode for arguments
21331         during expansion.
21332         * builtins.c (expand_asan_emit_allocas_unpoison): Likewise.
21334 2017-07-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
21336         PR target/81193
21337         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If GLIBC
21338         provides the hardware capability bits, define the macro
21339         __BUILTIN_CPU_SUPPORTS__.
21340         * config/rs6000/rs6000.c (cpu_expand_builtin): Generate a warning
21341         if GLIBC does not provide the hardware capability bits.  Add a
21342         gcc_unreachable call if the built-in cpu function is neither
21343         __builtin_cpu_is nor __builtin_cpu_supports.
21344         (rs6000_get_function_versions_dispatcher): Change the warning
21345         that an old GLIBC is used which does not export the capability
21346         bits to be an error.
21347         * doc/extend.texi (target_clones attribute): Document the
21348         restriction that GLIBC 2.23 or newer is needed on the PowerPC.
21349         (PowerPC built-in functions): Document that GLIBC 2.23 or newer is
21350         needed by __builtin_cpu_is and __builtin_cpu_supports.  Document
21351         the macros defined by GCC if the newer GLIBC is available.
21353 2017-07-12  Jeff Law  <law@redhat.com>
21355         * config/riscv/riscv.c: Remove unnecessary includes.  Reorder
21356         remaining includes slightly.
21357         * config/riscv/riscv-builtins.c: Include profile-count.h.
21359 2017-07-12  Georg-Johann Lay  <avr@gjlay.de>
21361         PR target/79883
21362         * config/avr/avr.c (avr_set_current_function): In diagnostic
21363         messages: Quote keywords and (parts of) identifiers.
21364         [WITH_AVRLIBC]: Warn for functions named "ISR", "SIGNAL" or
21365         "INTERUPT".
21367 2017-07-12  Carl Love  <cel@us.ibm.com>
21369         * config/rs6000/rs6000-c.c: Add support for built-in functions
21370         vector bool char vec_revb (vector bool char);
21371         vector bool short vec_revb (vector short char);
21372         vector bool int vec_revb (vector bool int);
21373         vector bool long long vec_revb (vector bool long long);
21374         * doc/extend.texi: Update the built-in documentation file for the
21375         new built-in functions.
21377 2017-07-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21379         * config/s390/s390.md: Remove movcc splitter.
21381 2017-07-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21383         * config/s390/s390.c (s390_rtx_costs): Return proper costs for
21384         load/store on condition.
21386 2017-07-12  Georg-Johann Lay  <avr@gjlay.de>
21388         PR target/81407
21389         * config/avr/avr.c (avr_encode_section_info)
21390         [progmem && !TREE_READONLY]: Error if progmem object needs
21391         constructing.
21393 2017-07-11  Michael Collison  <michael.collison@arm.com>
21395         * config/aarch64/aarch64-simd.md (aarch64_sub<mode>_compare0):
21396         New pattern.
21398 2017-07-11  Carl Love  <cel@us.ibm.com>
21400         * config/rs6000/rs6000-c.c: Add support for builtins
21401         vector unsigned int vec_parity_lsbb (vector signed int);
21402         vector unsigned int vec_parity_lsbb (vector unsigned int);
21403         vector unsigned __int128 vec_parity_lsbb (vector signed __int128);
21404         vector unsigned __int128 vec_parity_lsbb (vector unsigned __int128);
21405         vector unsigned long long vec_parity_lsbb (vector signed long long);
21406         vector unsigned long long vec_parity_lsbb (vector unsigned long long);
21407         * config/rs6000/rs6000-builtin.def (VPARITY_LSBB): Add BU_P9V_OVERLOAD1.
21408         * config/rs6000/altivec.h (vec_parity_lsbb): Add define.
21409         * doc/extend.texi: Update the built-in documentation file for the
21410         new built-in functions.
21412 2017-07-11  David Malcolm  <dmalcolm@redhat.com>
21414         * diagnostic-show-locus.c: Include "gcc-rich-location.h".
21415         (layout::m_primary_loc): New field.
21416         (layout::layout): Initialize new field.  Move location filtering
21417         logic from here to...
21418         (layout::maybe_add_location_range): ...this new method.  Add
21419         support for filtering to just the lines already specified by other
21420         locations.
21421         (layout::will_show_line_p): New method.
21422         (gcc_rich_location::add_location_if_nearby): New method.
21423         (selftest::test_add_location_if_nearby): New test function.
21424         (selftest::diagnostic_show_locus_c_tests): Call it.
21425         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
21426         New method.
21428 2017-07-11  Tom de Vries  <tom@codesourcery.com>
21430         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG): New macro.
21431         (bb_first_real_insn): New function.
21432         (nvptx_single): Add extra initialization of broadcasted condition
21433         variables.
21435 2017-07-11  Nathan Sidwell  <nathan@acm.org>
21437         * dwarf2out.c (gen_member_die): Remove useless check for anon ctors.
21439 2017-07-11  Georg-Johann Lay  <avr@gjlay.de>
21441         * doc/extend.texi (AVR Function Attributes): Remove weblink to
21442         Binutils doc as TEXI will mess them up.
21443         * doc/invoke.texi (AVR Options): Same here.
21445 2017-07-11  Daniel Cederman  <cederman@gaisler.com>
21447         * config/sparc/sparc.opt (mfix-ut700): New option.
21448         (mfix-gr712rc): Likewise.
21449         (sparc_fix_b2bst): New variable.
21450         * doc/invoke.texi (SPARC options): Document them.
21451         (ARM options): Fix warnings.
21452         * config/sparc/sparc.c (sparc_do_work_around_errata): Insert NOP
21453         instructions to prevent sequences that can trigger the store-store
21454         errata for certain LEON3FT processors.
21455         (pass_work_around_errata::gate): Also test sparc_fix_b2bst.
21456         (sparc_option_override): Set sparc_fix_b2bst appropriately.
21457         * config/sparc/sparc.md (fix_b2bst): New attribute.
21458         (in_branch_delay): Prevent stores in delay slot if fix_b2bst.
21460 2017-07-10  Uros Bizjak  <ubizjak@gmail.com>
21462         PR target/81375
21463         * config/i386/i386.md (divsf3): Add TARGET_SSE to TARGET_SSE_MATH.
21464         (rcpps): Ditto.
21465         (*rsqrtsf2_sse): Ditto.
21466         (rsqrtsf2): Ditto.
21467         (div<mode>3): Macroize insn from divdf3 and divsf3
21468         using MODEF mode iterator.
21470 2017-07-10  Martin Sebor  <msebor@redhat.com>
21472         PR tree-optimization/80397
21473         * gimple-ssa-sprintf.c (format_integer): Use INTEGRAL_TYPE_P()
21474         instead of testing for equality to INTEGER_TYPE.
21476 2017-07-10  Vineet Gupta <vgupta@synopsys.com>
21478         * config.gcc: Remove uclibc from arc target spec.
21480 2017-07-10  Claudiu Zissulescu  <claziss@synopsys.com>
21482         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Define.
21484 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
21486         PR lto/80838
21487         * lto-wrapper.c (remove_option): New function.
21488         (merge_and_complain): Merge PIC/PIE options more realistically.
21490 2017-07-10  Georg-Johann Lay  <avr@gjlay.de>
21492         Better ISR prologues by supporting GASes __gcc_isr pseudo insn.
21494         PR target/20296
21495         PR target/81268
21496         * configure.ac [target=avr]: Add GAS check for -mgcc-isr.
21497         (HAVE_AS_AVR_MGCCISR_OPTION):  If so, AC_DEFINE it.
21498         * config.in: Regenerate.
21499         * configure: Regenerate.
21500         * doc/extend.texi (AVR Function Attributes) <no_gccisr>: Document it.
21501         * doc/invoke.texi (AVR Options) <-mgas-isr-prologues>: Document it.
21502         * config/avr/avr.opt (-mgas-isr-prologues): New option and...
21503         (TARGET_GASISR_PROLOGUES): ...target mask.
21504         * common/config/avr/avr-common.c
21505         (avr_option_optimization_table) [OPT_LEVELS_1_PLUS_NOT_DEBUG]:
21506         Set -mgas-isr-prologues.
21507         * config/avr/avr-passes.def (avr_pass_pre_proep): Add
21508         INSERT_PASS_BEFORE for it.
21509         * config/avr/avr-protos.h (make_avr_pass_pre_proep): New proto.
21510         * config/avr/avr.c (avr_option_override)
21511         [!HAVE_AS_AVR_MGCCISR_OPTION]: Unset TARGET_GASISR_PROLOGUES.
21512         (avr_no_gccisr_function_p, avr_hregs_split_reg): New static functions.
21513         (avr_attribute_table) <no_gccisr>: Add new function attribute.
21514         (avr_set_current_function) <is_no_gccisr>: Init machine field.
21515         (avr_pass_data_pre_proep, avr_pass_pre_proep): New pass data
21516         and rtl_opt_pass.
21517         (make_avr_pass_pre_proep): New function.
21518         (emit_push_sfr) <treg>: Add argument to function and use it
21519         instead of TMP_REG.
21520         (avr_expand_prologue) [machine->gasisr.maybe]: Emit gasisr insn
21521         and set machine->gasisr.yes.
21522         (avr_expand_epilogue) [machine->gasisr.yes]: Similar.
21523         (avr_asm_function_end_prologue) [machine->gasisr.yes]: Add
21524         __gcc_isr.n_pushed to .L__stack_usage.
21525         (TARGET_ASM_FINAL_POSTSCAN_INSN): Define to...
21526         (avr_asm_final_postscan_insn): ...this new static function.
21527         * config/avr/avr.h (machine_function)
21528         <is_no_gccisr, use_L__stack_usage>: New fields.
21529         <gasisr, gasisr.yes, gasisr.maybe, gasisr.regno>: New fields.
21530         * config/avr/avr.md (UNSPECV_GASISR): Add unspecv enum.
21531         (GASISR_Prologue, GASISR_Epilogue, GASISR_Done): New define_constants.
21532         (gasisr, *gasisr): New expander and insn.
21533         * config/avr/gen-avr-mmcu-specs.c (print_mcu)
21534         [HAVE_AS_AVR_MGCCISR_OPTION]: Print asm_gccisr spec.
21535         * config/avr/specs.h (ASM_SPEC) <asm_gccisr>: Add sub spec.
21537 2017-07-10  Richard Earnshaw  <rearnsha@arm.com>
21539         * config/arm/parsecpu.awk (gen_comm_data): Do not escape single quotes
21540         in quoted strings.
21542 2017-07-10  Georg-Johann Lay  <avr@gjlay.de>
21544         Move jump-tables out of .text again.
21546         PR target/81075
21547         * config/avr/avr.c (ASM_OUTPUT_ADDR_VEC_ELT): Remove function.
21548         (ASM_OUTPUT_ADDR_VEC): New function.
21549         (avr_adjust_insn_length) [JUMP_TABLE_DATA_P]: Return 0.
21550         (avr_final_prescan_insn) [avr_log.insn_addresses]: Dump
21551         INSN_ADDRESSes as asm comment.
21552         * config/avr/avr.h (JUMP_TABLES_IN_TEXT_SECTION): Adjust comment.
21553         (ASM_OUTPUT_ADDR_VEC_ELT): Remove define.
21554         (ASM_OUTPUT_ADDR_VEC): Define to avr_output_addr_vec.
21555         * config/avr/avr.md (*tablejump): Adjust comment.
21556         * config/avr/elf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove.
21557         * config/avr/avr-log.c (avr_log_set_avr_log) <insn_addresses>:
21558         New detail.
21559         * config/avr/avr-protos.h (avr_output_addr_vec_elt): Remove proto.
21560         (avr_output_addr_vec): New proto.
21561         (avr_log_t) <insn_addresses>: New field.
21563 2017-07-09  H.J. Lu  <hongjiu.lu@intel.com>
21565         PR target/81313
21566         * config/i386/i386.c (ix86_function_arg_advance): Set
21567         outgoing_args_on_stack to true if there are outgoing arguments
21568         on stack.
21569         (ix86_function_arg): Likewise.
21570         (ix86_get_drap_rtx): Use DRAP only if there are outgoing
21571         arguments on stack and ACCUMULATE_OUTGOING_ARGS is false.
21572         * config/i386/i386.h (machine_function): Add
21573         outgoing_args_on_stack.
21575 2017-07-09  Krister Walfridsson  <krister.walfridsson@gmail.com>
21577         * config.gcc (*-*-netbsd*): Remove check for NetBSD versions not
21578         supporting pthreds.
21579         * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always enable pthreads.
21581 2017-07-08  Richard Sandiford  <richard.sandiford@linaro.org>
21583         * Makefile.in (HOOKS_H, RTL_BASE_H, FUNCTION_H, EXPR_H, REGS_H)
21584         (REAL_H): Remove $(MACHMODE_H).
21585         (FIXED_VALUE_H, TREE_CORE_H, CFGLOOP_H): Remove $(MACHMODE_H) and
21586         double-int.h.
21587         (CORETYPES_H): Add signop.h, wide-int.h, wide-int-print.h,
21588         $(MACHMODE_H) and double-int.h.
21589         (build/min-insn-modes.o): Depend on $(CORETYPES_H) rather than
21590         $(MACHMODE_H).
21591         (gengtype-state.o, gengtype.o, build/gengtype.o): Don't depend on
21592         double-int.h.
21594 2017-07-07  Andrew Pinski  <apinski@cavium.com>
21596         * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Check
21597         prev_set and curr_set for AARCH64_FUSE_ALU_BRANCH.
21599 2017-07-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
21601         * config/rs6000/rs6000.c (rs6000_get_function_versions_dispatcher):
21602         Add warning if GCC was not configured to link against a GLIBC that
21603         exports the hardware capability bits.
21604         (make_resolver_func): Make resolver function private and not a
21605         COMDAT function.  Create the name with clone_function_name instead
21606         of make_unique_name.
21608         PR target/81348
21609         * config/rs6000/rs6000.md (HI sign_extend splitter): Use the
21610         correct operand in doing the split.
21612 2017-07-07 Carl Love  <cel@us.ibm.com>
21614         * config/rs6000/rs6000-c: Add support for built-in function
21615         vector unsigned short vec_pack_to_short_fp32 (vector float,
21616                                                       vector float).
21617         * config/rs6000/rs6000-builtin.def (CONVERT_4F32_8I16): Add
21618         BU_P9V_AV_2 and BU_P9V_OVERLOAD_2 definitions.
21619         * config/rs6000/altivec.h (vec_pack_to_short_fp32): Add define.
21620         * config/rs6000/altivec.md(UNSPEC_CONVERT_4F32_8I16): Add UNSPEC.
21621         (convert_4f32_8i16): Add define_expand.
21622         * doc/extend.texi: Update the built-in documentation file for the
21623         new built-in function.
21625 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
21627         * config/sparc/m8.md: New file.
21628         * config/sparc/sparc.md: Include m8.md.
21630 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
21632         * config/sparc/sparc.opt: New option -mvis4b.
21633         * config/sparc/sparc.c (dump_target_flag_bits): Handle MASK_VIS4B.
21634         (sparc_option_override): Handle VIS4B.
21635         (enum sparc_builtins): Define
21636         SPARC_BUILTIN_DICTUNPACK{8,16,32},
21637         SPARC_BUILTIN_FPCMP{LE,GT,EQ,NE}{8,16,32}SHL,
21638         SPARC_BUILTIN_FPCMPU{LE,GT}{8,16,32}SHL,
21639         SPARC_BUILTIN_FPCMPDE{8,16,32}SHL and
21640         SPARC_BUILTIN_FPCMPUR{8,16,32}SHL.
21641         (check_constant_argument): New function.
21642         (sparc_vis_init_builtins): Define builtins
21643         __builtin_vis_dictunpack{8,16,32},
21644         __builtin_vis_fpcmp{le,gt,eq,ne}{8,16,32}shl,
21645         __builtin_vis_fpcmpu{le,gt}{8,16,32}shl,
21646         __builtin_vis_fpcmpde{8,16,32}shl and
21647         __builtin_vis_fpcmpur{8,16,32}shl.
21648         (sparc_expand_builtin): Check that the constant operands to
21649         __builtin_vis_fpcmp*shl and _builtin_vis_dictunpack* are indeed
21650         constant and in range.
21651         * config/sparc/sparc-c.c (sparc_target_macros): Handle
21652         TARGET_VIS4B.
21653         * config/sparc/sparc.h (SPARC_IMM2_P): Define.
21654         (SPARC_IMM5_P): Likewise.
21655         * config/sparc/sparc.md (cpu_feature): Add new feagure "vis4b".
21656         (enabled): Handle vis4b.
21657         (UNSPEC_DICTUNPACK): New unspec.
21658         (UNSPEC_FPCMPSHL): Likewise.
21659         (UNSPEC_FPUCMPSHL): Likewise.
21660         (UNSPEC_FPCMPDESHL): Likewise.
21661         (UNSPEC_FPCMPURSHL): Likewise.
21662         (cpu_feature): New CPU feature `vis4b'.
21663         (dictunpack{8,16,32}): New insns.
21664         (FPCSMODE): New mode iterator.
21665         (fpcscond): New code iterator.
21666         (fpcsucond): Likewise.
21667         (fpcmp{le,gt,eq,ne}{8,16,32}{si,di}shl): New insns.
21668         (fpcmpu{le,gt}{8,16,32}{si,di}shl): Likewise.
21669         (fpcmpde{8,16,32}{si,di}shl): Likewise.
21670         (fpcmpur{8,16,32}{si,di}shl): Likewise.
21671         * config/sparc/constraints.md: Define constraints `q' for unsigned
21672         2-bit integer constants and `t' for unsigned 5-bit integer
21673         constants.
21674         * config/sparc/predicates.md (imm5_operand_dictunpack8): New
21675         predicate.
21676         (imm5_operand_dictunpack16): Likewise.
21677         (imm5_operand_dictunpack32): Likewise.
21678         (imm2_operand): Likewise.
21679         * doc/invoke.texi (SPARC Options): Document -mvis4b.
21680         * doc/extend.texi (SPARC VIS Built-in Functions): Document the
21681         ditunpack* and fpcmp*shl builtins.
21683 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
21685         * config.gcc: Handle m8 in --with-{cpu,tune} options.
21686         * config.in: Add HAVE_AS_SPARC6 define.
21687         * config/sparc/driver-sparc.c (cpu_names): Add entry for the SPARC
21688         M8.
21689         * config/sparc/sol2.h (CPP_CPU64_DEFAULT_SPEC): Define for
21690         TARGET_CPU_m8.
21691         (ASM_CPU32_DEFAUILT_SPEC): Likewise.
21692         (CPP_CPU_SPEC): Handle m8.
21693         (ASM_CPU_SPEC): Likewise.
21694         * config/sparc/sparc-opts.h (enum processor_type): Add
21695         PROCESSOR_M8.
21696         * config/sparc/sparc.c (m8_costs): New struct.
21697         (sparc_option_override): Handle TARGET_CPU_m8.
21698         (sparc32_initialize_trampoline): Likewise.
21699         (sparc64_initialize_trampoline): Likewise.
21700         (sparc_issue_rate): Likewise.
21701         (sparc_register_move_cost): Likewise.
21702         * config/sparc/sparc.h (TARGET_CPU_m8): Define.
21703         (CPP_CPU64_DEFAULT_SPEC): Define for M8.
21704         (ASM_CPU64_DEFAULT_SPEC): Likewise.
21705         (CPP_CPU_SPEC): Handle M8.
21706         (ASM_CPU_SPEC): Likewise.
21707         (AS_M8_FLAG): Define.
21708         * config/sparc/sparc.md: Add m8 to the cpu attribute.
21709         * config/sparc/sparc.opt: New option -mcpu=m8 for sparc targets.
21710         * configure.ac (HAVE_AS_SPARC6): Check for assembler support for
21711         M8 instructions.
21712         * configure: Regenerate.
21713         * doc/invoke.texi (SPARC Options): Document -mcpu=m8 and
21714         -mtune=m8.
21716 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
21718         * config/sparc/niagara7.md: Rework the DFA scheduler to use insn
21719         subtypes.
21720         * config/sparc/sparc.md: Remove the `v3pipe' insn attribute.
21721         ("*movdi_insn_sp32"): Do not set v3pipe.
21722         ("*movsi_insn"): Likewise.
21723         ("*movdi_insn_sp64"): Likewise.
21724         ("*movsf_insn"): Likewise.
21725         ("*movdf_insn_sp32"): Likewise.
21726         ("*movdf_insn_sp64"): Likewise.
21727         ("*zero_extendsidi2_insn_sp64"): Likewise.
21728         ("*sign_extendsidi2_insn"): Likewise.
21729         ("*mov<VM32:mode>_insn"): Likewise.
21730         ("*mov<VM64:mode>_insn_sp64"): Likewise.
21731         ("*mov<VM64:mode>_insn_sp32"): Likewise.
21732         ("<plusminus_insn><VADDSUB:mode>3"): Likewise.
21733         ("<vlop:code><VL:mode>3"): Likewise.
21734         ("*not_<vlop:code><VL:mode>3"): Likewise.
21735         ("*nand<VL:mode>_vis"): Likewise.
21736         ("*<vlnotop:code>_not1<VL:mode>_vis"): Likewise.
21737         ("*<vlnotop:code>_not2<VL:mode>_vis"): Likewise.
21738         ("one_cmpl<VL:mode>2"): Likewise.
21739         ("faligndata<VM64:mode>_vis"): Likewise.
21740         ("alignaddrsi_vis"): Likewise.
21741         ("alignaddrdi_vis"): Likweise.
21742         ("alignaddrlsi_vis"): Likewise.
21743         ("alignaddrldi_vis"): Likewise.
21744         ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise.
21745         ("bmaskdi_vis"): Likewise.
21746         ("bmasksi_vis"): Likewise.
21747         ("bshuffle<VM64:mode>_vis"): Likewise.
21748         ("cmask8<P:mode>_vis"): Likewise.
21749         ("cmask16<P:mode>_vis"): Likewise.
21750         ("cmask32<P:mode>_vis"): Likewise.
21751         ("pdistn<P:mode>_vis"): Likewise.
21752         ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise.
21754 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
21756         * config/sparc/sparc.md ("subtype"): New insn attribute.
21757         ("*wrgsr_sp64"): Set insn subtype.
21758         ("*rdgsr_sp64"): Likewise.
21759         ("alignaddrsi_vis"): Likewise.
21760         ("alignaddrdi_vis"): Likewise.
21761         ("alignaddrlsi_vis"): Likewise.
21762         ("alignaddrldi_vis"): Likewise.
21763         ("<plusminus_insn><VADDSUB:mode>3"): Likewise.
21764         ("fexpand_vis"): Likewise.
21765         ("fpmerge_vis"): Likewise.
21766         ("faligndata<VM64:mode>_vis"): Likewise.
21767         ("bshuffle<VM64:mode>_vis"): Likewise.
21768         ("cmask8<P:mode>_vis"): Likewise.
21769         ("cmask16<P:mode>_vis"): Likewise.
21770         ("cmask32<P:mode>_vis"): Likewise.
21771         ("fchksm16_vis"): Likewise.
21772         ("v<vis3_shift_patname><GCM:mode>3"): Likewise.
21773         ("fmean16_vis"): Likewise.
21774         ("fp<plusminus_insn>64_vis"): Likewise.
21775         ("<plusminus_insn>v8qi3"): Likewise.
21776         ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise.
21777         ("<vis4_minmax_patname><VMMAX:mode>3"): Likewise.
21778         ("<vis4_uminmax_patname><VMMAX:mode>3"): Likewise.
21779         ("<vis3_addsub_ss_patname>v8qi3"): Likewise.
21780         ("<vis4_addsub_us_patname><VAUS:mode>3"): Likewise.
21781         ("*movqi_insn"): Likewise.
21782         ("*movhi_insn"): Likewise.
21783         ("*movsi_insn"): Likewise.
21784         ("movsi_pic_gotdata_op"): Likewise.
21785         ("*movdi_insn_sp32"): Likewise.
21786         ("*movdi_insn_sp64"): Likewise.
21787         ("movdi_pic_gotdata_op"): Likewise.
21788         ("*movsf_insn"): Likewise.
21789         ("*movdf_insn_sp32"): Likewise.
21790         ("*movdf_insn_sp64"): Likewise.
21791         ("*zero_extendhisi2_insn"): Likewise.
21792         ("*zero_extendqihi2_insn"): Likewise.
21793         ("*zero_extendqisi2_insn"): Likewise.
21794         ("*zero_extendqidi2_insn"): Likewise.
21795         ("*zero_extendhidi2_insn"): Likewise.
21796         ("*zero_extendsidi2_insn_sp64"): Likewise.
21797         ("ldfsr"): Likewise.
21798         ("prefetch_64"): Likewise.
21799         ("prefetch_32"): Likewise.
21800         ("tie_ld32"): Likewise.
21801         ("tie_ld64"): Likewise.
21802         ("*tldo_ldub_sp32"): Likewise.
21803         ("*tldo_ldub1_sp32"): Likewise.
21804         ("*tldo_ldub2_sp32"): Likewise.
21805         ("*tldo_ldub_sp64"): Likewise.
21806         ("*tldo_ldub1_sp64"): Likewise.
21807         ("*tldo_ldub2_sp64"): Likewise.
21808         ("*tldo_ldub3_sp64"): Likewise.
21809         ("*tldo_lduh_sp32"): Likewise.
21810         ("*tldo_lduh1_sp32"): Likewise.
21811         ("*tldo_lduh_sp64"): Likewise.
21812         ("*tldo_lduh1_sp64"): Likewise.
21813         ("*tldo_lduh2_sp64"): Likewise.
21814         ("*tldo_lduw_sp32"): Likewise.
21815         ("*tldo_lduw_sp64"): Likewise.
21816         ("*tldo_lduw1_sp64"): Likewise.
21817         ("*tldo_ldx_sp64"): Likewise.
21818         ("*mov<VM32:mode>_insn"): Likewise.
21819         ("*mov<VM64:mode>_insn_sp64"): Likewise.
21820         ("*mov<VM64:mode>_insn_sp32"): Likewise.
21822 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
21824         * config/sparc/sparc.md ("type"): New insn type viscmp.
21825         ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Set insn type to
21826         viscmp.
21827         ("fpcmp<gcond:code>8<P:mode>_vis"): Likewise.
21828         ("fucmp<gcond:code>8<P:mode>_vis"): Likewise.
21829         ("fpcmpu<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise.
21830         * config/sparc/niagara7.md ("n7_vis_logical_v3pipe"): Handle
21831         viscmp.
21832         ("n7_vis_logical_11cycle"): Likewise.
21833         * config/sparc/niagara4.md ("n4_vis_logical"): Likewise.
21834         * config/sparc/niagara2.md ("niag3_vis": Likewise.
21835         * config/sparc/niagara.md ("niag_vis"): Likewise.
21836         * config/sparc/ultra3.md ("us3_fga"): Likewise.
21837         * config/sparc/ultra1_2.md ("us1_fga_double"): Likewise.
21839 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
21841         * config/sparc/sparc.md: New instruction type `bmask'.
21842         (bmaskdi_vis): Use the `bmask' type.
21843         (bmasksi_vis): Likewise.
21844         * config/sparc/ultra3.md (us3_array): Likewise.
21845         * config/sparc/niagara7.md (n7_array): Likewise.
21846         * config/sparc/niagara4.md (n4_array): Likewise.
21847         * config/sparc/niagara2.md (niag2_vis): Likewise.
21848         (niag3_vis): Likewise.
21849         * config/sparc/niagara.md (niag_vis): Likewise.
21851 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
21853         * ipa-comdats.c: Remove optimize check from gate.
21854         * ipa-fnsummary.c (ipa_fn_summary_generate): do not generate summary
21855         for functions not optimized.
21856         (ipa_fn_summary_read): Skip optimize check.
21857         (ipa_fn_summary_write): Likewise.
21858         * ipa-inline-analysis.c (do_estimate_growth_1): Check that caller
21859         is optimized.
21860         * ipa-inline.c (can_inline_edge_p): Not optimized functions are
21861         uninlinable.
21862         (can_inline_edge_p): Check flag_pcc_struct_return for match.
21863         (check_callers): Give up on caller which is not optimized.
21864         (inline_small_functions): Likewise.
21865         (ipa_inline): Do not give up when not optimizing.
21866         * ipa-visbility.c (function_and_variable_visibility): Do not optimize
21867         away unoptimizes cdtors.
21868         (whole_program_function_and_variable_visibility): Do
21869         ipa_discover_readonly_nonaddressable_vars in LTO mode.
21870         * ipa.c (process_references): Do not check optimize.
21871         (symbol_table::remove_unreachable_nodes): Update optimize check.
21872         (set_writeonly_bit): Update optimize check.
21873         (pass_ipa_cdtor_merge::gate): Do not check optimize.
21874         (pass_ipa_single_use::gate): Remove.
21876 2017-07-06  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21878         * config/rs6000/rs6000.c (union_defs, union_uses, insn_is_load_p,
21879         insn_is_store_p, insn_is_swap_p, const_load_sequence_p, v2df_reduction_p,
21880         rtx_is_swappable_p, insn_is_swappable_p, chain_contains_only_swaps,
21881         mark_swaps_for_removal, swap_const_vector_halves, adjust_subreg_index,
21882         permute_load, permute_store, adjust_extract, adjust_splat,
21883         adjust_xxpermdi, adjust_concat, adjust_vperm, handle_special_swappables,
21884         replace_swap_with_copy, dump_swap_insn_table,
21885         alignment_with_canonical_addr, alignment_mask, find_alignment_op,
21886         recombine_lvx_pattern, recombine_stvx_pattern,
21887         recombine_lvx_stvx_patterns, rs6000_analyze_swaps,
21888         make_pass_analyze_swaps): Move all code related to p8 swap optimizations
21889         to file rs6000-p8swap.c.
21890         * config/rs6000/rs6000-p8swap.c: New file.
21891         * config/rs6000/t-rs6000: Add rule to build rs6000-p8swap.o.
21892         * config.gcc: Add rs6000-p8swap.o to extra_objs for powerpc*-*-*
21893         and rs6000*-*-* targets.
21895 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
21897         * Makefile.in (selftest): Remove dependency on s-selftest-c++.
21899 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
21901         * lto-wrapper.c (merge_and_complain): Do not merge
21902         fexceptions, fnon_call_exceptions, ftrapv, ffp_contract_, fmath_errno,
21903         fsigned_zeros, ftrapping_math, fwrapv.
21904         (append_compiler_options): Do not track these options.
21905         (append_linker_options): Likewie
21907 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
21909         * cgraphunit.c (cgraph_node::finalize_function): When
21910         !flag_toplevel_reorde set no_reorder flag.
21911         (varpool_node::finalize_decl): Likewise.
21912         (symbol_table::compile): Drop no toplevel reorder path.
21914 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
21916         * bb-reorder.c (better_edge_p): Do not build traces across abnormal/eh
21917         edges; zero probability is not better than uninitialized.
21919 2017-07-06  Maxim Ostapenko  <m.ostapenko@samsung.com>
21921         * asan.h (asan_sanitize_allocas_p): Declare.
21922         * asan.c (asan_sanitize_allocas_p): New function.
21923         (handle_builtin_stack_restore): Bail out if !asan_sanitize_allocas_p.
21924         (handle_builtin_alloca): Likewise.
21925         * cfgexpand.c (expand_used_vars): Do not add allocas unpoisoning stuff
21926         if !asan_sanitize_allocas_p.
21927         * params.def (asan-instrument-allocas): Add new option.
21928         * params.h (ASAN_PROTECT_ALLOCAS): Define.
21929         * opts.c (common_handle_option): Disable allocas sanitization for
21930         KASan by default.
21932 2017-07-06  Maxim Ostapenko  <m.ostapenko@samsung.com>
21934         * asan.c: Include gimple-fold.h.
21935         (get_last_alloca_addr): New function.
21936         (handle_builtin_stackrestore): Likewise.
21937         (handle_builtin_alloca): Likewise.
21938         (asan_emit_allocas_unpoison): Likewise.
21939         (get_mem_refs_of_builtin_call): Add new parameter, remove const
21940         quallifier from first paramerer. Handle BUILT_IN_ALLOCA,
21941         BUILT_IN_ALLOCA_WITH_ALIGN and BUILT_IN_STACK_RESTORE builtins.
21942         (instrument_builtin_call): Pass gimple iterator to
21943         get_mem_refs_of_builtin_call.
21944         (last_alloca_addr): New global.
21945         * asan.h (asan_emit_allocas_unpoison): Declare.
21946         * builtins.c (expand_asan_emit_allocas_unpoison): New function.
21947         (expand_builtin): Handle BUILT_IN_ASAN_ALLOCAS_UNPOISON.
21948         * cfgexpand.c (expand_used_vars): Call asan_emit_allocas_unpoison
21949         if function calls alloca.
21950         * gimple-fold.c (replace_call_with_value): Remove static keyword.
21951         * gimple-fold.h (replace_call_with_value): Declare.
21952         * internal-fn.c: Include asan.h.
21953         * sanitizer.def (BUILT_IN_ASAN_ALLOCA_POISON,
21954         BUILT_IN_ASAN_ALLOCAS_UNPOISON): New builtins.
21956 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
21958         * Makefile.in (SELFTEST_FLAGS): Drop "-x c", moving it to...
21959         (C_SELFTEST_FLAGS): New.
21960         (CPP_SELFTEST_FLAGS): New.
21961         (SELFTEST_DEPS): New, from deps of s-selftest.
21962         (C_SELFTEST_DEPS): New, from deps of s-selftest.
21963         (CPP_SELFTEST_DEPS): New.
21964         (selftest): Add dependency on s-selftest-c++.
21965         (s-selftest): Rename to...
21966         (s-selftest-c): ...this, moving deps to SELFTEST_DEPS
21967         and C_SELFTEST_DEPS, and using C_SELFTEST_FLAGS rather
21968         than SELFTEST_FLAGS.
21969         (selftest-gdb): Rename to...
21970         (selftest-c-gdb): ...this, using C_SELFTEST_DEPS and
21971         C_SELFTEST_FLAGS.
21972         (selftest-gdb): Reintroduce as an alias for selftest-c-gdb.
21973         (selftest-valgrind): Rename to...
21974         (selftest-c-valgrind): ...this, using C_SELFTEST_DEPS and
21975         C_SELFTEST_FLAGS.
21976         (selftest-valgrind): Reintroduce as an alias for
21977         selftest-c-valgrind.
21978         (s-selftest-c++): New.
21979         (selftest-c++-gdb): New.
21980         (selftest-c++-valgrind): New.
21982 2017-07-06  Olivier Hainque  <hainque@adacore.com>
21984         * gcc.c (process_command): When deciding if undefined variables
21985         should be ignored when processing specs, accept "gcc -v" as well.
21987 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
21989         * auto-profile.c (afdo_set_bb_count, afdo_propagate_edge,
21990         afdo_annotate_cfg): Set counts/probabilities as determined by afdo.
21992 2017-07-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21994         * config/arm/arm-cpus.in (armv8-r): Add new entry.
21995         * config/arm/arm-isa.h (ISA_ARMv8r): Define macro.
21996         * config/arm/arm-tables.opt: Regenerate.
21997         * config/arm/arm.h (enum base_architecture): Add BASE_ARCH_8R
21998         enumerator.
21999         * doc/invoke.texi: Mention -march=armv8-r and its extensions.
22001 2017-07-06  Carl Love  <cel@us.ibm.com>
22003         * ChangeLog: Clean up from mid air collision
22005 2017-07-06  Carl Love  <cel@us.ibm.com>
22007         * config/rs6000/rs6000-c.c: Add support for built-in functions
22008         vector signed int vec_subc (vector signed int, vector signed int);
22009         vector signed __int128 vec_subc (vector signed __int128,
22010                                          vector signed __int128);
22011         vector unsigned __int128 vec_subc (vector unsigned __int128,
22012                                            vector unsigned __int128);
22013         vector signed int vec_sube (vector signed int, vector signed int,
22014                                     vector signed int);
22015         vector unsigned int vec_sube (vector unsigned int,
22016                                       vector unsigned int,
22017                                       vector unsigned int);
22018         vector signed __int128 vec_sube (vector signed __int128,
22019                                          vector signed __int128,
22020                                          vector signed__int128);
22021         vector unsigned __int128 vec_sube (vector unsigned __int128,
22022                                            vector unsigned __int128,
22023                                            vector unsigned __int128);
22024         vector signed int vec_subec (vector signed int, vector signed int,
22025                                      vector signed int);
22026         vector unsigned int vec_subec (vector unsigned int,
22027                                        vector unsigned int,
22028                                        vector unsigned int);
22029         vector signed __int128 vec_subec (vector signed __int128,
22030                                           vector signed __int128,
22031                                           vector signed__int128);
22032         vector unsigned __int128 vec_subec (vector unsigned __int128,
22033                                             vector unsigned __int128,
22034                                             vector unsigned __int128);
22035         * config/rs6000/rs6000.c (ALTIVEC_BUILTIN_VEC_SUBE,
22036         ALTIVEC_BUILTIN_VEC_SUBEC): Add ef_builtins.
22037         * config/rs6000/rs6000-builtin.def (SUBE, SUBEC): Add
22038         BU_ALTIVEC_OVERLOAD_X definitions.
22039         * config/rs6000/altivec.h (vec_sube, vec_subec): Add builtin defines.
22040         * doc/extend.texi: Update the built-in documentation file for the new
22041         built-in functions.
22043 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
22045         PR c++/79300
22046         * diagnostic-show-locus.c (layout::layout): Use start and finish
22047         spelling location for the start and finish of each range.
22048         * genmatch.c (linemap_client_expand_location_to_spelling_point):
22049         Add unused aspect param.
22050         * input.c (expand_location_1): Add "aspect" param, and use it
22051         to access the correct part of the location.
22052         (expand_location): Pass LOCATION_ASPECT_CARET to new param of
22053         expand_location_1.
22054         (expand_location_to_spelling_point): Likewise.
22055         (linemap_client_expand_location_to_spelling_point): Add "aspect"
22056         param, and pass it to expand_location_1.
22058 2017-07-06  Sebastian Peryt  <sebastian.peryt@intel.com>
22060         * config/i386/avx512fintrin.h (_mm_mask_getexp_round_ss,
22061         _mm_maskz_getexp_round_ss, _mm_mask_getexp_round_sd,
22062         _mm_maskz_getexp_round_sd, _mm_mask_getmant_round_sd,
22063         _mm_maskz_getmant_round_sd, _mm_mask_getmant_round_ss,
22064         _mm_maskz_getmant_round_ss, _mm_mask_getexp_ss, _mm_maskz_getexp_ss,
22065         _mm_mask_getexp_sd, _mm_maskz_getexp_sd, _mm_mask_getmant_sd,
22066         _mm_maskz_getmant_sd, _mm_mask_getmant_ss,
22067         _mm_maskz_getmant_ss): New intrinsics.
22068         (__builtin_ia32_getexpss128_mask): Changed to ...
22069         __builtin_ia32_getexpss128_round ... this.
22070         (__builtin_ia32_getexpsd128_mask): Changed to ...
22071         __builtin_ia32_getexpsd128_round ... this.
22072         * config/i386/i386-builtin-types.def
22073         ((V2DF, V2DF, V2DF, INT, V2DF, UQI, INT),
22074         (V4SF, V4SF, V4SF, INT, V4SF, UQI, INT)): New function type aliases.
22075         * config/i386/i386-builtin.def (__builtin_ia32_getexpsd_mask_round,
22076         __builtin_ia32_getexpss_mask_round,     __builtin_ia32_getmantsd_mask_round,
22077         __builtin_ia32_getmantss_mask_round): New builtins.
22078         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_INT_V2DF_UQI_INT,
22079         V4SF_FTYPE_V4SF_V4SF_INT_V4SF_UQI_INT): Handle new types.
22080         (CODE_FOR_avx512f_vgetmantv2df_mask_round,
22081         CODE_FOR_avx512f_vgetmantv4sf_mask_round): New cases.
22082         * config/i386/sse.md
22083         (avx512f_sgetexp<mode><round_saeonly_name>): Changed to ...
22084         avx512f_sgetexp<mode><mask_scalar_name>
22085         <round_saeonly_scalar_name> ... this.
22086         (vgetexp<ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|
22087         %0, %1, %2<round_saeonly_op3>}): Changed to ...
22088         vgetexp<ssescalarmodesuffix>
22089         \t{<round_saeonly_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
22090         %0<mask_scalar_operand3>, %1, %2<round_saeonly_scalar_mask_op3>} ... this.
22091         (avx512f_vgetmant<mode><round_saeonly_name>): Changed to ...
22092         avx512f_vgetmant<mode><mask_scalar_name>
22093         <round_saeonly_scalar_name> ... this.
22094         (vgetmant<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
22095         %0, %1, %2<round_saeonly_op4>, %3}): Changed to ...
22096         vgetmant<ssescalarmodesuffix>
22097         \t{%3, <round_saeonly_scalar_mask_op4>%2, %1, %0<mask_scalar_operand4>|
22098         %0<mask_scalar_operand4>, %1, %2
22099         <round_saeonly_scalar_mask_op4>, %3} ... this.
22100         * config/i386/subst.md (mask_scalar_operand4,
22101         round_saeonly_scalar_mask_operand4,     round_saeonly_scalar_mask_op4,
22102         round_saeonly_scalar_nimm_predicate): New subst attributes.
22104 2017-07-06  Julia Koval  <julia.koval@intel.com>
22106         * config/i386/i386.c (ix86_erase_embedded_rounding):
22107         Remove code for old rounding pattern.
22109 2017-07-06  Richard Earnshaw  <rearnsha@arm.com>
22111         * config/arm/t-arm (GTM_H): Add arm-cpu.h.
22113 2017-07-06  Christophe Lyon  <christophe.lyon@linaro.org>
22115         * doc/sourcebuild.texi (Test Directives, Variants of
22116         dg-require-support): Add documentation for dg-require-stack-check.
22118 2017-07-05  Sebastian Peryt  <sebastian.peryt@intel.com>
22120         * config/i386/subst.md (mask_scalar, round_scalar,
22121         round_saeonly_scalar): New meta-templates.
22122         (mask_scalar_name, mask_scalar_operand3, round_scalar_name,
22123         round_scalar_mask_operand3, round_scalar_mask_op3,
22124         round_scalar_constraint, round_scalar_prefix, round_saeonly_scalar_name,
22125         round_saeonly_scalar_mask_operand3, round_saeonly_scalar_mask_op3,
22126         round_saeonly_scalar_constraint,
22127         round_saeonly_scalar_prefix): New subst attribute.
22128         * config/i386/sse.md
22129         (<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): Renamed to ...
22130         <sse>_vm<plusminus_insn><mode>3<mask_scalar_name>
22131         <round_scalar_name> ... this.
22132         (<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): Renamed to ...
22133         <sse>_vm<multdiv_mnemonic><mode>3<mask_scalar_name>
22134         <round_scalar_name> ... this.
22135         (<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): Renamed to ...
22136         <sse>_vm<code><mode>3<mask_scalar_name>
22137         <round_saeonly_scalar_name> ... this.
22138         (v<plusminus_mnemonic><ssescalarmodesuffix>
22139         \t{<round_mask_op3>%2, %1, %0<mask_operand3>|
22140         %0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}): Changed to ...
22141         v<plusminus_mnemonic><ssescalarmodesuffix>
22142         \t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
22143         %0<mask_scalar_operand3>, %1, %<iptr>2<round_scalar_mask_op3>} ... this.
22144         (v<multdiv_mnemonic><ssescalarmodesuffix>
22145         \t{<round_mask_op3>%2, %1, %0<mask_operand3>|
22146         %0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}): Changed to ...
22147         v<multdiv_mnemonic><ssescalarmodesuffix>
22148         \t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
22149         %0<mask_scalar_operand3>, %1, %<iptr>2<round_scalar_mask_op3>} ... this.
22150         (v<maxmin_float><ssescalarmodesuffix>
22151         \t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|
22152         %0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}): Changed to ...
22153         v<maxmin_float><ssescalarmodesuffix>
22154         \t{<round_saeonly_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
22155         %0<mask_scalar_operand3>, %1, %<iptr>2
22156         <round_saeonly_scalar_mask_op3>} ... this.
22158 2017-07-05  Richard Earnshaw  <rearnsha@arm.com>
22160         * config/arm/arm.c (arm_fixed_condition_code_regs): New function.
22161         (TARGET_FIXED_CONDITION_CODE_REGS): Redefine.
22163 2017-07-05  Richard Sandiford  <richard.sandiford@linaro.org>
22164             Alan Hayward  <alan.hayward@arm.com>
22165             David Sherwood  <david.sherwood@arm.com>
22167         * combine.c (simplify_if_then_else): Remove "enum" before
22168         "machine_mode".
22169         * compare-elim.c (can_eliminate_compare): Likewise.
22170         * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
22171         Likewise.
22172         (aarch64_lookup_simd_builtin_type): Likewise.
22173         (aarch64_simd_builtin_type): Likewise.
22174         (aarch64_init_simd_builtin_types): Likewise.
22175         (aarch64_simd_expand_args): Likewise.
22176         * config/aarch64/aarch64-protos.h (aarch64_simd_attr_length_rglist):
22177         Likewise.
22178         (aarch64_reverse_mask): Likewise.
22179         (aarch64_simd_emit_reg_reg_move): Likewise.
22180         (aarch64_gen_adjusted_ldpstp): Likewise.
22181         (aarch64_ccmp_mode_to_code): Likewise.
22182         (aarch64_operands_ok_for_ldpstp): Likewise.
22183         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
22184         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
22185         Likewise.
22186         (aarch64_min_divisions_for_recip_mul): Likewise.
22187         (aarch64_reassociation_width): Likewise.
22188         (aarch64_get_condition_code_1): Likewise.
22189         (aarch64_simd_emit_reg_reg_move): Likewise.
22190         (aarch64_simd_attr_length_rglist): Likewise.
22191         (aarch64_reverse_mask): Likewise.
22192         (aarch64_operands_ok_for_ldpstp): Likewise.
22193         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
22194         (aarch64_gen_adjusted_ldpstp): Likewise.
22195         * config/aarch64/cortex-a57-fma-steering.c (fma_node::rename):
22196         Likewise.
22197         * config/arc/arc.c (legitimate_offset_address_p): Likewise.
22198         * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
22199         (arm_lookup_simd_builtin_type): Likewise.
22200         (arm_simd_builtin_type): Likewise.
22201         (arm_init_simd_builtin_types): Likewise.
22202         (arm_expand_builtin_args): Likewise.
22203         * config/arm/arm-protos.h (arm_expand_builtin): Likewise.
22204         * config/ft32/ft32.c (ft32_libcall_value): Likewise.
22205         (ft32_setup_incoming_varargs): Likewise.
22206         (ft32_function_arg): Likewise.
22207         (ft32_function_arg_advance): Likewise.
22208         (ft32_pass_by_reference): Likewise.
22209         (ft32_arg_partial_bytes): Likewise.
22210         (ft32_valid_pointer_mode): Likewise.
22211         (ft32_addr_space_pointer_mode): Likewise.
22212         (ft32_addr_space_legitimate_address_p): Likewise.
22213         * config/i386/i386-protos.h (ix86_operands_ok_for_move_multiple):
22214         Likewise.
22215         * config/i386/i386.c (ix86_setup_incoming_vararg_bounds): Likewise.
22216         (ix86_emit_outlined_ms2sysv_restore): Likewise.
22217         (iamcu_alignment): Likewise.
22218         (canonicalize_vector_int_perm): Likewise.
22219         (ix86_noce_conversion_profitable_p): Likewise.
22220         (ix86_mpx_bound_mode): Likewise.
22221         (ix86_operands_ok_for_move_multiple): Likewise.
22222         * config/microblaze/microblaze-protos.h
22223         (microblaze_expand_conditional_branch_reg): Likewise.
22224         * config/microblaze/microblaze.c
22225         (microblaze_expand_conditional_branch_reg): Likewise.
22226         * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
22227         Likewise.
22228         (rs6000_reassociation_width): Likewise.
22229         (rs6000_invalid_binary_op): Likewise.
22230         (fusion_p9_p): Likewise.
22231         (emit_fusion_p9_load): Likewise.
22232         (emit_fusion_p9_store): Likewise.
22233         * config/riscv/riscv-protos.h (riscv_regno_mode_ok_for_base_p):
22234         Likewise.
22235         (riscv_hard_regno_mode_ok_p): Likewise.
22236         (riscv_address_insns): Likewise.
22237         (riscv_split_symbol): Likewise.
22238         (riscv_legitimize_move): Likewise.
22239         (riscv_function_value): Likewise.
22240         (riscv_hard_regno_nregs): Likewise.
22241         (riscv_expand_builtin): Likewise.
22242         * config/riscv/riscv.c (riscv_build_integer_1): Likewise.
22243         (riscv_build_integer): Likewise.
22244         (riscv_split_integer): Likewise.
22245         (riscv_legitimate_constant_p): Likewise.
22246         (riscv_cannot_force_const_mem): Likewise.
22247         (riscv_regno_mode_ok_for_base_p): Likewise.
22248         (riscv_valid_base_register_p): Likewise.
22249         (riscv_valid_offset_p): Likewise.
22250         (riscv_valid_lo_sum_p): Likewise.
22251         (riscv_classify_address): Likewise.
22252         (riscv_legitimate_address_p): Likewise.
22253         (riscv_address_insns): Likewise.
22254         (riscv_load_store_insns): Likewise.
22255         (riscv_force_binary): Likewise.
22256         (riscv_split_symbol): Likewise.
22257         (riscv_force_address): Likewise.
22258         (riscv_legitimize_address): Likewise.
22259         (riscv_move_integer): Likewise.
22260         (riscv_legitimize_const_move): Likewise.
22261         (riscv_legitimize_move): Likewise.
22262         (riscv_address_cost): Likewise.
22263         (riscv_subword): Likewise.
22264         (riscv_output_move): Likewise.
22265         (riscv_canonicalize_int_order_test): Likewise.
22266         (riscv_emit_int_order_test): Likewise.
22267         (riscv_function_arg_boundary): Likewise.
22268         (riscv_pass_mode_in_fpr_p): Likewise.
22269         (riscv_pass_fpr_single): Likewise.
22270         (riscv_pass_fpr_pair): Likewise.
22271         (riscv_get_arg_info): Likewise.
22272         (riscv_function_arg): Likewise.
22273         (riscv_function_arg_advance): Likewise.
22274         (riscv_arg_partial_bytes): Likewise.
22275         (riscv_function_value): Likewise.
22276         (riscv_pass_by_reference): Likewise.
22277         (riscv_setup_incoming_varargs): Likewise.
22278         (riscv_print_operand): Likewise.
22279         (riscv_elf_select_rtx_section): Likewise.
22280         (riscv_save_restore_reg): Likewise.
22281         (riscv_for_each_saved_reg): Likewise.
22282         (riscv_register_move_cost): Likewise.
22283         (riscv_hard_regno_mode_ok_p): Likewise.
22284         (riscv_hard_regno_nregs): Likewise.
22285         (riscv_class_max_nregs): Likewise.
22286         (riscv_memory_move_cost): Likewise.
22287         * config/rl78/rl78-protos.h (rl78_split_movsi): Likewise.
22288         * config/rl78/rl78.c (rl78_split_movsi): Likewise.
22289         (rl78_addr_space_address_mode): Likewise.
22290         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
22291         Likewise.
22292         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
22293         (rs6000_reassociation_width): Likewise.
22294         (rs6000_invalid_binary_op): Likewise.
22295         (fusion_p9_p): Likewise.
22296         (emit_fusion_p9_load): Likewise.
22297         (emit_fusion_p9_store): Likewise.
22298         * config/visium/visium-protos.h (prepare_move_operands): Likewise.
22299         (ok_for_simple_move_operands): Likewise.
22300         (ok_for_simple_move_strict_operands): Likewise.
22301         (ok_for_simple_arith_logic_operands): Likewise.
22302         (visium_legitimize_reload_address): Likewise.
22303         (visium_select_cc_mode): Likewise.
22304         (output_cbranch): Likewise.
22305         (visium_split_double_move): Likewise.
22306         (visium_expand_copysign): Likewise.
22307         (visium_expand_int_cstore): Likewise.
22308         (visium_expand_fp_cstore): Likewise.
22309         * config/visium/visium.c (visium_pass_by_reference): Likewise.
22310         (visium_function_arg): Likewise.
22311         (visium_function_arg_advance): Likewise.
22312         (visium_libcall_value): Likewise.
22313         (visium_setup_incoming_varargs): Likewise.
22314         (visium_legitimate_constant_p): Likewise.
22315         (visium_legitimate_address_p): Likewise.
22316         (visium_legitimize_address): Likewise.
22317         (visium_secondary_reload): Likewise.
22318         (visium_register_move_cost): Likewise.
22319         (visium_memory_move_cost): Likewise.
22320         (prepare_move_operands): Likewise.
22321         (ok_for_simple_move_operands): Likewise.
22322         (ok_for_simple_move_strict_operands): Likewise.
22323         (ok_for_simple_arith_logic_operands): Likewise.
22324         (visium_function_value_1): Likewise.
22325         (rtx_ok_for_offset_p): Likewise.
22326         (visium_legitimize_reload_address): Likewise.
22327         (visium_split_double_move): Likewise.
22328         (visium_expand_copysign): Likewise.
22329         (visium_expand_int_cstore): Likewise.
22330         (visium_expand_fp_cstore): Likewise.
22331         (visium_split_cstore): Likewise.
22332         (visium_select_cc_mode): Likewise.
22333         (visium_split_cbranch): Likewise.
22334         (output_cbranch): Likewise.
22335         (visium_print_operand_address): Likewise.
22336         * expmed.c (flip_storage_order): Likewise.
22337         * expmed.h (emit_cstore): Likewise.
22338         (flip_storage_order): Likewise.
22339         * genrecog.c (validate_pattern): Likewise.
22340         * hsa-gen.c (gen_hsa_addr): Likewise.
22341         * internal-fn.c (expand_arith_overflow): Likewise.
22342         * ira-color.c (allocno_copy_cost_saving): Likewise.
22343         * lra-assigns.c (find_hard_regno_for_1): Likewise.
22344         * lra-constraints.c (prohibited_class_reg_set_mode_p): Likewise.
22345         (process_invariant_for_inheritance): Likewise.
22346         * lra-eliminations.c (move_plus_up): Likewise.
22347         * omp-low.c (lower_oacc_reductions): Likewise.
22348         * simplify-rtx.c (simplify_subreg): Likewise.
22349         * target.def (TARGET_SETUP_INCOMING_VARARG_BOUNDS): Likewise.
22350         (TARGET_CHKP_BOUND_MODE): Likewise..
22351         * targhooks.c (default_chkp_bound_mode): Likewise.
22352         (default_setup_incoming_vararg_bounds): Likewise.
22353         * targhooks.h (default_chkp_bound_mode): Likewise.
22354         (default_setup_incoming_vararg_bounds): Likewise.
22355         * tree-ssa-math-opts.c (divmod_candidate_p): Likewise.
22356         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
22357         (have_whole_vector_shift): Likewise.
22358         * tree-vect-stmts.c (vectorizable_load): Likewise.
22359         * doc/tm.texi: Regenerate.
22361 2017-07-05  Georg-Johann Lay  <avr@gjlay.de>
22363         Graceful degrade if Binutils PR21472 is not available.
22365         PR target/81072
22366         * configure.ac [target=avr]: WARN instead of ERROR if avrxmega3
22367         .rodata in flash test fails.
22368         (HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH): Define it if test passes.
22369         * confgure: Regenerate.
22370         * config.in: Regenerate.
22371         * config/avr/avr.c (avr_asm_named_section)
22372         [HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH]: Only trigger
22373         __do_copy_data for stuff in .rodata if flash_pm_offset = 0.
22374         (avr_asm_init_sections): Same.
22376 2017-07-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
22378         * config/arm/neon.md (fma<VCVTF:mode>4): Remove %?.
22379         (fma<VH:mode>4_intrinsic): Likewise.
22380         (*fmsub<VCVTF:mode>4): Likewise.
22381         (*fmsub<VH:mode>4_intrinsic): Likewise.
22383 2017-07-05  Georg-Johann Lay  <avr@gjlay.de>
22385         PR target/81305
22386         * config/avr/avr.c (avr_out_movhi_mr_r_xmega) [CONSTANT_ADDRESS_P]:
22387         Don't depend on "optimize > 0".
22388         (out_movhi_r_mr, out_movqi_mr_r): Same.
22389         (out_movhi_mr_r, out_movqi_r_mr): Same.
22390         (avr_address_cost) [CONSTANT_ADDRESS_P]: Don't depend cost for
22391         io_address_operand on "optimize > 0".
22393 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
22395         * tree-loop-distribution.c: Add general explanantion on the pass.
22396         (generate_loops_for_partition): Mark distributed loop.
22397         (pg_add_dependence_edges): New parameter.  Handle alias data
22398         dependence specially and record it in the parameter if asked.
22399         (struct pg_vdata, pg_edata, pg_edge_callback_data): New structs.
22400         (init_partition_graph_vertices, add_partition_graph_edge): New.
22401         (pg_skip_alias_edge, free_partition_graph_edata_cb): New.
22402         (free_partition_graph_vdata, build_partition_graph): New.
22403         (sort_partitions_by_post_order, merge_dep_scc_partitions): New.
22404         (pg_collect_alias_ddrs, break_alias_scc_partitions): New.
22405         (data_ref_segment_size, latch_dominated_by_data_ref): New.
22406         (compute_alias_check_pairs, version_loop_by_alias_check): New.
22407         (version_for_distribution_p, finalize_partitions): New.
22408         (distribute_loop): Handle alias data dependence specially.  Factor
22409         out loop fusion code as functions and call these functions.
22411 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
22413         * tree-loop-distribution.c (classify_partition): New parameter and
22414         better handle reduction statement.
22415         (rdg_build_partitions): Revise comment.
22416         (distribute_loop): Compute statements in all partitions and pass it
22417         to classify_partition.
22419 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
22421         * tree-loop-distribution.c (enum partition_type): New.
22422         (struct partition): New field type.
22423         (partition_merge_into): Add parameter.  Update partition type.
22424         (data_dep_in_cycle_p, update_type_for_merge): New functions.
22425         (build_rdg_partition_for_vertex): Compute partition type.
22426         (rdg_build_partitions): Dump partition type.
22427         (distribute_loop): Update calls to partition_merge_into.
22429 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
22431         * tree-loop-distribution.c (struct ddr_hasher): New.
22432         (ddr_hasher::hash, ::equal, get_data_dependence): New function.
22433         (ddrs_table): New.
22434         (classify_partition): Call get_data_dependence.
22435         (pg_add_dependence_edges): Ditto.
22436         (distribute_loop): Release data dependence hash table.
22438 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
22440         * tree-loop-distribution.c (ref_base_address): Delete.
22441         (similar_memory_accesses): Rename ...
22442         (share_memory_accesses): ... to this.  Check if partitions access
22443         the same memory reference.
22444         (distribute_loop): Call share_memory_accesses.
22446 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
22448         * tree-loop-distribution.c (struct partition): New field recording
22449         its data reference.
22450         (partition_alloc, partition_free): Init and release data refs.
22451         (partition_merge_into): Merge data refs.
22452         (build_rdg_partition_for_vertex): Collect data refs for partition.
22453         (pg_add_dependence_edges): Change parameters from vector to bitmap.
22454         Update uses.
22455         (distribute_loop): Remve data refs from vertice data of partition
22456         graph.
22458 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
22460         * tree-loop-distribution.c (params.h): Include header file.
22461         (MAX_DATAREFS_NUM, DR_INDEX): New macro.
22462         (datarefs_vec): New global var.
22463         (create_rdg_vertices): Use datarefs_vec directly.
22464         (free_rdg): Don't free data references.
22465         (build_rdg): Update use.  Don't free data references.
22466         (distribute_loop): Compute global variable for data references.
22467         Bail out if there are too many data references.
22469 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
22471         * tree-loop-distribution.c (loop_nest): New global var.
22472         (build_rdg): Use loop directly, rather than loop nest.
22473         (pg_add_dependence_edges): Remove loop nest parameter.  Use global
22474         variable directly.
22475         (distribute_loop): Compute global variable loop nest.  Update use.
22477 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
22479         * tree-loop-distribution.c (enum fuse_type, fuse_message): New.
22480         (partition_merge_into): New parameter.  Dump reason for fusion.
22481         (distribute_loop): Update use of partition_merge_into.
22483 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
22485         * tree-loop-distribution.c (bb_top_order_index): New.
22486         (bb_top_order_index_size, bb_top_order_cmp): New.
22487         (stmts_from_loop): Use topological order.
22488         (pass_loop_distribution::execute): Compute and release topological
22489         order for basic blocks.
22491 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
22493         * tree-loop-distribution.c (pass_loop_distribution::execute): Skip
22494         if no loops.
22496 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
22498         * cfgloop.h (struct loop): Add comment.  New field orig_loop_num.
22499         * cfgloopmanip.c (lv_adjust_loop_entry_edge): Comment change.
22500         * internal-fn.c (expand_LOOP_DIST_ALIAS): New function.
22501         * internal-fn.def (LOOP_DIST_ALIAS): New.
22502         * tree-vectorizer.c (fold_loop_vectorized_call): Rename to ...
22503         (fold_loop_internal_call): ... this.
22504         (vect_loop_dist_alias_call): New function.
22505         (set_uid_loop_bbs): Call fold_loop_internal_call.
22506         (vectorize_loops): Fold IFN_LOOP_VECTORIZED and IFN_LOOP_DIST_ALIAS
22507         internal calls.
22509 2017-07-04  Uros Bizjak  <ubizjak@gmail.com>
22511         PR target/81300
22512         * config/i386/i386.md (setcc + movzbl/and to xor + setcc peepholes):
22513         Require dead FLAGS_REG at the beginning of a peephole.
22515 2017-07-04  Uros Bizjak  <ubizjak@gmail.com>
22517         PR target/81294
22518         * config/i386/adxintrin.h (_subborrow_u32): Swap _X and _Y
22519         arguments in the call to __builtin_ia32_sbb_u32.
22520         (_subborrow_u64): Swap _X and _Y arguments in the call to
22521         __builtin_ia32_sbb_u64.
22523 2017-07-04  Jakub Jelinek  <jakub@redhat.com>
22525         PR debug/81278
22526         * tree-vrp.c (compare_assert_loc): Turn into a function template
22527         with stable template parameter.  Only test if a->e is NULL,
22528         !a->e == !b->e has been verified already.  Use e == NULL or
22529         e != NULL instead of e or ! e tests.  If stable is true, don't use
22530         iterative_hash_expr, on the other side allow a or b or both NULL
22531         and sort the NULLs last.
22532         (process_assert_insertions): Sort using compare_assert_loc<false>
22533         instead of compare_assert_loc, later sort using
22534         compare_assert_loc<true> before calling process_assert_insertions_for
22535         in a loop.  Use break instead of continue once seen NULL pointer.
22537 2017-07-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22539         * config/arm/driver-arm.c (arm_cpu_table): Add entry for ARM
22540         Cortex-R7 and Cortex-R8 processors.
22542 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
22544         * ipa-utils.c (ipa_merge_profiles): Fix merging when dst is
22545         uninitialized while src is not.
22547 2017-07-04  Richard Earnshaw  <rearnsha@arm.com>
22549         * common/config/arm/arm-common.c: Adjust include path for
22550         arm-cpu-cdata.h
22551         * config/arm/t-arm (TM_H): Adjust path for arm-cpu.h.
22552         (arm-cpu.h): Create in build directory.  Adjust dependency rules.
22553         (arm-cpu-data.h): Likewise.
22554         (arm-cpu-cdata.h): Likewise.
22555         * config/arm/arm-cpu.h: Delete.
22556         * config/arm/arm-cpu-cdata.h: Delete.
22557         * config/arm/arm-cpu-data.h: Delete.
22559 2017-07-04  James Greenhalgh  <james.greenhalgh@arm.com>
22561         * config/arm/arm-cpus.in (cortex-a55): New.
22562         (cortex-a75): Likewise.
22563         (cortex-a75.cortex-a55): Likewise.
22564         * config/arm/driver-arm.c (arm_cpu_table): Add cortex-a55 and
22565         cortex-a75.
22566         * doc/invoke.texi (-mcpu): Document cortex-a55 and cortex-a75.
22567         * config/arm/arm-cpu-cdata.h: Regenerate.
22568         * config/arm/arm-cpu-data.h: Regenerate.
22569         * config/arm/arm-cpu.h: Regenerate.
22570         * config/arm/arm-tables.opt: Regenerate.
22571         * config/arm/arm-tune.md: Regenerate.
22573 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
22575         * haifa-sched.c (sched_create_recovery_edges): Update profile.
22577 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
22579         * bb-reorder.c (better_edge_p): Fix handling of uninitialized
22580         probability.
22582 2017-07-04  Richard Sandiford  <richard.sandiford@linaro.org>
22584         PR tree-optimization/81292
22585         * tree-ssa-strlen.c (handle_builtin_strlen): When setting
22586         full_string_p, also call adjust_related_strinfos if the adjustment
22587         is simple, otherwise invalidate related strinfos.
22589 2017-07-04  Martin Liska  <mliska@suse.cz>
22591         PR sanitizer/81040
22592         * sanopt.c (sanitize_rewrite_addressable_params): Mark the
22593         newly created variable as DECL_IGNORED_P.
22595 2017-07-04  Martin Liska  <mliska@suse.cz>
22597         PR ipa/81293
22598         * ipa-inline.c (inline_small_functions):
22599         Use xstrdup_for_dump.
22601 2017-07-04  Tom de Vries  <tom@codesourcery.com>
22603         * graph.c (draw_cfg_edges): Save and restore EDGE_DFS_BACK.
22605 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
22607         PR target/81033
22608         * config/darwin.c (darwin_function_switched_text_sections):
22609         Fix spaces.
22611 2017-07-03  Jan Hubicka  <hubicka@ucw.cz>
22613         * tree-vect-loop-manip.c (vect_do_peeling): Fix scaling up.
22615 2017-07-03  Richard Earnshaw  <rearnsha@arm.com>
22617         * doc/invoke.texi (ARM Options): Add -mbe8 and -mbe32 to option summary.
22619 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
22621         * tree-vect-loop.c (vect_analyze_loop_2): Treat min_scalar_loop_bound,
22622         min_profitable_iters, and th as inclusive lower bounds.
22623         Fix LOOP_VINFO_PEELING_FOR_GAPS condition.
22624         (vect_estimate_min_profitable_iters): Return inclusive lower bounds
22625         for min_profitable_iters and min_profitable_estimate.
22626         (vect_transform_loop): Treat th as an inclusive lower bound.
22627         * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
22629 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
22631         PR target/81033
22632         * config/darwin.c (darwin_function_switched_text_sections):
22633         Replace DECL_NAME with DECL_ASSEMBLER_NAME, split assemble_name_raw
22634         in two pieces, and suppress the use of buf.
22636 2017-07-03  Nathan Sidwell  <nathan@acm.org>
22638         * hash-table.h (hash_table_mod1): Fix indentation.
22640 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
22642         PR middle-end/81290
22643         * predict.c (force_edge_cold): Be more careful about propagation
22644         backward.
22645         * profile-count.h (profile_probability::guessed,
22646         profile_probability::fdo, profile_count::guessed, profile_count::fdo):
22647         New.
22648         * tree-ssa-threadupdate.c (recompute_probabilities): Result is guessed.
22650 2017-07-03  James Greenhalgh  <james.greenhalgh@arm.com>
22652         * doc/invoke.texi (rcpc architecture extension): Document it.
22654 2017-07-03  Richard Biener  <rguenther@suse.de>
22656         PR tree-optimization/60510
22657         * tree-vect-loop.c (vect_create_epilog_for_reduction): Pass in
22658         the scalar reduction PHI and use it.
22659         (vectorizable_reduction): Properly guard the single_defuse_cycle
22660         path for non-SLP reduction chains where we cannot use it.
22661         Rework reduc_def/index and vector type deduction.  Rework
22662         vector operand gathering during reduction op code-gen.
22663         * tree-vect-slp.c (vect_analyze_slp): For failed SLP reduction
22664         chains dissolve the chain and leave it to non-SLP reduction
22665         handling.
22667 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
22669         * tree-data-ref.h (dr_alignment): Declare.
22670         * tree-data-ref.c (dr_alignment): New function.
22671         * tree-vectorizer.h (dataref_aux): Remove base_element_aligned.
22672         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
22673         set it.
22674         * tree-vect-stmts.c (vectorizable_store): Use dr_alignment.
22676 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
22678         * tree-data-ref.h (innermost_loop_behavior): Add base_alignment
22679         and base_misalignment fields.
22680         (DR_BASE_ALIGNMENT, DR_BASE_MISALIGNMENT): New macros.
22681         * tree-data-ref.c: Include builtins.h.
22682         (dr_analyze_innermost): Set up the new innmost_loop_behavior fields.
22683         * tree-vectorizer.h (STMT_VINFO_DR_BASE_ALIGNMENT): New macro.
22684         (STMT_VINFO_DR_BASE_MISALIGNMENT): Likewise.
22685         * tree-vect-data-refs.c: Include tree-cfg.h.
22686         (vect_compute_data_ref_alignment): Use the new innermost_loop_behavior
22687         fields instead of calculating an alignment here.
22688         (vect_analyze_data_refs): Use dr_analyze_innermost.  Dump the new
22689         innermost_loop_behavior fields.
22691 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
22693         * tree-data-ref.h (innermost_loop_behavior): Add a step_alignment
22694         field.
22695         (DR_STEP_ALIGNMENT): New macro.
22696         * tree-vectorizer.h (STMT_VINFO_DR_STEP_ALIGNMENT): Likewise.
22697         * tree-data-ref.c (dr_analyze_innermost): Initalize step_alignment.
22698         (create_data_ref): Print it.
22699         * tree-vect-stmts.c (vectorizable_load): Use the step alignment
22700         to tell whether the step preserves vector (mis)alignment.
22701         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
22702         Move the check for an integer step and generalise to all INTEGER_CST.
22703         (vect_analyze_data_refs): Set DR_STEP_ALIGNMENT when setting DR_STEP.
22704         Print the outer step alignment.
22706 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
22708         * tree-data-ref.h (innermost_loop_behavior): Replace aligned_to
22709         with offset_alignment.
22710         (DR_ALIGNED_TO): Delete.
22711         (DR_OFFSET_ALIGNMENT): New macro.
22712         * tree-vectorizer.h (STMT_VINFO_DR_ALIGNED_TO): Delete.
22713         (STMT_VINFO_DR_OFFSET_ALIGNMENT): New macro.
22714         * tree-data-ref.c (dr_analyze_innermost): Update after above changes.
22715         (create_data_ref): Likewise.
22716         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
22717         (vect_analyze_data_refs): Likewise.
22718         * tree-if-conv.c (if_convertible_loop_p_1): Use memset before
22719         creating dummy innermost behavior.
22721 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
22723         * tree-data-ref.h (dr_analyze_innermost): Replace the dr argument
22724         with a "innermost_loop_behavior *" and refeence tree.
22725         * tree-data-ref.c (dr_analyze_innermost): Likewise.
22726         (create_data_ref): Update call accordingly.
22727         * tree-predcom.c (find_looparound_phi): Likewise.
22729 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
22731         * tree-vectorizer.h (_stmt_vec_info): Replace individual dr_*
22732         fields with dr_wrt_vec_loop.
22733         (STMT_VINFO_DR_BASE_ADDRESS, STMT_VINFO_DR_INIT, STMT_VINFO_DR_OFFSET)
22734         (STMT_VINFO_DR_STEP, STMT_VINFO_DR_ALIGNED_TO): Update accordingly.
22735         (STMT_VINFO_DR_WRT_VEC_LOOP): New macro.
22736         (vect_dr_behavior): New function.
22737         (vect_create_addr_base_for_vector_ref): Remove loop parameter.
22738         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
22739         vect_dr_behavior.  Use a step_preserves_misalignment_p boolean to
22740         track whether the step preserves the misalignment.
22741         (vect_create_addr_base_for_vector_ref): Remove loop parameter.
22742         Use vect_dr_behavior.
22743         (vect_setup_realignment): Update call accordingly.
22744         (vect_create_data_ref_ptr): Likewise.  Use vect_dr_behavior.
22745         * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Update
22746         call to vect_create_addr_base_for_vector_ref.
22747         (vect_create_cond_for_align_checks): Likewise.
22748         * tree-vect-patterns.c (vect_recog_bool_pattern): Copy
22749         STMT_VINFO_DR_WRT_VEC_LOOP as a block.
22750         (vect_recog_mask_conversion_pattern): Likewise.
22751         * tree-vect-stmts.c (compare_step_with_zero): Use vect_dr_behavior.
22752         (new_stmt_vec_info): Remove redundant zeroing.
22754 2017-07-03  Richard Earnshaw  <rearnsha@arm.com>
22756         * common/config/arm/arm-common.c (arm_be8_option): New function.
22757         * config/arm/arm-isa.h (isa_feature): Add new feature bit isa_bit_be8.
22758         (ISA_ARMv6): Add isa_bit_be8.
22759         * config/arm/arm.h (arm_be8_option): Add prototype.
22760         (BE8_SPEC_FUNCTION): New define.
22761         (EXTRA_SPEC_FUNCTIONS): Add BE8_SPEC_FUNCTION.
22762         * config/arm/arm.opt (mbig-endian): Mark as Negative of mlittle-endian.
22763         (mlittle-endian): Similarly.
22764         (mbe8, mbe32): New options.
22765         * config/arm/bpabi.h (BE8_LINK_SPEC): Call arm_be8_option.
22766         * doc/invoke.texi (ARM Options): Document -mbe8 and -mbe32.
22768 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
22770         * tree-cfg.c (gimple_find_sub_bbs): Fix profile updating.
22772 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
22774         * tree-cfgcleanup.c (want_merge_blocks_p): New function.
22775         (cleanup_tree_cfg_bb): Use it.
22776         * profile-count.h (profile_count::of_for_merging, profile_count::merge):
22777         New functions.
22778         * tree-cfg.c (gimple_merge_blocks): Use profile_count::merge.
22780 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
22782         PR bootstrap/81285
22783         * loop-doloop.c (add_test): Update profile.
22785 2017-07-03  Martin Liska  <mliska@suse.cz>
22787         PR sanitize/81040
22788         * sanopt.c (rewrite_usage_of_param): New function.
22789         (sanitize_rewrite_addressable_params): Likewise.
22790         (pass_sanopt::execute): Call rewrite_usage_of_param.
22792 2017-07-03  Richard Biener  <rguenther@suse.de>
22794         * tree-vect-loop.c (vect_create_epilog_for_reduction): Revert
22795         back to using VIEW_CONVERT_EXPR.
22797 2017-07-03  Martin Liska  <mliska@suse.cz>
22799         PR other/78366
22800         * doc/extend.texi: Document when a resolver function is
22801         generated for target_clones.
22803 2017-07-03  Martin Liska  <mliska@suse.cz>
22805         * asan.c (asan_emit_stack_protection): Unpoison just red zones
22806         and shadow memory of auto variables which are subject of
22807         use-after-scope sanitization.
22808         (asan_expand_mark_ifn): Add do set only when is_poison.
22810 2016-07-03  Richard Biener  <rguenther@suse.de>
22812         * tree-vect-loop.c (vect_analyze_loop_operations): Also analyze
22813         reduction PHIs.
22814         (vect_force_simple_reduction): Record reduction def -> phi mapping.
22815         (vectorizable_reduction): Perform reduction PHI creation when
22816         visiting a reduction PHI and adjust and simplify code generation
22817         phase of the reduction op.  Cache dts, use fold_binary, not fold_build2.
22818         (vect_transform_loop): Visit reduction PHIs.
22819         * tree-vect-slp.c (vect_get_and_check_slp_defs): Record reduction
22820         defs into the SLP tree.
22821         (vect_build_slp_tree): Reduction defs terminate the recursion.
22822         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Allow lookup
22823         of reduction defs.
22824         (vect_get_vec_defs_for_stmt_copy): Export.
22825         (vect_get_vec_defs): Likewise.
22826         * tree-vectorizer.h (struct _stmt_vec_info): Amend reduc_def
22827         purpose.
22828         (vect_get_vec_defs_for_stmt_copy): Declare.
22829         (vect_get_vec_defs): Likewise.
22831 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
22833         * tree-data-ref.c (dr_analyze_innermost): Replace the "nest"
22834         parameter with a "loop" parameter and use it instead of the
22835         loop containing DR_STMT.  Don't check simple_iv when doing
22836         BB analysis.  Describe the two analysis modes in the comment.
22838 2017-07-03  Tom de Vries  <tom@codesourcery.com>
22840         PR tree-optimization/69468
22841         * tree-ssa-tail-merge.c (ignore_edge_flags): New constant.
22842         (find_same_succ_bb): Handle ignore_edge_flags.
22844 2017-07-03  Tom de Vries  <tom@codesourcery.com>
22846         PR tree-optimization/81192
22847         * tree-ssa-tail-merge.c (same_succ_hash): Use bb->loop_father->num in
22848         hash.
22849         (same_succ::equal): Don't find bbs to be equal if bb->loop_father
22850         differs.
22851         (find_same_succ_bb): Remove obsolete test on bb->loop_father->latch.
22853 2017-07-03  Tom de Vries  <tom@codesourcery.com>
22855         PR tree-optimization/81192
22856         * tree-ssa-tail-merge.c (same_succ_flush_bb): Handle
22857         BB_SAME_SUCC (bb) == NULL.
22859 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
22861         * cfgrtl.c (rtl_verify_edges): Enable checking of profile_probability
22862         consistency.
22864 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
22866         * dumpfile.c: Include profile-count.h
22867         * tree-cfg.c (gimple_duplicate_sese_tail): Drop UNUSED attributes;
22868         update profile.
22869         (insert_cond_bb): Update profile.
22870         * tree-cfg.h (insert_cond_bb): Update prototype.
22871         * tree-chkp-opt.c (chkp_optimize_string_function_calls): Update.
22872         * tree-dump.c: Do not include tree-cfg.
22874 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
22876         * bb-reorder.c (fix_up_crossing_landing_pad): Update profile.
22878 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
22880         * expect.c (dw2_build_landing_pads): Update profile of the landing pad
22881         bb.
22883 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
22885         * tree-complex.c (expand_complex_div_wide): update profile.
22887 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
22888             Alan Hayward  <alan.hayward@arm.com>
22889             David Sherwood  <david.sherwood@arm.com>
22891         * Makefile.in (MACHMODE_H): Remove insn-modes.h
22892         (CORETYPES_H): New define.
22893         (MOSTLYCLEANFILES): Add insn-modes-inline.h.
22894         (insn-modes-inline.h, s-modes-inline-h): New rules.
22895         (generated_files): Add insn-modes-inline.h.
22896         (RTL_BASE_H, TREE_CORE_H): Use CORETYPES_H instead of coretypes.h.
22897         (build/gensupport.o, build/ggc-none.o, build/print-rtl.o): Likewise.
22898         (build/read-md.o, build/read-rtl.o, build/rtl.o): Likewise.
22899         (build/vec.o, build/hash-table.o, build/inchash.o): Likewise.
22900         (build/gencondmd.o, build/genattr.o, build/genattr-common.o): Likewise.
22901         (build/genattrtab.o, build/genautomata.o, build/gencheck.o): Likewise.
22902         (build/gencodes.o, build/genconditions.o): Likewise.
22903         (build/genconfig.o, build/genconstants.o, build/genemit.o): Likewise.
22904         (build/genenums.o, build/genextract.o, build/genflags.o): Likewise.
22905         (build/gentarget-def.o, build/genmddeps.o, build/genopinit.o)
22906         (build/genoutput.o, build/genpeep.o, build/genpreds.o): Likewise.
22907         (build/genrecog.o, build/genmddump.o, build/genmatch.o): Likewise.
22908         (build/gencfn-macros.o, build/gcov-iov.o): Likewise.
22909         * coretypes.h: Include everything up to real.h for generators.
22910         Include insn-modes.h first.  Include wide-int-print.h after
22911         wide-int.h.  Include insn-modes-inline.h and then machmode.h.
22912         * machmode.h: Don't include insn-modes.h here.
22913         * function-tests.c: Remove includes of signop.h, machmode.h,
22914         double-int.h and wide-int.h.
22915         * rtl.h: Likewise.
22916         * gcc-rich-location.c: Remove includes of machmode.h, double-int.h
22917         and wide-int.h.
22918         * optc-save-gen.awk: Likewise.
22919         * gencheck.c (BITS_PER_UNIT): Delete dummy definition.
22920         * godump.c: Remove include of wide-int-print.h.
22921         * pretty-print.h: Likewise.
22922         * wide-int-print.cc: Likewise.
22923         * wide-int.cc: Likewise.
22924         * hash-map-tests.c: Remove include of signop.h.
22925         * hash-set-tests.c: Likewise.
22926         * rtl-tests.c: Likewise.
22927         * mkconfig.sh: Remove include of machmode.h.
22928         * genmodes.c (emit_insn_modes_h): Split emission of inline functions
22929         into...
22930         (emit_insn_modes_inline_h): ...this new function.  Emit the code
22931         into an insn-modes-inline.h header file, adding appropriate
22932         include guards and end comments.
22933         (emit_insn_modes_c_header): Remove include of machmode.h.
22934         (emit_min_insn_modes_c_header): Include coretypes.h rather than
22935         machmode.h.
22936         (main): Handle -i flag and call emit_insn_modes_inline_h when
22937         it is passed.
22939 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
22941         * tree-ssa-strlen.c (strinfo): Rename the length field to
22942         nonzero_chars.  Add a full_string_p field.
22943         (compare_nonzero_chars, zero_length_string_p): New functions.
22944         (get_addr_stridx): Add an offset_out parameter.
22945         Use compare_nonzero_chars.
22946         (get_stridx): Update accordingly.  Use compare_nonzero_chars.
22947         (new_strinfo): Update after above changes to strinfo.
22948         (set_endptr_and_length): Set full_string_p.
22949         (get_string_length): Update after above changes to strinfo.
22950         (unshare_strinfo): Update call to new_strinfo.
22951         (maybe_invalidate): Likewise.
22952         (get_stridx_plus_constant): Change off to unsigned HOST_WIDE_INT.
22953         Use compare_nonzero_chars and zero_string_p.  Treat nonzero_chars
22954         as a uhwi instead of an shwi.  Update after above changes to
22955         strinfo and new_strinfo.
22956         (zero_length_string): Assert that chainsi contains full strings.
22957         Use zero_length_string_p.  Update call to new_strinfo.
22958         (adjust_related_strinfos): Update after above changes to strinfo.
22959         Copy full_string_p from origsi.
22960         (adjust_last_stmt): Use zero_length_string_p.
22961         (handle_builtin_strlen): Update after above changes to strinfo and
22962         new_strinfo.  Install the lhs as the string length if the previous
22963         entry didn't describe a full string.
22964         (handle_builtin_strchr): Update after above changes to strinfo
22965         and new_strinfo.
22966         (handle_builtin_strcpy): Likewise.
22967         (handle_builtin_strcat): Likewise.
22968         (handle_builtin_malloc): Likewise.
22969         (handle_pointer_plus): Likewise.
22970         (handle_builtin_memcpy): Likewise.  Track nonzero characters
22971         that aren't necessarily followed by a nul terminator.
22972         (handle_char_store): Likewise.
22974 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
22976         PR tree-optimization/80769
22977         * tree-ssa-strlen.c (strinfo): Document that "stmt" is also used
22978         for malloc and calloc.  Document the new invariant that all related
22979         strinfos have delayed lengths or none do.
22980         (verify_related_strinfos): Move earlier in file.
22981         (set_endptr_and_length): New function, split out from...
22982         (get_string_length): ...here.  Also set the lengths of related
22983         strinfos.
22984         (zero_length_string): Assert that chainsi has known (rather than
22985         delayed) lengths.
22986         (adjust_related_strinfos): Likewise.
22988 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
22990         PR tree-optimization/81136
22991         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Only
22992         assert that two references with the same misalignment have the same
22993         compile-time misalignment if those compile-time misalignments
22994         are known.
22996 2017-07-01  Andi Kleen  <ak@linux.intel.com>
22998         * print-tree.c (print_node): Print all attributes.
23000 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
23002         * cfg.c (scale_bbs_frequencies): New function.
23003         * cfg.h (scale_bbs_frequencies): Declare it.
23004         * cfgloopanal.c (single_likely_exit): Cleanup.
23005         * cfgloopmanip.c (scale_loop_frequencies): Take profile_probability
23006         as parameter.
23007         (scale_loop_profile): Likewise.
23008         (loop_version): Likewise.
23009         (create_empty_loop_on_edge): Update.
23010         * cfgloopmanip.h (scale_loop_frequencies, scale_loop_profile,
23011         scale_loop_frequencies, scale_loop_profile, loopify,
23012         loop_version): Update prototypes.
23013         * modulo-sched.c (sms_schedule): Update.
23014         * predict.c (unlikely_executed_edge_p): Also check probability.
23015         (probably_never_executed_edge_p): Fix typo.
23016         * tree-if-conv.c (version_loop_for_if_conversion): Update.
23017         * tree-parloops.c (gen_parallel_loop): Update.
23018         * tree-ssa-loop-ivcanon.c (try_peel_loop): Update.
23019         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
23020         * tree-ssa-loop-split.c (split_loop): Update.
23021         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
23022         * tree-vect-loop-manip.c (vect_do_peeling): Update.
23023         (vect_loop_versioning): Update.
23024         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
23026 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
23028         * trans-mem.c (split_bb_make_tm_edge): Update profile.
23030 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
23032         * tree-if-conv.c (combine_blocks): Use make_single_succ_edge
23033         to keep profile consistent.
23035 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
23037         * cfgrtl.c (rtl_flow_call_edges_add): Update profile.
23038         * tree-cfg.c (gimple_flow_call_edges_add): Likewise.
23039         * profile-count.h (max_safe_multiplier): Make unsigned.
23040         (profile_count::guessed_zero): New.
23042 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
23044         * bb-reorder.c (fix_up_crossing_landing_pad,
23045         fix_crossing_conditional_branches): Use make_single_succ_edge
23046         to keep profile consistent.
23048 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
23050         * tree-vect-loop.c (optimize_mask_stores): Use make_single_succ_edge
23051         to update profile.
23053 2017-07-01  Jakub Jelinek  <jakub@redhat.com>
23055         PR sanitizer/81262
23056         * bb-reorder.c (fix_up_fall_thru_edges): Move variable declarations to
23057         the right scopes, make sure cond_jump isn't preserved between multiple
23058         iterations.  Search for fallthru edge whenever there are 3+ edges and
23059         use find_fallthru_edge for it.
23061 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
23063         Patch by Alexander Monakov <amonakov@ispras.ru>
23064         * sel-sched-ir.c (compute_succs_info): Handle uninitialized
23065         probabilities consistently.
23067 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
23069         * pa.c (pa_expand_compare_and_swap_loop): Update call of
23070         emit_cmp_and_jump_insns.
23072 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
23074         PR ipa/81261
23075         * tree-inline.c (expand_call_inline): Combine profile statuses.
23077 2017-06-30  Andrew Pinski  <apinski@cavium.com>
23079         * tree-if-conv.c (predicate_scalar_phi): Update new_stmt if
23080         fold_stmt returned true.
23082 2017-06-30  Nathan Sidwell  <nathan@acm.org>
23084         * ggc.h (empty_string): Delete.
23085         * cfgexpand.c (expand_asm_stmt): Use plain "".
23086         * optabs.c (expand_asm_memory_barrier): Likewise.
23087         * stringpool.c (empty_string): Delete.
23088         (digit_vector, digit_string): Delete.
23089         (ggc_alloc_string): Use plain "", don't optimize single digit
23090         strings.  Use ggc_alloc_atomic.
23092 2017-06-30  Richard Earnshaw  <rearnsha@arm.com>
23094         * rtlanal.c (insn_rtx_cost): If a parallel contains exactly one
23095         comparison set and one other set, use the cost of the non-comparison
23096         set.
23098 2017-06-30  Nathan Sidwell  <nathan@acm.org>
23100         * ggc.h: Replace all 'static inline' with plain 'inline'.  Fix
23101         some formatting.
23103 2017-06-30  Peter Bergner  <bergner@vnet.ibm.com>
23105         * tree-cfg.c (group_case_labels_stmt): Merge scanning and compressing
23106         loops.  Remove now unneeded calls to gimple_switch_set_label() that
23107         just set removed labels to NULL_TREE.
23109 2017-06-30  Aldy Hernandez  <aldyh@redhat.com>
23111         * tree-ssanames.c (set_range_info_raw): Abstract from ...
23112         (set_range_info): ...here.  Only call set_range_info_raw if domain
23113         is useful.
23114         (set_nonzero_bits): Call set_range_info_raw.
23115         * tree-ssanames.h (set_range_info_raw): New.
23117 2017-06-30  Jakub Jelinek  <jakub@redhat.com>
23119         PR target/81225
23120         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): For V8FI,
23121         V16FI and VI8F_256 iterators, use <store_mask_predicate> instead
23122         of nonimmediate_operand and <store_mask_constraint> instead of m
23123         for the input operand.  For V8FI iterator, always split if input
23124         is a MEM.  For V16FI and V8SF_256 iterators, don't test if both
23125         operands are MEM if <mask_applied>.  For VI4F_256 iterator, use
23126         <store_mask_predicate> instead of register_operand and
23127         <store_mask_constraint> instead of v for the input operand.  Make
23128         sure both operands aren't MEMs for if not <mask_applied>.
23130 2017-06-30  Sylvestre Ledru  <sylvestre@debian.org>
23132         * lto-wrapper.c (copy_file) Close both file descriptors before
23133         exiting normally.
23135 2017-06-30  Martin Liska  <mliska@suse.cz>
23137         PR ipa/81214
23138         * multiple_target.c (create_dispatcher_calls): Make ifunc
23139         also for function that don't have calls or are not referenced.
23141 2017-06-30  Richard Biener  <rguenther@suse.de>
23143         * tree-vect-slp.c (vect_slp_analyze_node_operations): Only
23144         analyze the first scalar stmt.  Move vector type computation
23145         for the BB case here from ...
23146         * tree-vect-stmts.c (vect_analyze_stmt): ... here.  Guard
23147         live operation processing in the SLP case properly.
23149 2017-06-30  Richard Biener  <rguenther@suse.de>
23151         * graph.c (draw_cfg_node_succ_edges): Fix broken dot syntax.
23153 2017-06-30  Martin Liska  <mliska@suse.cz>
23155         PR sanitizer/81021
23156         * tree-eh.c (lower_resx): Call BUILT_IN_ASAN_HANDLE_NO_RETURN
23157         before BUILT_IN_UNWIND_RESUME when ASAN is used.
23159 2017-06-30  Yvan Roux  <yvan.roux@linaro.org>
23161         * doc/invoke.texi (AArch64): Add missing options and remove redundant
23162         ones.
23164 2017-06-30  Richard Biener  <rguenther@suse.de>
23166         PR tree-optimization/81249
23167         * tree-vect-loop.c (vect_create_epilog_for_reduction): Convert
23168         condition reduction result to original scalar type.
23170 2017-06-30  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23172         * profile-count.h (enum profile_quality): Fix typos and whitespace
23173         issues.
23175 2017-06-30  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23177         * config/s390/s390.c (s390_expand_setmem): Adjust to the new data
23178         type for branch probabilities.
23180 2017-06-29  Julian Brown  <julian@codesourcery.com>
23181             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
23183         * config/aarch64/aarch64-fusion-pairs.def: Add ALU_BRANCH entry.
23184         * config/aarch64/aarch64.c (AARCH64_FUSE_ALU_BRANCH): New fusion type.
23185         (thunderx2t99_tunings): Set AARCH64_FUSE_ALU_BRANCH flag.
23186         (aarch_macro_fusion_pair_p): Add support for AARCH64_FUSE_ALU_BRANCH.
23188 2017-06-29  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
23190         * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Push the
23191         check for CC usage into AARCH64_FUSE_CMP_BRANCH.
23192         * config/i386/i386.c (ix86_macro_fusion_pair_p): Push the check for
23193         CC usage from generic code to here.
23194         * sched-deps.c (sched_macro_fuse_insns): Move the condition for
23195         CC usage into the target macros.
23197 2017-06-29  Maya Rashish  <coypu@sdf.org>
23199         * config/netbsd.h (NETBSD_LIB_SPEC): Add -lc when creating shared
23200         objects.
23202 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
23204         * arm/arm-builtins.c: Include profile-count.h
23205         * except.c (sjlj_emit_function_enter): Use
23206         profile_probability::unlikely.
23208 2017-06-29  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23210         * config/rs6000/rs6000.c (toc_relative_expr_p): Make tocrel_base
23211         and tocrel_offset be pointer args rather than implicitly using
23212         static versions.
23213         (legitimate_constant_pool_address_p, rs6000_emit_move,
23214         const_load_sequence_p, adjust_vperm): Add local tocrel_base and
23215         tocrel_offset and use in toc_relative_expr_p call.
23216         (print_operand, print_operand_address): Use static tocrel_base_oac
23217         and tocrel_offset_oac.
23218         (rs6000_output_addr_const_extra): Use static tocrel_base_oac and
23219         tocrel_offset_oac.
23221 2017-06-29  Maya Rashish  <coypu@sdf.org>
23223         * config/vax/builtins.md (ffssi2_internal): Correct constraint.
23225 2017-06-29  Eric Botcazou  <ebotcazou@adacore.com>
23227         * expr.c (expand_expr) <normal_inner_ref>: When testing for unaligned
23228         objects, take into account only the alignment of 'op0' and 'mode1' if
23229         'op0' is a MEM.
23231 2017-06-29  Steve Ellcey  <sellcey@cavium.com>
23233         * ccmp.c (ccmp_tree_comparison_p): New function.
23234         (ccmp_candidate_p): Update to use above function.
23235         (get_compare_parts): New function.
23236         (expand_ccmp_next): Update to use new functions.
23237         (expand_ccmp_expr_1): Take tree arg instead of gimple, update to use
23238         new functions.
23239         (expand_ccmp_expr): Pass tree instead of gimple to expand_ccmp_expr_1,
23240         take mode as argument.
23241         * ccmp.h (expand_ccmp_expr): Add mode as argument.
23242         * expr.c (expand_expr_real_1): Pass mode as argument.
23244 2017-06-29  Segher Boessenkool  <segher@kernel.crashing.org>
23246         * combine.c (combine_instructions): Print insns to dump_file, together
23247         with their costs.
23249 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
23251         * asan.c (asan_emit_stack_protection): Update.
23252         (create_cond_insert_point): Update.
23253         * auto-profile.c (afdo_propagate_circuit): Update.
23254         * basic-block.h (struct edge_def): Turn probability to
23255         profile_probability.
23256         (EDGE_FREQUENCY): Update.
23257         * bb-reorder.c (find_traces_1_round): Update.
23258         (better_edge_p): Update.
23259         (sanitize_hot_paths): Update.
23260         * cfg.c (unchecked_make_edge): Initialize probability to uninitialized.
23261         (make_single_succ_edge): Update.
23262         (check_bb_profile): Update.
23263         (dump_edge_info): Update.
23264         (update_bb_profile_for_threading): Update.
23265         * cfganal.c (connect_infinite_loops_to_exit): Initialize new edge
23266         probabilitycount to 0.
23267         * cfgbuild.c (compute_outgoing_frequencies): Update.
23268         * cfgcleanup.c (try_forward_edges): Update.
23269         (outgoing_edges_match): Update.
23270         (try_crossjump_to_edge): Update.
23271         * cfgexpand.c (expand_gimple_cond): Update make_single_succ_edge.
23272         (expand_gimple_tailcall): Update.
23273         (construct_init_block): Use make_single_succ_edge.
23274         (construct_exit_block): Use make_single_succ_edge.
23275         * cfghooks.c (verify_flow_info): Update.
23276         (redirect_edge_succ_nodup): Update.
23277         (split_edge): Update.
23278         (account_profile_record): Update.
23279         * cfgloopanal.c (single_likely_exit): Update.
23280         * cfgloopmanip.c (scale_loop_profile): Update.
23281         (set_zero_probability): Remove.
23282         (duplicate_loop_to_header_edge): Update.
23283         * cfgloopmanip.h (loop_version): Update prototype.
23284         * cfgrtl.c (try_redirect_by_replacing_jump): Update.
23285         (force_nonfallthru_and_redirect): Update.
23286         (update_br_prob_note): Update.
23287         (rtl_verify_edges): Update.
23288         (purge_dead_edges): Update.
23289         (rtl_lv_add_condition_to_bb): Update.
23290         * cgraph.c: (cgraph_edge::redirect_call_stmt_to_calle): Update.
23291         * cgraphunit.c (init_lowered_empty_function): Update.
23292         (cgraph_node::expand_thunk): Update.
23293         * cilk-common.c: Include profile-count.h
23294         * dojump.c (inv): Remove.
23295         (jumpifnot): Update.
23296         (jumpifnot_1): Update.
23297         (do_jump_1): Update.
23298         (do_jump): Update.
23299         (do_jump_by_parts_greater_rtx): Update.
23300         (do_compare_rtx_and_jump): Update.
23301         * dojump.h (jumpifnot, jumpifnot_1, jumpif_1, jumpif, do_jump,
23302         do_jump_1. do_compare_rtx_and_jump): Update prototype.
23303         * dwarf2cfi.c: Include profile-count.h
23304         * except.c (dw2_build_landing_pads): Use make_single_succ_edge.
23305         (sjlj_emit_dispatch_table): Likewise.
23306         * explow.c: Include profile-count.h
23307         * expmed.c (emit_store_flag_force): Update.
23308         (do_cmp_and_jump): Update.
23309         * expr.c (compare_by_pieces_d::generate): Update.
23310         (compare_by_pieces_d::finish_mode): Update.
23311         (emit_block_move_via_loop): Update.
23312         (store_expr_with_bounds): Update.
23313         (store_constructor): Update.
23314         (expand_expr_real_2): Update.
23315         (expand_expr_real_1): Update.
23316         * expr.h (try_casesi, try_tablejump): Update prototypes.
23317         * gimple-pretty-print.c (dump_probability): Update.
23318         (dump_profile): New.
23319         (dump_gimple_label): Update.
23320         (dump_gimple_bb_header): Update.
23321         * graph.c (draw_cfg_node_succ_edges): Update.
23322         * hsa-gen.c (convert_switch_statements): Update.
23323         * ifcvt.c (cheap_bb_rtx_cost_p): Update.
23324         (find_if_case_1): Update.
23325         (find_if_case_2): Update.
23326         * internal-fn.c (expand_arith_overflow_result_store): Update.
23327         (expand_addsub_overflow): Update.
23328         (expand_neg_overflow): Update.
23329         (expand_mul_overflow): Update.
23330         (expand_vector_ubsan_overflow): Update.
23331         * ipa-cp.c (good_cloning_opportunity_p): Update.
23332         * ipa-split.c (split_function): Use make_single_succ_edge.
23333         * ipa-utils.c (ipa_merge_profiles): Update.
23334         * loop-doloop.c (add_test): Update.
23335         (doloop_modify): Update.
23336         * loop-unroll.c (compare_and_jump_seq): Update.
23337         (unroll_loop_runtime_iterations): Update.
23338         * lra-constraints.c (lra_inheritance): Update.
23339         * lto-streamer-in.c (input_cfg): Update.
23340         * lto-streamer-out.c (output_cfg): Update.
23341         * mcf.c (adjust_cfg_counts): Update.
23342         * modulo-sched.c (sms_schedule): Update.
23343         * omp-expand.c (expand_omp_for_init_counts): Update.
23344         (extract_omp_for_update_vars): Update.
23345         (expand_omp_ordered_sink): Update.
23346         (expand_omp_for_ordered_loops): Update.
23347         (expand_omp_for_generic): Update.
23348         (expand_omp_for_static_nochunk): Update.
23349         (expand_omp_for_static_chunk): Update.
23350         (expand_cilk_for): Update.
23351         (expand_omp_simd): Update.
23352         (expand_omp_taskloop_for_outer): Update.
23353         (expand_omp_taskloop_for_inner): Update.
23354         * omp-simd-clone.c (simd_clone_adjust): Update.
23355         * optabs.c (expand_doubleword_shift): Update.
23356         (expand_abs): Update.
23357         (emit_cmp_and_jump_insn_1): Update.
23358         (expand_compare_and_swap_loop): Update.
23359         * optabs.h (emit_cmp_and_jump_insns): Update prototype.
23360         * predict.c (predictable_edge_p): Update.
23361         (edge_probability_reliable_p): Update.
23362         (set_even_probabilities): Update.
23363         (combine_predictions_for_insn): Update.
23364         (combine_predictions_for_bb): Update.
23365         (propagate_freq): Update.
23366         (estimate_bb_frequencies): Update.
23367         (force_edge_cold): Update.
23368         * profile-count.c (profile_count::dump): Add missing space into dump.
23369         (profile_count::debug): Add newline.
23370         (profile_count::differs_from_p): Explicitly convert to unsigned.
23371         (profile_count::stream_in): Update.
23372         (profile_probability::dump): New member function.
23373         (profile_probability::debug): New member function.
23374         (profile_probability::differs_from_p): New member function.
23375         (profile_probability::differs_lot_from_p): New member function.
23376         (profile_probability::stream_in): New member function.
23377         (profile_probability::stream_out): New member function.
23378         * profile-count.h (profile_count_quality): Rename to ...
23379         (profile_quality): ... this one.
23380         (profile_probability): New.
23381         (profile_count): Update.
23382         * profile.c (compute_branch_probabilities): Update.
23383         * recog.c (peep2_attempt): Update.
23384         * sched-ebb.c (schedule_ebbs): Update.
23385         * sched-rgn.c (find_single_block_region): Update.
23386         (compute_dom_prob_ps): Update.
23387         (schedule_region): Update.
23388         * sel-sched-ir.c (compute_succs_info): Update.
23389         * stmt.c (struct case_node): Update.
23390         (do_jump_if_equal): Update.
23391         (get_outgoing_edge_probs): Update.
23392         (conditional_probability): Update.
23393         (emit_case_dispatch_table): Update.
23394         (expand_case): Update.
23395         (expand_sjlj_dispatch_table): Update.
23396         (emit_case_nodes): Update.
23397         * targhooks.c: Update.
23398         * tracer.c (better_p): Update.
23399         (find_best_successor): Update.
23400         * trans-mem.c (expand_transaction): Update.
23401         * tree-call-cdce.c: Update.
23402         * tree-cfg.c (gimple_split_edge): Upate.
23403         (move_sese_region_to_fn): Upate.
23404         * tree-cfgcleanup.c (cleanup_control_expr_graph): Upate.
23405         * tree-eh.c (lower_resx): Upate.
23406         (cleanup_empty_eh_move_lp): Upate.
23407         * tree-if-conv.c (version_loop_for_if_conversion): Update.
23408         * tree-inline.c (copy_edges_for_bb): Update.
23409         (copy_cfg_body): Update.
23410         * tree-parloops.c (gen_parallel_loop): Update.
23411         * tree-profile.c (gimple_gen_ic_func_profiler): Update.
23412         (gimple_gen_time_profiler): Update.
23413         * tree-ssa-dce.c (remove_dead_stmt): Update.
23414         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
23415         * tree-ssa-loop-im.c (execute_sm_if_changed): Update.
23416         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
23417         (unloop_loops): Update.
23418         (try_peel_loop): Update.
23419         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
23420         * tree-ssa-loop-split.c (connect_loops): Update.
23421         (split_loop): Update.
23422         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
23423         (hoist_guard): Update.
23424         * tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
23425         * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
23426         (value_replacement): Update.
23427         * tree-ssa-reassoc.c (branch_fixup): Update.
23428         * tree-ssa-tail-merge.c (replace_block_by): Update.
23429         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
23430         (create_edge_and_update_destination_phis): Update.
23431         (compute_path_counts): Update.
23432         (recompute_probabilities): Update.
23433         (update_joiner_offpath_counts): Update.
23434         (freqs_to_counts_path): Update.
23435         (duplicate_thread_path): Update.
23436         * tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
23437         (struct switch_conv_info): Update.
23438         (gen_inbound_check): Update.
23439         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
23440         (vect_do_peeling): Update.
23441         (vect_loop_versioning): Update.
23442         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
23443         (optimize_mask_stores): Update.
23444         * ubsan.c (ubsan_expand_null_ifn): Update.
23445         * value-prof.c (gimple_divmod_fixed_value): Update.
23446         (gimple_divmod_fixed_value_transform): Update.
23447         (gimple_mod_pow2): Update.
23448         (gimple_mod_pow2_value_transform): Update.
23449         (gimple_mod_subtract): Update.
23450         (gimple_mod_subtract_transform): Update.
23451         (gimple_ic): Update.
23452         (gimple_stringop_fixed_value): Update.
23453         (gimple_stringops_transform): Update.
23454         * value-prof.h: Update.
23456 2017-06-29  Carl Love  <cel@us.ibm.com>
23458         * config/rs6000/rs6000-c.c: Add support for built-in functions
23459         vector signed int vec_signed (vector float);
23460         vector signed long long vec_signed (vector double);
23461         vector signed int vec_signed2 (vector double, vector double);
23462         vector signed int vec_signede (vector double);
23463         vector signed int vec_signedo (vector double);
23464         * config/rs6000/rs6000.c (rs6000_generate_vsigned2_code): Add
23465         instruction generator.
23466         * config/rs6000/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
23467         UNSPEC_VSX_VSIGNED2): Add UNSPECS.
23468         (vsx_xvcvspsxws, vsx_xvcvdpuxds_scale, vsx_xvcvspuxws, vsigned2_v2df):
23469         Add define_insn.
23470         (vsignedo_v2df, vsignede_v2df, vunsigned2_v2df, vunsignedo_v2df,
23471         vunsignede_v2df): Add define_expands.
23472         * config/rs6000/rs6000-builtin.def (VEC_SIGNED, VEC_UNSIGNED,
23473         VEC_SIGNED2, VEC_UNSIGNED2, VEC_SIGNEDE, VEC_UNSIGNEDE, VEC_SIGNEDO,
23474         VEC_UNSIGNEDO): Add definitions.
23475         * config/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
23476         UNSPEC_VSX_VSIGNED2): Add UNSPECs.
23477         (vsx_xvcvspsxws, vsx_xvcvspuxws): Add define_insn.
23478         (vsigned2_v2df, vsigendo_v2df, vsignede_v2df,
23479         vunsigned2_v2df, vunsignedo_v2df, vunsignede_v2df): Add define_expands.
23480         * config/rs6000/altivec.h (vec_signed, vec_signed2,
23481         vec_signede and vec_signedo, vec_unsigned, vec_unsigned2,
23482         vec_unsignede, vec_unsignedo): Add builtin defines.
23483         * config/rs6000-protos.h (rs6000_generate_vsigned2_code): Add extern
23484         declaration.
23485         * doc/extend.texi: Update the built-in documentation file for the
23486         new built-in functions.
23488 2017-06-29  Richard Biener  <rguenther@suse.de>
23490         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Do not add
23491         reduction chains to LOOP_VINFO_REDUCTIONS.
23492         * tree-vect-slp.c (vect_analyze_slp): Continue looking for
23493         SLP reductions after processing reduction chains.
23495 2017-06-29  Nathan Sidwell  <nathan@acm.org>
23497         * builtins.c (fold_builtin_FUNCTION): Use
23498         lang_hooks.decl_printable_name.
23500 2017-06-29  Peter Bergner  <bergner@vnet.ibm.com>
23502         PR middle-end/81194
23503         * cfgexpand.c (expand_gimple_stmt_1): Handle switch statements
23504         with only one label.
23505         * stmt.c (expand_case): Assert NCASES is greater than one.
23507 2017-06-29  Richard Biener  <rguenther@suse.de>
23509         * tree-cfg.c (group_case_labels_stmt): Return whether we changed
23510         anything.
23511         (group_case_labels): Likewise.
23512         (find_taken_edge): Push sanity checking on val to workers...
23513         (find_taken_edge_cond_expr): ... here
23514         (find_taken_edge_switch_expr): ... and here, handle cases
23515         with just a default label.
23516         * tree-cfg.h (group_case_labels_stmt): Adjust prototype.
23517         (group_case_labels): Likewise.
23518         * tree-cfgcleanup.c (execute_cleanup_cfg_post_optimizing): When
23519         group_case_labels does anything cleanup the CFG again.
23521 2017-06-29  Bin Cheng  <bin.cheng@arm.com>
23523         PR tree-optimization/81196
23524         * tree-ssa-loop-niter.c (number_of_iterations_cond): Handle loop
23525         exit condition comparing two IVs.
23527 2017-06-29  Richard Earnshaw  <rearnsha@arm.com>
23529         * config/arm/parsecpu.awk (gen_comm_data): Add initializer for
23530         profile to the dummy entry at the end of the list of architectures.
23531         * config/arm/arm-cpu-cdata.h: Regenerated.
23533 2017-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23534             Michael Collison <michael.collison@arm.com>
23536         PR target/70119
23537         * config/aarch64/aarch64.md (*aarch64_<optab>_reg_<mode>3_mask1):
23538         New pattern.
23539         (*aarch64_reg_<mode>3_neg_mask2): New pattern.
23540         (*aarch64_reg_<mode>3_minus_mask): New pattern.
23541         (*aarch64_<optab>_reg_di3_mask2): New pattern.
23542         * config/aarch64/aarch64.c (aarch64_rtx_costs): Account for cost
23543         of shift when the shift amount is masked with constant equal to
23544         the size of the mode.
23545         * config/aarch64/predicates.md (subreg_lowpart_operator): New
23546         predicate.
23548 2017-06-29  Martin Liska  <mliska@suse.cz>
23550         * config/i386/i386.opt: Change range from [1,5] to [0,5].
23552 2017-06-29  Yury Gribov  <tetra2005@gmail.com>
23554         PR bootstrap/80565
23555         * ipa-cp.c (allocate_and_init_ipcp_value): Add initialization
23556         code.
23557         * ipa-inline.h
23558         (edge_growth_cache_entry::edge_growth_cache_entry): New
23559         function.
23560         (reset_edge_growth_cache): Update to use constructor.
23562 2017-06-28  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
23564         * config/aarch64/aarch64.h (AARCH64_EXPAND_ALIGNMENT): New.
23565         (DATA_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
23566         (LOCAL_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
23568 2017-06-28  Sebastian Peryt  <sebastian.peryt@intel.com>
23570         * config/i386/avx512vlintrin.h (_mm256_permutexvar_epi64)
23571         (_mm256_permutexvar_epi32, _mm256_permutex_epi64): New intrinsics.
23573 2017-06-28  Szabolcs Nagy  <szabolcs.nagy@arm.com>
23575         * config.gcc (*-linux-musl*): Add t-musl tmake_file.
23576         (*-linux-uclibc*): Add t-uclibc tmake_file.
23577         * config/t-musl: New.
23578         * config/t-uclibc: New.
23580 2017-06-28  Richard Earnshaw  <rearnsha@arm.com>
23582         * config/arm/parsecpu.awk (profile): Parse new keyword in an arch
23583         context.
23584         (gen_comm_data): Emit architectural setting of arch_prof.
23585         * config/arm/arm-cpus.in (armv6-m, armv6s-m, armv7-a, armv7ve): Set the
23586         profile.
23587         (armv7-r, armv7-m, armv7e-m, armv8-a, armv8.1-a, armv8.2-a): Likewise.
23588         (armv8-m.base, armv8-m.main): Likewise.
23589         * arm-protos.h (arm_build_target): Add profile field.
23590         (arch_option): Likewise.
23591         * config/arm/arm.c (arm_configure_build_target): Copy the profile to
23592         the active target.
23593         * config/arm/arm.h (TARGET_ARM_ARCH_PROFILE): Use
23594         arm_active_target.profile.
23596 2017-06-28  Richard Biener  <rguenther@suse.de>
23598         PR middle-end/81227
23599         * fold-const.c (negate_expr_p): Use TYPE_UNSIGNED, not
23600         TYPE_OVERFLOW_WRAPS.
23601         * match.pd (negate_expr_p): Likewise.
23602         * tree-ssa-reassoc.c (optimize_range_tests_diff): Use
23603         fold_build2, not fold_binary.
23605 2017-06-28  Wilco Dijkstra  <wdijkstr@arm.com>
23607         * config/aarch64/aarch64 (aarch64_expand_mov_immediate):
23608         Convert memory address to Pmode.
23609         (aarch64_print_operand): Assert MEM operands are always Pmode.
23611 2017-06-28  Wilco Dijkstra  <wdijkstr@arm.com>
23613         PR target/79665
23614         * config/arm/aarch-common.c (arm_no_early_alu_shift_dep):
23615         Remove redundant if.
23616         (aarch_forward_to_shift_is_not_shifted_reg): Remove.
23617         * config/arm/aarch-common-protos.h
23618         (aarch_forward_to_shift_is_not_shifted_re): Remove.
23619         * config/arm/cortex-a53.md: Use arm_no_early_alu_shift_dep in bypass.
23621 2017-06-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
23623         PR ipa/81238
23624         * multiple_target.c (create_dispatcher_calls): Set the default
23625         clone to be static, not public.
23627 2017-06-28  Richard Biener  <rguenther@suse.de>
23629         * tree-vect-loop.c (vectorizable_reduction): Move special
23630         cond reduction IV var creation ...
23631         (vect_create_epilog_for_reduction): ... here.  Remove induction_index
23632         parameter.  Use STMT_VINFO_VECTYPE.
23633         * tree-vect-slp.c (vect_get_constant_vectors): Properly reset
23634         constant_p.
23636 2017-06-28  Martin Liska  <mliska@suse.cz>
23638         PR ipa/81128
23639         * ipa-visibility.c (non_local_p): Handle visibility.
23641 2017-06-28  Martin Liska  <mliska@suse.cz>
23643         PR driver/79659
23644         * common.opt: Add IntegerRange to various options.
23645         * opt-functions.awk (integer_range_info): New function.
23646         * optc-gen.awk: Add integer_range_info to cl_options struct.
23647         * opts-common.c (decode_cmdline_option): Handle
23648         CL_ERR_INT_RANGE_ARG.
23649         (cmdline_handle_error): Likewise.
23650         * opts.c (print_filtered_help): Show valid interval in
23651         when --help is provided.
23652         * opts.h (struct cl_option): Add range_min and range_max fields.
23653         * config/i386/i386.opt: Add IntegerRange for -mbranch-cost.
23655 2017-06-28  Marc Glisse  <marc.glisse@inria.fr>
23657         * match.pd ((X & ~Y) | (~X & Y)): Generalize to + and ^.
23658         (x * C EQ/NE y * C): New transformation.
23660 2017-06-28  Christophe Lyon  <christophe.lyon@linaro.org>
23662         * genmultilib (combination_space): Accept '+' in option names.
23664 2017-06-28  Martin Liska  <mliska@suse.cz>
23666         PR sanitizer/81224
23667         * asan.c (instrument_derefs): Bail out inner references
23668         that are hard register variables.
23670 2017-06-28  Jakub Jelinek  <jakub@redhat.com>
23672         PR target/81175
23673         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Use def_builtin
23674         rather than def_builtin_pure for __builtin_ia32_gatherpf*.
23676 2017-06-28  Richard Biener  <rguenther@suse.de>
23678         * tree-vectorizer.h (vect_get_vec_defs): Remove.
23679         (vect_get_slp_defs): Adjust.
23680         * tree-vect-loop.c (get_initial_defs_for_reduction): Split
23681         out from ...
23682         * tree-vect-slp.c (vect_get_constant_vectors): ... here and
23683         simplify.
23684         * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
23685         get_initial_defs_for_reduction instead of vect_get_vec_defs.
23686         (vectorizable_reduction): Adjust.
23687         * tree-vect-slp.c (vect_get_constant_vectors): Remove reduction
23688         handling.
23689         (vect_get_slp_defs): Likewise.
23690         * tree-vect-stmts.c (vect_get_vec_defs): Make static and adjust.
23691         (vectorizable_bswap): Adjust.
23692         (vectorizable_call): Likewise.
23693         (vectorizable_conversion): Likewise.
23694         (vectorizable_assignment): Likewise.
23695         (vectorizable_shift): Likewise.
23696         (vectorizable_operation): Likewise.
23697         (vectorizable_store): Likewise.
23698         (vectorizable_condition): Likewise.
23699         (vectorizable_comparison): Likewise.
23701 2017-06-28  Michael Collison  <michael.collison@arm.com>
23703         PR target/68535
23704         * config/arm/arm.c (gen_ldm_seq): Remove last unnecessary
23705         set of base_reg
23706         (arm_gen_movmemqi): Removed unused variable 'i'.
23707         Convert 'for' loop into 'while' loop.
23708         (arm_expand_prologue): Remove last unnecessary set of insn.
23709         (thumb_pop): Remove unused variable 'pushed_words'.
23710         (thumb_exit): Remove last unnecessary set of regs_to_pop.
23712 2017-06-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23714         * config/s390/predicates.md: Use s390_rel_address_ok_p.
23715         * config/s390/s390-protos.h: Add prototype of
23716         s390_rel_address_ok_p.
23717         * config/s390/s390.c (s390_got_symbol): New function.
23718         (s390_rel_address_ok_p): New function.
23719         (legitimize_pic_address): Use s390_rel_address_ok_p.
23720         (s390_load_got): Use s390_got_symbol.
23721         (s390_option_override): Issue error if
23722         -mno-pic-data-is-text-relative is used without -fpic/-fPIC.
23723         * config/s390/s390.h (TARGET_DEFAULT_PIC_DATA_IS_TEXT_RELATIVE):
23724         New macro.
23725         * config/s390/s390.opt: New option mpic-data-is-text-relative.
23727 2017-06-27  Andrew Pinski  <apinski@cavium.com>
23729         * match.pd (X >/>=/</<= 0 ? 1.0 : -1.0): New patterns.
23730         (X * copysign (1.0, X)): New pattern.
23731         (X * copysign (1.0, -X)): New pattern.
23732         (copysign (-1.0, CST)): New pattern.
23734 2017-06-27  Joseph Myers  <joseph@codesourcery.com>
23736         * genmultilib (combination_space): Remove variable.
23737         Validate reuse rules against regular expression for any sequence
23738         of multilib options in any order.
23740 2017-06-27  Michael Collison  <michael.collison@arm.com>
23742         * config/aarch64/aarch64-simd.md (aarch64_combine<mode>): Directly
23743         call aarch64_split_simd_combine.
23744         * (aarch64_combine_internal<mode>): Delete pattern.
23745         * config/aarch64/aarch64.c (aarch64_split_simd_combine):
23746         Allow register and subreg operands.
23748 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
23750         * config/i386/vxworks.h (ASM_SPEC): Remove definition. No target
23751         specific need, just fallback on defaults.
23752         (ASM_OUTPUT_ALIGNED_BSS): Add #undef before #define.
23754 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
23755             Olivier Hainque  <hainque@adacore.com>
23757         * config/i386/vxworks.h (DBX_REGISTER_NUMBER): Pick distinct
23758         map for 64bits.
23759         (TARGET_OS_CPP_BUILTINS): builtin_define CPU to X86_64 for 64bit
23760         targets. Pick a default if no particular attempt applied.
23761         (STACK_CHECK_PROTECT): Double for 64bit targets, which have
23762         larger contexts.
23764 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
23766         * config.gcc (i*86-wrs-vxworks7): Handle new acceptable triplet.
23767         (x86_64-wrs-vxworks7): Likewise.
23769 2017-06-27  Marek Polacek  <polacek@redhat.com>
23771         PR sanitizer/81223
23772         * ubsan.c (instrument_null): Check get_base_address's result for null.
23774 2017-06-27  Marc Glisse  <marc.glisse@inria.fr>
23776         * match.pd ((A+-B)+(C-A), (A+B)-(A-C)): New transformations.
23778 2017-06-27  Marc Glisse  <marc.glisse@inria.fr>
23780         * builtin-types.def (BT_FENV_T_PTR, BT_CONST_FENV_T_PTR,
23781         BT_FEXCEPT_T_PTR, BT_CONST_FEXCEPT_T_PTR): New primitive types.
23782         (BT_FN_INT_FENV_T_PTR, BT_FN_INT_CONST_FENV_T_PTR,
23783         BT_FN_INT_FEXCEPT_T_PTR_INT, BT_FN_INT_CONST_FEXCEPT_T_PTR_INT):
23784         New function types.
23785         * builtins.def (BUILT_IN_FECLEAREXCEPT, BUILT_IN_FEGETENV,
23786         BUILT_IN_FEGETEXCEPTFLAG, BUILT_IN_FEGETROUND,
23787         BUILT_IN_FEHOLDEXCEPT, BUILT_IN_FERAISEEXCEPT,
23788         BUILT_IN_FESETENV, BUILT_IN_FESETEXCEPTFLAG,
23789         BUILT_IN_FESETROUND, BUILT_IN_FETESTEXCEPT,
23790         BUILT_IN_FEUPDATEENV): New builtins.
23791         * tree-core.h (TI_FENV_T_PTR_TYPE, TI_CONST_FENV_T_PTR_TYPE,
23792         TI_FEXCEPT_T_PTR_TYPE, TI_CONST_FEXCEPT_T_PTR_TYPE): New entries.
23793         * tree.h (fenv_t_ptr_type_node, const_fenv_t_ptr_type_node,
23794         fexcept_t_ptr_type_node, const_fexcept_t_ptr_type_node): New
23795         macros.
23796         (builtin_structptr_types): Adjust size.
23797         * tree.c (builtin_structptr_types): Add four entries.
23799 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
23800             Olivier Hainque  <hainque@adacore.com>
23802         * config/vxworks.h (VXWORKS_LIB_SPEC): Incorporate ...
23803         (TLS_SYM): New local macro, forcing reference to __tls__ on
23804         link command lines for VxWorks 7 RTPs, triggering initialization
23805         of tlsLib.
23806         (VXWORKS_HAVE_TLS): New macro. State whether the target VxWorks
23807         OS features TLS support, true for RTPs on VxWorks 7.
23808         * config/vxworks.c (vxworks_override_options): Setup emutls
23809         accordingly.
23811 2017-06-27  Jakub Jelinek  <jakub@redhat.com>
23813         * predict.c (test_prediction_value_range): Use -1U instead of -1
23814         to avoid narrowing conversion warning.
23815         * dumpfile.c (dump_options): Wrap all value into dump_flags_t cast
23816         to avoid narrowing conversion warning.
23817         * opt-functions.awk (var_ref): Return (unsigned short) -1 instead of
23818         -1.
23819         * optc-gen.awk (END): Expect (unsigned short) -1 instead of -1.
23821 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
23823         * config/vxworks.h (VXWORKS_LIBS_RTP): Alternative definition for
23824         64bit configurations.
23825         (PTR_DIFF_TYPE): Alternative definition for TARGET_LP64.
23826         (SIZE_TYPE): Likewise.
23827         * config/vxworks.c (vxworks_emutls_var_fields): Use
23828         long_unsigned_type_node instead of unsigned_type_node as the offset
23829         field type, which is "pointer" mode in emutls.c.
23831 2017-06-27  Jakub Jelinek  <jakub@redhat.com>
23833         PR sanitizer/81209
23834         * ubsan.c (ubsan_encode_value): Initialize DECL_CONTEXT on var.
23836         PR middle-end/81207
23837         * gimple-fold.c (replace_call_with_call_and_fold): Handle
23838         gimple_vuse copying separately from gimple_vdef copying.
23840 2017-06-27  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
23842         * value-prof.c (free_hist): Remove call to memset and the enclosing if
23843         condition.
23845 2017-06-26  Jerome Lambourg  <lambourg@adacore.com>
23846             Olivier Hainque  <hainque@adacore.com>
23848         * config.gcc (*-*-vxworks*): Add TARGET_VXWORKS7=1 to tm_defines
23849         for all vxworks7 targets.
23850         * config/vxworks.h (TARGET_VXWORKS7): If not defined, define to 0.
23851         (VXWORKS_ADDITIONAL_CPP_SPEC): Alternative definition for VXWORKS7.
23852         (VXWORKS_LIBS_RTP, VXWORKS_LIBS_RTP_DIR): New macros, allowing
23853         variations for VX6/VX7 and 32/64bits later on in ...
23854         (VXWORKS_LIB_SPEC): Leverage new macros.
23855         (VXWORKS_OS_CPP_BUILTINS): Define _VSB_CONFIG_FILE for VXWORKS7,
23856         as well as _ALLOW_KEYWORD_MACROS when "inline" is not a keyword.
23858 2017-06-26  Jerome Lambourg  <lambourg@adacore.com>
23860         * config/vxworks.h (VXWORKS_OS_CPP_BUILTINS): builtin_define
23861         _VX_TOOL_FAMILY and _VX_TOOL to gnu.
23863 2017-06-26  Carl Love  <cel@us.ibm.com>
23865         * config/rs6000/rs6000-c.c: Add support for built-in functions
23866         vector bool char vec_reve (vector bool char);
23867         vector signed char vec_reve (vector signed char);
23868         vector unsigned char vec_reve (vector unsigned char);
23869         vector bool int vec_reve (vector bool int);
23870         vector signed int vec_reve (vector signed int);
23871         vector unsigned int vec_reve (vector unsigned int);
23872         vector bool long long vec_reve (vector bool long long);
23873         vector signed long long vec_reve (vector signed long long);
23874         vector unsigned long long vec_reve (vector unsigned long long);
23875         vector bool short vec_reve (vector bool short);
23876         vector signed short vec_reve (vector signed short);
23877         vector double vec_reve (vector double);
23878         vector float vec_reve (vector float);
23879         * config/rs6000/rs6000-builtin.def (VREVE_V2DI, VREVE_V4SI,
23880         VREVE_V8HI, VREVE_V16QI, VREVE_V2DF, VREVE_V4SF, VREVE): New builtin.
23881         * config/rs6000/altivec.md (UNSPEC_VREVEV): New UNSPEC.
23882         (altivec_vreve): New pattern.
23883         * config/rs6000/altivec.h (vec_reve): New define.
23884         * doc/extend.texi (vec_rev): Update the built-in documentation file
23885         for the new built-in functions.
23887 2016-06-26  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23889         PR tree-optimization/71815
23890         * gimple-ssa-strength-reduction.c (uses_consumed_by_stmt): New
23891         function.
23892         (find_basis_for_candidate): Call uses_consumed_by_stmt rather than
23893         has_single_use.
23894         (slsr_process_phi): Likewise.
23895         (replace_uncond_cands_and_profitable_phis): Don't replace a
23896         multiply candidate with a stride of 1 (copy or cast).
23897         (phi_incr_cost): Call uses_consumed_by_stmt rather than
23898         has_single_use.
23899         (lowest_cost_path): Likewise.
23900         (total_savings): Likewise.
23902 2017-06-26  Richard Biener  <rguenther@suse.de>
23904         PR target/81175
23905         * config/i386/i386.c (ix86_init_mmx_sse_builtins):
23906         Use def_builtin_pure for all gather builtins.
23908 2017-06-26  Richard Biener  <rguenther@suse.de>
23910         PR tree-optimization/81203
23911         * tree-tailcall.c (find_tail_calls): Do not move stmts into
23912         non-dominating BBs.
23914 2017-06-26  Marek Polacek  <polacek@redhat.com>
23916         PR c/80116
23917         * doc/invoke.texi: Document -Wmultistatement-macros.
23919 2017-06-26  Christophe Lyon  <christophe.lyon@linaro.org>
23921         * doc/sourcebuild.texi (ARM-specific attributes): Document new
23922         arm_neon_ok_no_float_abi effective target.
23924 2017-06-26  Richard Biener  <rguenther@suse.de>
23926         PR tree-optimization/80928
23927         * cfghooks.c (duplicate_block): Do not copy BB_DUPLICATED flag.
23928         (copy_bbs): Set BB_DUPLICATED flag early.
23929         (execute_on_growing_pred): Do not execute for BB_DUPLICATED
23930         marked blocks.
23931         (execute_on_shrinking_pred): Likewise.
23932         * tree-ssa.c (ssa_redirect_edge): Do not look for PHI args in
23933         BB_DUPLICATED blocks.
23934         * tree-ssa-phionlycoprop.c (eliminate_degenerate_phis_1): Properly
23935         iterate over all PHIs considering removal of *gsi.
23937 2017-06-23  Jim Wilson  <jim.wilson@linaro.org>
23939         * doc/invoke.texi (AArch64 Options, -mtune): Re-add falkor and
23940         qdf24xx.
23942 2017-06-23  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23944         * config/rs6000/rs6000-string.c: (expand_block_clear,
23945         do_load_for_compare, select_block_compare_mode,
23946         compute_current_alignment, expand_block_compare,
23947         expand_strncmp_align_check, expand_strn_compare,
23948         expand_block_move, rs6000_output_load_multiple)
23949         Move functions related to string/block move/compare
23950         to a separate file.
23951         * config/rs6000/rs6000.c: Move above functions to rs6000-string.c.
23952         * config/rs6000/rs6000-protos.h (rs6000_emit_dot_insn): Add prototype
23953         for this function which is now used in two files.
23954         * config/rs6000/t-rs6000: Add rule to compile rs6000-string.o.
23955         * config.gcc: Add rs6000-string.o to extra_objs for
23956         targets powerpc*-*-* and rs6000*-*-*.
23958 2017-06-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
23960         PR target/80510
23961         * config/rs6000/rs6000.md (ALTIVEC_DFORM): Do not allow DImode in
23962         32-bit, since indexed is not valid for DImode.
23963         (mov<mode>_hardfloat32): Reorder ISA 2.07 load/stores before ISA
23964         3.0 d-form load/stores to be the same as mov<mode>_hardfloat64.
23965         (define_peephole2 for Altivec d-form load): Add 32-bit support.
23966         (define_peephole2 for Altivec d-form store): Likewise.
23968         PR ipa/81185
23969         * multiple_target.c (create_dispatcher_calls): Only create the
23970         dispatcher call if the function is the default clone of a
23971         versioned function.
23973 2017-06-23  Segher Boessenkool  <segher@kernel.crashing.org>
23975         PR middle-end/80902
23976         * builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
23977         a call, force the call to not be a tail call.
23979 2017-06-23  Jeff Law  <law@redhat.com>
23981         * doc/contrib.texi: Add entry for Steven Pemberton's work on
23982         enquire.
23984 2017-06-23  Will Schmidt  <will_schmidt@vnet.ibm.com>
23986         * config/rs6000/rs6000.c: Add include of ssa-propagate.h for
23987         update_call_from_tree().  (rs6000_gimple_fold_builtin): Add
23988         handling for early expansion of vector shifts (sl,sr,sra,rl).
23989         (builtin_function_type): Add vector shift right instructions
23990         to the unsigned argument list.
23992 2017-06-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
23994         rtl-optimizatoin/79286
23995         * ira.c (update_equiv_regs): Revert to using may_trap_or_fault_p again.
23996         * rtlanal.c (rtx_addr_can_trap_p_1): SYMBOL_REF_FUNCTION_P can never
23997         trap.  PIC register plus a const unspec without offset can never trap.
23999 2017-06-23  Marc Glisse  <marc.glisse@inria.fr>
24001         * tree.h (builtin_structptr_type): New type.
24002         (builtin_structptr_types): Declare new array.
24003         * tree.c (builtin_structptr_types): New array.
24004         (free_lang_data, build_common_tree_nodes): Use it.
24006 2017-06-23  Jonathan Wakely  <jwakely@redhat.com>
24008         PR c++/81187
24009         * doc/invoke.texi (-Wnoexcept-type): Fix name of option, from
24010         -Wnoexcept.
24012 2017-06-22  Matt Turner  <mattst88@gmail.com>
24014         * config/i386/driver-i386.c (host_detect_local_cpu): Add Kaby
24015         Lake models to skylake case.  Assume skylake for unknown
24016         models with clflushopt.
24018 2017-06-22  Jeff Law  <law@redhat.com>
24020         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Handle
24021         frame sizes that do not satisfy aarch64_uimm12_shift.
24023 2017-06-22  Jan Hubicka <hubicka@ucw.cz>
24025         * profile-count.h (apply_probability,
24026         apply_scale, probability_in): Fix checks for zero.
24028 2017-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
24030         * incpath.c (add_sysroot_to_chain): Allow for $SYSROOT prefix.
24031         * doc/cppdiropts.texi (-I @var{dir}): Document it.
24033 2016-06-22  Richard Biener  <rguenther@suse.de>
24035         * tree-vect-loop.c (vect_model_reduction_cost): Handle
24036         COND_REDUCTION and INTEGER_INDUC_COND_REDUCTION without
24037         REDUC_MAX_EXPR support.
24038         (vectorizable_reduction): Likewise.
24039         (vect_create_epilog_for_reduction): Likewise.
24041 2017-06-22  James Greenhalgh  <james.greenhalgh@arm.com>
24043         * match.pd (A / (1 << B) -> A >> B): New.
24044         * generic-match-head.c: Include optabs-tree.h.
24045         * gimple-match-head.c: Likewise.
24046         * optabs-tree.h (target_supports_op_p): New.
24047         * optabs-tree.c (target_supports_op_p): New.
24049 2017-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
24051         * configure.ac (gcc_cv_ld_static_dynamic): Also check stderr for
24052         $gcc_cv_ld --help output.
24053         (gcc_cv_ld_demangle): Likewise.
24054         (gcc_cv_ld_eh_frame_hdr): Likewise.
24055         (gcc_cv_ld_pie): Likewise.
24056         (gcc_cv_ld_as_needed): Likewise.  Prefer native forms unless $gnu_ld.
24057         (gcc_cv_ld_buildid): Likewise.
24058         (gcc_cv_ld_sysroot): Likewise.
24059         (ld_bndplt_support): Likewise.
24060         (ld_pushpopstate_support): Likewise.
24061         * configure: Regenerate.
24062         * config/sol2.h [!USE_GLD] (SYSROOT_SPEC): Define.
24064 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
24066         PR target/81151
24067         * config/i386/sse.md (round<mode>2): Renumber match_dup and
24068         operands indexes to avoid gap between operands and match_dups.
24070 2017-06-21  Andrew Pinski  <apinski@cavium.com>
24072         * config/aarch64/aarch64-cost-tables.h (thunderx_extra_costs):
24073         Increment Arith_shift and Arith_shift_reg by 1.
24074         * config/aarch64/aarch64-tuning-flags.def (cheap_shift_extend):
24075         New tuning flag.
24076         * config/aarch64/aarch64.c (thunderx_tunings): Enable
24077         AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND.
24078         (aarch64_strip_extend): Add new argument and test for it.
24079         (aarch64_cheap_mult_shift_p): New function.
24080         (aarch64_rtx_mult_cost): Call aarch64_cheap_mult_shift_p and don't
24081         add a cost if it is true.
24082         Update calls to aarch64_strip_extend.
24083         (aarch64_rtx_costs): Update calls to aarch64_strip_extend.
24085 2017-06-21  Andrew Pinski  <apinski@cavium.com>
24087         * config/aarch64/aarch64-cores.def (thunderxt88p1): Use thunderxt88
24088         tunings.
24089         (thunderxt88): Likewise.
24090         * config/aarch64/aarch64.c (thunderxt88_prefetch_tune): New variable.
24091         (thunderx_prefetch_tune): New variable.
24092         (thunderx2t99_prefetch_tune): Update for the correct values.
24093         (thunderxt88_tunings): New variable.
24094         (thunderx_tunings): Use thunderx_prefetch_tune instead of
24095         generic_prefetch_tune.
24096         (thunderx2t99_tunings): Use AUTOPREFETCHER_WEAK.
24098 2017-06-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24100         * config/aarch64/atomics.md (aarch64_compare_and_swap<mode>_lse,
24101         SHORT): Relax operand 3 to aarch64_reg_or_zero and constraint to Z.
24102         (aarch64_compare_and_swap<mode>_lse, GPI): Likewise.
24103         (aarch64_atomic_cas<mode>, SHORT): Likewise for operand 2.
24104         (aarch64_atomic_cas<mode>, GPI): Likewise.
24106 2017-06-21  Martin Liska  <mliska@suse.cz>
24108         * gimplify.c (gimplify_label_expr): Insert GIMPLE_PREDICT
24109         statements on cold and hot labels.
24110         * predict.c (tree_estimate_probability_bb): Remove the
24111         prediction from this place.
24113 2017-06-21  Martin Liska  <mliska@suse.cz>
24115         PR tree-optimization/79489
24116         * gimplify.c (maybe_add_early_return_predict_stmt): New
24117         function.
24118         (gimplify_return_expr): Call the function.
24119         * predict.c (tree_estimate_probability_bb): Remove handling
24120         of early return.
24121         * predict.def: Update comment about early return predictor.
24122         * gimple-predict.h (is_gimple_predict): New function.
24123         * predict.def: Change default value of early return to 66.
24124         * tree-tailcall.c (find_tail_calls): Skip GIMPLE_PREDICT
24125         statements.
24126         * passes.def: Put pass_strip_predict_hints to the beginning of
24127         IPA passes.
24129 2017-06-21  Pierre-Marie de Rodat  <derodat@adacore.com>
24131         * dwarf2out.c (gen_decl_die): Remove the guard to skip file-scope
24132         FUNCTION_DECL declarations.
24133         (dwarf2out_early_global_decl): Remove the guard to skip FUNCTION_DECL
24134         declarations.
24135         (dwaf2out_decl): Likewise.
24136         * godump.c (go_early_global_decl): Skip call to the real debug hook
24137         for FUNCTION_DECL declarations.
24138         * passes.c (rest_of_decl_compilation): Skip call to the
24139         early_global_decl debug hook for FUNCTION_DECL declarations, unless
24140         -fdump-go-spec is passed.
24142 2017-06-21  Marc Glisse  <marc.glisse@inria.fr>
24144         * config/i386/i386.c (struct builtin_isa): New field pure_p.
24145         Reorder for compactness.
24146         (def_builtin, def_builtin2, ix86_add_new_builtins): Handle pure_p.
24147         (def_builtin_pure, def_builtin_pure2): New functions.
24148         (ix86_init_mmx_sse_builtins) [__builtin_ia32_stmxcsr]: Mark as pure.
24150 2017-06-21  Marc Glisse  <marc.glisse@inria.fr>
24152         * match.pd (nop_convert): New predicate.
24153         ((A +- CST1) +- CST2): Allow some NOP conversions.
24155 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
24157         PR c++/81130
24158         * gimplify.c (omp_add_variable): Don't force GOVD_SEEN for types
24159         with ctors/dtors if GOVD_SHARED is set.
24161 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
24163         * config/aarch64/aarch64.md (movti_aarch64):
24164         Emit mov rather than orr.
24165         (movtf_aarch64): Likewise.
24166         * config/aarch64/aarch64-simd.md (aarch64_simd_mov):
24167         Emit mov rather than orr.
24169 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
24171         * config/aarch64/aarch64-simd.md (aarch64_simd_dup):
24172         Swap alternatives, make integer dup more expensive.
24174 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
24176         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
24177         Return true for non-tls symbols.
24179 2017-06-21  James Greenhalgh  <james.greenhalgh@arm.com>
24181         * config/aarch64/aarch64-cores.def (cortex-a55): New.
24182         (cortex-a75): Likewise.
24183         (cortex-a75.cortex-a55): Likewise.
24184         * config/aarch64/aarch64-tune.md: Regenerate.
24185         * doc/invoke.texi (-mtune): Document new values for -mtune.
24187 2017-06-21  Tom de Vries  <tom@codesourcery.com>
24189         * doc/sourcebuild.texi (Add Options, Features for dg-add-options): Add
24190         stack_size feature.
24191         (Effective-Target Keywords, Other attributes): Suggest using
24192         dg-add-options stack_size feature to get stack limit in stack_size
24193         effective target documentation.
24195 2017-06-21  Julian Brown  <julian@codesourcery.com>
24196             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
24198         * config/aarch64/aarch64-simd.md (aarch64_crypto_pmulldi)
24199         (aarch64_crypto_pmullv2di): Change type attribute to crypto_pmull.
24200         * config/aarch64/thunderx2t99.md (thunderx2t99_pmull): New
24201         reservation.
24202         * config/arm/cortex-a53.md (cortex_a53_advsimd_type): Add crypto_pmull to
24203         attribute type list for neon_multiply.
24204         * config/arm/cortex-a57.md (cortex_a57_neon_type): Add crypto_pmull to
24205         attribute type list for neon_multiply.
24206         * config/arm/crypto.md (crypto_vmullp64): Change type to crypto_pmull.
24207         * config/arm/exynos-m1.md (exynos_m1_neon_type): Add crypto_pmull to
24208         attribute type list for neon_multiply.
24209         * config/arm/types.md (crypto_pmull): Add.
24210         * config/arm/xgene1.md (xgene1_neon_pmull): Add crypto_pmull to
24211         attribute type list.
24213 2017-06-20  Andreas Tobler  <andreast@gcc.gnu.org>
24215         * config.gcc (armv6*-*-freebsd*): Change the target_cpu_cname to
24216         arm1176jzf-s.
24218 2017-06-20  Jakub Jelinek  <jakub@redhat.com>
24220         * ira-costs.c (find_costs_and_classes): Initialize cost_classes later
24221         to make sure not to dereference a NULL cost_classes_ptr pointer.
24223 2017-06-20  Carl Love  <cel@us.ibm.com>
24225         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
24226         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
24227         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
24228         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
24229         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
24230         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
24231         VMULOSW): New enum "unspec" values.
24232         (vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
24233         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
24234         altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
24235         altivec_vmulosw): New patterns.
24236         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
24237         VMULOSW): Add definitions.
24239 2017-06-20  Julia Koval  <julia.koval@intel.com>
24241         * config/i386/i386.c: Fix rounding expand for new pattern.
24242         * config/i386/subst.md: Fix pattern (parallel -> unspec).
24244 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
24246         * config/aarch64/aarch64-option-extensions.def (rcpc): New.
24247         * config/aarch64/aarch64.h (AARCH64_FL_RCPC): New.
24249 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
24251         * config/aarch64/aarch64-option-extensions.def (fp16): Fix expected
24252         feature string.
24254 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
24256         * config/aarch64/aarch64-cores.def: Rearrange to sort by
24257         architecture, then by implementer ID.
24258         * config/aarch64/aarch64-tune.md: Regenerate.
24260 2017-06-20  Richard Biener  <rguenther@suse.de>
24262         PR middle-end/81097
24263         * fold-const.c (split_tree): Fold to type before negating.
24265 2017-06-20  David Malcolm  <dmalcolm@redhat.com>
24267         * diagnostic-show-locus.c
24268         (selftest::test_fixit_deletion_affecting_newline): New function.
24269         (selftest::diagnostic_show_locus_c_tests): Call it.
24271 2017-06-20  Andreas Schwab  <schwab@suse.de>
24273         PR target/80970
24274         * config/m68k/m68k.md (bsetdreg, bchgdreg, bclrdreg): Use "=d"
24275         instead of "+d".
24277 2017-06-20  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
24279         * config/arm/arm-c.c (arm_cpu_builtins): New block to define
24280         __ARM_FEATURE_COPROC according to support.
24282 2017-06-20  Jakub Jelinek  <jakub@redhat.com>
24284         * tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
24285         Rewritten to avoid overflow for > 32-bit pointers.
24287         PR sanitizer/81125
24288         * ubsan.h (ubsan_encode_value): Workaround buggy clang++ parser
24289         by removing enum keyword.
24290         (ubsan_type_descriptor): Likewise.  Formatting fix.
24292         PR target/81121
24293         * config/i386/i386.md (TARGET_USE_VECTOR_CONVERTS float si->{sf,df}
24294         splitter): Require TARGET_SSE2 in the condition.
24296 2017-06-20  Michael Meissner  <meissner@linux.vnet.ibm.com>
24298         PR target/79799
24299         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Add support
24300         for doing vector set of SFmode on ISA 3.0.
24301         * config/rs6000/vsx.md (vsx_set_v4sf_p9): Likewise.
24302         (vsx_set_v4sf_p9_zero): Special case setting 0.0f to a V4SF
24303         element.
24304         (vsx_insert_extract_v4sf_p9): Add an optimization for inserting a
24305         SFmode value into a V4SF variable that was extracted from another
24306         V4SF variable without converting the element to double precision
24307         and back to single precision vector format.
24308         (vsx_insert_extract_v4sf_p9_2): Likewise.
24310 2017-06-19  Jakub Jelinek  <jakub@redhat.com>
24312         * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Multiply
24313         in UWHI to avoid undefined overflow.
24315         PR sanitizer/81125
24316         * ubsan.h (enum ubsan_encode_value_phase): New.
24317         (ubsan_encode_value): Change second argument to
24318         enum ubsan_encode_value_phase with default value of
24319         UBSAN_ENCODE_VALUE_GENERIC.
24320         * ubsan.c (ubsan_encode_value): Change second argument to
24321         enum ubsan_encode_value_phase PHASE from bool IN_EXPAND_P,
24322         adjust uses, for UBSAN_ENCODE_VALUE_GENERIC use just
24323         create_tmp_var_raw instead of create_tmp_var and use a
24324         TARGET_EXPR.
24325         (ubsan_expand_bounds_ifn, ubsan_build_overflow_builtin,
24326         instrument_bool_enum_load, ubsan_instrument_float_cast): Adjust
24327         ubsan_encode_value callers.
24329         PR sanitizer/81111
24330         * ubsan.c (ubsan_encode_value): If current_function_decl is NULL,
24331         use create_tmp_var_raw instead of create_tmp_var, mark it addressable
24332         just by setting TREE_ADDRESSABLE on the result and use a TARGET_EXPR.
24334 2017-06-19  Richard Biener  <rguenther@suse.de>
24336         PR middle-end/81118
24337         * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Clear niter
24338         estimates if we changed anything.
24340 2017-06-19  Richard Biener  <rguenther@suse.de>
24342         PR tree-optimization/80887
24343         * tree-ssa-sccvn.c (mprts_hook_cnt): New global.
24344         (vn_lookup_simplify_result): Allow only mprts_hook_cnt succesful
24345         simplified lookups, then reset mprts_hook.
24346         (vn_nary_build_or_lookup_1): Set mprts_hook_cnt to 9 before
24347         simplifying.
24348         (try_to_simplify): Likewise.
24350 2017-06-19  Martin Liska  <mliska@suse.cz>
24352         PR sanitizer/80879
24353         * gimplify.c (gimplify_switch_expr):
24354         Initialize live_switch_vars for SWITCH_BODY == STATEMENT_LIST.
24356 2017-06-19  Martin Liska  <mliska@suse.cz>
24358         * doc/install.texi: Document that PGO runs in 4 stages.
24360 2017-06-19  Martin Liska  <mliska@suse.cz>
24362         PR ipa/80732
24363         * attribs.c (make_dispatcher_decl): Do not append '.ifunc'
24364         to dispatcher function name.
24365         * multiple_target.c (replace_function_decl): New function.
24366         (create_dispatcher_calls): Redirect both edges and references.
24368 2017-06-19  Jan Hubicka <hubicka@ucw.cz>
24370         * profile-count.c (profile_count::dump): Dump quality.
24371         (profile_count::differs_from_p): Update for unsigned val.
24372         * profile-count.h (profile_count_quality): New enum.
24373         (profile_count): Turn m_val to 62bit unsigned, add quality tracking.
24375 2017-06-19  Richard Biener  <rguenther@suse.de>
24377         * tree-ssa-loop-niter.h (estimate_numbers_of_iterations): Take
24378         struct function as arg.
24379         (estimate_numbers_of_iterations): Export overload with loop arg.
24380         (free_numbers_of_iterations_estimates_loop): Use an overload of
24381         free_numbers_of_iterations_estimates instead.
24382         * tree-cfg.c (remove_bb): Adjust.
24383         * tree-cfgcleanup.c (remove_forwarder_block_with_phi): Likewise.
24384         * tree-parloops.c (gen_parallel_loop): Likewise.
24385         * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables):
24386         Likewise.
24387         (tree_unroll_loops_completely): Likewise.
24388         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop):
24389         Use an overload instead and export.
24390         (estimated_loop_iterations): Adjust.
24391         (max_loop_iterations): Likewise.
24392         (likely_max_loop_iterations): Likewise.
24393         (estimate_numbers_of_iterations): Take struct function as arg
24394         and adjust.
24395         (loop_exits_before_overflow): Adjust.
24396         (free_numbers_of_iterations_estimates_loop): Use an overload.
24397         * tree-vect-loop.c (vect_analyze_loop_form): Adjust.
24398         * tree-vectorizer.c (vect_free_loop_info_assumptions): Likewise.
24400 2017-06-19  Richard Biener  <rguenther@suse.de>
24402         PR ipa/81112
24403         * ipa-prop.c (find_constructor_constant_at_offset): Handle
24404         RANGE_EXPR conservatively.
24406 2017-06-16  Carl Love  <cel@us.ibm.com>
24408         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
24409         definitions for vec_float, vec_float2, vec_floato,
24410         vec_floate built-ins.
24411         * config/rs6000/vsx.md (define_c_enum "unspec"): Add RTL code
24412         for instructions vsx_xvcvsxws vsx_xvcvuxwsp, float2, floato and
24413         floate.
24414         * config/rs6000/rs6000-builtin.def (FLOAT2_V2DI, FLOATE_V2DF,
24415         FLOATE_2DI, FLOATO_V2DF, FLOATEE_V2DI, XVCVSXWSP_V4SF,
24416         UNS_FLOATO_V2DI, UNS_FLOATE_V2DI): Add definitions.
24417         * config/altivec.md (define_insn "p8_vmrgew_<mode>",
24418         define_mode_attr VF_sxddp): Add V4SF type to p8_vmrgew.
24419         * config/rs6000/altivec.h (vec_float, vec_float2, vec_floate,
24420         vec_floato): Add builtin defines.
24421         * doc/extend.texi (vec_float, vec_float2, vec_floate, vec_floato):
24422         Update the built-in documentation file for the new built-in
24423         functions.
24425 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24427         * config/arm/arm.opt (marm): Mark as the negative of of -mthumb.
24428         (mthumb): Mark as the negative of -marm.
24430 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24432         * doc/invoke.texi (ARM Options, -mcpu): Document supported
24433         extension options.
24434         (ARM Options, -mtune): Document that this accepts the same
24435         extension options as -mcpu.
24436         (ARM Options, -mfpu): Document addition of -mfpu=auto.
24438 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24440         * doc/invoke.texi (ARM Options, -march=): Document new syntax and
24441         permitted extensions.
24443 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24445         * config/arm/arm-cpus.in (armv7): Add extension +nofp.
24446         (armv7-r): Add aliases vfpv3xd and vfpv3-d16.
24447         (armv8-m.main): Add option +nodsp.
24448         * config/arm/arm-cpu-cdata.h: Regenerated.
24450 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24452         * config/arm/t-fuchsia: New file.
24453         * config.gcc (arm*-*-fuchsia*): Use it.
24455 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24457         * config/arm/t-symbian: Rewrite for new option infrastructure.
24459 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24461         * config/arm/t-phoenix (MULTILIB_REUSE): Clear variable.
24462         (MULTILIB_REQUIRED): Likewise.
24464 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24466         * config/arm/t-linux-eabi (MULTILIB_EXCEPTIONS): Set to empty.
24467         (MULTILIB_RESUE): Likewise.
24468         (MULTILIB_MATCHES): Likewise.
24469         (MULTLIB_REQUIRED): Likewise.
24471 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24473         * config/arm/t-rtems: Rewrite for new option framework.
24475 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24477         * config/arm/t-aprofile (v7_a_nosimd_variants, v7_a_simd_variants)
24478         (v7ve_nosimd_variatns, v7ve_vfpv3_simd_variants)
24479         (v7ve_vfpv4_simd_variants, v8_a_nosimd_variants, v8_a_simd_variants)
24480         (v8_1_a_simd_variants, v8_2_a_simd_variants): Move to ...
24481         * config/arm/t-multilib: ... here.
24482         (MULTILIB_OPTIONS): Add armv7 and armv7+fp architectures.
24483         (MULTILIB_MATCHES): Use armv7 libraries for armv7-r.  Also use for
24484         armv7-a and armv8*-a when A-profile libraries have not been built.
24485         * config/arm/t-rmprofile: Rewrite.
24487 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24489         * genmultilib (multilib_reuse): Allow an explicit period to be escaped
24490         with a backslash.  Remove the backslash after substituting unescaped
24491         periods.
24492         * doc/fragments.texi (MULTILIB_REUSE): Document it.
24494 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24496         * config.gcc: (arm*-*-*): When building a-profile libraries, force
24497         the driver to pass through the default setting of -mfloat-abi.
24498         * common/config/arm/arm-common.c (arm_target_thumb_only): Return -marm
24499         rather than NULL.
24500         * config/arm/t-multilib (MULTILIB_REUSE): Initialize to empty.
24501         (all_feat_combs): New rule.
24502         (MULTILIB_OPTIONS): Use explicit ARM and Thumb directories.  Rework
24503         default libraries.
24504         * config/arm/t-aprofile: Rewrite.
24506 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24508         * config/arm/arm.h (FPUTYPE_AUTO): Define.
24509         * config/arm/arm.c (arm_option_override): Use FPUTYPE_AUTO if the
24510         fpu is not specified by the user/command-line.
24511         * config/arm/bpabi.h (FPUTYPE_DEFAULT): Delete.
24512         * config/arm/netbsd-elf.h (FPUTYPE_DEFAULT): Delete.
24513         * config/arm/linux-elf.h (FPUTYPE_DEFAULT): Delete.
24514         * config/arm/vxworks.h (FPUTYPE_DEFAULT): Delete.
24515         * common/config/arm/arm-common.c (arm_canon_arch_option): Use
24516         FPUTYPE_AUTO insted of FPUTYPE_DEFAULT.
24518 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24520         * config/arm/elf.h (MULTILIB_DEFAULTS): Delete.
24521         * config/arm/t-arm-elf: Rewritten.
24523 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24525         * config/arm/arm.h (TARGET_HARD_FLOAT): Also check that we
24526         have some floating-point instructions.
24527         (TARGET_SOFT_FLOAT): Define as inverse of TARGET_HARD_FLOAT.
24528         (TARGET_MAYBE_HARD_FLOAT): New macro.
24529         * config/arm/arm-builtins.c (arm_init_builtins): Use
24530         TARGET_MAYBE_HARD_FLOAT.
24531         * config/arm/arm.c (arm_option_override): Use TARGET_HARD_FLOAT_ABI.
24533 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24535         * common/config/arm/arm-common.c: Define INCLUDE_LIST.
24536         (configargs.h): Include it.
24537         (arm_print_hint_for_fpu_option): New function.
24538         (arm_parse_fpu_option): New function.
24539         (candidate_extension): New class.
24540         (arm_canon_for_multilib): New function.
24541         * config/arm/arm.h (CANON_ARCH_SPEC_FUNCTION): New macro.
24542         (EXTRA_SPEC_FUNCTIONS): Add CANON_ARCH_SPEC_FUNCTION.
24543         (ARCH_CANONICAL_SPECS): New macro.
24544         (DRIVER_SELF_SPECS): Add ARCH_CANONICAL_SPECS.
24546 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24548         * config.gcc (arm*-*-*): Ensure both target_cpu_cname and with_cpu
24549         are set after handling multilib fragments.  Set target_cpu_default2
24550         from with_cpu.
24552 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24554         * config.gcc (arm*-*-fucshia*): Set target_cpu_cname to the real
24555         cpu name.
24556         (arm*-*-*): Set target_cpu_default2 to a quoted string.
24557         * config/arm/parsecpu.awk (check_cpu): Validate any extension
24558         options.
24559         (check_arch): Likewise.
24560         * config/arm/arm.c (arm_configure_build_target): Handle
24561         TARGET_CPU_DEFAULT being a string constant.  Scan any feature
24562         options in the default.
24564 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24566         * config/arm/arm-protos.h (cpu_arch_extension): Add field to record
24567         when an option is an alias of another.
24568         * config/arm/parsecpu.awk (optalias): New parser token.
24569         (gen_comm_data): Mark non-alias options as such.  Emit entries
24570         for extension aliases.
24571         * config/arm/arm-cpus.in (armv5e): Make vfpv2 an alias.
24572         (armv5te, armv5tej, armv6, armv6j, armv6k, armv6z): Likewise.
24573         (armv6kz, armv6zk, armv6t2): Likewise.
24574         (armv7): Make vfpv3-d16 an alias.
24575         (armv7-a): Make vfpv3-d16, neon and neon-vfpv3 aliases.  Sort in
24576         canonical order.
24577         (armv7ve): Make vfpv4-d16, neon-vfpv3 and neon-vfpv4 aliases.
24578         Sort in canonical order.
24579         (armv8-a): Sort in canonical order.
24580         (armv8.1-a, armv8.2-a):  Likewise.
24581         (generic-armv7-a): Make neon and neon-vfpv3 aliases.  Sort in
24582         canonical order.
24583         (cortex-a9): Sort in canonical order.
24584         * config/arm/arm.c (selftests.h): Include it.
24585         (arm_test_cpu_arch_data): New function.
24586         (arm_run_self_tests): New function.
24587         (TARGET_RUN_TARGET_SELFTESTS): Redefine.
24588         (targetm): Move declaration to the end of the file.
24589         * arm-cpu-cdata.h: Regenerated.
24591 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24593         * config/arm/arm.h (TARGET_MODE_SPECS): Add additional parameter to
24594         call to target_mode_check describing the type of option passed.
24595         * common/config/arm/arm-common.c (arm_arch_core_flag): Delete.
24596         (arm_target_thumb_only): Use arm_parse_arch_option_name or
24597         arm_parse_cpu_option_name to match parameters against list of
24598         available targets.
24599         * config/arm/parsecpu.awk (gen_comm_data): Don't generate
24600         arm_arch_core_flags data structure.
24601         * config/arm/arm-cpu_cdata.h: Regenerated.
24603 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24605         * common/config/arm/arm-common.c (arm_initialize_isa): Moved here from
24606         config/arm/arm.c.
24607         (arm_print_hint_for_cpu_option): Likewise.
24608         (arm_print_hint_for_arch_option): Likewise.
24609         (arm_parse_cpu_option_name): Likewise.
24610         (arm_parse_arch_option_name): Likewise.
24611         * config/arm/arm.c (arm_identify_fpu_from_isa): Use the computed number
24612         of entries in the all_fpus list.
24613         * config/arm/arm-protos.h (all_architectures, all_cores): Declare.
24614         (arm_parse_cpu_option_name): Declare.
24615         (arm_parse_arch_option_name): Declare.
24616         (arm_parse_option_features): Declare.
24617         (arm_intialize_isa): Declare.
24618         * config/arm/parsecpu.awk (gen_data): Move CPU and architecture
24619         data tables to ...
24620         (gen_comm_data): ... here.  Make definitions non-static.
24621         * config/arm/arm-cpu-data.h: Regenerated.
24622         * config/arm/arm-cpu-cdata.h: Regenerated.
24624 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24626         * config/arm/arm-protos.h (arm_build_target): Remove arch_core.
24627         (cpu_arch_extension): New structure.
24628         (cpu_arch_option, arch_option, cpu_option): New structures.
24629         * config/arm/parsecpu.awk (gen_headers): Build an enumeration of
24630         architecture types.
24631         (gen_data): Generate new format data tables.
24632         * config/arm/arm.c (cpu_tune): New structure.
24633         (cpu_option, processors): Delete.
24634         (arm_print_hint_for_core_or_arch): Delete.  Replace with ...
24635         (arm_print_hint_for_cpu_option): ... this and ...
24636         (arm_print_hint_for_arch_option): ... this.
24637         (arm_parse_arch_cpu_name): Delete.  Replace with ...
24638         (arm_parse_cpu_option_name): ... this and ...
24639         (arm_parse_arch_option_name): ... this.
24640         (arm_unrecognized_feature): Change type of target parameter to
24641         cpu_arch_option.
24642         (arm_parse_arch_cpu_features): Delete.  Replace with ...
24643         (arm_parse_option_features): ... this.
24644         (arm_configure_build_target): Rework to use new configuration data
24645         tables.
24646         (arm_print_tune_info): Rework for new configuration data tables.
24647         * config/arm/arm-cpu-data.h: Regenerated.
24648         * config/arm/arm-cpu.h: Regenerated.
24650 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24652         * Makefile.in (OBJS): Move sbitmap.o from here ...
24653         (OBJS-libcommon): ... to here.
24655 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24657         * config/arm/arm-isa.h (ISA_ALL_FPU_INTERNAL): Renamed from ISA_ALL_FPU.
24658         (ISA_ALL_CRYPTO): New macro.
24659         (ISA_ALL_SIMD): New macro
24660         (ISA_ALL_FP): New macro.
24661         * config/arm/arm.c (fpu_bitlist): Update initializer.
24662         * config/arm/arm-cpus.in: Use new ISA_ALL macros to disable crypto,
24663         simd or fp.
24664         (arm9e): Add fpu.  Add option for nofp
24665         (arm946e-s, arm966e-s, arm968e-s, arm10e, arm1020e, arm1022e): Likewise.
24666         (arm926ej-s, arm1026ej-s): Likewise.
24667         (generic-armv7-a): Add fpu.  Add options for simd, vfpv3, vfpv3-d16,
24668         vfpv3-fp16, vfpv3-d16-fp16, vfpv4, vfpv4-d16, neon, neon-vfp3,
24669         neon-fp16, neon-vfpv4, nofp and nosimd.
24670         (cortex-a5, cortex-a7): Add fpu.  Add options for nosimd and nofp.
24671         (cortex-a8): Add fpu.  Add option for nofp.
24672         (cortex-a9): Add fpu.  Add options for nosimd and nofp.
24673         (cortex-a12, cortex-a15, cortex-a17): Add fpu.  Add option for nofp.
24674         (cortex-r4f): Add fpu.
24675         (cortex-r5): Add fpu.  Add options for nofp.dp and nofp.
24676         (cortex-r7): Use idiv option from architecture.  Add fpu.  Add option
24677         for nofp.
24678         (cortex-r8): Likewise.
24679         (cortex-m4): Add fpu.  Add option for nofp.
24680         (cortex-a15.cortex-a7): Add fpu.  Add option for nofp.
24681         (cortex-a17.cortex-a7): Likewise.
24682         (cortex-a32): Add fpu.  Add options for crypto and nofp.
24683         (cortex-a35, cortex-a53): Likewise.
24684         (cortex-a57): Add fpu.  Add option for crypto.
24685         (cortex-a72, cortex-a73): Likewise.
24686         (exynos-m1): Likewise.
24687         (cortex-a57.cortex-a53, cortex-a72.cortex-a53): Likewise.
24688         (cortex-a73.cortex-a35, cortex-a73.cortex-a53): Likewise.
24689         (cortex-m33): Add fpu.  Add option for nofp.
24690         * config/arm/arm-cpu-cdata.h: Regenerated
24691         * config/arm/arm-cpu-data.h: Regenerated.
24693 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24695         * arm-cpus.in (armv5e): Add options fp, vfpv2 and nofp.
24696         (armv5te, armv5tej): Likewise.
24697         (armv6, armv6j, armv6k, armv6z, armv6kz, armv6zk, armv6t2): Likewise.
24698         (armv7): Add options fp and vfpv3-d16.
24699         (armv7-a): Add options fp, simd, vfpv3, vfpv3-d16, vfpv3-d16-fp16,
24700         vfpv3-fp16, vfpv4, vfpv4-d16, neon, neon-vfpv3, neon-fp16, neon-vfpv4,
24701         nofp and nosimd.
24702         (armv7ve): Likewise.
24703         (armv7-r): Add options fp, fp.sp, idiv, nofp and noidiv.
24704         (armv7e-m): Add options fp, fpv5, fp.dp and nofp.
24705         (armv8-a): Add nocrypto option.
24706         (armv8.1-a, armv8.2-a): Likewise.
24707         (armv8-m.main): add options fp, fp.dp and nofp.
24709 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24711         * config/arm/arm-cpus.in (armv8-a): Add options crc, simd crypto and
24712         nofp.
24713         (armv8-a+crc): Delete.
24714         (armv8.1-a): Add options simd, crypto and nofp.
24715         (armv8.2-a): Add options fp16, simd, crypto and nofp.
24716         (armv8.2-a+fp16): Delete.
24717         (armv8-m.main): Add option dsp.
24718         (armv8-m.main+dsp): Delete.
24719         (cortex-a8): Add fpu.  Add nofp option.
24720         (cortex-a9): Add fpu.  Add nofp and nosimd options.
24721         * config/arm/parsecpu.awk (gen_data): Generate option tables and
24722         link to main cpu and architecture data structures.
24723         (gen_comm_data): Only put isa attributes from the main architecture
24724         in common tables.
24725         (option): New statement for architecture and CPU entries.
24726         * arm.c (struct cpu_option): New structure.
24727         (struct processors): Add entry for options.
24728         (arm_unrecognized_feature): New function.
24729         (arm_parse_arch_cpu_name): Ignore any characters after the first
24730         '+' character.
24731         (arm_parse_arch_cpu_feature): New function.
24732         (arm_configure_build_target): Separate out any CPU and architecture
24733         features and parse separately.  Don't error out if -mfpu=auto is
24734         used with only an architecture string.
24735         (arm_print_asm_arch_directives): New function.
24736         (arm_file_start): Call it.
24737         * config/arm/arm-cpu-cdata.h: Regenerated.
24738         * config/arm/arm-cpu-data.h: Likewise.
24739         * config/arm/arm-tables.opt: Likewise.
24741 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24743         * config/arm/elf.h (ASM_SPEC): Only pass -mfpu through to the
24744         assembler when it is not -mfpu=auto.
24746 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24748         * config/arm/arm.h (BIG_LITTLE_SPEC): Delete macro.
24749         (ASM_REWRITE_SPEC_FUNCTIONS): New macro.
24750         (BIG_LITTLE_CPU_SPEC_FUNCTIONS): Delete macro.
24751         (ASM_CPU_SPEC): Rewrite.
24752         (MCPU_MTUNE_NATIVE_FUNCTIONS): New macro.
24753         (EXTRA_SPEC_FUNCTIONS): Move outside of ifdef.  Use
24754         MCPU_MTUNE_NATIVE_FUNCTIONS and ASM_REWRITE_SPEC_FUNCTIONS.  Remove
24755         reference to BIG_LITTLE_CPU_SPEC_FUNCTIONS.
24756         * common/config/arm/arm-common.c (arm_rewrite_selected_cpu): Ensure
24757         copied string is NUL-terminated.  Also strip any characters prefixed
24758         by '+'.
24759         (arm_rewrite_selected_arch): New function.
24760         (arm_rewrite_march): New function.
24762 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
24764         * config/arm/arm.opt (x_arm_arch_string): New TargetSave option.
24765         (x_arm_cpu_string, x_arm_tune_string): Likewise.
24766         (march, mcpu, mtune): Convert to string-based options.
24767         * config/arm/arm.c (arm_print_hint_for_core_or_arch): New function.
24768         (arm_parse_arch_cpu_name): New function.
24769         (arm_configure_build_target): Use arm_parse_arch_cpu_name to
24770         identify selected architecture or CPU.
24771         (arm_option_save): New function.
24772         (TARGET_OPTION_SAVE): Redefine.
24773         (arm_option_restore): Restore string options.
24774         (arm_option_print): Print string options.
24776 2017-06-16  Martin Sebor  <msebor@redhat.com>
24778         PR tree-optimization/80933
24779         PR tree-optimization/80934
24780         * builtins.c (fold_builtin_3): Do not handle bcmp here.
24781         * gimple-fold.c (gimple_fold_builtin_bcmp): New function.
24782         (gimple_fold_builtin_bcopy, gimple_fold_builtin_bzero): Likewise.
24783         (gimple_fold_builtin): Call them.
24785 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
24787         * gimple-ssa-isolate-paths.c (isolate_path): Set edge leading to path
24788         as unlikely; update profile.
24790 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
24792         * predict.c (force_edge_cold): Handle declaring edges impossible
24793         more aggresively.
24795 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
24797         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update
24798         profile.
24799         (try_unroll_loop_completely): Fix reporting.
24801 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
24803         * tree-ssa-tail-merge.c (replace_block_by): Fix profile updating.
24805 2017-06-16  James Greenhalgh  <james.greenhalgh@arm.com>
24807         PR target/71778
24808         * config/arm/arm-builtins.c (arm_expand_builtin_args): Return TARGET
24809         if given a non-constant argument for an intrinsic which requires a
24810         constant.
24812 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
24814         * profile.c (compare_freqs): New function.
24815         (branch_prob): Sort edge list.
24816         (find_spanning_tree): Assume that the list is priority sorted.
24818 2017-06-16  Richard Biener  <rguenther@suse.de>
24820         PR tree-optimization/81090
24821         * passes.def (pass_record_bounds): Remove.
24822         * tree-pass.h (make_pass_record_bounds): Likewise.
24823         * tree-ssa-loop.c (pass_data_record_bounds, pass_record_bounds,
24824         make_pass_record_bounds): Likewise.
24825         * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables): Do
24826         not free niter estimates at the beginning but at the end.
24827         * tree-scalar-evolution.c (scev_finalize): Free niter estimates.
24829 2017-06-16  Richard Biener  <rguenther@suse.de>
24831         * tree-switch-conversion.c (emit_case_bit_tests): Adjust
24832         initializer to workaround ICE in host GCC 4.8.
24834 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
24836         * ipa-inline-transform.c (update_noncloned_frequencies): Update also
24837         counts.
24838         (clone_inlined_nodes): Update.
24840 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
24842         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune): Update
24843         prefetch settings, and enable prefetching by default at -O3.
24845 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
24847         * config/aarch64/aarch64.c (aarch64_override_options_internal):
24848         Set flag_prefetch_loop_arrays according to tuning data.
24850 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
24852         * config/aarch64/aarch64-protos.h (struct cpu_prefetch_tune):
24853         New tune structure.
24854         (struct tune_params): Use cpu_prefetch_tune instead of cache_line_size.
24855         [Unrelated to main purpose of the patch] Place the pointer field last
24856         to enable type checking errors when tune structure are wrongly merged.
24857         * config/aarch64/aarch64.c (generic_prefetch_tune,)
24858         (exynosm1_prefetch_tune, qdf24xx_prefetch_tune,)
24859         (thunderx2t99_prefetch_tune): New tune constants.
24860         (tune_params *_tunings): Update all tunings (no functional change).
24861         (aarch64_override_options_internal): Set PARAM_SIMULTANEOUS_PREFETCHES,
24862         PARAM_L1_CACHE_SIZE, PARAM_L1_CACHE_LINE_SIZE, and PARAM_L2_CACHE_SIZE
24863         from tunings structures.
24865 2017-06-16  Jakub Jelinek  <jakub@redhat.com>
24867         PR sanitizer/81094
24868         * ubsan.c (instrument_null): Add T argument, use it instead
24869         of computing it based on IS_LHS.
24870         (instrument_object_size): Likewise.
24871         (pass_ubsan::execute): Adjust instrument_null and
24872         instrument_object_size callers to pass gimple_get_lhs or
24873         gimple_assign_rhs1 result to it.  Use instrument_null instead of
24874         calling get_base_address and instrument_mem_ref.  Handle
24875         aggregate call arguments for object-size sanitization.
24877 2017-06-16  Yury Gribov  <tetra2005@gmail.com>
24879         PR tree-optimization/81089
24880         * tree-vrp.c (is_masked_range_test): Validate operands of
24881         subexpression.
24883 2017-06-15  Martin Sebor  <msebor@redhat.com>
24885         PR c++/80560
24886         * dumpfile.c (dump_register): Avoid calling memset to initialize
24887         a class with a default ctor.
24888         * gcc.c (struct compiler): Remove const qualification.
24889         * genattrtab.c (gen_insn_reserv): Replace memset with initialization.
24890         * hash-table.h: Ditto.
24891         * ipa-cp.c (allocate_and_init_ipcp_value): Replace memset with
24892           assignment.
24893         * ipa-prop.c (ipa_free_edge_args_substructures): Ditto.
24894         * omp-low.c (lower_omp_ordered_clauses): Replace memset with
24895         default ctor.
24896         * params.h (struct param_info): Make struct members non-const.
24897         * tree-switch-conversion.c (emit_case_bit_tests): Replace memset
24898         with default initialization.
24899         * vec.h (vec_copy_construct, vec_default_construct): New helper
24900         functions.
24901         (vec<T>::copy, vec<T>::splice, vec<T>::reserve): Replace memcpy
24902         with vec_copy_construct.
24903         (vect<T>::quick_grow_cleared): Replace memset with default ctor.
24904         (vect<T>::vec_safe_grow_cleared, vec_safe_grow_cleared): Same.
24905         * doc/invoke.texi (-Wclass-memaccess): Document.
24907 2017-06-15  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
24909         * emit-rtl.h (is_leaf): Update comment about local
24910         register allocator.
24912 2017-06-15  Jozef Lawrynowicz   <jozef.l@somniumtech.com>
24914         PR target/78818
24915         * config/msp430/msp430.c (msp430_data_attr): Check that it's possible
24916         for a variable to have a section before checking if the section has a
24917         name.
24918         Set section to.persistent if persistent attribute is set.
24919         Warn if .persistent attribute is used on an automatic variable.
24921 2017-06-15  Eric Botcazou  <ebotcazou@adacore.com>
24923         PR rtl-optimization/80474
24924         * reorg.c (update_block): Do not ignore instructions in a delay slot.
24926 2017-06-15  Segher Boessenkool  <segher@kernel.crashing.org>
24928         * config/rs6000/rs6000.md (add<mode>3): Use reg_or_subregno instead
24929         of REGNO.
24931 2017-06-14  Maciej W. Rozycki  <macro@imgtec.com>
24933         * config/mips/mips.md (MIPS16_T_REGNUM): Remove constant.
24934         (casesi): Emit bounds checking as RTL.
24935         (casesi_internal_mips16_<mode>): Remove bounds checking.
24937 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
24939         * config/xtensa/xtensa.c (xtensa_option_override): Append
24940         MASK_CONST16 to target_flags in the absence of TARGET_L32R.
24941         (hwloop_optimize, hwloop_fail, hwloop_pattern_reg,
24942          xtensa_doloop_hooks): Define unconditionally.
24943         (xtensa_reorg_loops): Only call reorg_loops in the presence of
24944         TARGET_LOOPS.
24945         * config/xtensa/xtensa.h (TARGET_L32R): New definition.
24946         (TARGET_DEFAULT): Remove XCHAL_HAVE_L32R condition and account
24947         for it in xtensa_option_override.
24948         (HARD_FRAME_POINTER_IS_FRAME_POINTER,
24949          HARD_FRAME_POINTER_IS_ARG_POINTER): New definitions.
24951 2017-06-14  Boris Kolpackov  <boris@codesynthesis.com>
24953         * doc/cppopts.texi: Document '-' special value to -MF.
24955 2017-06-14  Wilco Dijkstra  <wdijkstr@arm.com>
24957         * config/arm/cortex-a53.md (cortex_a53_fpalu) Adjust latency.
24958         (cortex_a53_fconst): Likewise.
24959         (cortex_a53_fpmul): Likewise.
24960         (cortex_a53_f_load_64): Likewise.
24961         (cortex_a53_f_load_many): Likewise.
24962         (cortex_a53_advsimd_alu): Likewise.
24963         (cortex_a53_advsimd_alu_q): Likewise.
24964         (cortex_a53_advsimd_mul): Likewise.
24965         (cortex_a53_advsimd_mul_q): Likewise.
24966         (fpmac bypass): Add new bypass for fpmac-fpmac case.
24967         Add missing fmul, r2f_cvt and fconst cases.
24969 2017-06-14  Richard Biener  <rguenther@suse.de>
24971         PR middle-end/81088
24972         * fold-const.c (split_tree): Drop TREE_OVERFLOW flag from
24973         literal constants.
24974         (fold_binary_loc): When associating do not treat pre-existing
24975         TREE_OVERFLOW on literal constants as a reason to allow
24976         TREE_OVERFLOW on associated literal constants.
24978 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
24980         * config/sparc/sparc.h (MASK_ISA): Add MASK_LEON and MASK_LEON3.
24981         (MASK_FEATURES): New macro.
24982         * config/sparc/sparc.c (sparc_option_override): Remove the special
24983         handling of -mfpu and generalize it to all MASK_FEATURES switches.
24985 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
24987         * simplify-rtx.c (simplify_binary_operation_1) <UDIV>: Do not simplify
24988         a division of 0 if non-call exceptions are enabled.
24990 2017-06-14  Andrew Pinski  <apinski@cavium.com>
24991             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
24993         PR target/71663
24994         * config/aarch64/aarch64.c (aarch64_expand_vector_init):
24995         Improve vector initialization code gen for only variable case.
24997 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
24999         * config/sparc/driver-sparc.c (cpu_names): Add SPARC-T5 entry.
25001 2017-06-14  Richard Biener  <rguenther@suse.de>
25003         PR tree-optimization/81083
25004         * tree-ssa-sccvn.c (vn_reference_lookup_3): Do not use abnormals
25005         as values.
25007 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
25009         * config/rs6000/rs6000.c: Update all comments that mentioned SPE.
25010         (rs6000_expand_builtin): Remove RS6000_BTC_EVSEL.
25011         * config/rs6000/rs6000.h (RS6000_BTC_EVSEL): Delete.
25012         * config/rs6000/vxworks.h (VXCPU_FOR_8548): Delete.  Adjust former use.
25013         * config/rs6000/vxworksae.h (VXCPU_FOR_8548): Delete.
25014         * config/rs6000/vxworksmils.h (VXCPU_FOR_8548): Delete.
25016 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
25018         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete VECTOR_SPE.
25019         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete VECTOR_SPE.
25021 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
25023         * config/rs6000/rs6000.h (FIXED_SCRATCH): Delete.
25025 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
25027         * config/rs6000/t-rtems: Don't handle SPE.
25029 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
25031         * config/rs6000/t-linux: Don't handle SPE.
25033 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
25035         * config/rs6000/eabispe.h: Delete file.
25037 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
25039         * config/rs6000/t-spe: Delete file.
25041 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
25043         * config/rs6000/rs6000.c (SPE_CONST_OFFSET_OK): Delete.
25044         (rs6000_legitimate_offset_address_p): Return false for anything in
25045         V2SImode or V2SFmode.
25047 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
25049         * config/rs6000/rs6000-modes.def: Remove all 8-byte vector modes
25050         except V2SF and V2SI.  Rearrange the vector modes, and add comments.
25051         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove V8QImode
25052         and V4HImode.
25053         (reg_offset_addressing_ok_p): Remove V4HImode and V1DImode.
25054         (rs6000_legitimate_offset_address_p): Ditto.
25055         (rs6000_emit_move): Ditto.
25056         (rs6000_init_builtins): Remove V4HI_type_node.
25058 2017-06-13  Martin Liska  <mliska@suse.cz>
25060         PR sanitize/78204
25061         * asan.c (asan_sanitize_stack_p): Use sanitize_flags_p.
25062         (gate_asan): Likewise.
25063         * asan.h (asan_no_sanitize_address_p): Remove the function.
25064         (sanitize_flags_p): New function.
25065         * builtins.def: Fix coding style.
25066         * common.opt: Use renamed enum value.
25067         * convert.c (convert_to_integer_1): Use sanitize_flags_p.
25068         * doc/extend.texi: Document no_sanitize attribute.
25069         * flag-types.h (enum sanitize_code): Rename SANITIZE_NONDEFAULT
25070         to SANITIZE_UNDEFINED_NONDEFAULT.
25071         * gcc.c (sanitize_spec_function): Use the renamed enum value.
25072         * gimple-fold.c (optimize_atomic_compare_exchange_p):
25073         Use sanitize_flags_p.
25074         * gimplify.c (gimplify_function_tree): Likewise.
25075         * ipa-inline.c (sanitize_attrs_match_for_inline_p): Likewise.
25076         * opts.c (parse_no_sanitize_attribute): New function.
25077         (common_handle_option): Use renamed enum value.
25078         * opts.h (parse_no_sanitize_attribute): Declare.
25079         * tree.c (sanitize_flags_p): New function.
25080         * tree.h: Declared here.
25081         * tsan.c: Use sanitize_flags_p.
25082         * ubsan.c (ubsan_expand_null_ifn): Likewise.
25083         (instrument_mem_ref): Likewise.
25084         (instrument_bool_enum_load): Likewise.
25085         (do_ubsan_in_current_function): Remove the function.
25086         (pass_ubsan::execute): Use sanitize_flags_p.
25087         * ubsan.h: Remove do_ubsan_in_current_function
25088         * tree-cfg.c (print_no_sanitize_attr_value): New function.
25089         (dump_function_to_file): Use it here.
25091 2017-06-13  Martin Jambor  <mjambor@suse.cz>
25093         PR tree-optimization/80803
25094         PR tree-optimization/81063
25095         * tree-sra.c (subtree_mark_written_and_enqueue): Move up in the file.
25096         (propagate_subaccesses_across_link): Enqueue subtree whenever
25097         necessary instead of relying on the caller.
25099 2017-06-13  Martin Jambor  <mjambor@suse.cz>
25101         * tree-sra.c (add_access_to_work_queue): Only enqueue accesses
25102         that have a first_link.
25103         (sort_and_splice_var_accesses): Do not check first_link before
25104         enquing.
25105         (subtree_mark_written_and_enqueue): Likewise.
25106         (propagate_all_subaccesses): Likewise and do not stop at first
25107         parent with a first_link.
25109 2017-06-13  Martin Jambor  <mjambor@suse.cz>
25111         * tree-sra.c (dump_access_tree_1): Fix accidental dumping to stderr
25112         instead of f.
25114 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
25116         * match.pd: New pattern.
25118 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
25120         * tree-vrp.c (is_masked_range_test): New function.
25121         (register_edge_assert_for): Determine ranges for
25122         some bit tests.
25124 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
25126         PR tree-optimization/67328
25127         * fold-const.c (maskable_range_p): New function.
25128         (build_range_check): Generate bittests if possible.
25130 2017-06-13  Martin Liska  <mliska@suse.cz>
25132         * gimple-pretty-print.c (dump_probability): Add new argument.
25133         (dump_edge_probability): Dump both probability and count.
25134         (dump_gimple_label): Likewise.
25135         (dump_gimple_bb_header): Likewise.
25137 2017-06-13  Georg-Johann Lay  <avr@gjlay.de>
25139         PR target/81072
25140         * config/avr/avr-devices.c: Fix indentation.
25141         * config/avr/gen-avr-mmcu-specs.c: Dito.
25143 2017-06-13  Richard Biener  <rguenther@suse.de>
25145         * tree-vect-loop.c (vect_model_reduction_cost): Do not fail,
25146         instead get vector type from stmt_info.
25147         (vectorizable_reduction): Adjust.  Remove dead code.
25149 2017-06-13  Richard Biener  <rguenther@suse.de>
25151         PR middle-end/81065
25152         * fold-const.c (extract_muldiv_1): Remove bogus distribution
25153         case of C * (x * C2 + C3).
25154         (fold_addr_of_array_ref_difference): Properly fold index difference.
25156 2017-06-12  David S. Miller  <davem@davemloft.net>
25158         PR target/80968
25159         * config/sparc/sparc.md (return expander): Emit frame blockage if
25160         function uses alloca.
25162 2017-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
25164         * combine.c (make_field_assignment): Check len rather than the mode
25165         precision when calling force_to_mode.
25167 2017-06-12  Georg-Johann Lay  <avr@gjlay.de>
25169         Support multilibs and devices that see flash in RAM address range.
25171         PR target/81072
25172         * config/avr/avr-arch.h (avr_arch_id) <ARCH_AVRXMEGA3>: New enum.
25173         (avr_mcu_t) <flash_pm_offset>: New field.
25174         (avr_device_specific_features) <AVR_ISA_RCALL>: New enum.
25175         * config/avr/avr.h (AVR_SHORT_CALLS): New define.
25176         (AVR_HAVE_JMP_CALL): Don't set if AVR_SHORT_CALLS.
25177         (AVR_TINY_PM_OFFSET): Remove macro.
25178         * config/avr/avr.opt (-mshort-calls): New option.
25179         * config/avr/gen-avr-mmcu-specs.c (print_mcu)
25180         [*self_spec]: Add / remove -mshort-calls depending on AVR_ISA_RCALL.
25181         * config/avr/avr-c.c (avr_cpu_cpp_builtins)
25182         <__AVR_SHORT_CALLS__>: Built-in define if AVR_SHORT_CALLS.
25183         <__AVR_HAVE_JMP_CALL__>: Use AVR_HAVE_JMP_CALL as condition
25184         instead of avr_arch->have_jmp_call.
25185         <__AVR_PM_BASE_ADDRESS__>: Built-in define if avr_arch->flash_pm_offset.
25186         [AVR_TINY] <__AVR_TINY_PM_BASE_ADDRESS__>: Use
25187         avr_arch->flash_pm_offset to define.
25188         * config/avr/avr-devices.c (avr_arch_types): Add initializers for
25189         new field flash_pm_offset.  Add entry for avrxmega3.
25190         (avr_texinfo): Add entry for avrxmega3.
25191         * config/avr/avr-mcus.def: Add entries for: avrxmega3,
25192         attiny212, attiny214,
25193         attiny412, attiny414, attiny416, attiny417,
25194         attiny814, attiny816, attiny817,
25195         attiny1614, attiny1616, attiny1617,
25196         attiny3214, attiny3216, attiny3217.
25197         * config/avr/avr.c (avr_assemble_integer)[AVR_TINY]: Use
25198         avr_arch->flash_pm_offset instead of AVR_TINY_PM_OFFSET.
25199         (avr_print_operand_address) [AVR_TINY]: Same.
25200         (avr_asm_init_sections) <readonly_data_section>: Only patch
25201         callback if avr_arch->flash_pm_offset = 0.
25202         (avr_asm_named_section) <avr_need_copy_data_p>: Skip setting it
25203         for rodata if avr_arch->flash_pm_offset != 0.
25204         (avr_encode_section_info) [AVR_TINY]: Adjust comment.
25205         * config/avr/genmultilib.awk (dir_rcall, opt_rcall): New vars.
25206         (opts) [AVR_ISA_RCALL]: Append opt_rcall.
25207         (m_options): Append opt_rcall.
25208         (m_dirnames): Append dir_rcall.
25209         * config/avr/t-multilib: Regenerate.
25211         * configure.ac [target=avr]: Check whether avrxmega3 default
25212         linker description file works as needed.
25213         * configure: Regenerate.
25214         * doc/avr-mmcu.texi: Regenerate.
25215         * doc/invoke.texi (AVR Options) <-mshort-calls>: Document it.
25216         <__AVR_ARCH__>: Document avrxmega3 and 103.
25217         <__AVR_HAVE_JMP_CALL__>: Adjust documentation.
25218         <__AVR_SHORT_CALLS__>: Document it.
25219         <__AVR_PM_BASE_ADDRESS__>: Document it.
25220         * doc/extend.texi (AVR Options) <-mshort-calls>: Document it.
25221         (AVR Variable Attributes) <progmem>: Document this is
25222         not needed for avrxmega3.
25223         (AVR Named Address Spaces) <__flash>: Dito.
25225 2017-06-12  Jan Hubicka  <hubicka@ucw.cz>
25227         * cgraph.c (cgraph_node::dump): Complain about profile insanities.
25229 2017-06-12  Doug Rupp  <rupp@adacore.com>
25231         * config.gcc (*-*-vxworks*): Set use_gcc_stdint to "provide".
25232         Append vxworks-stdint.h to the tm_file list.
25233         * config/vxworks-stdint.h: New file.
25235 2017-06-12  Martin Liska  <mliska@suse.cz>
25237         PR tree-optimization/81041
25238         * tree-profile.c (gimple_gen_ic_func_profiler):
25239         Create an extra BB in profile-generate
25240         (gimple_gen_time_profiler): Likewise.
25242 2017-06-12  Jakub Jelinek  <jakub@redhat.com>
25244         PR tree-optimization/81003
25245         * tree-ssa-reassoc.c (force_into_ssa_name): New function.
25246         (update_range_test): Use it instead of force_gimple_operand_gsi.
25248 2017-06-12  Richard Biener  <rguenther@suse.de>
25250         PR tree-optimization/81053
25251         * tree-vect-loop.c (vect_is_simple_reduction): Handle PHI
25252         with backedge value not defined in loop.  Simplify def stmt
25253         compute.
25255 2017-06-11  Tom de Vries  <tom@codesourcery.com>
25257         PR target/79939
25258         * config/nvptx/nvptx.c (nvptx_cannot_force_const_mem): New function.
25259         Return true.
25260         (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to
25261         nvptx_cannot_force_const_mem.
25263 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
25265         * opts.c (finish_options): Move test for flag_split_stack after
25266         it has been initialized.
25268 2017-06-11  Jason Merrill  <jason@redhat.com>
25270         * tree.h (id_equal): New.
25271         * dwarf2out.c, hsa-gen.c, ipa-devirt.c, omp-expand.c,
25272         omp-simd-clone.c, read-rtl-function.c, tree-chkp.c, tree.c: Use it
25273         instead of strcmp of IDENTIFIER_POINTER.
25275 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
25277         * ipa-inline-transform.c: Include function.h, cfg.h and basic-block.h
25278         (mark_all_inlined_calls_cdtor): Fix formating.
25279         (inline_transform): Rescale profile before inlining.
25281 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
25283         * cgraph.h (cgraph_edge::clone): Update prototype.
25284         * cgraphclones.c (cgraph_edge::clone): Update profile scaling.
25285         (cgraph_node::create_clone): Update.
25286         (cgraph_node::create_version_clone): Update.
25287         * tree-inline.c (copy_bb): Update.
25288         (expand_call_inline): Update.
25290 2017-06-10  Segher Boessenkool  <segher@kernel.crashing.org>
25292         * config/rs6000/rs6000.c (emit_vrsave_prologue): New function,
25293         factored out from ...
25294         (rs6000_emit_prologue): ... here.
25296 2017-06-10  Segher Boessenkool  <segher@kernel.crashing.org>
25298         * config/rs6000/rs6000.c (emit_split_stack_prologue): New function,
25299         factored out from ...
25300         (rs6000_emit_prologue): ... here.
25302 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
25304         * predict.c (drop_profile): Also drop individual bb/edge and cgraph
25305         edge counts.
25306         (handle_missing_profiles): Fix computation of tp_first_run.
25307         (counts_to_freqs): Do not touch freqs when count is 0.
25309 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
25311         * cgraphbuild.c (cgraph_edge::rebuild_references): Do not touch
25312         profile.
25314 2017-06-10  Tom de Vries  <tom@codesourcery.com>
25316         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
25317         attributes): Document signal effective target.
25319 2017-06-10  Tom de Vries  <tom@codesourcery.com>
25321         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
25322         Document effective target stack_size.
25324 2017-06-09  David Malcolm  <dmalcolm@redhat.com>
25326         * diagnostic.c (diagnostic_report_diagnostic): Only add fixits
25327         to the edit_context if they can be auto-applied.
25329 2017-06-9  Ian Lance Taylor  <iant@golang.org>
25331         * opts.c (finish_options): If -fsplit-stack, disable implicit
25332         -forder-blocks-and-partition.
25333         * doc/invoke.texi (Optimize Options): Document that when using
25334         -fsplit-stack -forder-blocks-and-partition is not implicitly
25335         enabled.
25337 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
25339         * builtin-attrs.def (ATTR_NORETURN_NOTHROW_LEAF_COLD_LIST,
25340         ATTR_CONST_NORETURN_NOTHROW_LEAF_COLD_LIST,
25341         ATTR_TMPURE_NORETURN_NOTHROW_LEAF_COLD_LIST): New.
25342         * builtins.def (abort, trap, unreachable): Declare cold.
25343         * calls.c (flags_from_decl_or_type): Lookup ECF_COLD.
25344         * tree-core.h (ECF_COLD): New.
25345         * tree.c (set_call_expr_flags): Handle ECF_COLD.
25346         (build_common_builtin_nodes): Mark unreachable and abort as cold.
25348 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
25350         * predict.c (unlikely_executed_stmt_p): Cleanup.
25352 2017-06-09  Richard Biener  <rguenther@suse.de>
25354         * tree-ssa-loop-im.c (execute_sm): Do not force multi-threaded
25355         model if the ref is always written to.
25357 2017-06-09  Tamar Christina  <tamar.christina@arm.com>
25359         * config/aarch64/aarch64.md (lrint<GPF:mode><GPI:mode>2): New.
25361 2017-06-09  Tamar Christina  <tamar.christina@arm.com>
25363         * config/arm/arm.c (arm_rtx_costs_internal): Make sdiv more expensive
25364         than udiv.
25366 2017-06-09  Tom de Vries  <tom@codesourcery.com>
25368         PR target/80855
25369         * config/nvptx/nvptx.md (define_expand "mov<QHSDISDFM>"): Error out with
25370         "target cannot support label values" when encountering LABEL_REF.
25372 2017-06-09  Martin Liska  <mliska@suse.cz>
25374         * tree-profile.c (gimple_gen_ic_profiler): Update comment.
25375         (gimple_gen_ic_func_profiler): Emit direct comparison
25376         of __gcov_indirect_call_callee with NULL.
25377         (gimple_gen_time_profiler): Change probability from
25378         PROB_VERY_UNLIKELY to PROB_UNLIKELY.
25380 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
25382         * profile.c (edge_gcov_counts): Turn to pointer.
25383         (compute_branch_probabilities, compute_branch_probabilities): Update.
25384         (branch_prob): Do not clear edge_gcov_count.
25385         * profile.h (edge_gcov_counts): Turn to pointer.
25386         (edge_gcov_count): Update.
25388 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
25390         * gimple.h (gimple_check_failed): Mark cold.
25392 2017-06-09  Richard Biener  <rguenther@suse.de>
25394         PR tree-optimization/66623
25395         * tree-vect-loop.c (vect_is_simple_reduction): Cleanup,
25396         refactor check_reduction into two parts, properly computing
25397         whether we have to check reduction validity for outer loop
25398         vectorization.
25400 2017-06-09  Richard Biener  <rguenther@suse.de>
25402         PR tree-optimization/79483
25403         * graphite-scop-detection.c (order): New global.
25404         (get_order): Compute bb to order mapping that satisfies code
25405         generation constraints.
25406         (cmp_pbbs): New helper.
25407         (build_scops): Start domwalk at entry block, sort generated
25408         pbbs.
25410 2017-06-09  Richard Biener  <rguenther@suse.de>
25412         PR middle-end/81007
25413         * ipa-polymorphic-call.c
25414         (ipa_polymorphic_call_context::restrict_to_inner_class):
25415         Skip FIELD_DECLs with error_mark_node type.
25416         * passes.def (all_lowering_passes): Run pass_build_cgraph_edges
25417         last again.
25419 2017-06-09  Martin Liska  <mliska@suse.cz>
25421         * predict.c (struct branch_predictor): New struct.
25422         (test_prediction_value_range): New test.
25423         (predict_c_tests): New function.
25424         * selftest-run-tests.c (selftest::run_tests): Run the function.
25425         * selftest.h: Declare new tests.
25427 2017-06-09  Segher Boessenkool  <segher@kernel.crashing.org>
25429         PR target/80966
25430         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
25431         gen_add3_insn did not fail.
25432         * config/rs6000/rs6000.md (add<mode>3): If asked to add a constant to
25433         r0, construct that number in a temporary reg and add that reg to r0.
25434         If asked to put the result in r0 as well, fail.
25436 2017-06-08  Will Schmidt  <will_schmidt@vnet.ibm.com>
25438         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
25439         for early expansion of vec_eqv.
25441 2017-06-08  Jakub Jelinek  <jakub@redhat.com>
25443         PR middle-end/81005
25444         * ubsan.c (instrument_null): Avoid pointless code temporary.
25445         (pass_ubsan::execute): Instrument aggregate arguments of calls.
25447 2017-06-08  Uros Bizjak  <ubizjak@gmail.com>
25449         PR target/81015
25450         Revert:
25451         2016-12-14  Uros Bizjak  <ubizjak@gmail.com>
25453         PR target/59874
25454         * config/i386/i386.md (*ctzhi2): New insn_and_split pattern.
25455         (*clzhi2): Ditto.
25457 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
25459         * predict.c (unlikely_executed_edge_p): Move ahead.
25460         (probably_never_executed_edge_p): Use it.
25462 2017-06-08  Alexander Ivchenko  <alexander.ivchenko@intel.com>
25464         PR middle-end/79988
25465         * tree-chkp.c (chkp_gimple_call_builtin_p): Remove
25466         gimple_call_builtin_p call.
25468 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
25470         * system.h (fancy_abort): Annotate by ATTRIBUTE_COLD.
25471         * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1,
25472         rtl_check_failed_type2, rtl_check_failed_code1,
25473         rtl_check_failed_code2, rtl_check_failed_code_mode,
25474         rtl_check_failed_block_symbol, cwi_check_failed_bounds,
25475         rtvec_check_failed_bounds, rtl_check_failed_flag,
25476         _fatal_insn_not_found, _fatal_insn): Likewise.
25477         * tree.h (tree_contains_struct_check_failed,
25478         tree_check_failed, tree_not_check_failed,
25479         tree_class_check_failed, tree_range_check_failed,
25480         tree_not_class_check_failed, tree_int_cst_elt_check_failed,
25481         tree_vec_elt_check_failed, phi_node_elt_check_failed,
25482         tree_operand_check_failed, omp_clause_check_failed,
25483         omp_clause_operand_check_failed, omp_clause_range_check_failed):
25484         Likewise.
25486 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
25488         * cgraph.c (cgraph_edge::maybe_hot_p): Do not check
25489         flag_branch_probabilities.
25490         * ipa-inline.c (edge_badness): Likewise.
25491         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
25492         * postreload-gcse.c (eliminate_partially_redundant_load): Likewise.
25493         * predict.c (maybe_hot_frequency_p): Likewise.
25494         (probably_never_executed): Likewise.
25495         * sched-ebb.c (schedule_ebbs): Likewise.
25496         * sched-rgn.c (find_single_block_region): Likewise.
25497         * tracer.c (tail_duplicate): Likewise.
25499 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
25501         * opts.c (finish_options): x_flag_reorder_blocks_and_partition no
25502         longer requires x_flag_profile_use.
25504 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
25506         * cfgrtl.c (cfg_layout_initialize): Check crtl->has_bb_partition
25507         instead of flag_reorder_blocks_and_partition.
25508         * dbxout.c (dbxout_function_end): Likewise.
25509         * dwarf2out.c (gen_subprogram_die): Likewise.
25510         * haifa-sched.c (sched_create_recovery_edges): Likewise.
25511         * hw-doloop.c (reorg_loops): Likewise.
25512         * varasm.c (assemble_start_function,
25513         assemble_end_function): Likewise.
25514         (decide_function_section): Do not check for
25515         flag_reorder_blocks_and_partition.
25517 2017-06-08  Alexander Ivchenko  <alexander.ivchenko@intel.com>
25519         * tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
25520         New function.
25521         (chkp_get_hard_register_fake_addr_expr): Ditto.
25522         (chkp_build_addr_expr): Add check for hard reg case.
25523         (chkp_parse_array_and_component_ref): Ditto.
25524         (chkp_find_bounds_1): Ditto.
25525         (chkp_process_stmt): Don't generate bounds store for
25526         hard reg case.
25528 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
25530         * predict.c (maybe_hot_bb_p): Do not check profile status.
25531         (maybe_hot_edge_p): Likewise.
25532         (probably_never_executed): Check for zero counts even if profile
25533         is not read.
25534         (unlikely_executed_edge_p): New function.
25535         (unlikely_executed_stmt_p): New function.
25536         (unlikely_executed_bb_p): New function.
25537         (set_even_probabilities): Use unlikely predicates.
25538         (combine_predictions_for_bb): Likewise.
25539         (predict_paths_for_bb): Likewise.
25540         (predict_paths_leading_to_edge): Likewise.
25541         (determine_unlikely_bbs): New function.
25542         (estimate_bb_frequencies): Use it.
25543         (compute_function_frequency): Use zero counts even if profile is
25544         not read.
25545         * profile-count.h: Fix typo.
25547 2017-08-08  Julia Koval  <julia.koval@intel.com>
25549         * config/i386/avx512bwintrin.h (_mm512_mask_cvtepi16_storeu_epi8,
25550         _mm512_mask_cvtsepi16_storeu_epi8,
25551         _mm512_mask_cvtusepi16_storeu_epi8): New intrinsics.
25552         * config/i386/avx512vlbwintrin.h (_mm256_mask_cvtepi16_storeu_epi8,
25553         _mm_mask_cvtsepi16_storeu_epi8, _mm256_mask_cvtsepi16_storeu_epi8,
25554         _mm_mask_cvtusepi16_storeu_epi8, _mm256_mask_cvtusepi16_storeu_epi8,
25555         _mm_mask_cvtepi16_storeu_epi8): New intrinsics.
25556         * config/i386/i386-builtin-types.def (PV8Q, V8QI): New pointer type.
25557         (VOID_FTYPE_PV32QI_V32HI_USI, VOID_FTYPE_PV8QI_V8HI_UQI,
25558         VOID_FTYPE_PV16QI_V16HI_UHI): New function types.
25559         * config/i386/i386-builtin.def (__builtin_ia32_pmovwb128mem_mask,
25560         __builtin_ia32_pmovwb256mem_mask, __builtin_ia32_pmovswb128mem_mask,
25561         __builtin_ia32_pmovswb256mem_mask, __builtin_ia32_pmovuswb128mem_mask,
25562         __builtin_ia32_pmovuswb256mem_mask,
25563         __builtin_ia32_pmovuswb512mem_mask, __builtin_ia32_pmovswb512mem_mask)
25564         __builtin_ia32_pmovwb512mem_mask): New builtins.
25566 2017-08-08  Julia Koval  <julia.koval@intel.com>
25568         PR target/73350,80862
25569         * config/i386/subst.md (round): Fix round pattern.
25570         * config/i386/i386.c (ix86_erase_embedded_rounding):
25571         Fix erasing rounding for the fixed pattern.
25573 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
25575         * cfgbuild.c (find_many_sub_basic_blocks): Fix thinko.
25577 2017-06-08  Martin Liska  <mliska@suse.cz>
25579         PR gcov-profile/80911
25580         * gcov.c (block_info::block_info): New constructor.
25582 2017-06-07  Carl Love  <cel@us.ibm.com>
25584         * config/rs6000/rs6000-c: The return type of the following
25585         built-in functions was implemented as int not long long.  Fix sign
25586         of return value for the unsigned version of vec_mulo and vec_mule.
25587         vector unsigned long long vec_bperm (vector unsigned long long,
25588                                              vector unsigned char)
25589         vector signed long long vec_mule (vector signed int,
25590                                           vector signed int)
25591         vector unsigned long long vec_mule (vector unsigned int,
25592                                             vector unsigned int)
25593         vector signed long long vec_mulo (vector signed int,
25594                                           vector signed int)
25595         vector unsigned long long vec_mulo (vector unsigned int,
25596                                             vector unsigned int)
25597         * doc/extend.texi: Fix the documentation for the built-in
25598         functions.
25600 2017-06-07  Carl Love  <cel@us.ibm.com>
25602         PR target/80982
25603         * config/rs6000/altivec.md (double<mode>2): Fix the implementation of
25604         for BE.
25606 2017-06-07  Carl Love  <cel@us.ibm.com>
25608         * config/rs6000/altivec.md: Fix argument swizzle in vec_doublel
25609         support, Generate       doublehv for signed int/float for BE case only.
25611 2017-06-07  Alexander Monakov  <amonakov@ispras.ru>
25613         * doc/invoke.texi (mcx16): Rewrite.
25615 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
25617         * config/rs6000/predicates.md (rs6000_nonimmediate_operand): Delete.
25618         * config/rs6000/rs6000.md (*movsi_internal1, movsi_from_sf,
25619         *mov<mode>_softfloat, and an anonymous splitter): Use
25620         nonimmediate_operand instead of rs6000_nonimmediate_operand.
25622 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
25624         * config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE_ACC and
25625         SPEFSCR registers.
25626         * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
25627         (enum rs6000_reg_type): Delete SPE_ACC_TYPE and SPEFSCR_REG_TYPE.
25628         (rs6000_debug_reg_global): Adjust.
25629         (rs6000_init_hard_regno_mode_ok): Adjust.
25630         (rs6000_dbx_register_number): Adjust.
25631         * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change to 115.
25632         (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
25633         Remove SPE_ACC and SPEFSCR.
25634         (REG_ALLOC_ORDER): Ditto.
25635         (FRAME_POINTER_REGNUM): Change to 111.
25636         (enum reg_class): Remove the SPE_ACC and SPEFSCR registers.
25637         (REG_CLASS_NAMES): Ditto.
25638         (REG_CLASS_CONTENTS): Delete the SPE_ACC and SPEFSCR registers.
25639         (REGISTER_NAMES): Ditto.
25640         (ADDITIONAL_REG_NAMES): Ditto.
25641         (rs6000_reg_names): Ditto.
25642         * config/rs6000/rs6000.md: Renumber some register number
25643         define_constants.
25645 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
25647         * config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE high
25648         registers.
25649         * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
25650         * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change from 149
25651         to 117.
25652         (DWARF_REG_TO_UNWIND_COLUMN): Do not define.
25653         (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
25654         Delete the SPE high registers.
25655         (REG_ALLOC_ORDER): Ditto.
25656         (enum reg_class): Remove SPE_HIGH_REGS.
25657         (REG_CLASS_NAMES): Ditto.
25658         (REG_CLASS_CONTENTS): Delete the SPE high registers.
25659         (REGISTER_NAMES): Ditto.
25660         (rs6000_reg_names): Ditto.
25661         * doc/tm.texi.in: Remove SPE as example.
25662         * doc/tm.texi: Regenerate.
25664 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
25666         * config/rs6000/8540.md (ppc8540_brinc): Delete.
25667         * config/rs6000/e500mc.md (e500mc_brinc): Delete.
25668         * config/rs6000/e500mc64.md (e500mc64_brinc): Delete.
25669         * config/rs6000/rs6000.md (type): Remove "brinc".
25671 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
25673         * config.gcc (powerpc*-*-*): Don't add spe.h to extra_headers.
25674         (powerpc*-linux*spe*): Use ${cpu_type} instead of rs6000.
25675         * config/rs6000/linuxspe.h: Delete file.
25676         * config/rs6000/rs6000.md: Don't include spe.md.
25677         * config/rs6000/spe.h: Delete file.
25678         * config/rs6000/spe.md: Delete file.
25679         * config/rs6000/t-rs6000: Remove spe.md.
25681 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
25683         * config/rs6000/predicates.md (reg_or_mem_operand): Reformat.
25684         (reg_or_none500mem_operand): Delete.
25685         * config/rs6000/rs6000.md (extendsfdf2): Use reg_or_mem_operand
25686         instead of reg_or_none500mem_operand.
25688 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
25690         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
25691         handling of SPE flags.
25692         * config/rs6000/rs6000.opt (-mspe, -mspe=no, -mspe=yes): Delete.
25694 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
25696         * config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
25697         SPE ABI handling.
25698         * config/rs6000/paired.md (paired_negv2sf2): Rename to negv2sf2.
25699         (paired_absv2sf2, paired_addv2sf3, paired_subv2sf3, paired_mulv2sf3,
25700         paired_divv2sf3): Similar.
25701         * config/rs6000/predicates.md: Replace TARGET_SPE, TARGET_SPE_ABI,
25702         SPE_VECTOR_MODE and SPE_HIGH_REGNO_P by 0; simplify.
25703         * config/rs6000/rs6000-builtin.def: Delete RS6000_BUILTIN_E and
25704         RS6000_BUILTIN_S.
25705         Delete BU_SPE_1, BU_SPE_2, BU_SPE_3, BU_SPE_E, BU_SPE_P, and BU_SPE_X.
25706         Rename the paired_* instruction patterns.
25707         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Do not
25708         define __SPE__.
25709         * config/rs6000/rs6000-protos.h (invalid_e500_subreg): Delete.
25710         * config/rs6000/rs6000.c: Delete RS6000_BUILTIN_E and RS6000_BUILTIN_S.
25711         (struct rs6000_stack): Delete fields spe_gp_save_offset, spe_gp_size,
25712         spe_padding_size, and spe_64bit_regs_used.  Replace TARGET_SPE and
25713         TARGET_SPE_ABI with 0, simplify.  Replace SPE_VECTOR_MODE with
25714         PAIRED_VECTOR_MODE.
25715         (struct machine_function): Delete field spe_insn_chain_scanned_p.
25716         (spe_func_has_64bit_regs_p): Delete.
25717         (spe_expand_predicate_builtin): Delete.
25718         (spe_expand_evsel_builtin): Delete.
25719         (TARGET_DWARF_REGISTER_SPAN): Do not define.
25720         (TARGET_MEMBER_TYPE_FORCES_BLK): Do not define.
25721         (invalid_e500_subreg): Delete.
25722         (rs6000_legitimize_address): Always force_reg op2 as well, for
25723         paired single memory accesses.
25724         (rs6000_member_type_forces_blk): Delete.
25725         (rs6000_spe_function_arg): Delete.
25726         (rs6000_expand_unop_builtin): Delete SPE handling.
25727         (rs6000_expand_binop_builtin): Ditto.
25728         (spe_expand_stv_builtin): Delete.
25729         (bdesc_2arg_spe): Delete.
25730         (spe_expand_builtin): Delete.
25731         (spe_expand_predicate_builtin): Delete.
25732         (spe_expand_evsel_builtin): Delete.
25733         (rs6000_invalid_builtin): Remove RS6000_BTM_SPE handling.
25734         (spe_init_builtins): Delete.
25735         (spe_func_has_64bit_regs_p): Delete.
25736         (savres_routine_name): Delete "info" parameter.  Adjust callers.
25737         (rs6000_emit_stack_reset): Ditto.
25738         (rs6000_dwarf_register_span): Delete.
25739         * config/rs6000/rs6000.h (TARGET_SPE_ABI, TARGET_SPE,
25740         UNITS_PER_SPE_WORD, SPE_HIGH_REGNO_P, SPE_SIMD_REGNO_P,
25741         SPE_VECTOR_MODE, RS6000_BTM_SPE, RS6000_BUILTIN_E, RS6000_BUILTIN_S):
25742         Delete.
25743         * config/rs6000/rs6000.md (FIRST_SPE_HIGH_REGNO, LAST_SPE_HIGH_REGNO):
25744         Delete.
25745         * config/rs6000/rs6000.opt (-mabi=spe, -mabi=no-spe): Delete.
25746         * config/rs6000/spe.md: Delete every pattern that uses TARGET_SPE.
25747         * config/rs6000/vector.md (absv2sf2, negv2sf2, addv2sf3, subv2sf3,
25748         mulv2sf3, divv2sf3): Delete expanders.
25750 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
25752         config/rs6000/rs6000.md (UNSPEC_MV_CR_GT): Delete.
25754 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
25756         * config/rs6000/rs6000-protos.h (output_e500_flip_gt_bit): Delete.
25757         * config/rs6000/rs6000.c: Ditto.
25759 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
25761         * config/rs6000/predicated.md (rs6000_cbranch_operator): Delete.
25762         * config/rs6000/rs6000.md: Replace rs6000_cbranch_operator by
25763         comparison_operator.
25765 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
25767         * config/rs6000/rs6000.c: Remove everything related to -mfloat-gprs.
25768         * config/rs6000/rs6000.opt: Ditto.
25769         * config/rs6000/t-rtems: Ditto.
25771 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
25773         * config/rs6000/predicates.md: Replace TARGET_E500_DOUBLE and
25774         TARGET_E500_SINGLE by 0, simplify.
25775         * config/rs6000/rs6000.c: Ditto.
25776         (rs6000_option_override_internal): Delete CHECK_E500_OPTIONS.
25777         (spe_build_register_parallel): Delete.
25778         * config/rs6000/rs6000.h: Delete TARGET_E500_SINGLE,
25779         TARGET_E500_DOUBLE, and CHECK_E500_OPTIONS.
25780         * config/rs6000/rs6000.md: Replace TARGET_E500_DOUBLE,
25781         TARGET_E500_SINGLE, and <E500_CONVERT> by 0, simplify.
25782         (E500_CONVERT): Delete.
25783         * config/rs6000/spe.md: Remove many patterns and all define_constants.
25785 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
25787         * config/rs6000/darwin.md: Replace TARGET_FPRS by 1 and simplify.
25788         * config/rs6000/dfp.md: Ditto.
25789         (negdd2, *negdd2_fpr): Merge.
25790         (absdd2, *absdd2_fpr): Merge.
25791         (negtd2, *negtd2_fpr): Merge.
25792         (abstd2, *abstd2_fpr): Merge.
25793         * config/rs6000/e500.h: Delete file.
25794         * config/rs6000/predicates.md (rs6000_cbranch_operator): Replace
25795         TARGET_FPRS by 1 and simplify.
25796         * config/rs6000/rs6000-c.c: Ditto.
25797         * config/rs6000/rs6000.c: Ditto.  Also replace TARGET_SF_SPE and
25798         TARGET_DF_SPE by 0.
25799         * config/rs6000/rs6000.h: Ditto.  Delete TARGET_SF_SPE and
25800         TARGET_DF_SPE.
25801         * config/rs6000/rs6000.md: Ditto.
25802         (floatdidf2, *floatdidf2_fpr): Merge.
25803         (move_from_CR_gt_bit): Delete.
25804         * config/rs6000/spe.md: Replace TARGET_FPRS by 1 and simplify.
25805         (E500_CR_IOR_COMPARE): Delete.
25806         (All patterns that require !TARGET_FPRS): Delete.
25807         * config/rs6000/vsx.md: Replace TARGET_FPRS by 1 and simplify.
25809 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
25811         * passes.def (pass_iv_canon): Move before pass_loop_distribution.
25813 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
25815         * graphds.c (add_edge): Intitialize edge's attached data.
25816         (foll_in_subgraph, dfs_fst_edge, dfs_next_edge): New function
25817         pointer parameter.  Call pointed function on each edge during
25818         graph traversing.  Skip traversing the edge when the function
25819         returns true.
25820         (graphds_dfs, graphds_scc): Ditto.
25821         (for_each_edge): New parameter.  Pass the new parameter to callback
25822         function.
25823         * graphds.h (skip_edge_callback): New function pointer type.
25824         (graphds_dfs, graphds_scc): New function pointer parameter.
25825         (graphds_edge_callback, for_each_edge): New parameter.
25827 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
25829         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test): Factor
25830         out code checking if runtime alias check is possible to below ...
25831         Call the new function.
25832         * tree-data-ref.c (runtime_alias_check_p): ... to new function.
25833         * tree-data-ref.h (runtime_alias_check_p): New decalaration.
25835 2017-06-07  Marek Polacek  <polacek@redhat.com>
25837         PR sanitizer/80932
25838         * fold-const.c (extract_muldiv_1) <case MINUS_EXPR>: Add
25839         TYPE_OVERFLOW_WRAPS check.
25841 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
25843         * tree-vect-loop-manip.c (vect_do_peeling): Don't skip vector loop
25844         if versioning is required.
25845         * tree-vect-loop.c (vect_analyze_loop_2): Merge niter check for loop
25846         peeling with the check for versioning.
25848 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
25850         * tree-vectorizer.h (vect_build_loop_niters): New parameter.
25851         * tree-vect-loop-manip.c (vect_build_loop_niters): New parameter.
25852         Set true to new parameter if new ssa variable is defined.
25853         (vect_gen_vector_loop_niters): Refactor.  Set range information
25854         for the new vector loop bound variable.
25855         (vect_do_peeling): Ditto.
25857 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
25859         * tree-affine.c (ssa.h): Include header file.
25860         (tree_to_aff_combination): Handle (T1)(X - CST) when inner type
25861         has wrapping overflow behavior.
25863 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
25865         * tree-affine.c (tree_to_aff_combination): Handle (T1)(X + X).
25867 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
25869         (aff_combination_expand): Move (T1)(X *+- CST) simplification to ...
25870         (tree_to_aff_combination): ... here.
25872 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
25874         * tree-ssa-loop-ivopts.c (ivopts_estimate_reg_pressure): New
25875         reg_pressure model function.
25876         (ivopts_global_cost_for_size): Delete.
25877         (determine_set_costs, iv_ca_recount_cost): Call new model function
25878         ivopts_estimate_reg_pressure.
25880 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
25882         * config/aarch64/aarch64.c (aarch64_rtx_costs): Make sdiv more
25883         expensive than udiv.  Remove floating point cases from mod.
25885 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
25887         * config/arm/aarch-cost-tables.h (cortexa53_extra_cost):
25888         Increase idiv cost.
25890 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
25892         * config/aarch64/aarch64.md
25893         (copysignsf3): Fix mask generation.
25895 2017-06-07  Jakub Jelinek  <jakub@redhat.com>
25897         * dumpfile.h (enum tree_dump_index): Rename TDI_generic to
25898         TDI_gimple.
25899         (class dump_manager): Add register_dumps method.
25900         * dumpfile.c: Include langhooks.h.
25901         (dump_files): Use 0 instead of 3/4/5 for TDI_{original,gimple,nested}.
25902         (FIRST_AUTO_NUMBERED_DUMP): Decrease to 1.
25903         (FIRST_ME_AUTO_NUMBERED_DUMP): Define.
25904         (dump_manager::dump_register): Start with 512 entries instead of 32.
25905         (dump_manager::register_dumps): New method.
25906         * toplev.c (general_init): Instead of invoking register_dumps
25907         langhook, invoke register_dumps method on the dump manager.
25908         * gimplify.c (gimplify_function_tree): Use TDI_gimple instead of
25909         TDI_generic.
25911 2017-06-07  Richard Sandiford  <richard.sandiford@linaro.org>
25913         * doc/md.texi: Clarify the restrictions on a define_insn condition.
25914         Say that # requires an associated define_split to exist, and that
25915         the define_split must be suitable for use after register allocation.
25917 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
25919         * cfgbuild.c (find_bb_boundaries): Initialize profile of split blocks.
25920         (compute_outgoing_frequencies): Also initialize zero counts.
25921         (find_many_sub_basic_blocks): Do not produce uninitialized profile
25922         around loops; preserve more of profile when nothing changes.
25924 2017-06-06  Jim Wilson  <jim.wilson@linaro.org>
25926         * config/aarch64/aarch64-cost-tables.h (qdf24xx_extra_costs): Move to
25927         here.
25928         * config/arm/aarch-cost-tables.h (qdf24xx_extra_costs): From here.
25929         * config/arm/arm-cpu-cdata.h: Regenerate.
25930         * config/arm/arm-cpu-data.h, config/arm/arm-cpu.h: Likewise.
25931         * config/arm/arm-tables.opt, config/arm/arm-tune.md: Likewise.
25932         * config/arm/arm-cpus.in: Delete falkor and qdf24xx entries.
25933         * config/arm/arm.c (arm_qdf24xx_tune): Delete.
25934         * config/arm/bpabi.h (BE8_LINK_SPEC): Delete falkor and qdf24xx
25935         support.
25936         * config/arm/t-aprofile (MULTILIB_MATCHES): Delete falkor and qdf24xx
25937         support.
25938         * config/arm/t-rmprofile: Likewise.
25939         * doc/invoke.texi (ARM Options): Drop falkor and qdf24xx support.
25941 2017-06-06  David S. Miller  <davem@davemloft.net>
25943         PR target/80968
25944         * config/sparc/sparc.c (sparc_expand_prologue): Emit frame
25945         blockage if function uses alloca.
25947 2017-06-06  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
25949         * tree-ssa-loop-prefetch.c (struct mem_ref_group, struct mem_ref):
25950         New "uid" fields to hold pretty-print IDs of group and ref.
25951         Memory references are now identified as <group_id>:<ref_id>
25952         instead of using [random] addresses.
25953         (dump_mem_details): Simplify, no functional change.
25954         (dump_mem_ref): Simplify and make output more concise.
25955         Replace couple of fprintf's throughout code with calls to dump_mem_ref.
25956         (find_or_create_group): Initialize group uid.
25957         (record_ref): Initialize ref uid.  Improve debug output.
25958         (prune_group_by_reuse, should_issue_prefetch_p,)
25959         (should_issue_prefetch_p, schedule_prefetches, issue_prefetch_ref,)
25960         (mark_nontemporal_store, determine_loop_nest_reuse):
25961         Improve debug output.
25963 2017-06-06  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
25965         * dbgcnt.def (prefetch): New debug counter.
25966         * tree-ssa-loop-prefetch.c (dbgcnt.h): New include.
25967         (schedule_prefetches): Stop issueing prefetches if debug counter
25968         tripped.
25970 2017-06-06  Tom de Vries  <tom@codesourcery.com>
25972         * doc/sourcebuild.texi (Testsuites, C Language Testsuites,
25973         gcc.c-torture/compile): Remove mention of NO_LABEL_VALUES in fixme.
25975 2017-06-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25977         * config/aarch64/atomics.md (atomic_compare_and_swap<mode> expander):
25978         Use aarch64_reg_or_zero predicate for operand 4.
25979         (aarch64_compare_and_swap<mode> define_insn_and_split):
25980         Use aarch64_reg_or_zero predicate for operand 3.  Add 'Z' constraint.
25981         (aarch64_store_exclusive<mode>): Likewise for operand 2.
25983 2017-06-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
25985         * config/arm/arm.c (arm_compute_save_reg_mask): Rename into ...
25986         (arm_compute_save_core_reg_mask): This.
25987         (thumb1_compute_save_reg_mask): Rename into ...
25988         (thumb1_compute_save_core_reg_mask): This.
25989         (arm_compute_save_reg0_reg12_mask): Adapt comment.
25990         (arm_compute_frame_layout): Likewise.
25992 2017-06-06  Richard Biener  <rguenther@suse.de>
25994         PR tree-optimization/80974
25995         * tree-ssa-sccvn.c (set_ssa_val_to): Do not change but only
25996         keep or clear leaders SSA info.
25998 2017-06-06  Tom de Vries  <tom@codesourcery.com>
26000         * config/nvptx/nvptx.c (split_mode_p): New function.
26001         (nvptx_declare_function_name, nvptx_print_operand): Use split_mode_p.
26003 2017-06-06  Tom de Vries  <tom@codesourcery.com>
26005         * config/nvptx/nvptx.c (nvptx_print_operand): Use maybe_split_mode.
26007 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
26009         PR bootstrap/80978
26010         * tree-cfg.c (execute_fixup_cfg): Fix condition on when to rescale
26011         profile.
26013 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
26015         * shrink-wrap.c (handle_simple_exit): Update profile.
26016         (try_shrink_wrapping): Upate profile.
26018 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
26020         * predict.c (tree_estimate_probability_bb): Add LOCAL_ONLY.
26021         (tree_guess_outgoing_edge_probabilities): New.
26022         * predict.h (tree_guess_outgoing_edge_probabilities): Declare.
26023         * tree-cfg.c (gimple_find_sub_bbs): Propagate profile.
26025 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
26027         * ipa-split.c (split_function): Initialize return bb profile.
26029 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
26031         * profile.c (compute_branch_probabilities): Also initialize
26032         EXIT_BLOCK profile.
26034 2017-06-06  Richard Biener  <rguenther@suse.de>
26036         PR tree-optimization/80928
26037         * tree-vect-loop.c (vect_update_vf_for_slp): Amend dumps.
26038         (vect_analyze_loop_operations): Properly guard analysis for
26039         pure SLP case.
26040         (vect_transform_loop): Likewise.
26041         (vect_analyze_loop_2): Also reset SLP type on PHIs.
26042         (vect_model_induction_cost): Do not cost for pure SLP.
26043         (vectorizable_induction): Pass in SLP node, implement SLP vectorization
26044         of induction in inner loop vectorization.
26045         * tree-vect-slp.c (vect_create_new_slp_node): Handle PHIs.
26046         (vect_get_and_check_slp_defs): Handle vect_induction_def.
26047         (vect_build_slp_tree): Likewise.  Handle PHIs as terminating the
26048         recursion.
26049         (vect_analyze_slp_cost_1): Cost induction.
26050         (vect_detect_hybrid_slp_stmts): Handle PHIs.
26051         (vect_get_slp_vect_defs): Likewise.
26052         * tree-vect-stmts.c (vect_analyze_stmt): Handle induction.
26053         (vect_transform_stmt): Handle SLP reductions.
26054         * tree-vectorizer.h (vectorizable_induction): Adjust.
26056 2017-06-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
26058         * config/rs6000/rs6000.c (make_resolver_func): Update
26059         init_lowered_empty_function call.
26061 2017-06-05  Bernd Edlinger  <bernd.edlinger@hotmail.de>
26063         * doc/invoke.texi: Document the -fprofile-abs-path option.
26064         * common.opt (fprofile-abs-path): New option.
26065         * gcov-io.h (gcov_write_filename): Declare.
26066         * gcov-io.c (gcov_write_filename): New function.
26067         * coverage.c (coverage_begin_function): Use gcov_write_filename.
26068         * profile.c (output_location): Likewise.
26070 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
26072         * shring-wrap.c: Revert accidental commit.
26074 2017-06-05  Volker Reichelt  <v.reichelt@netcologne.de>
26076         * doc/invoke.texi (-Wduplicated-branches): Add to warning list.
26078 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
26080         * cfgexpand.c (expand_gimple_tailcall): Initialize profile of
26081         new edge.
26082         * ipa-inline.c (want_inline_self_recursive_call_p): Watch for missing
26083         profile in callgraph edge.
26084         * profile-count.h (apply_probability): If THIS is 0, then result is 0
26085         (apply_scale): Likewise.
26086         * tree-inline.c (copy_bb, copy_edges_for_bb, copy_cfg_body):
26087         Also scale profile when inlining function with zero profile.
26088         (initialize_cfun): Update exit block profile even when it is zero.
26089         * tree-ssa-threadupdate.c (clear_counts_path): Handle correctly case
26090         when profile is read.
26092 2017-06-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
26094         * config/rs6000/rs6000.c (toplevel): Include attribs.h.
26095         (CLONE_*): New constants to define the processors we can generate
26096         code for with the target_clone attribute.
26097         (rs6000_clone_map): New array to identify which clone processors
26098         the current program is running on.
26099         (TARGET_COMPARE_VERSION_PRIORITY): Define to enable the
26100         target_clone attribute.
26101         (TARGET_GENERATE_VERSION_DISPATCHER_BODY): Likewise.
26102         (TARGET_GET_FUNCTION_VERSIONS_DISPATCHER): Likewise.
26103         (TARGET_OPTION_FUNCTION_VERSIONS): Likewise.
26104         (cpu_expand_builtin): Add support for target_clone attribute.
26105         (rs6000_valid_attribute_p): Allow "default" attribute.
26106         (get_decl_name): New debug function to simplify printing the
26107         current function name in debugging statements.
26108         (rs6000_clone_priority): New functions to support the target_clone
26109         attribute, and be able to generate code to switch between ISA 2.05
26110         through ISA 3.0 (power6 through power9).
26111         (rs6000_compare_version_priority): Likewise.
26112         (rs6000_get_function_versions_dispatcher): Likewise.
26113         (make_resolver_func): Likewise.
26114         (add_condition_to_bb): Likewise.
26115         (dispatch_function_versions): Likewise.
26116         (rs6000_generate_version_dispatcher_body): Likewise.
26117         (rs6000_can_inline_p): Call get_decl_name for debugging usage.
26118         (fusion_gpr_load_p): Fix a spacing issue.
26119         * doc/extend.texi (Common Function Attributes): Document that the
26120         PowerPC supports the target_clone attribute.
26122 2017-06-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>
26124         * config/arm/arm.h: explain F symbol found in description of ARM
26125         register allocation in its legend.
26127 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
26129         * config/mips/frame-header-opt.c: Include profile-count.h.
26130         * config/riscv/riscv.c: Include profile-count.h
26132 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
26134         * tree-ssa-loop-im.c (execute_sm_if_changed): Add FLAG_BBS parameter;
26135         update profile.
26136         (sm_set_flag_if_changed): Add bbs field.
26137         (execute_sm_if_changed_flag_set): Pass BBS.
26138         (execute_sm): Update.
26140 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26142         * config/aarch64/aarch64-simd.md (aarch64_store_lane0<mode>):
26143         New pattern.
26145 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26147         * config/aarch64/aarch64.md (sub<mode>3_compare1_imm): New define_insn.
26148         (peephole2): New peephole2 to emit the above.
26149         * config/aarch64/predicates.md (aarch64_sub_immediate): New predicate.
26151 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26153         * config/aarch64/aarch64.c (define_peephole2 above
26154         *sub_<shift>_<mode>): New peephole.
26156 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
26158         * config/i386/i386.c (make_resolver_func): Update.
26159         * Makefile.in: Add profile-count.h and profile-count.o
26160         * auto-profile.c (afdo_indirect_call): Update to new API.
26161         (afdo_set_bb_count): Update.
26162         (afdo_propagate_edge): Update.
26163         (afdo_propagate_circuit): Update.
26164         (afdo_calculate_branch_prob): Update.
26165         (afdo_annotate_cfg): Update.
26166         * basic-block.h: Include profile-count.h
26167         (struct edge_def): Turn count to profile_count.
26168         (struct basic_block_def): Likewie.
26169         (REG_BR_PROB_BASE): Move to profile-count.h
26170         (RDIV): Move to profile-count.h
26171         * bb-reorder.c (max_entry_count): Turn to profile_count.
26172         (find_traces): Update.
26173         (rotate_loop):Update.
26174         (connect_traces):Update.
26175         (sanitize_hot_paths):Update.
26176         * bt-load.c (migrate_btr_defs): Update.
26177         * cfg.c (RDIV): Remove.
26178         (init_flow): Use alloc_block.
26179         (alloc_block): Uninitialize count.
26180         (unchecked_make_edge): Uninitialize count.
26181         (check_bb_profile): Update.
26182         (dump_edge_info): Update.
26183         (dump_bb_info): Update.
26184         (update_bb_profile_for_threading): Update.
26185         (scale_bbs_frequencies_int): Update.
26186         (scale_bbs_frequencies_gcov_type): Update.
26187         (scale_bbs_frequencies_profile_count): New.
26188         * cfg.h (update_bb_profile_for_threading): Update.
26189         (scale_bbs_frequencies_profile_count): Declare.
26190         * cfgbuild.c (compute_outgoing_frequencies): Update.
26191         (find_many_sub_basic_blocks): Update.
26192         * cfgcleanup.c (try_forward_edges): Update.
26193         (try_crossjump_to_edge): Update.
26194         * cfgexpand.c (expand_gimple_tailcall): Update.
26195         (construct_exit_block): Update.
26196         * cfghooks.c (verify_flow_info): Update.
26197         (dump_bb_for_graph): Update.
26198         (split_edge): Update.
26199         (make_forwarder_block): Update.
26200         (duplicate_block): Update.
26201         (account_profile_record): Update.
26202         * cfgloop.c (find_subloop_latch_edge_by_profile): Update.
26203         (get_estimated_loop_iterations): Update.
26204         * cfgloopanal.c (expected_loop_iterations_unbounded): Update.
26205         (single_likely_exit): Update.
26206         * cfgloopmanip.c (scale_loop_profile): Update.
26207         (loopify): Update.
26208         (set_zero_probability): Update.
26209         (lv_adjust_loop_entry_edge): Update.
26210         * cfgrtl.c (force_nonfallthru_and_redirect): Update.
26211         (purge_dead_edges): Update.
26212         (rtl_account_profile_record): Update.
26213         * cgraph.c (cgraph_node::create): Uninitialize count.
26214         (symbol_table::create_edge): Uninitialize count.
26215         (cgraph_update_edges_for_call_stmt_node): Update.
26216         (cgraph_edge::dump_edge_flags): Update.
26217         (cgraph_node::dump): Update.
26218         (cgraph_edge::maybe_hot_p): Update.
26219         * cgraph.h: Include profile-count.h
26220         (create_clone), create_edge, create_indirect_edge): Update.
26221         (cgraph_node): Turn count to profile_count.
26222         (cgraph_edge0: Likewise.
26223         (make_speculative, clone): Update.
26224         (create_edge): Update.
26225         (init_lowered_empty_function): Update.
26226         * cgraphclones.c (cgraph_edge::clone): Update.
26227         (duplicate_thunk_for_node): Update.
26228         (cgraph_node::create_clone): Update.
26229         * cgraphunit.c (cgraph_node::analyze): Update.
26230         (cgraph_node::expand_thunk): Update.
26231         * final.c (dump_basic_block_info): Update.
26232         * gimple-streamer-in.c (input_bb): Update.
26233         * gimple-streamer-out.c (output_bb): Update.
26234         * graphite.c (print_global_statistics): Update.
26235         (print_graphite_scop_statistics): Update.
26236         * hsa-brig.c: Include basic-block.h.
26237         * hsa-dump.c: Include basic-block.h.
26238         * hsa-gen.c (T sum_slice): Update.
26239         (convert_switch_statements):Update.
26240         * hsa-regalloc.c: Include basic-block.h.
26241         * ipa-chkp.c (chkp_produce_thunks): Update.
26242         * ipa-cp.c (struct caller_statistics): Update.
26243         (init_caller_stats): Update.
26244         (gather_caller_stats): Update.
26245         (ipcp_cloning_candidate_p): Update.
26246         (good_cloning_opportunity_p): Update.
26247         (get_info_about_necessary_edges): Update.
26248         (dump_profile_updates): Update.
26249         (update_profiling_info): Update.
26250         (update_specialized_profile): Update.
26251         (perhaps_add_new_callers): Update.
26252         (decide_about_value): Update.
26253         (ipa_cp_c_finalize): Update.
26254         * ipa-devirt.c (struct odr_type_warn_count): Update.
26255         (struct decl_warn_count): Update.
26256         (struct final_warning_record): Update.
26257         (possible_polymorphic_call_targets): Update.
26258         (ipa_devirt): Update.
26259         * ipa-fnsummary.c (redirect_to_unreachable): Update.
26260         * ipa-icf.c (sem_function::merge): Update.
26261         * ipa-inline-analysis.c (do_estimate_edge_time): Update.
26262         * ipa-inline.c (compute_uninlined_call_time): Update.
26263         (compute_inlined_call_time): Update.
26264         (want_inline_small_function_p): Update.
26265         (want_inline_self_recursive_call_p): Update.
26266         (edge_badness): Update.
26267         (lookup_recursive_calls): Update.
26268         (recursive_inlining): Update.
26269         (inline_small_functions): Update.
26270         (dump_overall_stats): Update.
26271         (dump_inline_stats): Update.
26272         * ipa-profile.c (ipa_profile_generate_summary): Update.
26273         (ipa_propagate_frequency): Update.
26274         (ipa_profile): Update.
26275         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
26276         * ipa-utils.c (ipa_merge_profiles): Update.
26277         * loop-doloop.c (doloop_modify): Update.
26278         * loop-unroll.c (report_unroll): Update.
26279         (unroll_loop_runtime_iterations): Update.
26280         * lto-cgraph.c (lto_output_edge): Update.
26281         (lto_output_node): Update.
26282         (input_node): Update.
26283         (input_edge): Update.
26284         (merge_profile_summaries): Update.
26285         * lto-streamer-in.c (input_cfg): Update.
26286         * lto-streamer-out.c (output_cfg): Update.
26287         * mcf.c (create_fixup_graph): Update.
26288         (adjust_cfg_counts): Update.
26289         (sum_edge_counts): Update.
26290         * modulo-sched.c (sms_schedule): Update.
26291         * postreload-gcse.c (eliminate_partially_redundant_load): Update.
26292         * predict.c (maybe_hot_count_p): Update.
26293         (probably_never_executed): Update.
26294         (dump_prediction): Update.
26295         (combine_predictions_for_bb): Update.
26296         (propagate_freq): Update.
26297         (handle_missing_profiles): Update.
26298         (counts_to_freqs): Update.
26299         (rebuild_frequencies): Update.
26300         (force_edge_cold): Update.
26301         * predict.h: Include profile-count.h
26302         (maybe_hot_count_p, counts_to_freqs): UPdate.
26303         * print-rtl-function.c: Do not include cfg.h
26304         * print-rtl.c: Include basic-block.h
26305         * profile-count.c: New file.
26306         * profile-count.h: New file.
26307         * profile.c (is_edge_inconsistent): Update.
26308         (correct_negative_edge_counts): Update.
26309         (is_inconsistent): Update.
26310         (set_bb_counts): Update.
26311         (read_profile_edge_counts): Update.
26312         (compute_frequency_overlap): Update.
26313         (compute_branch_probabilities): Update; Initialize and deinitialize
26314         gcov_count tables.
26315         (branch_prob): Update.
26316         * profile.h (bb_gcov_counts, edge_gcov_counts): New.
26317         (edge_gcov_count): New.
26318         (bb_gcov_count): New.
26319         * shrink-wrap.c (try_shrink_wrapping): Update.
26320         * tracer.c (better_p): Update.
26321         * trans-mem.c (expand_transaction): Update.
26322         (ipa_tm_insert_irr_call): Update.
26323         (ipa_tm_insert_gettmclone_call): Update.
26324         * tree-call-cdce.c: Update.
26325         * tree-cfg.c (gimple_duplicate_sese_region): Update.
26326         (gimple_duplicate_sese_tail): Update.
26327         (gimple_account_profile_record): Update.
26328         (execute_fixup_cfg): Update.
26329         * tree-inline.c (copy_bb): Update.
26330         (copy_edges_for_bb): Update.
26331         (initialize_cfun): Update.
26332         (freqs_to_counts): Update.
26333         (copy_cfg_body): Update.
26334         (expand_call_inline): Update.
26335         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
26336         * tree-ssa-loop-ivcanon.c (unloop_loops): Update.
26337         (try_unroll_loop_completely): Update.
26338         (try_peel_loop): Update.
26339         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
26340         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop): Update.
26341         * tree-ssa-loop-split.c (connect_loops): Update.
26342         * tree-ssa-loop-unswitch.c (hoist_guard): Update.
26343         * tree-ssa-reassoc.c (branch_fixup): Update.
26344         * tree-ssa-tail-merge.c (replace_block_by): Update.
26345         * tree-ssa-threadupdate.c (create_block_for_threading): Update.
26346         (compute_path_counts): Update.
26347         (update_profile): Update.
26348         (recompute_probabilities): Update.
26349         (update_joiner_offpath_counts): Update.
26350         (estimated_freqs_path): Update.
26351         (freqs_to_counts_path): Update.
26352         (clear_counts_path): Update.
26353         (ssa_fix_duplicate_block_edges): Update.
26354         (duplicate_thread_path): Update.
26355         * tree-switch-conversion.c (case_bit_test_cmp): Update.
26356         (struct switch_conv_info): Update.
26357         * tree-tailcall.c (decrease_profile): Update.
26358         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
26359         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
26360         * value-prof.c (check_counter): Update.
26361         (gimple_divmod_fixed_value): Update.
26362         (gimple_mod_pow2): Update.
26363         (gimple_mod_subtract): Update.
26364         (gimple_ic_transform): Update.
26365         (gimple_stringop_fixed_value): Update.
26366         * value-prof.h (gimple_ic): Update.
26368 2017-06-02  Carl Love  <cel@us.ibm.com>
26370         * config/rs6000/rs6000-c: Add support for built-in functions
26371         vector double vec_doublee (vector signed int);
26372         vector double vec_doublee (vector unsigned int);
26373         vector double vec_doublee (vector float);
26374         vector double vec_doubleh (vector signed int);
26375         vector double vec_doubleh (vector unsigned int);
26376         vector double vec_doubleh (vector float);
26377         vector double vec_doublel (vector signed int);
26378         vector double vec_doublel (vector unsigned int);
26379         vector double vec_doublel (vector float);
26380         vector double vec_doubleo (vector signed int);
26381         vector double vec_doubleo (vector unsigned int);
26382         vector double vec_doubleo (vector float);.
26383         * config/rs6000/rs6000-builtin.def: Add definitions for DOUBLEE,
26384         DOUBLEO, DOUBLEH, DOUBLEL, UNS_DOUBLEO, UNS_DOUBLEE, UNS_DOUBLEH,
26385         UNS_DOUBLEL.
26386         * config/rs6000/altivec.md: Add code generator for doublee<mode>2,
26387         unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2, doubleh<mode>2,
26388         unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2, add mode attribute
26389         VS_sxwsp.
26390         * config/rs6000/altivec.h: Add define for vec_doublee, vec_doubleo,
26391         vec_doublel, vec_doubleh.
26392         * doc/extend.texi: Update the built-in documentation file for the
26393         new built-in functions.
26395 2017-06-02  David Malcolm  <dmalcolm@redhat.com>
26397         PR jit/80954
26398         * ipa-inline-analysis.c (free_growth_caches): Set
26399         edge_removal_hook_holder to NULL after removing it.
26401 2017-06-02  Sudakshina Das  <sudi.das@arm.com>
26403         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Return CC_SWP for
26404         comparision with zero.
26406 2017-06-02  Will Schmidt  <will_schmidt@vnet.ibm.com>
26407         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
26408         for early expansion of vec_min and vec_max builtins.
26409         (builtin_function_type): Add min/max unsigned variants to those
26410         identified as having unsigned arguments.
26412 2017-06-02  Olivier Hainque  <hainque@adacore.com>
26414         * config/vx-common.h (DWARF_UNWIND_INFO): Switch #define to 1.
26416 2017-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26418         * config/aarch64/aarch64-simd.md (*aarch64_simd_vec_copy_lane<mode>):
26419         Use VALL_F16 iterator rather than VALL.
26421 2017-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26423         * config/aarch64/aarch64.c (aarch64_split_compare_and_swap):
26424         Emit CBNZ inside loop when doing a strong exchange and comparing
26425         against zero.  Generate the CC flags after the loop.
26427 2017-06-02  David Edelsohn  <dje.gcc@gmail.com>
26429         * dwarf2out.c (DWARF_INITIAL_LENGTH_SIZE_STR): New.
26430         (dl_section_ref): New.
26431         (dwarf2out_finish): Copy debug_line_section_label to dl_section_ref.
26432         On AIX, append an expression to subtract the size of the
26433         section length to dl_section_ref.
26435 2017-06-02  Will Schmidt  <will_schmidt@vnet.ibm.com>
26437         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
26438         for early expansion of vector absolute builtins.
26440 2017-06-02  Richard Biener  <rguenther@suse.de>
26442         * tree-vect-slp.c (vect_detect_hybrid_slp_2): Match up
26443         what we consider a relevant use stmt with vect_detect_hybrid_slp_stmts.
26445 2017-06-02  Richard Biener  <rguenther@suse.de>
26447         PR tree-optimization/80948
26448         * tree-tailcall.c (find_tail_calls): Track stmts to move in
26449         stmt order as well.
26451 2017-06-02  Richard Biener  <rguenther@suse.de>
26453         * tree-vect-loop.c (vect_analyze_loop_operations): Not relevant
26454         PHIs are ok.
26455         * tree-vect-stmts.c (process_use): Do not mark backedge defs
26456         for inductions as relevant.
26458 2017-06-02  Richard Biener  <rguenther@suse.de>
26460         * tree-vect-loop.c (get_initial_def_for_induction): Inline into ...
26461         (vectorizable_induction): ... this.  Remove dead code.
26463 2017-06-02  Eric Botcazou  <ebotcazou@adacore.com>
26465         * builtins. (expand_builtin_alloca): Remove second parameter and
26466         infer its value from the first parameter instead.
26467         (expand_builtin) <BUILT_IN_ALLOCA>: Adjust call to above.
26469 2017-06-02  Jakub Jelinek  <jakub@redhat.com>
26471         PR rtl-optimization/80903
26472         * loop-doloop.c (add_test): Unshare sequence.
26474 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
26476         * doc/invoke.texi: Document the -Wsizeof-pointer-div warning.
26478 2017-06-01  Bernd Edlinger  <bernd.edlinger@hotmail.de>
26480         * config/i386/i386.c (x86_64_ms_sysv_extra_clobbered_registers): Make
26481         static.
26482         (xlogue_layout::get_stack_space_used, xlogue_layout::s_instances,
26483         xlogue_layout::get_instance, logue_layout::xlogue_layout,
26484         sp_valid_at, fp_valid_at, choose_basereg): Formatting.
26485         (xlogue_layout::get_stub_rtx): Make static.
26486         (xlogue_layout::get_stub_name): Avoid const-cast, make static.
26487         (xlogue_layout::compute_stub_managed_regs): Rename to...
26488         (xlogue_layout::count_stub_managed_regs): ...this.
26489         (xlogue_layout::is_stub_managed_reg): New function.
26490         (xlogue_layout::m_stub_names): Rename to...
26491         (xlogue_layout::s_stub_names): ...this, make static.
26492         (xlogue_layout::STUB_INDEX_OFFSET, xlogue_layout::MIN_REGS,
26493         xlogue_layout::MAX_REGS, xlogue_layout::MAX_EXTRA_REGS,
26494         xlogue_layout::VARIANT_COUNT, xlogue_layout::STUB_NAME_MAX_LEN,
26495         xlogue_layout::s_stub_names): Instantiate statics.
26496         (stub_managed_regs): Remove.
26497         (ix86_save_reg): Use xlogue_layout::compute_stub_managed_regs.
26498         (disable_call_ms2sysv_xlogues): Rename to...
26499         (warn_once_call_ms2sysv_xlogues): ...this, and warn only once.
26500         (ix86_initial_elimination_offset, ix86_expand_call): Fix call_ms2sysv
26501         warning logic.
26502         (ix86_static_chain): Make sure that ix86_static_chain_on_stack can't
26503         change after reload_completed.
26504         (ix86_can_use_return_insn_p): Use the ix86_frame data structure
26505         directly.
26506         (ix86_expand_prologue): Likewise.
26507         (ix86_expand_epilogue): Likewise.
26508         (ix86_expand_split_stack_prologue): Likewise.
26509         (ix86_compute_frame_layout): Remove frame parameter ...
26510         (TARGET_COMPUTE_FRAME_LAYOUT): ... and export it as a target hook.
26511         (ix86_finalize_stack_realign_flags): Call ix86_compute_frame_layout
26512         only if necessary.
26513         (ix86_init_machine_status): Don't set use_fast_prologue_epilogue_nregs.
26514         (ix86_frame): Move from here ...
26515         * config/i386/i386.h (ix86_frame): ... to here.
26516         (machine_function): Remove use_fast_prologue_epilogue_nregs, cache the
26517         complete ix86_frame data structure instead.  Remove some_ld_name.
26519 2017-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
26521         * dwarf2out.c (dwarf2out_late_global_decl): Add locations for
26522         symbols that hold a DECL_VALUE_EXPR.
26524 2017-06-01  Martin Jambor  <mjambor@suse.cz>
26526         PR tree-optimization/80898
26527         * tree-sra.c (process_subtree_disqualification): Removed.
26528         (disqualify_candidate): Do not acll
26529         process_subtree_disqualification.
26530         (subtree_mark_written_and_enqueue): New function.
26531         (propagate_all_subaccesses): Set grp_write of LHS subtree if the
26532         RHS has been disqualified and re-queue LHS if necessary.  Apart
26533         from that, ignore disqualified RHS.
26535 2017-06-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
26537         * config/s390/s390.c (s390_emit_epilogue): Disable early return
26538         address fetch for z10 or later.
26540 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
26542         * config/arc/arc.md (tst_movb): Add guard when splitting.
26544 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
26546         * config/arc/arc.c (arc_can_eliminate): Test against
26547         arc_frame_pointer_needed.
26549 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
26551         * config/arc/arc.c (arc_expand_prologue): Emit a special barrier
26552         to prevent store reordering.
26553         * config/arc/arc.md (UNSPEC_ARC_STKTIE): Define.
26554         (type): Add block type.
26555         (stack_tie): Define special instruction to be used in
26556         expand_prologue.
26558 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
26560         * config/arc/arc.md (commutative_binary_comparison): Remove 'I'
26561         constraint. It is not valid for the pattern.
26562         (noncommutative_binary_comparison): Likewise.
26564 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
26566         * config/arc/simdext.md (movv2hi_insn): Change predicate to avoid
26567         scaled addresses.
26569 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
26571         * config/arc/arc.c (arc_conditional_register_usage): Allow r30 to
26572         be used by the reg-alloc.
26574 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
26576         * config/arc/arc.md (mulsi3): Avoid use of hard registers before
26577         reg-alloc when having mul64 or mul32x16 instructions.
26578         (mulsidi3): Likewise.
26579         (umulsidi3): Likewise.
26580         (mulsi32x16): New pattern.
26581         (mulsi64): Likewise.
26582         (mulsidi64): Likewise.
26583         (umulsidi64): Likewise.
26584         (MUL32x16_REG): Define.
26585         (mul64_600): Use MUL32x16_REG.
26586         (mac64_600): Likewise.
26587         (umul64_600): Likewise.
26588         (umac64_600): Likewise.
26590 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
26592         * config/arc/arc.md (mulsi3_700): Make it commutative.
26594 2017-06-01  Jose E. Marchesi  <jose.marchesi@oracle.com>
26596         * config/sparc/sparc.md (*zero_extendsidi2_insn_sp64): Set insn
26597         type for movstouw.
26598         (*sign_extendsidi2_insn): Likewise for movstosw.
26600 2017-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
26602         * dwarf2out.c (get_discr_value): Call the get_debug_type hook on
26603         the type of the input discriminant value.  Convert the
26604         discriminant value of signedness vary.
26606 2017-06-01  Volker Reichelt  <v.reichelt@netcologne.de>
26608         * doc/invoke.texi (-Wcatch-value): Document new shortcut.
26609         Add to -Wall section.
26611 2017-06-01  Richard Biener  <rguenther@suse.de>
26613         PR middle-end/66313
26614         * fold-const.c (fold_plusminus_mult_expr): If the factored
26615         factor may be zero use a wrapping type for the inner operation.
26616         * tree-tailcall.c (independent_of_stmt_p): Pass in to_move bitmap
26617         and handle moved defs.
26618         (process_assignment): Properly guard the unary op case.  Return a
26619         tri-state indicating that moving the stmt before the call may allow
26620         to continue.  Pass through to_move.
26621         (find_tail_calls): Handle moving unrelated defs before
26622         the call.
26624 2017-05-31  Segher Boessenkool  <segher@kernel.crashing.org>
26626         PR target/80618
26627         * config/rs6000/vector.md (*vector_uneq<mode>): Write the nor in the
26628         splitter result in the canonical way.
26630 2017-05-31  Uros Bizjak  <ubizjak@gmail.com>
26632         * config/i386/i386.md (*zero_extendsidi2): Enable alternative (?r, *Yj)
26633         also for 32bit target.  Update insn attributes.
26634         (zero-extendsidi2 splitter): Allow all registers for operand 1.
26636 2017-05-31  Sebastian Peryt  <sebastian.peryt@intel.com>
26638         * config/i386/avx512fintrin.h (_mm_mask_max_sd)
26639         (_mm_maskz_max_sd, _mm_mask_max_ss, _mm_maskz_max_ss)
26640         (_mm_mask_min_sd, _mm_maskz_min_sd, _mm_mask_min_ss)
26641         (_mm_maskz_min_ss): New intrinsics.
26643 2017-05-31  Martin Liska  <mliska@suse.cz>
26645         * tree-vect-loop.c (vect_create_epilog_for_reduction):
26646         Change comment style to one we normally use.
26647         (vectorizable_reduction): Likewise.
26648         (vectorizable_induction): Likewise.
26649         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
26650         (vectorizable_call): Likewise.
26651         (vectorizable_simd_clone_call): Likewise.
26652         (vectorizable_conversion): Likewise.
26653         (vectorizable_assignment): Likewise.
26654         (vectorizable_shift): Likewise.
26655         (vectorizable_operation): Likewise.
26656         (vectorizable_store): Likewise.
26657         (vectorizable_load): Likewise.
26658         * tree-vectorizer.h: Likewise.
26660 2017-05-31  Alexander Monakov  <amonakov@ispras.ru>
26662         * passes.c (emergency_dump_function): New.
26663         * tree-pass.h (emergency_dump_function): Declare.
26664         * plugin.c (plugins_internal_error_function): Remove.
26665         * plugin.h (plugins_internal_error_function): Remove declaration.
26666         * toplev.c (internal_error_function): New static function.  Use it...
26667         (general_init): ...here.
26669 2017-05-31  Graham Markall  <graham.markall@embecosm.com>
26671         * config/arc/arc.c (arc_print_operand): Handle constant operands.
26672         (arc_rtx_costs): Add costs for new patterns.
26673         * config/arc/arc.md: Additional *add_n and *sub_n patterns.
26674         * config/arc/predicates.md: Add _1_2_3_operand predicate.
26676 2017-05-31  Richard Sandiford  <richard.sandiford@linaro.org>
26678         * tree-ssa-strlen.c (get_next_strinfo): New function.
26679         (get_stridx_plus_constant): Use it.
26680         (zero_length_string): Likewise.
26681         (adjust_related_strinfos): Likewise.
26682         (adjust_last_stmt): Likewise.
26684 2017-05-31  Richard Biener  <rguenther@suse.de>
26686         PR target/80880
26687         * config/i386/i386.c (ix86_expand_builtin): Remove assert
26688         for arg being an SSA name when expanding IX86_BUILTIN_BNDRET.
26690 2017-05-31  Richard Sandiford  <richard.sandiford@linaro.org>
26692         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Remove
26693         loop_vinfo argument and use of dependence distance vectors.
26694         Check instead whether the two references differ only in their
26695         initial value and assume that they have the same alignment if the
26696         difference is a multiple of the vector alignment.
26697         (vect_analyze_data_refs_alignment): Update call accordingly.
26699 2017-05-31  Martin Liska  <mliska@suse.cz>
26701         PR target/79155
26702         * config/i386/cpuid.h: Fix typo in a comment in cpuid.h.
26704 2017-05-31  Bin Cheng  <bin.cheng@arm.com>
26706         * tree-vect-loop-manip.c (create_intersect_range_checks_index)
26707         (create_intersect_range_checks): Move from ...
26708         * tree-data-ref.c (create_intersect_range_checks_index)
26709         (create_intersect_range_checks): ... to here.
26710         (create_runtime_alias_checks): New function factored from ...
26711         * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): ...
26712         here.  Call above function.
26713         * tree-data-ref.h (create_runtime_alias_checks): New function.
26715 2017-05-31  Bin Cheng  <bin.cheng@arm.com>
26717         * tree-data-ref.c (prune_runtime_alias_test_list): Relax minimal
26718         segment length for dr_b and compute it in wide_int.
26720 2017-05-31  Richard Biener  <rguenther@suse.de>
26722         PR tree-optimization/80906
26723         * graphite-isl-ast-to-gimple.c (copy_loop_close_phi_nodes): Get
26724         and pass through iv_map.
26725         (copy_bb_and_scalar_dependences): Adjust.
26726         (translate_pending_phi_nodes): Likewise.
26727         (copy_loop_close_phi_args): Handle code-generating IVs instead
26728         of ICEing.
26730 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
26732         * diagnostic-color.c (color_dict): Add "type-diff".
26733         (parse_gcc_colors): Update comment.
26734         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
26735         -fdiagnostics-show-template-tree and -fno-elide-type.
26736         (GCC_COLORS): Add type-diff to example.
26737         (type-diff=): New.
26738         (-fdiagnostics-show-template-tree): New.
26739         (-fno-elide-type): New.
26740         * pretty-print.c (pp_format): Pass quote and formatters[argno] to
26741         the pp_format_decoder callback.  Call any m_format_postprocessor's
26742         "handle" method.
26743         (pretty_printer::pretty_printer): Initialize
26744         m_format_postprocessor.
26745         (pretty_printer::~pretty_printer): Delete any
26746         m_format_postprocessor.
26747         * pretty-print.h (printer_fn): Add bool and const char ** parameters.
26748         (class format_postprocessor): New class.
26749         (struct pretty_printer::format_decoder): Document the new parameters.
26750         (struct pretty_printer::m_format_postprocessor): New field.
26751         * tree-diagnostic.c (default_tree_printer): Update for new
26752         bool and const char ** params.
26753         * tree-diagnostic.h (default_tree_printer): Likewise.
26755 2017-05-30  Segher Boessenkool  <segher@kernel.crashing.org>
26757         * config/rs6000/predicates.md (cc_reg_not_micro_cr0_operand): Delete.
26758         (lwa_operand): Delete rs6000_gen_cell_microcode test.
26759         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
26760         rs6000_gen_cell_microcode code.
26761         (rs6000_final_prescan_insn): Delete.
26762         (rs6000_opt_vars): Delete the "gen-cell-microcode" and
26763         "warn-cell-microcode" entries.
26764         * config/rs6000/rs6000.h (FINAL_PRESCAN_INSN): Delete.
26765         * config/rs6000/rs6000.md: Delete rs6000_gen_cell_microcode tests
26766         throughout.  Change cc_reg_not_micro_cr0_operand to
26767         cc_reg_not_cr0_operand throughout.
26768         (*extendhi<mode>2_noload): Delete.
26769         * config/rs6000/rs6000.opt (mgen-cell-microcode): Replace by stub.
26770         (mwarn-cell-microcode): Delete.
26771         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete
26772         -mgen-cell-microcode and -mwarn-cell-microcode.
26774 2017-05-30  Uros Bizjak  <ubizjak@gmail.com>
26776         PR target/80833
26777         * config/i386/constraints.md (Yd): New constraint.
26778         (Ye): Ditto.
26779         * config/i386/i386.md (*movti_internal): Add (?r, Ye)
26780         and (?Yd, r) alternatives.  Update insn attributes.
26781         * config/i386/i386.md (*movti_internal): Add (?r, *Ye)
26782         and (?*Yd, r) alternatives.  Update insn attributes.
26783         (double-mode inter-unit splitters): Add new GR<->XMM splitters.
26785 2017-05-30  Pierre-Marie de Rodat  <derodat@adacore.com>
26787         * gimplify.c (gimplify_modify_expr): Don't create a
26788         DECL_DEBUG_EXPR link if *FROM_P does not belong to the current
26789         function.
26791 2017-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
26793         * config/arm/arm-builtins.c (arm_expand_builtin): Remove const.
26795 2017-05-30  Richard Biener  <rguenther@suse.de>
26797         * tree-vectorizer.h (struct _stmt_vec_info): Add reduc_type
26798         and reduc_def fields.
26799         (STMT_VINFO_REDUC_TYPE): New define.
26800         (STMT_VINFO_REDUC_DEF): Likewise.
26801         (vect_force_simple_reduction): Adjust prototype.
26802         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Adjust.
26803         (vect_is_simple_reduction): Remove check_reduction argument.
26804         (vect_force_simple_reduction): Adjust and set
26805         STMT_VINFO_REDUC_TYPE and STMT_VINFO_REDUC_DEF.
26806         (vectorizable_reduction): Do not re-do reduction analysis
26807         but use STMT_VINFO_REDUC_TYPE and STMT_VINFO_REDUC_DEF.
26808         * tree-parloops.c (gather_scalar_reductions): Adjust.
26810 2017-05-30  Richard Biener  <rguenther@suse.de>
26812         PR middle-end/80901
26813         * cfgexpand.c (expand_gimple_cond): Match up loop fixup with
26814         split_edge code.
26816 2017-05-24  Robin Dapp  <rdapp@linux.vnet.ibm.com>
26818         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs):
26819         Introduce unknown_misalignment parameter and remove vf.
26820         (vect_peeling_hash_get_lowest_cost):
26821         Pass unknown_misalignment parameter.
26822         (vect_enhance_data_refs_alignment):
26823         Fix unsupportable data ref treatment.
26825 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
26827         * tree-vect-data-refs.c (vect_get_data_access_cost):
26828         Workaround for SLP handling.
26829         (vect_enhance_data_refs_alignment):
26830         Compute costs for doing no peeling at all, compare to the best
26831         peeling costs so far and avoid peeling if cheaper.
26833 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
26835         * tree-vect-data-refs.c (vect_peeling_hash_choose_best_peeling):
26836         Return peeling info and set costs to zero for unlimited cost
26837         model.
26838         (vect_enhance_data_refs_alignment): Also inspect all datarefs
26839         with unknown misalignment. Compute and costs for unknown
26840         misalignment, compare them to the costs for known misalignment
26841         and choose the cheapest for peeling.
26843 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
26845         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Rename.
26846         (vect_get_peeling_costs_all_drs): Create function.
26847         (vect_peeling_hash_get_lowest_cost):
26848         Use vect_get_peeling_costs_all_drs.
26849         (vect_peeling_supportable): Create function.
26850         (vect_enhance_data_refs_alignment): Use vect_peeling_supportable.
26852 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
26854         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Create
26855         DR_HAS_NEGATIVE_STEP.
26856         (vect_update_misalignment_for_peel): Define DR_MISALIGNMENT.
26857         (vect_enhance_data_refs_alignment): Use.
26858         (vect_duplicate_ssa_name_ptr_info): Use.
26859         * tree-vectorizer.h (dr_misalignment): Use.
26860         (known_alignment_for_access_p): Use.
26862 2017-05-30  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
26864         PR target/78838
26865         * config/msp430/msp430.c (gen_prefix): Return NULL when section name is
26866         .lowtext.
26867         (has_section_name): New function.
26869 2017-05-30  Martin Liska  <mliska@suse.cz>
26871         PR other/80909
26872         * auto-profile.c (get_function_decl_from_block): Fix
26873         parenthesis.
26875 2017-05-30  Richard Biener  <rguenther@suse.de>
26877         PR middle-end/80876
26878         * cfgexpand.c (expand_gimple_cond): Fixup preserving loops again.
26880 2017-05-30  Martin Liska  <mliska@suse.cz>
26882         * dumpfile.c: Use newly added macro DUMP_FILE_INFO.
26883         * dumpfile.h (struct dump_file_info): Remove ctors.
26885 2017-05-30  Martin Liska  <mliska@suse.cz>
26887         * predict.def: Fix GNU coding style.
26889 2017-05-29  Max Filippov  <jcmvbkbc@gmail.com>
26891         * config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
26892         Mark 'to' argument with ATTRIBUTE_UNUSED.
26894 2017-05-29  Max Filippov  <jcmvbkbc@gmail.com>
26896         * config/xtensa/xtensa.c (xtensa_emit_call): Use
26897         HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string.
26898         (print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld
26899         format string.
26901 2017-05-29  Eric Botcazou  <ebotcazou@adacore.com>
26903         * doc/install.texi (Options specification): Restore entry of
26904         --enable-sjlj-exceptions.
26906 2017-05-27  Michael Eager  <eager@eagercon.com>
26908         Revert:
26909         2016-01-21  Ajit Agarwal  <ajitkum@xilinx.com>
26911         See https://gcc.gnu.org/ml/gcc/2017-05/msg00221.html.
26913         * config/microblaze/microblaze.h
26914         (FIXED_REGISTERS): Update in macro.
26915         (CALL_USED_REGISTERS): Update in macro.
26917 2017-05-27  François-Xavier Coudett  <fxcoudert@gcc.gnu.org>
26919         * doc/install.texi: Add links to macOS binary distributions.
26921 2017-05-27  Jakub Jelinek  <jakub@redhat.com>
26923         PR bootstrap/80887
26924         Revert:
26925         2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
26927         * match.pd ((A +- CST1) +- CST2): Allow some conversions.
26929 2017-05-26  Martin Liska  <mliska@suse.cz>
26931         * dumpfile.h (enum dump_kind): Renumber TDF_* flags to be contiguous.
26933 2017-05-26  Martin Liska  <mliska@suse.cz>
26935         * cfg.c (check_bb_profile): Do not use TDF_COMMENT and print
26936         always leading ';; '.
26937         (dump_bb_info): Likewise.
26938         (brief_dump_cfg): Likewise.
26939         * cfgrtl.c (print_rtl_with_bb): Do not use TDF_COMMENT.
26940         * dumpfile.c: Remove usage of TDF_VERBOSE.
26941         * dumpfile.h (enum dump_kind): Likewise.
26942         (dump_gimple_bb_header): Do not use TDF_COMMENT.
26943         * print-tree.c (debug_verbose): Remove.
26944         * tree-cfg.c (gimple_dump_cfg): Do not use TDF_COMMENT.
26945         (dump_function_to_file): Remove dumps guarded with TDF_VERBOSE.
26946         * tree-diagnostic.c (default_tree_printer): Replace
26947         TDF_DIAGNOSTIC with TDF_SLIM.
26949 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
26951         * tree-vect-loop-manip.c (create_intersect_range_checks_index): Pass
26952         in parameter loop, rather than loop_vinfo.
26953         (create_intersect_range_checks): Ditto.
26954         (vect_create_cond_for_alias_checks): Update call to above functions.
26956 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
26958         PR tree-optimization/80815
26959         * tree-data-ref.c (prune_runtime_alias_test_list): Simplify condition
26960         for merging runtime alias checks.  Handle negative DR_STEPs.
26962 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
26964         * tree-vect-data-refs.c (Operator==, comp_dr_with_seg_len_pair):
26965         Move from ...
26966         * tree-data-ref.c (Operator==, comp_dr_with_seg_len_pair): To here.
26967         * tree-vect-data-refs.c (vect_prune_runtime_alias_test_list): Factor
26968         out code pruning runtime alias checks.
26969         * tree-data-ref.c (prune_runtime_alias_test_list): New function
26970         factored out from above.
26971         * tree-vectorizer.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
26972         Move from ...
26973         * tree-data-ref.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
26974         ... to here.
26975         (prune_runtime_alias_test_list): New decalaration.
26977 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
26979         * tree-vect-data-refs.c (compare_tree): Rename and move ...
26980         * tree-data-ref.c (data_ref_compare_tree): ... to here.
26981         * tree-data-ref.h (data_ref_compare_tree): New decalaration.
26982         * tree-vect-data-refs.c (dr_group_sort_cmp): Update uses.
26983         (operator==, comp_dr_with_seg_len_pair): Ditto.
26984         (vect_prune_runtime_alias_test_list): Ditto.
26986 2017-05-26  Martin Liska  <mliska@suse.cz>
26988         PR ipa/80663
26989         * params.def: Bound partial-inlining-entry-probability param.
26991 2017-05-26  Marek Polacek  <polacek@redhat.com>
26993         PR sanitizer/80875
26994         * fold-const.c (fold_binary_loc) <case MULT_EXPR>: Check if OP1
26995         can be negated.
26997 2017-05-26  Richard Biener  <rguenther@suse.de>
26999         PR tree-optimization/80842
27000         * tree-ssa-ccp.c (set_lattice_value): Always meet with the old
27001         value.
27003 2017-05-26  Richard Biener  <rguenther@suse.de>
27005         PR tree-optimization/80844
27006         * tree-vectorizer.c (adjust_simduid_builtins): Propagate results.
27008 2017-05-25  Sebastian Peryt  <sebastian.peryt@intel.com>
27010         * doc/md.texi (Machine Constraints): Update x86 family
27011         machine constraints section to match 'config/i386/constraints.md'.
27013 2017-05-25  Volker Reichelt  <v.reichelt@netcologne.de>
27015         * doc/invoke.texi (-Wcatch-value=): Document new warning option.
27017 2017-05-25  Nathan Sidwell  <nathan@acm.org>
27019         * doc/invoke.texi (--enable-languages): Update documentation.
27021 2017-05-25  Martin Liska  <mliska@suse.cz>
27023         * dumpfile.c: Add TDF_FOLDING.
27024         * dumpfile.h (enum dump_kind): Likewise.
27025         * genmatch.c (dt_simplify::gen_1): Use it.
27027 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
27029         * match.pd (view_convert (convert@0 @1)): Handle zero-extension.
27031 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
27033         * match.pd ((A +- CST1) +- CST2): Allow some conversions.
27034         * tree.c (drop_tree_overflow): Handle COMPLEX_CST and VECTOR_CST.
27036 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
27038         * fold-const.c (fold_binary_loc) [(A & C) == D]: Remove transformation.
27039         * match.pd (X == C): Rewrite it here.
27040         (with_possible_nonzero_bits, with_possible_nonzero_bits2,
27041         with_certain_nonzero_bits2): New predicates.
27042         * tree-ssanames.c (get_nonzero_bits): Handle INTEGER_CST.
27044 2017-05-24  Nathan Sidwell  <nathan@acm.org>
27046         * lto-streamer-in.c (lto_input_data_block): Adjust T const cast to
27047         avoid warning.
27049         * auto-profile.c (afdo_propagate): Adjust T const cast to avoid
27050         warning.
27052 2017-05-24  Segher Boessenkool  <segher@kernel.crashing.org>
27054         * config/powerpcspe: New port.  Files are copied from the rs6000
27055         port, with "rs6000" in filenames replaced by "powerpcspe".
27057 2017-05-24  Wilco Dijkstra  <wdijkstr@arm.com>
27059         PR rtl-optimization/80754
27060         * lra-remat.c (do_remat): Add overlap checks for dst_regno.
27062 2017-05-24  Sheldon Lobo  <smlobo@sheldon.us.oracle.com>
27064         * config/sparc/sparc.md (length): Return the correct value for -mflat
27065         sibcalls to match output_sibcall.
27067 2017-05-24  Segher Boessenkool  <segher@kernel.crashing.org>
27069         PR bootstrap/80860
27070         PR bootstrap/80843
27071         * config/rs6000/rs6000.c (struct machine_function): Add new field
27072         n_components.
27073         (rs6000_get_separate_components): Init that field, use it.
27074         (rs6000_components_for_bb): Use the field.
27076 2017-05-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>
27078         * config/arm/arm.c (arm_expand_prologue): Fix typo in comment.
27080 2017-05-24  Peter Bergner  <bergner@vnet.ibm.com>
27082         PR middle-end/80823
27083         * tree-cfg.c (group_case_labels_stmt): Delete increment of "i";
27085 2017-05-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27087         PR target/80725
27088         * config/s390/s390.c (s390_check_qrst_address): Check incoming
27089         address against address_operand predicate.
27090         * config/s390/s390.md ("*indirect_jump"): Swap alternatives.
27092 2017-05-24  Eric Botcazou  <ebotcazou@adacore.com>
27094         * var-tracking.c (track_expr_p): Do not return 0 for tracked record
27095         parameters passed indirectly.
27097 2017-05-23  Uros Bizjak  <ubizjak@gmail.com>
27099         * config/i386/i386.md (*movdi_internal): Remove SSE4
27100         alternative 18 (?r, *v).  Update insn attributes.
27101         (*movsi_internal): Remove SSE4 alternative 13 (?r, *v).
27102         Update insn attributes.
27103         (*zero_extendsidi2): Remove SSE4 alternative (?r, *x).
27104         Update insn attributes.
27105         * config/i386/sse.md (vec_extract<ssevecmodelower>_0): Remove SSE4
27106         alternative 1 (r, v). Remove isa attribute.
27107         * config/i386/i386.c (dimode_scalar_chain::make_vector_copies):
27108         Always move value through stack for !TARGET_INTER_UNIT_MOVES_TO_VEC
27109         and !TARGET_INTER_UNIT_MOVES_TO_VEC targets.
27111 2017-05-23  Tom de Vries  <tom@codesourcery.com>
27113         * doc/sourcebuild.texi (Directives, Verify compiler message): Document
27114         dg-line directive.
27116 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
27118         * cgraphunit.c (symbol_table::process_new_functions): Update.
27119         * ipa-fnsummary.c (pass_data_inline_parameters): Remove.
27120         (inline_generate_summary): Rename to ...
27121         (ipa_fn_summary_generate): ... this one.
27122         (inline_read_summary): Rename to ...
27123         (ipa_fn_summary_read): ... this one.
27124         (inline_write_summary): Rename to ...
27125         (ipa_fn_summary_write): ... this one.
27126         (inline_free_summary): Rename to ...
27127         (ipa_free_fn_summary): ... this one.
27128         (pass_data_local_fn_summary, pass_local_fn_summary,
27129         make_pass_local_fn_summary, pass_data_ipa_free_fn_summary,
27130         pass_ipa_free_fn_summary, make_pass_ipa_free_fn_summary,
27131         pass_data_ipa_fn_summary, pass_ipa_fn_summary,
27132         make_pass_ipa_fn_summary): New.
27133         * ipa-fnsummary.h (inline_generate_summary, inline_read_summary,
27134         inline_write_summary, inline_free_summary): Remove.
27135         (ipa_free_fn_summary) : New.
27136         * ipa-inline.c (ipa_inline): Update.
27137         (pass_ipa_inline): Do not generate summaries.
27138         * ipa.c (pass_data_ipa_free_fn_summary, pass_ipa_free_fn_summary):
27139         Remove.
27140         * passes.def: Replace pass_inline_parameters by pass_local_fn_summary
27141         and add pass_ipa_fn_summary.
27142         * tree-pass.h (make_pass_ipa_fn_summary, make_pass_local_fn_summary):
27143         New.
27144         (make_pass_inline_parameters): Remove.
27146 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
27148         * omp-low.c (struct omp_context): Remove "default_kind" member.
27149         Adjust all users.
27151         * omp-offload.c (execute_oacc_device_lower): Remove the
27152         parallelism dimensions function attributes for unparallelized
27153         OpenACC kernels constructs.
27155 2017-05-23  Martin Liska  <mliska@suse.cz>
27157         * cgraph.c (cgraph_node::get_create): Use symtab_node::dump_{asm_,}name
27158         functions.
27159         (cgraph_edge::make_speculative): Likewise.
27160         (cgraph_edge::resolve_speculation): Likewise.
27161         (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
27162         (cgraph_node::dump): Likewise.
27163         * cgraph.h: Likewise.
27164         * cgraphunit.c (analyze_functions): Likewise.
27165         (symbol_table::compile): Likewise.
27166         * ipa-cp.c (print_all_lattices): Likewise.
27167         (determine_versionability): Likewise.
27168         (initialize_node_lattices): Likewise.
27169         (ipcp_verify_propagated_values): Likewise.
27170         (estimate_local_effects): Likewise.
27171         (update_profiling_info): Likewise.
27172         (create_specialized_node): Likewise.
27173         (perhaps_add_new_callers): Likewise.
27174         (decide_about_value): Likewise.
27175         (decide_whether_version_node): Likewise.
27176         (identify_dead_nodes): Likewise.
27177         (ipcp_store_bits_results): Likewise.
27178         * ipa-devirt.c (dump_targets): Likewise.
27179         (ipa_devirt): Likewise.
27180         * ipa-icf.c (sem_item::dump): Likewise.
27181         (sem_function::equals): Likewise.
27182         (sem_variable::equals): Likewise.
27183         (sem_item_optimizer::read_section): Likewise.
27184         (sem_item_optimizer::execute): Likewise.
27185         (congruence_class::dump): Likewise.
27186         * ipa-inline-analysis.c (dump_ipa_call_summary): Likewise.
27187         (dump_inline_summary): Likewise.
27188         (estimate_node_size_and_time): Likewise.
27189         (inline_analyze_function): Likewise.
27190         * ipa-inline-transform.c (inline_call): Likewise.
27191         * ipa-inline.c (report_inline_failed_reason): Likewise.
27192         (want_early_inline_function_p): Likewise.
27193         (edge_badness): Likewise.
27194         (update_edge_key): Likewise.
27195         (inline_small_functions): Likewise.
27196         * ipa-profile.c (ipa_profile): Likewise.
27197         * ipa-prop.c (ipa_print_node_jump_functions): Likewise.
27198         (ipa_make_edge_direct_to_target): Likewise.
27199         (remove_described_reference): Likewise.
27200         (ipa_impossible_devirt_target): Likewise.
27201         (propagate_controlled_uses): Likewise.
27202         (ipa_print_node_params): Likewise.
27203         (ipcp_transform_function): Likewise.
27204         * ipa-pure-const.c (pure_const_read_summary): Likewise.
27205         (propagate_pure_const): Likewise.
27206         * ipa-reference.c (generate_summary): Likewise.
27207         (read_write_all_from_decl): Likewise.
27208         (propagate): Likewise.
27209         (ipa_reference_read_optimization_summary): Likewise.
27210         * ipa-utils.c (ipa_merge_profiles): Likewise.
27211         * ipa.c (walk_polymorphic_call_targets): Likewise.
27212         (symbol_table::remove_unreachable_nodes): Likewise.
27213         (ipa_single_use): Likewise.
27214         * passes.c (execute_todo): Likewise.
27215         * predict.c (drop_profile): Likewise.
27216         * symtab.c (symtab_node::get_dump_name): New function.
27217         (symtab_node::dump_name): Likewise.
27218         (symtab_node::dump_asm_name): Likewise.
27219         (symtab_node::dump_references): Likewise.
27220         (symtab_node::dump_referring): Likewise.
27221         (symtab_node::dump_base): Likewise.
27222         (symtab_node::debug_symtab): Likewise.
27223         * tree-sra.c (convert_callers_for_node): Likewise.
27224         * tree-ssa-structalias.c (ipa_pta_execute): Likewise.
27225         * value-prof.c (init_node_map): Likewise.
27227 2017-05-23  Martin Liska  <mliska@suse.cz>
27229         * cgraph.h: Move symtab_node::dump_table to symbol_table::dump
27230         and symtab_node::debug_symtab to symbol_table::debug.
27231         * cgraphunit.c (analyze_functions): Use the renamed function.
27232         (symbol_table::compile): Likewise.
27233         * ipa-cp.c (ipcp_verify_propagated_values): Likewise.
27234         * ipa-icf.c (sem_item_optimizer::execute): Likewise.
27235         * passes.c (execute_todo): Likewise.
27236         * symtab.c (symbol_table::dump): New function.
27237         * tree-ssa-structalias.c (ipa_pta_execute): Use the renamed function.
27239 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
27241         * ipa-fnsummary.c (estimate_node_size_and_time): Do not sanity check
27242         that nonconst implies exec.
27244 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
27246         * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
27247         inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
27248         (inline_edge_summary_vec): Turn into ...
27249         (ipa_call_summaries): ... this one.
27250         (redirect_to_unreachable, edge_set_predicate,
27251         evaluate_properties_for_edge, inline_summary_alloc,
27252         reset_ipa_call_summary, reset_inline_summary,
27253         inline_summary_t::duplicate): Update.
27254         (inline_edge_duplication_hook): Turn to ...
27255         (ipa_call_summary_t::duplicate): ... this one.
27256         (inline_edge_removal_hook): Turn to ...
27257         (ipa_call_summary_t::remove): ... this one.
27258         (dump_inline_edge_summary): Turn to ...
27259         (dump_ipa_call_summary): ... this one.
27260         (estimate_function_body_sizes): Update.
27261         (inline_update_callee_summaries): Update.
27262         (remap_edge_change_prob): Update.
27263         (remap_edge_summaries): Update.
27264         (inline_merge_summary): Update.
27265         (do_estimate_edge_time): Update.
27266         (inline_generate_summary): Update.
27267         (inline_read_section): Update.
27268         (inline_read_summary): Update.
27269         (inline_free_summary): Update.
27270         * ipa-inline.c (can_inline_edge_p): Update.
27271         (compute_inlined_call_time): Update.
27272         (want_inline_small_function_p): Update.
27273         (edge_badness): Update.
27274         (early_inliner): Update.
27275         * ipa-inline.h (inline_edge_summary): Turn to ...
27276         (ipa_call_summary): ... this one.
27277         (ipa_call_summary_t): New class.
27278         (inline_edge_summary_t, inline_edge_summary_vec): Remove.
27279         (ipa_call_summaries): New.
27280         (inline_edge_summary): Remove.
27281         (estimate_edge_growth): Update.
27282         * ipa-profile.c (ipa_propagate_frequency_1): Update.
27283         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
27284         * ipa-split.c (execute_split_functions): Update.
27285         * ipa.c (symbol_table::remove_unreachable_nodes): Update.
27287 2017-05-23  Tom de Vries  <tom@codesourcery.com>
27289         * doc/sourcebuild.texi (Effective-Target Keywords, Other hardware
27290         attributes): Document rdrand effective target.
27292 2017-05-23  Tom de Vries  <tom@codesourcery.com>
27294         * doc/sourcebuild.texi (Effective-Target Keywords, Other hardware
27295         attributes): Sort alphabetically.
27297 2017-05-23  Georg-Johann Lay  <avr@gjlay.de>
27299         * config/avr/genmultilib.awk: Use gsub instead of gensub.
27301 2017-05-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
27303         PR target/80718
27304         * config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Split
27305         V2DF/V2DI splat into two separate patterns, one that handles
27306         registers, and the other that only handles memory.  Drop support
27307         for splatting from a GPR on ISA 2.07 and then splitting the
27308         splat into direct move and splat.
27309         (vsx_splat_<mode>_reg): Likewise.
27310         (vsx_splat_<mode>_mem): Likewise.
27312 2017-05-22  Segher Boessenkool  <segher@kernel.crashing.org>
27314         * cfgcleanup.c (bb_is_just_return): Allow CLOBBERs.
27316 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
27318         PR middle-end/80809
27319         * omp-low.c (finish_taskreg_remap): New function.
27320         (finish_taskreg_scan): If unit size of ctx->record_type
27321         is non-constant, unshare the size expression and replace
27322         decls in it with possible outer var refs.
27324         PR middle-end/80809
27325         * gimplify.c (omp_add_variable): For GOVD_DEBUG_PRIVATE use
27326         GOVD_SHARED rather than GOVD_PRIVATE with it.
27327         (gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Expect
27328         GOVD_SHARED rather than GOVD_PRIVATE with GOVD_DEBUG_PRIVATE.
27330         PR middle-end/80853
27331         * omp-low.c (lower_reduction_clauses): Pass OMP_CLAUSE_PRIVATE
27332         as last argument to build_outer_var_ref for pointer bases of array
27333         section reductions.
27335 2017-05-19  Martin Sebor  <msebor@redhat.com>
27337         * print-tree.c (print_node): Print DECL_READ_P flag.
27339 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
27341         * Makefile.in: Add ipa-fnsummary.o and ipa-fnsummary.h
27342         * auto-profile.c: Replace ipa-inline.h by ipa-fnsummary.h
27343         * cgraph.c: Likewise.
27344         * cgraphunit.c: Likewise.
27345         * gengtype.c: Likewise.
27346         * ipa-cp.c: Likewise.
27347         * ipa-devirt.c: Likewise.
27348         * ipa-icf.c: Likewise.
27349         * ipa-predicate.c: Likewise.
27350         * ipa-profile.c: Likewise.
27351         * ipa-prop.c: Likewise.
27352         * ipa-split.c: Likewise.
27353         * ipa.c: Likewise.
27354         * ipa-inline-analysis.c (inline_summaries, ipa_call_summaries,
27355         edge_predicate_pool, dump_inline_hints,
27356         inline_summary::account_size_time, redirect_to_unreachable,
27357         edge_set_predicate, set_hint_predicate,
27358         evaluate_conditions_for_known_args, evaluate_properties_for_edge,
27359         inline_summary_alloc, ipa_call_summary::reset, inline_summary::reset,
27360         inline_summary_t::remove, remap_hint_predicate_after_duplication,
27361         inline_summary_t::duplicate, ipa_call_summary_t::duplicate,
27362         ipa_call_summary_t::remove, initialize_growth_caches,
27363         free_growth_caches, dump_ipa_call_summary, dump_inline_summary,
27364         debug_inline_summary, dump_inline_summaries, initialize_inline_failed,
27365         mark_modified, unmodified_parm_1, unmodified_parm,
27366         unmodified_parm_or_parm_agg_item, eliminated_by_inlining_prob,
27367         set_cond_stmt_execution_predicate, set_switch_stmt_execution_predicate,
27368         compute_bb_predicates, will_be_nonconstant_expr_predicate,
27369         will_be_nonconstant_predicate, record_modified_bb_info,
27370         get_minimal_bb, record_modified, param_change_prob,
27371         phi_result_unknown_predicate, predicate_for_phi_result,
27372         array_index_predicate, clobber_only_eh_bb_p, fp_expression_p,
27373         estimate_function_body_sizes, compute_inline_parameters,
27374         compute_inline_parameters_for_curren, pass_data_inline_parameters,
27375         estimate_node_size_and_time, estimate_ipcp_clone_size_and_time,
27376         inline_update_callee_summaries, remap_edge_change_prob,
27377         remap_edge_summaries, remap_hint_predicate, inline_merge_summary,
27378         inline_update_overall_summary, inline_indirect_intraprocedural_analysis,
27379         inline_analyze_function, inline_summary_t::insert,
27380         inline_generate_summary, read_ipa_call_summary, inline_read_section,
27381         inline_read_summary, write_ipa_call_summary, inline_write_summary,
27382         inline_free_summary): Move to ipa-fnsummary.h
27383         (predicate_t): Remove.
27384         * ipa-fnsummary.c: New file.
27385         * ipa-inline.h:  Do not include sreal.h and ipa-predicate.h
27386         (enum inline_hints_vals, inline_hints, agg_position_info,
27387         INLINE_SIZE_SCALE, size_time_entry, inline_summary, inline_summary_t,
27388         inline_summaries, ipa_call_summary, ipa_call_summary_t,
27389         ipa_call_summaries, debug_inline_summary, dump_inline_summaries,
27390         dump_inline_summary, dump_inline_hints, inline_generate_summary,
27391         inline_read_summary, inline_write_summary, inline_free_summary,
27392         inline_analyze_function, initialize_inline_failed,
27393         inline_merge_summary, inline_update_overall_summary,
27394         compute_inline_parameters): Move to ipa-fnsummary.h
27395         * ipa-fnsummary.h: New file.
27396         * ipa-inline-transform.h: Include ipa-inline.h.
27397         * ipa-inline.c: LIkewise.
27399 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
27401         * ipa-inline.c (edge_badness): Use inlined_time instead of
27402         inline_summaries->get.
27404 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
27406         * ipa-inline.c (edge_badness): Use estimate_size_after_inlining.
27408 2017-05-22  Nathan Sidwell  <nathan@acm.org>
27410         * doc/invoke.texi (fdump-translation-unit): Delete documentation.
27411         (fdump-lang): Document 'raw' option.
27412         * dumpfile.h (TDI_tu): Delete.
27413         * dumpfile.c (dump_files): Remove translation-unit.
27414         (FIRST_AUTO_NUMBERED_DUMP): Decrement.
27416 2017-05-22  Georg-Johann Lay  <avr@gjlay.de>
27418         * config/avr/t-avr (AWK) [t-multilib]: Remove "-v FORMAT=Makefile"
27419         command option from $(AWK) call.
27420         * config/avr/genmultilib.awk: Simplify and rewrite so that it
27421         generates MULTILIB_REQUIRED instead of MULTILIB_EXCEPTIONS.
27422         [FORMAT]: Remove handling of variable.
27423         * config/avr/t-multilib: Regenerate.
27425 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
27427         * ipa-inline-analysis.c (inline_summary::reset): Do not reset
27428         self_time.
27429         (dump_inline_summary): Do not print self_time.
27430         (estimate_function_body_sizes): Do not set self_time.
27431         (compute_inline_parameters): Likewise.
27432         (inline_read_section, inline_write_summary): Do not stream self_time.
27433         * ipa-inline.h (inline_summary): Drop self_time.
27435 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
27437         * ipa-inline-analysis.c (account_size_time): Rename to ...
27438         (inline_summary::account_size_time): ... this one.
27439         (reset_ipa_call_summary): Turn to ...
27440         (ipa_call_summary::reset): ... this one.
27441         (reset_inline_summary): Turn to ...
27442         (inline_summary::reset): ... this one.
27443         (inline_summary_t::remove): Update.
27444         (inline_summary_t::duplicate): Update.
27445         (ipa_call_summary_t::remove): Update.
27446         (dump_inline_summary): Update.
27447         (estimate_function_body_sizes): Update.
27448         (compute_inline_parameters): Update.
27449         (estimate_node_size_and_time): Update.
27450         (inline_merge_summary): Update.
27451         (inline_update_overall_summary): Update.
27452         (inline_read_section): Update.
27453         (inline_write_summary): Update.
27454         * ipa-inline.h (inline_summary): Rename entry to size_time_table;
27455         add account_size_time and reset member functions.
27456         (ipa_call_summary): Add reset function.
27457         * ipa-predicate.h (predicate::operator &): Constify.
27459 2017-05-22  Richard Biener  <rguenther@suse.de>
27461         * df-scan.c (df_insn_refs_verify): Speedup when not verifying.
27463 2017-05-19  Jason Merrill  <jason@redhat.com>
27465         * tree.c (make_tree_vec_stat, grow_tree_vec_stat): Use size_t.
27467 2017-05-19  Marek Polacek  <polacek@redhat.com>
27469         PR sanitizer/80800
27470         * fold-const.c (extract_muldiv_1) <case TRUNC_DIV_EXPR>: Add
27471         TYPE_OVERFLOW_WRAPS checks.
27473 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
27475         * tree-core.h (enum omp_clause_default_kind): Add
27476         "OMP_CLAUSE_DEFAULT_PRESENT".
27477         * tree-pretty-print.c (dump_omp_clause): Handle it.
27478         * gimplify.c (enum gimplify_omp_var_data): Add
27479         "GOVD_MAP_FORCE_PRESENT".
27480         (gimplify_adjust_omp_clauses_1): Map it to
27481         "GOMP_MAP_FORCE_PRESENT".
27482         (oacc_default_clause): Handle "OMP_CLAUSE_DEFAULT_PRESENT".
27484         * gimplify.c (oacc_default_clause): Clarify.
27486 2017-05-19  Nathan Sidwell  <nathan@acm.org>
27488         LANG_HOOK_REGISTER_DUMPS
27489         * toplev.c (general_init): Call register dump lang hook.
27490         * doc/invoke.texi: Document -fdump-lang option family.
27491         * dumpfile.c (dump_files): Remove class dump here.
27492         (FIRST_AUTO_NUMBERED_DUMP): Adjust.
27493         * dumpfile.h (tree_dump_index): Remove TDI_class.
27494         * langhooks-def.h (lhd_register_dumps): Declare.
27495         (LANG_HOOKS_REGISTER_DUMPS): Define.
27496         (LANG_HOOKS_INITIALIZER): Add it.
27497         * langhooks.c (lhd_register_dumps): Define.
27498         * langhooks.h (struct lang_hooks): Add register_dumps.
27500 2017-05-19  Nathan Sidwell  <nathan@acm.org>
27502         * context.h (context::set_passes): New.
27503         * context.c (context::context): Do not create pass manager.
27504         * toplev.c (general_init): Create pass manager here.
27506 2017-05-19  Segher Boessenkool  <segher@kernel.crashing.org>
27508         * config/rs6000/rs6000.md (splitter to load of -1 and mask): Don't
27509         use this splitter if two add or or instructions would also work for
27510         the constant we want to generate.
27512 2017-05-19  Richard Biener  <rguenther@suse.de>
27514         PR build/80821
27515         * genmatch.c (dt_node::gen_kids_1): Add missing scope around
27516         predicate evaluation.
27518 2017-05-19  Jan Hubicka  <hubicka@ucw.cz>
27520         * ipa-inline.h (ipa_call_summary): Turn sizes into signed;
27521         add ctor.
27522         * ipa-inline.c (want_inline_small_function_p): Do not cast to
27523         unsigned.
27525 2017-05-19  Jan Hubicka  <hubicka@ucw.cz>
27527         * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
27528         inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
27529         (inline_edge_summary_vec): Turn into ...
27530         (ipa_call_summaries): ... this one.
27531         (redirect_to_unreachable, edge_set_predicate,
27532         evaluate_properties_for_edge, inline_summary_alloc,
27533         reset_ipa_call_summary, reset_inline_summary,
27534         inline_summary_t::duplicate): Update.
27535         (inline_edge_duplication_hook): Turn to ...
27536         (ipa_call_summary_t::duplicate): ... this one.
27537         (inline_edge_removal_hook): Turn to ...
27538         (ipa_call_summary_t::remove): ... this one.
27539         (dump_inline_edge_summary): Turn to ...
27540         (dump_ipa_call_summary): ... this one.
27541         (estimate_function_body_sizes): Update.
27542         (inline_update_callee_summaries): Update.
27543         (remap_edge_change_prob): Update.
27544         (remap_edge_summaries): Update.
27545         (inline_merge_summary): Update.
27546         (do_estimate_edge_time): Update.
27547         (inline_generate_summary): Update.
27548         (inline_read_section): Update.
27549         (inline_read_summary): Update.
27550         (inline_free_summary): Update.
27551         * ipa-inline.c (can_inline_edge_p): Update.
27552         (compute_inlined_call_time): Update.
27553         (want_inline_small_function_p): Update.
27554         (edge_badness): Update.
27555         (early_inliner): Update.
27556         * ipa-inline.h (inline_edge_summary): Turn to ...
27557         (ipa_call_summary): ... this one.
27558         (ipa_call_summary_t): New class.
27559         (inline_edge_summary_t, inline_edge_summary_vec): Remove.
27560         (ipa_call_summaries): New.
27561         (inline_edge_summary): Remove.
27562         (estimate_edge_growth): Update.
27563         * ipa-profile.c (ipa_propagate_frequency_1): Update.
27564         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
27565         * ipa-split.c (execute_split_functions): Update.
27566         * ipa.c (symbol_table::remove_unreachable_nodes): Update.
27568 2017-05-19  Richard Biener  <rguenther@suse.de>
27570         PR middle-end/80764
27571         * cfgexpand.c (expand_gimple_cond): Fix loop fixup.
27573 2017-05-18  Segher Boessenkool  <segher@kernel.crashing.org>
27575         * config/rs6000/rs6000.c (struct machine_function): Add field
27576         fpr_is_wrapped_separately.
27577         (rs6000_get_separate_components): Use 64 components.  Handle the
27578         new FPR components.
27579         (rs6000_components_for_bb): Handle the FPR components.
27580         (rs6000_emit_prologue_components): Handle the FPR components.
27581         (rs6000_emit_epilogue_components): Handle the FPR components.
27582         (rs6000_set_handled_components): Handle the FPR components.
27583         (rs6000_emit_prologue): Don't output prologue code for those FPRs
27584         that are already separately shrink-wrapped.
27585         (rs6000_emit_epilogue): Don't output epilogue code for those FPRs
27586         that are already separately shrink-wrapped.
27588 2017-05-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
27590         PR target/80510
27591         * config/rs6000/predicates.md (simple_offsettable_mem_operand):
27592         New predicate.
27594         * config/rs6000/rs6000.md (ALTIVEC_DFORM): New iterator.
27595         (define_peephole2 for Altivec d-form load): Add peepholes to catch
27596         cases where the register allocator uses a move and an offsettable
27597         memory operation to/from a FPR register on ISA 2.06/2.07.
27598         (define_peephole2 for Altivec d-form store): Likewise.
27600 2017-05-18  Uros Bizjak  <ubizjak@gmail.com>
27602         PR target/80799
27603         * config/i386/mmx.md (*mov<mode>_internal): Enable
27604         alternatives 11, 12, 13 and 14 also for 32bit targets.
27605         Remove alternatives 15, 16, 17 and 18.
27606         * config/i386/sse.md (vec_concatv2di): Change
27607         alternative (!x, *y) to (x, ?!*Yn).
27609 2017-05-18  Paolo Carlini  <paolo.carlini@oracle.com>
27611         * dumpfile.h (enum dump_kind): Remove stray comma.
27613 2017-05-18  Jan Hubicka  <hubicka@ucw.cz>
27615         * Makefile.in: Add ipa-predicate.o and ipa-predicate.h
27616         * ipa-inline-analysis.c (NUM_CONDITIONS): turn into
27617         predicate::num_conditions
27618         (IS_NOT_CONSTANT): turn into predicate::is_not_constant.
27619         (CHANGED): turn into predicate::changed.
27620         (agg_position_info): Move to ipa-predicate.h
27621         (add_condition, predicate::add_clause, predicate::operator &=,
27622         predicate::or_with, predicate::evaluate, predicate::probability,
27623         dump_condition, dump_clause, predicate::dump,
27624         predicate::remap_after_duplication, predicate::remap_after_inlining,
27625         predicate::stream_in, predicate::stream_out): Move to ipa-predicate.c
27626         (evaluate_conditions_for_known_args): Update.
27627         (set_cond_stmt_execution_predicate): Update.
27628         * ipa-inline.h: Include ipa-predicate.h
27629         (condition, inline_param_summary, conditions, agg_position_info,
27630         predicate): Move to ipa-predicate.h
27631         * ipa-predicate.c: New file.
27632         * ipa-predicate.h: New file.
27634 2017-05-18  Wilco Dijkstra  <wdijkstr@arm.com>
27636         * final.c (leaf_function_p): Check we are not in a sequence.
27638 2017-05-18  Martin Liska  <mliska@suse.cz>
27640         * cfgrtl.c (rtl_verify_edges): Remove usage of TDF_RTL.
27641         * dumpfile.c (dump_register): Use new enum dump_kind.
27642         (get_dump_file_name): Likewise.
27643         (dump_enable_all): Likewise.
27644         (dump_switch_p_1): Likewise.
27645         (enable_rtl_dump_file): Remove usage of TDF_RTL.
27646         * dumpfile.h (enum dump_kind): New enum type.
27647         (struct dump_file_info): Create constructor and
27648         format fields and comments.
27649         * passes.c (pass_manager::register_one_dump_file):
27650         Use num dump_kind.
27651         * statistics.c (statistics_early_init): Likewise.
27652         * tree-ssa-loop-prefetch.c (dump_mem_details): Replace
27653         TDF_TREE with TDF_SLIM.
27654         (gather_memory_references_ref): Likewise.
27656 2017-05-18  Martin Liska  <mliska@suse.cz>
27658         * vec.h (struct vnull): Use it.
27660 2017-05-18  Jan Hubicka  <hubicka@ucw.cz>
27662         * ipa-inline-analysis.c (predicate_conditions): Move to ipa-inline.h
27663         (true_predicate, false_predicate, true_predicate_p,
27664         false_predicate_p): Remove.
27665         (single_cond_predicate, not_inlined_predicate): Turn to member function
27666         in ipa-inline.h
27667         (add_condition): Update.
27668         (add_clause): Turn to...
27669         (predicate::add_clause): ... this one; update; allow passing NULL
27670         as parameter.
27671         (and_predicates): Turn to ...
27672         (predicate::operator &=): ... this one.
27673         (predicates_equal_p): Move to predicate::operator == in ipa-inline.h
27674         (or_predicates): Turn to ...
27675         (predicate::or_with): ... this one.
27676         (evaluate_predicate): Turn to ...
27677         (predicate::evaluate): ... this one.
27678         (predicate_probability): Turn to ...
27679         (predicate::probability): ... this one.
27680         (dump_condition): Update.
27681         (dump_predicate): Turn to ...
27682         (predicate::dump): ... this one.
27683         (account_size_time): Update.
27684         (edge_set_predicate): Update.
27685         (set_hint_predicate): UPdate.
27686         (evaluate_conditions_for_known_args): Update.
27687         (evaluate_properties_for_edge): Update.
27688         (remap_predicate_after_duplication): Turn to...
27689         (predicate::remap_after_duplication): ... this one.
27690         (remap_hint_predicate_after_duplication): Update.
27691         (inline_summary_t::duplicate): UPdate.
27692         (dump_inline_edge_summary): Update.
27693         (dump_inline_summary): Update.
27694         (set_cond_stmt_execution_predicate): Update.
27695         (set_switch_stmt_execution_predicate): Update.
27696         (compute_bb_predicates): Update.
27697         (will_be_nonconstant_expr_predicate): Update.
27698         (will_be_nonconstant_predicate): Update.
27699         (phi_result_unknown_predicate): Update.
27700         (predicate_for_phi_result): Update.
27701         (array_index_predicate): Update.
27702         (estimate_function_body_sizes): Update.
27703         (estimate_node_size_and_time): Update.
27704         (estimate_ipcp_clone_size_and_time): Update.
27705         (remap_predicate): Rename to ...
27706         (predicate::remap_after_inlining): ... this one.
27707         (remap_hint_predicate): Update.
27708         (inline_merge_summary): Update.
27709         (inline_update_overall_summary): Update.
27710         (estimate_size_after_inlining): Update.
27711         (read_predicate): Rename to ...
27712         (predicate::stream_in): ... this one.
27713         (read_inline_edge_summary): Update.
27714         (write_predicate): Rename to ...
27715         (predicate::stream_out): ... this one.
27716         (write_inline_edge_summary): Update.
27717         * ipa-inline.h (MAX_CLAUSES): Turn to predicate::max_clauses.
27718         (clause_t): Turn to uint32_t
27719         (predicate): Turn to class; implement constructor and operators
27720         ==, !=, &
27721         (size_time_entry): Update.
27722         (inline_summary): Update.
27723         (inline_edge_summary): Update.
27725 2017-05-18  Marc Glisse  <marc.glisse@inria.fr>
27727         * fold-const.c (fold_binary_loc): Move transformation...
27728         * match.pd (C - X CMP X): ... here.
27730 2017-05-18  Sheldon Lobo  <sheldon.lobo@oracle.com>
27732         * config/sparc/sparc.c (sparc_option_override): Set function
27733         alignment for -mcpu=niagara7 to 64 to match the I$ line.
27734         * config/sparc/sparc.h (BRANCH_COST): Set the SPARC M7 branch
27735         latency to 1.
27736         * config/sparc/sparc.h (BRANCH_COST): Set the SPARC T4 branch
27737         latency to 2.
27738         * config/sparc/sol2.h: Fix a ASM_CPU32_DEFAULT_SPEC typo.
27740 2017-05-18  Marek Polacek  <polacek@redhat.com>
27742         PR sanitizer/80797
27743         * ubsan.c (instrument_null): Unwrap ADDR_EXPRs.
27744         (pass_ubsan::execute): Call gimple_assign_single_p instead of
27745         gimple_assign_load_p.
27747 2017-05-17  Segher Boessenkool  <segher@kernel.crashing.org>
27749         PR middle-end/80692
27750         * real.c (do_compare): Give decimal_do_compare preference over
27751         comparing just the signs.
27753 2017-05-17  Uros Bizjak  <ubizjak@gmail.com>
27755         * doc/md.texi (Canonicalization of Instructions): Describe the
27756         canonical form of instructions that inherently set a condition
27757         code register.
27759 2017-05-17  Peter Bergner  <bergner@vnet.ibm.com>
27761         PR middle-end/80775
27762         * tree-cfg.c: Move deletion of unreachable case statements to after
27763         the merging of consecutive case labels.
27765 2017-05-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>
27767         * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Refer
27768         readers to __gnu_cmse_nonsecure_call libcall for saving, clearing and
27769         restoring of callee-saved registers.
27771 2017-05-17  Eric Botcazou  <ebotcazou@adacore.com>
27773         * compare-elim.c (equivalent_reg_at_start): Adjust outdated comment.
27774         * config/visium/visium.c (single_set_and_flags): Likewise.
27775         * config/visium/visium.md (Substitutions): Likewise.
27777 2017-05-17  Martin Liska  <mliska@suse.cz>
27779         * cfg.c: Introduce dump_flags_t type and
27780         use it instead of int type.
27781         * cfg.h: Likewise.
27782         * cfghooks.c: Likewise.
27783         * cfghooks.h (struct cfg_hooks): Likewise.
27784         * cfgrtl.c: Likewise.
27785         * cfgrtl.h: Likewise.
27786         * cgraph.c (cgraph_node::get_body): Likewise.
27787         * coretypes.h: Likewise.
27788         * domwalk.c: Likewise.
27789         * domwalk.h: Likewise.
27790         * dumpfile.c (struct dump_option_value_info): Likewise.
27791         (dump_enable_all): Likewise.
27792         (dump_switch_p_1): Likewise.
27793         (opt_info_switch_p): Likewise.
27794         * dumpfile.h (enum tree_dump_index): Likewise.
27795         (struct dump_file_info): Likewise.
27796         * genemit.c: Likewise.
27797         * generic-match-head.c: Likewise.
27798         * gengtype.c (open_base_files): Likewise.
27799         * gimple-pretty-print.c: Likewise.
27800         * gimple-pretty-print.h: Likewise.
27801         * graph.c (print_graph_cfg): Likewise.
27802         * graphite-scop-detection.c (dot_all_sese): Likewise.
27803         * ipa-devirt.c (build_type_inheritance_graph): Likewise.
27804         * loop-unroll.c (report_unroll): Likewise.
27805         * passes.c (pass_manager::register_one_dump_file): Likewise.
27806         * print-tree.c: Likewise.
27807         * statistics.c: Likewise.
27808         * tree-cfg.c: Likewise.
27809         * tree-cfg.h: Likewise.
27810         * tree-dfa.c: Likewise.
27811         * tree-dfa.h: Likewise.
27812         * tree-dump.c (dump_function): Likewise.
27813         * tree-dump.h (struct dump_info): Likewise.
27814         * tree-pretty-print.c: Likewise.
27815         * tree-pretty-print.h: Likewise.
27816         * tree-ssa-live.c: Likewise.
27817         * tree-ssa-live.h: Likewise.
27818         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Likewise.
27819         * tree-vect-loop.c: Likewise.
27820         * tree-vect-slp.c: Likewise.
27822 2017-05-16  James Greenhalgh  <james.greenhalgh@arm.com>
27823             Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27825         PR tree-optimization/80457
27826         * tree-vect-stmts.c (vect_model_simple_cost): Model the cost
27827         of all arguments to a statement as scalar_to_vec operations.
27828         (vectorizable_call): Adjust call to vect_model_simple_cost for
27829         new parameter.
27830         (vectorizable_conversion): Likewise.
27831         (vectorizable_assignment): Likewise.
27832         (vectorizable_shift): Likewise.
27833         (vectorizable_operation): Likewise.
27834         (vectorizable_comparison): Likewise.
27835         (vect_is_simple_cond): Record the def types for operands.
27836         (vectorizable_condition): Likewise, call vect_model_simple_cost.
27837         * tree-vectorizer.h (vect_model_simple_cost): Add new parameter
27838         for statement argument count.
27840 2017-05-16  Carl Love  <cel@us.ibm.com>
27842         * config/rs6000/rs6000-c: Add support for built-in functions
27843         vector unsigned long long vec_bperm (vector unsigned long long,
27844                                              vector unsigned char)
27845         vector signed long long vec_mule (vector signed int,
27846                                           vector signed int)
27847         vector unsigned long long vec_mule (vector unsigned int,
27848                                             vector unsigned int)
27849         vector signed long long vec_mulo (vector signed int,
27850                                           vector signed int)
27851         vector unsigned long long vec_mulo (vector unsigned int,
27852                                             vector unsigned int)
27853         vector signed char vec_sldw (vector signed char,
27854                                      vector signed char,
27855                                      const int)
27856         vector unsigned char vec_sldw (vector unsigned char,
27857                                        vector unsigned char,
27858                                        const int)
27859         vector signed short vec_sldw (vector signed short,
27860                                       vector signed short,
27861                                       const int)
27862         vector unsigned short vec_sldw (vector unsigned short,
27863                                         vector unsigned short,
27864                                         const int)
27865         vector signed int vec_sldw (vector signed int,
27866                                     vector signed int,
27867                                     const int)
27868         vector unsigned int vec_sldw (vector unsigned int,
27869                                       vector unsigned int,
27870                                       const int)
27871         vector signed long long vec_sldw (vector signed long long,
27872                                           vector signed long long,
27873                                           const int)
27874         vector unsigned long long vec_sldw (vector unsigned long long,
27875                                             vector unsigned long long,
27876                                             const int)
27877         * config/rs6000/rs6000-c: Add support for built-in functions
27878         * config/rs6000/rs6000-builtin.def: Add definition for SLDW.
27879         * config/rs6000/altivec.h: Add defintion for vec_sldw.
27880         * doc/extend.texi: Update the built-in documentation for the
27881         new built-in functions.
27883 2017-05-16  Marek Polacek  <polacek@redhat.com>
27885         PR sanitizer/80536
27886         PR sanitizer/80386
27887         * tree.c (save_expr): Don't fold the expression.
27889 2017-05-16  Uros Bizjak  <ubizjak@gmail.com>
27891         * config/i386/i386.md (*movsi_internal): Split (?rm,*y) alternative
27892         to (?r,*Yn) and (?m,*y) alternatives, and (?*y,rm) to (?*Ym,r)
27893         and (?*y,m).  Update insn attributes.
27895 2017-05-16  Martin Liska  <mliska@suse.cz>
27897         * cgraph.c (cgraph_edge::resolve_speculation): Add default value for
27898         flags argument of print_gimple_stmt, print_gimple_expr,
27899         print_generic_stmt and print_generic_expr.
27900         * cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
27901         * coretypes.h: Likewise.
27902         * except.c (dump_eh_tree): Likewise.
27903         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
27904         * gimple-pretty-print.h: Likewise.
27905         * gimple-ssa-backprop.c (dump_usage_prefix): Likewise.
27906         (backprop::push_to_worklist): Likewise.
27907         (backprop::pop_from_worklist): Likewise.
27908         (backprop::process_use): Likewise.
27909         (backprop::intersect_uses): Likewise.
27910         (note_replacement): Likewise.
27911         * gimple-ssa-store-merging.c
27912         (pass_store_merging::terminate_all_aliasing_chains): Likewise.
27913         (imm_store_chain_info::coalesce_immediate_stores): Likewise.
27914         (pass_store_merging::execute): Likewise.
27915         * gimple-ssa-strength-reduction.c (dump_candidate): Likewise.
27916         (ssa_base_cand_dump_callback): Likewise.
27917         (dump_incr_vec): Likewise.
27918         (replace_refs): Likewise.
27919         (replace_mult_candidate): Likewise.
27920         (create_add_on_incoming_edge): Likewise.
27921         (create_phi_basis): Likewise.
27922         (insert_initializers): Likewise.
27923         (all_phi_incrs_profitable): Likewise.
27924         (introduce_cast_before_cand): Likewise.
27925         (replace_one_candidate): Likewise.
27926         * gimplify.c (gimplify_expr): Likewise.
27927         * graphite-isl-ast-to-gimple.c (is_valid_rename): Likewise.
27928         (set_rename): Likewise.
27929         (rename_uses): Likewise.
27930         (copy_loop_phi_nodes): Likewise.
27931         (add_close_phis_to_merge_points): Likewise.
27932         (copy_loop_close_phi_args): Likewise.
27933         (copy_cond_phi_args): Likewise.
27934         (graphite_copy_stmts_from_block): Likewise.
27935         (translate_pending_phi_nodes): Likewise.
27936         * graphite-poly.c (print_pdr): Likewise.
27937         (dump_gbb_cases): Likewise.
27938         (dump_gbb_conditions): Likewise.
27939         (print_scop_params): Likewise.
27940         * graphite-scop-detection.c (build_cross_bb_scalars_def): Likewise.
27941         (build_cross_bb_scalars_use): Likewise.
27942         (gather_bbs::before_dom_children): Likewise.
27943         * hsa-dump.c (dump_hsa_immed): Likewise.
27944         * ipa-cp.c (print_ipcp_constant_value): Likewise.
27945         (get_replacement_map): Likewise.
27946         * ipa-inline-analysis.c (dump_condition): Likewise.
27947         (estimate_function_body_sizes): Likewise.
27948         * ipa-polymorphic-call.c (check_stmt_for_type_change): Likewise.
27949         (ipa_polymorphic_call_context::get_dynamic_type): Likewise.
27950         * ipa-prop.c (ipa_dump_param): Likewise.
27951         (ipa_print_node_jump_functions_for_edge): Likewise.
27952         (ipa_modify_call_arguments): Likewise.
27953         (ipa_modify_expr): Likewise.
27954         (ipa_dump_param_adjustments): Likewise.
27955         (ipa_dump_agg_replacement_values): Likewise.
27956         (ipcp_modif_dom_walker::before_dom_children): Likewise.
27957         * ipa-pure-const.c (check_stmt): Likewise.
27958         (pass_nothrow::execute): Likewise.
27959         * ipa-split.c (execute_split_functions): Likewise.
27960         * omp-offload.c (dump_oacc_loop_part): Likewise.
27961         (dump_oacc_loop): Likewise.
27962         * trans-mem.c (tm_log_emit): Likewise.
27963         (tm_memopt_accumulate_memops): Likewise.
27964         (dump_tm_memopt_set): Likewise.
27965         (dump_tm_memopt_transform): Likewise.
27966         * tree-cfg.c (gimple_verify_flow_info): Likewise.
27967         (print_loop): Likewise.
27968         * tree-chkp-opt.c (chkp_print_addr): Likewise.
27969         (chkp_gather_checks_info): Likewise.
27970         (chkp_get_check_result): Likewise.
27971         (chkp_remove_check_if_pass): Likewise.
27972         (chkp_use_outer_bounds_if_possible): Likewise.
27973         (chkp_reduce_bounds_lifetime): Likewise.
27974         * tree-chkp.c (chkp_register_addr_bounds): Likewise.
27975         (chkp_mark_completed_bounds): Likewise.
27976         (chkp_register_incomplete_bounds): Likewise.
27977         (chkp_mark_invalid_bounds): Likewise.
27978         (chkp_maybe_copy_and_register_bounds): Likewise.
27979         (chkp_build_returned_bound): Likewise.
27980         (chkp_get_bound_for_parm): Likewise.
27981         (chkp_build_bndldx): Likewise.
27982         (chkp_get_bounds_by_definition): Likewise.
27983         (chkp_generate_extern_var_bounds): Likewise.
27984         (chkp_get_bounds_for_decl_addr): Likewise.
27985         * tree-chrec.c (chrec_apply): Likewise.
27986         * tree-data-ref.c (dump_data_reference): Likewise.
27987         (dump_subscript): Likewise.
27988         (dump_data_dependence_relation): Likewise.
27989         (analyze_overlapping_iterations): Likewise.
27990         * tree-inline.c (expand_call_inline): Likewise.
27991         (tree_function_versioning): Likewise.
27992         * tree-into-ssa.c (dump_defs_stack): Likewise.
27993         (dump_currdefs): Likewise.
27994         (dump_names_replaced_by): Likewise.
27995         (dump_update_ssa): Likewise.
27996         (update_ssa): Likewise.
27997         * tree-object-size.c (pass_object_sizes::execute): Likewise.
27998         * tree-parloops.c (build_new_reduction): Likewise.
27999         (try_create_reduction_list): Likewise.
28000         (ref_conflicts_with_region): Likewise.
28001         (oacc_entry_exit_ok_1): Likewise.
28002         (oacc_entry_exit_single_gang): Likewise.
28003         * tree-pretty-print.h: Likewise.
28004         * tree-scalar-evolution.c (set_scalar_evolution): Likewise.
28005         (get_scalar_evolution): Likewise.
28006         (add_to_evolution): Likewise.
28007         (get_loop_exit_condition): Likewise.
28008         (analyze_evolution_in_loop): Likewise.
28009         (analyze_initial_condition): Likewise.
28010         (analyze_scalar_evolution): Likewise.
28011         (instantiate_scev): Likewise.
28012         (number_of_latch_executions): Likewise.
28013         (gather_chrec_stats): Likewise.
28014         (final_value_replacement_loop): Likewise.
28015         (scev_const_prop): Likewise.
28016         * tree-sra.c (dump_access): Likewise.
28017         (disqualify_candidate): Likewise.
28018         (create_access): Likewise.
28019         (reject): Likewise.
28020         (maybe_add_sra_candidate): Likewise.
28021         (create_access_replacement): Likewise.
28022         (analyze_access_subtree): Likewise.
28023         (analyze_all_variable_accesses): Likewise.
28024         (sra_modify_assign): Likewise.
28025         (initialize_constant_pool_replacements): Likewise.
28026         (find_param_candidates): Likewise.
28027         (decide_one_param_reduction): Likewise.
28028         (replace_removed_params_ssa_names): Likewise.
28029         * tree-ssa-ccp.c (ccp_fold_stmt): Likewise.
28030         * tree-ssa-copy.c (dump_copy_of): Likewise.
28031         (copy_prop_visit_cond_stmt): Likewise.
28032         * tree-ssa-dce.c (mark_operand_necessary): Likewise.
28033         * tree-ssa-dom.c (pass_dominator::execute): Likewise.
28034         (record_equivalences_from_stmt): Likewise.
28035         * tree-ssa-dse.c (compute_trims): Likewise.
28036         (delete_dead_call): Likewise.
28037         (delete_dead_assignment): Likewise.
28038         * tree-ssa-forwprop.c (forward_propagate_into_gimple_cond): Likewise.
28039         (forward_propagate_into_cond): Likewise.
28040         (pass_forwprop::execute): Likewise.
28041         * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
28042         * tree-ssa-loop-im.c (invariantness_dom_walker::before_dom_children):
28043         Likewise.
28044         (move_computations_worker): Likewise.
28045         (execute_sm): Likewise.
28046         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Likewise.
28047         (remove_exits_and_undefined_stmts): Likewise.
28048         (remove_redundant_iv_tests): Likewise.
28049         * tree-ssa-loop-ivopts.c (dump_use): Likewise.
28050         (adjust_iv_update_pos): Likewise.
28051         * tree-ssa-math-opts.c (bswap_replace): Likewise.
28052         * tree-ssa-phiopt.c (factor_out_conditional_conversion): Likewise.
28053         (value_replacement): Likewise.
28054         * tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
28055         * tree-ssa-pre.c (print_pre_expr): Likewise.
28056         (get_representative_for): Likewise.
28057         (create_expression_by_pieces): Likewise.
28058         (insert_into_preds_of_block): Likewise.
28059         (eliminate_insert): Likewise.
28060         (eliminate_dom_walker::before_dom_children): Likewise.
28061         (eliminate): Likewise.
28062         (remove_dead_inserted_code): Likewise.
28063         * tree-ssa-propagate.c (substitute_and_fold): Likewise.
28064         * tree-ssa-reassoc.c (get_rank): Likewise.
28065         (eliminate_duplicate_pair): Likewise.
28066         (eliminate_plus_minus_pair): Likewise.
28067         (eliminate_not_pairs): Likewise.
28068         (undistribute_ops_list): Likewise.
28069         (eliminate_redundant_comparison): Likewise.
28070         (update_range_test): Likewise.
28071         (optimize_range_tests_var_bound): Likewise.
28072         (optimize_vec_cond_expr): Likewise.
28073         (rewrite_expr_tree): Likewise.
28074         (rewrite_expr_tree_parallel): Likewise.
28075         (linearize_expr): Likewise.
28076         (break_up_subtract): Likewise.
28077         (linearize_expr_tree): Likewise.
28078         (attempt_builtin_powi): Likewise.
28079         (attempt_builtin_copysign): Likewise.
28080         (transform_stmt_to_copy): Likewise.
28081         (transform_stmt_to_multiply): Likewise.
28082         (dump_ops_vector): Likewise.
28083         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Likewise.
28084         (print_scc): Likewise.
28085         (set_ssa_val_to): Likewise.
28086         (visit_reference_op_store): Likewise.
28087         (visit_use): Likewise.
28088         (sccvn_dom_walker::before_dom_children): Likewise.
28089         (run_scc_vn): Likewise.
28090         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
28091         Likewise.
28092         (expr_hash_elt::print): Likewise.
28093         (const_and_copies::pop_to_marker): Likewise.
28094         (const_and_copies::record_const_or_copy_raw): Likewise.
28095         * tree-ssa-structalias.c (compute_dependence_clique): Likewise.
28096         * tree-ssa-uninit.c (collect_phi_def_edges): Likewise.
28097         (dump_predicates): Likewise.
28098         (find_uninit_use): Likewise.
28099         (warn_uninitialized_phi): Likewise.
28100         (pass_late_warn_uninitialized::execute): Likewise.
28101         * tree-ssa.c (verify_vssa): Likewise.
28102         (verify_ssa): Likewise.
28103         (maybe_optimize_var): Likewise.
28104         * tree-vrp.c (dump_value_range): Likewise.
28105         (dump_all_value_ranges): Likewise.
28106         (dump_asserts_for): Likewise.
28107         (register_edge_assert_for_2): Likewise.
28108         (vrp_visit_cond_stmt): Likewise.
28109         (vrp_visit_switch_stmt): Likewise.
28110         (vrp_visit_stmt): Likewise.
28111         (vrp_visit_phi_node): Likewise.
28112         (simplify_cond_using_ranges_1): Likewise.
28113         (fold_predicate_in): Likewise.
28114         (evrp_dom_walker::before_dom_children): Likewise.
28115         (evrp_dom_walker::push_value_range): Likewise.
28116         (evrp_dom_walker::pop_value_range): Likewise.
28117         (execute_early_vrp): Likewise.
28119 2017-05-16  Richard Biener  <rguenther@suse.de>
28121         * dwarf2out.c (loc_list_from_tree_1): Do not create
28122         DW_OP_GNU_variable_value for DECL_IGNORED_P decls.
28124 2017-05-16  Richard Biener  <rguenther@suse.de>
28126         * dwarf2out.c (resolve_variable_value_in_expr): Lookup DIE
28127         just generated.
28128         (note_variable_value_in_expr): If we resolved the decl ref
28129         do not push to the stack.
28131 2017-05-16  Matthew Wahab  <matthew.wahab@arm.com>
28133         * config/arm/arm_neon.h (vadd_f16): Use standard arithmetic
28134         operations in fast-math mode.
28135         (vaddq_f16): Likewise.
28136         (vmul_f16): Likewise.
28137         (vmulq_f16): Likewise.
28138         (vsub_f16): Likewise.
28139         (vsubq_f16): Likewise.
28140         * config/arm/neon.md (add<mode>3): New.
28141         (sub<mode>3): New.
28142         (fma:<VH:mode>3): New.  Also remove outdated comment.
28143         (mul<mode>3): New.
28145 2017-05-16  Martin Liska  <mliska@suse.cz>
28147         PR ipa/79849.
28148         PR ipa/79850.
28149         * ipa-devirt.c (warn_types_mismatch): Fix typo.
28150         (odr_types_equivalent_p): Likewise.
28152 2017-05-15  Sylvestre Ledru  <sylvestre@debian.org>
28154         * plugin.c (try_init_one_plugin): Fix ressource leaks (CID 726637).
28156 2017-05-15  Uros Bizjak  <ubizjak@gmail.com>
28158         PR target/80425
28159         * config/i386.i386.md (*zero_extendsidi2): Do not penalize
28160         non-interunit SSE move alternatives with '?'.
28161         (zero-extendsidi peephole2): New peephole to skip intermediate
28162         general register in SSE zero-extend sequence.
28164 2017-05-15  Jeff Law  <law@redhat.com>
28166         * reorg.c (relax_delay_slots): Create a new variable to hold
28167         the temporary target rather than clobbering TARGET_LABEL.
28169         * config/tilegx/tilegx.c (tilegx_expand_unaligned_load): Add
28170         missing argument to extract_bit_field call.
28171         * config/tilepro/tilepro.c (tilepro_expand_unaligned_load): Likewise.
28173 2017-05-15  Martin Liska  <mliska@suse.cz>
28175         PR driver/31468
28176         * gcc.c (process_command): Do not allow empty argument of -o option.
28178 2017-05-15  Renlin Li  <renlin.li@arm.com>
28180         * config/aarch64/aarch64-protos.h (aarch64_expand_call): Declare.
28181         * config/aarch64/aarch64.c (aarch64_expand_call): Define.
28182         * config/aarch64/constraints.md (Usf): Add long call check.
28183         * config/aarch64/aarch64.md (call): Use aarch64_expand_call.
28184         (call_value): Likewise.
28185         (sibcall): Likewise.
28186         (sibcall_value): Likewise.
28187         (call_insn): New.
28188         (call_value_insn): New.
28189         (sibcall_insn): Update rtx pattern.
28190         (sibcall_value_insn): Likewise.
28191         (call_internal): Remove.
28192         (call_value_internal): Likewise.
28193         (sibcall_internal): Likewise.
28194         (sibcall_value_internal): Likewise.
28195         (call_reg): Likewise.
28196         (call_symbol): Likewise.
28197         (call_value_reg): Likewise.
28198         (call_value_symbol): Likewise.
28200 2017-05-14  Krister Walfridsson  <krister.walfridsson@gmail.com>
28202         PR target/80600
28203         * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always add -lgcc.
28205 2017-05-14  Uros Bizjak  <ubizjak@gmail.com>
28207         * config/i386.i386.c (ix86_cc_modes_compatible): CCNOmode is
28208         compatible with CCGOCmode and with CCZmode.
28210 2017-05-14  Martin Sebor  <msebor@redhat.com>
28212         PR middle-end/77671
28213         * gimple-fold.c (gimple_fold_builtin_sprintf): Make extern.
28214         (gimple_fold_builtin_snprintf): Same.
28215         * gimple-fold.h (gimple_fold_builtin_sprintf): Declare.
28216         (gimple_fold_builtin_snprintf): Same.
28217         * gimple-ssa-sprintf.c (get_format_string): Correct the detection
28218         of character types.
28219         (is_call_safe): New function.
28220         (try_substitute_return_value): Call it.
28221         (try_simplify_call): New function.
28222         (pass_sprintf_length::handle_gimple_call): Call it.
28224 2017-05-14  Martin Sebor  <msebor@redhat.com>
28226         PR middle-end/80669
28227         * builtins.c (expand_builtin_stpncpy): Simplify.
28229 2017-05-14  Daniel Santos  <daniel.santos@pobox.com>
28231         * config/i386/i386.opt: Add option -mcall-ms2sysv-xlogues.
28232         * config/i386/i386.h
28233         (x86_64_ms_sysv_extra_clobbered_registers): Change type to unsigned.
28234         (NUM_X86_64_MS_CLOBBERED_REGS): New macro.
28235         (struct machine_function): Add new members call_ms2sysv,
28236         call_ms2sysv_pad_in, call_ms2sysv_pad_out and call_ms2sysv_extra_regs.
28237         (struct machine_frame_state): New fields sp_realigned and
28238         sp_realigned_offset.
28239         * config/i386/i386.c
28240         (enum xlogue_stub): New enum.
28241         (enum xlogue_stub_sets): New enum.
28242         (class xlogue_layout): New class.
28243         (struct ix86_frame): New fields stack_realign_allocate_offset,
28244         stack_realign_offset and outlined_save_offset.  Modify comments to
28245         detail stack layout when using out-of-line stubs.
28246         (ix86_target_string): Add -mcall-ms2sysv-xlogues option.
28247         (ix86_option_override_internal): Add sorry() for TARGET_SEH and
28248         -mcall-ms2sysv-xlogues.
28249         (stub_managed_regs): New static variable.
28250         (ix86_save_reg): Add new parameter ignore_outlined to optionally omit
28251         registers managed by out-of-line stub.
28252         (disable_call_ms2sysv_xlogues): New function.
28253         (ix86_compute_frame_layout): Modify re-alignment calculations, disable
28254         m->call_ms2sysv when appropriate and compute frame layout for
28255         out-of-line stubs.
28256         (sp_valid_at, fp_valid_at): New inline functions.
28257         (choose_basereg): New function.
28258         (choose_baseaddr): Add align parameter, use choose_basereg and modify
28259         all callers.
28260         (ix86_emit_save_reg_using_mov, ix86_emit_restore_sse_regs_using_mov):
28261         Use align parameter of choose_baseaddr to generated aligned SSE movs
28262         when possible.
28263         (pro_epilogue_adjust_stack): Modify to track
28264         machine_frame_state::sp_realigned.
28265         (ix86_nsaved_regs): Modify to accommodate changes to ix86_save_reg.
28266         (ix86_nsaved_sseregs): Likewise.
28267         (ix86_emit_save_regs): Likewise.
28268         (ix86_emit_save_regs_using_mov): Likewise.
28269         (ix86_emit_save_sse_regs_using_mov): Likewise.
28270         (get_scratch_register_on_entry): Likewise.
28271         (gen_frame_set): New function.
28272         (gen_frame_load): Likewise.
28273         (gen_frame_store): Likewise.
28274         (emit_outlined_ms2sysv_save): Likewise.
28275         (emit_outlined_ms2sysv_restore): Likewise.
28276         (ix86_expand_prologue): Modify stack re-alignment code and call
28277         emit_outlined_ms2sysv_save when appropriate.
28278         (ix86_emit_leave): Clear machine_frame_state::sp_realigned.  Add
28279         parameter rtx_insn *insn, which allows the function to be used to only
28280         generate the notes.
28281         (ix86_expand_epilogue): Modify validity checks of frame and stack
28282         pointers, and call emit_outlined_ms2sysv_restore when appropriate.
28283         (ix86_expand_call): Modify to enable m->call_ms2sysv when appropriate.
28284         * config/i386/predicates.md
28285         (save_multiple): New predicate.
28286         (restore_multiple): Likewise.
28287         * config/i386/sse.md
28288         (save_multiple<mode>): New pattern.
28289         (save_multiple_realign<mode>): Likewise.
28290         (restore_multiple<mode>): Likewise.
28291         (restore_multiple_and_return<mode>): Likewise.
28292         (restore_multiple_leave_return<mode>): Likewise.
28293         * Makefile.in: Export HOSTCXX and HOSTCXXFLAGS to site.exp
28295 2017-05-14  Julia Koval  <julia.koval@intel.com>
28297         * config/i386/i386-builtin-types.def (VOID_FTYPE_INT_INT64): New type.
28298         * config/i386/i386-builtin.def (__builtin_ia32_xgetbv)
28299         (__builtin_ia32_xsetbv): New builtins.
28300         * config/i386/i386.c (ix86_expand_special_args_builtin):
28301         Process new types.
28302         (ix86_expand_builtin): Special expand for new intrinsics.
28303         * config/i386/i386.md (UNSPECV_XGETBV, UNSPECV_XSETBV): New.
28304         (xsetbv, xsetbv_rex64, xgetbv, xgetbv_rex64): New insn patterns.
28305         * config/i386/xsaveintrin.h (_xsetbv, _getbv): New intrinsics.
28307 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
28309         * cfganal.c (inverted_post_order_compute): Change argument type
28310         to vec *.
28311         * cfganal.h (inverted_post_order_compute): Adjust prototype.
28312         * df-core.c (rest_of_handle_df_initialize): Adjust.
28313         (rest_of_handle_df_finish): Likewise.
28314         (df_analyze_1): Likewise.
28315         (df_analyze): Likewise.
28316         (loop_inverted_post_order_compute): Change argument to be a vec *.
28317         (df_analyze_loop): Adjust.
28318         (df_get_n_blocks): Likewise.
28319         (df_get_postorder): Likewise.
28320         * df.h (struct df_d): Change field to be a vec.
28321         * lcm.c (compute_laterin): Adjust.
28322         (compute_available): Likewise.
28323         * lra-lives.c (lra_create_live_ranges_1): Likewise.
28324         * tree-ssa-dce.c (remove_dead_stmt): Likewise.
28325         * tree-ssa-pre.c (compute_antic): Likewise.
28327 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
28329         * cfganal.c (connect_infinite_loops_to_exit): Adjust.
28330         (depth_first_search::depth_first_search): Change structure init
28331         function to this constructor.
28332         (depth_first_search::add_bb): Rename function to this member.
28333         (depth_first_search::execute): Likewise.
28334         (flow_dfs_compute_reverse_finish): Adjust.
28336 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
28338         * ddg.c (find_nodes_on_paths): Use auto_sbitmap.
28339         (longest_simple_path): Likewise.
28340         * shrink-wrap.c (spread_components): Likewise.
28341         (disqualify_problematic_components): Likewise.
28342         (emit_common_heads_for_components): Likewise.
28343         (emit_common_tails_for_components): Likewise.
28344         (insert_prologue_epilogue_for_components): Likewise.
28346 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
28348         * tree-ssa-dse.c (dse_dom_walker): Make m_live_byes a
28349         auto_sbitmap.
28351 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
28353         * df-core.c (df_set_blocks): Start using auto_bitmap.
28354         (df_compact_blocks): Likewise.
28355         * df-problems.c (df_rd_confluence_n): Likewise.
28356         * df-scan.c (df_insn_rescan_all): Likewise.
28357         (df_process_deferred_rescans): Likewise.
28358         (df_update_entry_block_defs): Likewise.
28359         (df_update_exit_block_uses): Likewise.
28360         (df_entry_block_bitmap_verify): Likewise.
28361         (df_exit_block_bitmap_verify): Likewise.
28362         (df_scan_verify): Likewise.
28363         * lra-constraints.c (lra_constraints): Likewise.
28364         (undo_optional_reloads): Likewise.
28365         (lra_undo_inheritance): Likewise.
28366         * lra-remat.c (calculate_gen_cands): Likewise.
28367         (do_remat): Likewise.
28368         * lra-spills.c (assign_spill_hard_regs): Likewise.
28369         (spill_pseudos): Likewise.
28370         * tree-ssa-pre.c (bitmap_set_and): Likewise.
28371         (bitmap_set_subtract_values): Likewise.
28373 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
28375         * haifa-sched.c (estimate_shadow_tick): Replace manual bitmap
28376         management with auto_bitmap.
28377         (fix_inter_tick): Likewise.
28378         (fix_recovery_deps): Likewise.
28379         * ira.c (add_store_equivs): Likewise.
28380         (find_moveable_pseudos): Likewise.
28381         (split_live_ranges_for_shrink_wrap): Likewise.
28382         * print-rtl.c (rtx_reuse_manager::rtx_reuse_manager): Likewise.
28383         (rtx_reuse_manager::seen_def_p): Likewise.
28384         (rtx_reuse_manager::set_seen_def): Likewise.
28385         * print-rtl.h (class rtx_reuse_manager): Likewise.
28387 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
28389         * bt-load.c (combine_btr_defs): Use auto_bitmap to manage bitmap
28390         lifetime.
28391         (migrate_btr_def): Likewise.
28392         * cfgloop.c (get_loop_body_in_bfs_order): Likewise.
28393         * df-core.c (loop_post_order_compute): Likewise.
28394         (loop_inverted_post_order_compute): Likewise.
28395         * hsa-common.h: Likewise.
28396         * hsa-gen.c (hsa_bb::~hsa_bb): Likewise.
28397         * init-regs.c (initialize_uninitialized_regs): Likewise.
28398         * ipa-inline.c (resolve_noninline_speculation): Likewise.
28399         (inline_small_functions): Likewise.
28400         * ipa-reference.c (ipa_reference_write_optimization_summary): Likewise.
28401         * ira.c (combine_and_move_insns): Likewise.
28402         (build_insn_chain): Likewise.
28403         * loop-invariant.c (find_invariants): Likewise.
28404         * lower-subreg.c (propagate_pseudo_copies): Likewise.
28405         * predict.c (tree_predict_by_opcode): Likewise.
28406         (predict_paths_leading_to): Likewise.
28407         (predict_paths_leading_to_edge): Likewise.
28408         (estimate_loops_at_level): Likewise.
28409         (estimate_loops): Likewise.
28410         * shrink-wrap.c (try_shrink_wrapping): Likewise.
28411         (spread_components): Likewise.
28412         * tree-cfg.c (remove_edge_and_dominated_blocks): Likewise.
28413         * tree-loop-distribution.c (rdg_build_partitions): Likewise.
28414         * tree-predcom.c (tree_predictive_commoning_loop): Likewise.
28415         * tree-ssa-coalesce.c (coalesce_ssa_name): Likewise.
28416         * tree-ssa-phionlycprop.c (pass_phi_only_cprop::execute): Likewise.
28417         * tree-ssa-pre.c (remove_dead_inserted_code): Likewise.
28418         * tree-ssa-sink.c (nearest_common_dominator_of_uses): Likewise.
28419         * tree-ssa-threadupdate.c (compute_path_counts): Likewise.
28420         (mark_threaded_blocks): Likewise.
28421         (thread_through_all_blocks): Likewise.
28422         * tree-ssa.c (verify_ssa): Likewise.
28423         (execute_update_addresses_taken): Likewise.
28424         * tree-ssanames.c (verify_ssaname_freelists): Likewise.
28426 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
28428         * cfganal.c (mark_dfs_back_edges): Replace manual stack with
28429         auto_vec.
28430         (post_order_compute): Likewise.
28431         (inverted_post_order_compute): Likewise.
28432         (pre_and_rev_post_order_compute_fn): Likewise.
28434 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
28436         * genrecog.c (int_set::int_set): Explicitly construct our
28437         auto_vec base class.
28438         * vec.h (auto_vec::auto_vec): New constructor.
28440 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
28442         * bitmap.h (class auto_bitmap): New constructor taking
28443         bitmap_obstack * argument.
28445 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
28447         * bitmap.h (class auto_bitmap): Change type of m_bits to
28448         bitmap_head, and adjust ctor / dtor and member operators.
28450 2017-05-13  Uros Bizjak  <ubizjak@gmail.com>
28452         * compare-elim.c (equivalent_reg_at_start): Return NULL_RTX
28453         when returned register mode doesn't match original mode.
28455 2017-05-12  Jeff Law  <law@redhat.com>
28456             Jakub Jelinek  <jakub@redhat.com>
28458         * config/mn10300/mn10300.c (mn10300_match_ccmode): Fix where
28459         we look for cc setter after the compare-elim changes.
28460         * config/mn10300/mn10300.md (addsi3_flags): Fix order of patterns
28461         within the vector to match what compare-elim now expects.
28462         (subsi3_flags, andsi3_flags, iorsi3_flags): Likewise.
28463         (xorsi3_flags, one_cmplsi2_flags): Likewise.
28465         * config/rx/rx.c (rx_match_ccmode): Fix where we look cc setter
28466         after the compare-elim changes.
28467         * config/rx/rx.md (abssi2_flags): Fix order of patterns within
28468         the vector to match what compare-elim now expects.
28469         (addsi3_flags, adc_flags, addsi3_flags peepholes): Likewise.
28470         (andsi3_flags, negsi2_flags, one_cmplsi2_flags): Likewise.
28471         (iorsi3_flags, rotlsi3_flags, rotrsi3_flags): Likewise.
28472         (ashrsi3_flags, lshrsi3_flags, ashlsi3_flags): Likewise.
28473         (ssaddsi3, subsi3_flags, sbb_flags, xorsi3_flags): Likewise.
28475         * config/visium/visium.c (single_set_and_flags): Fix where
28476         we look for cc setter after the compare-elim changes.
28477         * config/visium/visium.md (flags_subst_logic): Fix order of patterns
28478         with the vector to match what compare-elim now expects.
28479         (flags_subst_arith, add<mode>3_insn_set_carry): Likewise.
28480         (add<mode>3_insn_set_overflow, addsi3_insn_set_carry): Likewise.
28481         (addsi3_insn_set_overflow, sub<mode>3_insn_set_carry): Likewise.
28482         (sub<mode>3_insn_set_overflow, subsi3_insn_set_carry): Likewise.
28483         (subsi3_insn_set_overflow, negsi2_insn_set_carry): Likewise.
28484         (neg<mode>2_insn_set_overflow): Likewise.
28486 2017-05-12  Jim Wilson  <jim.wilson@linaro.org>
28488         PR middle-end/79794
28489         * expmed.c (extract_bit_field_1): Add alt_rtl argument.  Before
28490         maybe_expand_insn call, set ops[0].target.  If still set after call,
28491         set alt_rtl.  Add extra arg to recursive calls.
28492         (extract_bit_field): Add alt_rtl argument.  Pass to
28493         extract_bit_field.
28494         * expmed.h (extract_bit_field): Fix prototype.
28495         * expr.c (emit_group_load_1, copy_blkmode_from_reg)
28496         (copy_blkmode_to_reg, read_complex_part, store_field): Pass extra NULL
28497         to extract_bit_field_calls.
28498         (expand_expr_real_1): Pass alt_rtl to expand_expr_real instead of 0.
28499         Pass alt_rtl to extract_bit_field calls.
28500         * calls.c (store_unaligned_arguments_into_psuedos)
28501         load_register_parameters): Pass extra NULL to extract_bit_field calls.
28502         * optabs.c (maybe_legitimize_operand): Clear op->target when call
28503         gen_reg_rtx.
28504         * optabs.h (struct expand_operand): Add target bitfield.
28506 2017-05-12  Uros Bizjak  <ubizjak@gmail.com>
28508         * compare-elim.c (try_eliminate_compare): Canonicalize
28509         operation with embedded compare to
28510         [(set (reg:CCM) (compare:CCM (operation) (immediate)))
28511          (set (reg) (operation)].
28513         * config/i386/i386.c (TARGET_FLAGS_REGNUM): New define.
28515 2017-05-12  Uros Bizjak  <ubizjak@gmail.com>
28517         PR target/80723
28518         * config/i386/i386.c (ix86_rtx_cost) [case PLUS]: Ignore the
28519         cost of adding a carry flag for ADC instruction.
28520         [case MINUS]: Ignore the cost of subtracting a carry flag
28521         for SBB instruction.
28523 2017-05-12  Steven Munroe  <munroesj@gcc.gnu.org>
28525         * config.gcc (powerpc*-*-*): Add bmi2intrin.h, bmiintrin.h,
28526         and x86intrin.h
28527         * config/rs6000/bmiintrin.h: New file.
28528         * config/rs6000/bmi2intrin.h: New file.
28529         * config/rs6000/x86intrin.h: New file.
28531 2017-05-12  Jeff Law  <law@redhat.com>
28533         * tree-vrp.c (vrp_dom_walker::before_dom_children): Push unwinding
28534         markers.
28536 2017-05-12  Peter Bergner  <bergner@vnet.ibm.com>
28538         PR middle-end/80707
28539         * tree-cfg.c: Remove cfg edges of unreachable case statements.
28541 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
28543         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
28544         early expansion of vector divide builtins.
28545         (builtin_function_type): Add VSX_BUILTIN_UDIV_V2DI to the list of
28546         builtins identified as having unsigned arguments.
28548 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
28550         * config/rs6000/rs6000.c (gimple-fold.h): New #include.
28551         (rs6000_gimple_fold_builtin): Add handling for early GIMPLE
28552         expansion of vector logical operations (and, andc, or, xor,
28553         nor, orc, nand).
28555 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
28557         * gimple-fold.c (create_tmp_reg_or_ssa_name): Remove static declaration.
28558         * gimple-fold.h (create_tmp_reg_or_ssa_name): New prototype.
28560 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
28562         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
28563         early GIMPLE expansion of vector multiplies.
28565 2017-05-12  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
28567         * config/arm/arm.md (movsi): Add TARGET_32BIT in addition to the
28568         TARGET_HAVE_MOVT conditional.
28569         (movt splitter): Likewise.
28571 2017-05-12  Richard Biener  <rguenther@suse.de>
28573         * tree-ssa-sccvn.h (has_VN_INFO): Declare.
28574         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
28575         Fold all stmts not inplace.
28577 2017-05-12  Richard Biener  <rguenther@suse.de>
28579         PR tree-optimization/80713
28580         * tree-ssa-pre.c (remove_dead_inserted_code): Clear
28581         inserted_exprs bit for not removed stmts.
28583 2017-05-12  Thomas Schwinge  <thomas@codesourcery.com>
28585         PR middle-end/69921
28586         * tree-parloops.c (create_parallel_loop): Set "oacc kernels
28587         parallelized" attribute for parallelized OpenACC kernels.
28588         * omp-offload.c (execute_oacc_device_lower): Use it.
28590         * omp-expand.c (expand_omp_target) <GF_OMP_TARGET_KIND_OACC_KERNELS>:
28591         Set "oacc kernels" attribute.
28592         * omp-general.c (oacc_set_fn_attrib): Remove is_kernel formal
28593         parameter.  Adjust all users.
28594         (oacc_fn_attrib_kernels_p): Remove function.
28595         * omp-offload.c (execute_oacc_device_lower): Look for "oacc
28596         kernels" attribute instead of calling oacc_fn_attrib_kernels_p.
28597         * tree-ssa-loop.c (gate_oacc_kernels): Likewise.
28598         * tree-parloops.c (create_parallel_loop): If oacc_kernels_p,
28599         assert "oacc kernels" attribute is set.
28601 2017-05-11  Carl Love  <cel@us.ibm.com>
28603         * config/rs6000/rs6000-c: Add support for built-in functions
28604         vector unsigned char vec_popcnt (vector signed char)
28605         vector unsigned char vec_popcnt (vector unsigned char)
28606         vector unsigned short vec_popcnt (vector signed short)
28607         vector unsigned short vec_popcnt (vector unsigned short)
28608         vector unsigned int vec_popcnt (vector signed int)
28609         vector unsigned int vec_popcnt (vector unsigned int)
28610         vector unsigned long long vec_popcnt (vector signed long long)
28611         vector unsigned long long vec_popcnt (vector unsigned long long)
28612         vector signed long long vec_slo (vector signed long long,
28613                                          vector signed char)
28614         vector signed long long vec_slo (vector signed long long,
28615                                          vector unsigned char)
28616         vector unsigned long long vec_slo (vector unsigned long long,
28617                                            vector signed char)
28618         vector unsigned long long vec_slo (vector unsigned long long,
28619                                            vector unsigned char)
28620         * config/rs6000/rs6000-builtin.def: Add definitions for VPOPCNTUB,
28621         VPOPCNTUH, VPOPCNTUW, and VPOPCNTUD overloads.
28622         * config/rs6000/altivec.h: Add define for vec_popcnt, vec_popcntb,
28623         vec_popcnth, vec_popcntw and vec_popcntd built-in functions.
28624         * doc/extend.texi: Update the built-in documentation file for the
28625         new built-in functions.
28627 2017-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
28629         * attribs.h (sorted_attr_string): Move machine independent
28630         functions for target clone support from the i386 port to common
28631         code.  Rename ix86_function_versions to common_function_versions.
28632         Rename make_name to make_unique_name.
28633         (common_function_versions): Likewise.
28634         (make_unique_name): Likewise.
28635         (make_dispatcher_decl): Likewise.
28636         (is_function_default_version): Likewise.
28637         * attribs.c (attr_strcmp): Likewise.
28638         (sorted_attr_string): Likewise.
28639         (common_function_versions): Likewise.
28640         (make_unique_name): Likewise.
28641         (make_dispatcher_decl): Likewise.
28642         (is_function_default_version): Likewise.
28643         * config/i386/i386.c (attr_strcmp): Likewise.
28644         (sorted_attr_string): Likewise.
28645         (ix86_function_versions): Likewise.
28646         (make_name): Likewise.
28647         (make_dispatcher_decl): Likewise.
28648         (is_function_default_version): Likewise.
28649         (TARGET_OPTION_FUNCTION_VERSIONS): Update target function hook.
28651 2017-05-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28653         PR target/80695
28654         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
28655         Account for direct move costs for vec_construct of integer
28656         vectors.
28658 2017-05-11  Uros Bizjak  <ubizjak@gmail.com>
28660         PR target/80706
28661         * config/i386/sync.md (UNSPEC_LDX_ATOMIC): New unspec.
28662         (UNSPEC_STX_ATOMIC): Ditto.
28663         (loaddi_via_sse): New insn.
28664         (storedi_via_sse): Ditto.
28665         (atomic_loaddi_fpu): Emit loaddi_via_sse and storedi_via_sse.
28666         Update corresponding peephole2 patterns.
28667         (atomic_storedi_fpu): Ditto.
28669 2017-05-11  Julia Koval  <julia.koval@intel.com>
28671         * config/i386/avx512fintrin.h (_mm_mask_rsqrt14_sd)
28672         (_mm_maskz_rsqrt14_sd, _mm_mask_rsqrt14_ss, _mm_maskz_rsqrt14_ss):
28673         New intrinsics.
28674         * config/i386/i386-builtin.def (__builtin_ia32_rsqrt14sd_mask)
28675         (__builtin_ia32_rsqrt14ss_mask): New builtins.
28676         * config/i386/sse.md (rsqrt14_<mode>_mask): New pattern.
28678 2017-05-11  Nathan Sidwell  <nathan@acm.org>
28680         * graphite-poly.c: Include dumpfile.h.
28682         * dumpfle.h (dump_function): Declare here ...
28683         * tree-dump.h (dump_function): ... not here.
28684         * dumpfile.c: #include tree-cfg.h.
28685         (dump_function): Move here from ...
28686         * tree-dump.c (dump_function): ... here.
28687         * gimplify.c: #include splay-tree.h, not tree-dump.h.
28688         * graphite-poly.c: Don't include tree-dump.h.
28689         * cgraphclones.c: Include dumpfile.h not tree-dump.h.
28690         * print-tree.c: Likewise.
28691         * stor-layout.c: Likewise.
28692         * tree-nested.c: Likewise.
28694         * dumpfile.c (dump_start): Use TDF_FLAGS.
28695         (dump_enable_all): Fix TDF_KIND check thinko.
28697 2017-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
28699         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
28700         array entries to represent two legal parameterizations of the
28701         overloaded __builtin_cmpb function, as represented by the
28702         P6_OV_BUILTIN_CMPB constant.
28703         (altivec_resolve_overloaded_builtin): Add special case handling
28704         for the __builtin_cmpb function, as represented by the
28705         P6_OV_BUILTIN_CMPB constant.
28706         * config/rs6000/rs6000-builtin.def (BU_P6_2): New macro.
28707         (BU_P6_64BIT_2): New macro.
28708         (BU_P6_OVERLOAD_2): New macro
28709         (CMPB_32): Add 32-bit compare-bytes support for 32-bit only targets.
28710         (CMPB): Add 64-bit compare-bytes support for 32-bit and 64-bit targets.
28711         (CMPB): Add overload support to represent both 32-bit and 64-bit
28712         compare-bytes function.
28713         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
28714         support for TARGET_CMPB.
28715         * config/rs6000/rs6000.h: Add support for RS6000_BTM_CMPB.
28716         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
28717         documentation of the __builtin_cmpb overloaded built-in function.
28719 2017-05-11  Richard Biener  <rguenther@suse.de>
28721         PR tree-optimization/80705
28722         * tree-vect-data-refs.c (vect_analyze_data_refs): DECL_NONALIASED
28723         bases are not vectorizable.
28725 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
28727         * tree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger
28728         when counting register pressure.
28730 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
28732         * tree-ssa-loop-ivopts.c (compare_cost_pair): New.
28733         (iv_ca_more_deps): Renamed to ...
28734         (iv_ca_compare_deps): ... this.
28735         (iv_ca_extend): Extend iv_ca if NEW_CP is cheaper than OLD_CP.
28737 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
28739         * tree-ssa-loop-ivopts.c (find_interesting_uses): Move inv vars dump
28740         to ...
28741         (determine_group_iv_costs): ... here.
28742         (find_inv_vars_cb): Record inv var if it's not recorded before.
28744 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
28746         * tree-ssa-loop-ivopts.c (allow_ip_end_pos_p): Refine comments.
28747         (get_shiftadd_cost): Ditto.
28749 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
28751         * tree-ssa-address.c: Include header file.
28752         (move_hint_to_base): Return TRUE if BASE_HINT is moved to memory
28753         address.
28754         (add_to_parts): Refactor.
28755         (addr_to_parts): New parameter.  Update use of move_hint_to_base.
28756         (create_mem_ref): Update use of addr_to_parts.  Re-associate addr
28757         in new order.
28759 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
28761         PR tree-optimization/53090
28762         * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New enum value
28763         COMP_IV_EXPR_2.
28764         (extract_cond_operands): Detect condition with IV on both sides
28765         and return COMP_IV_EXPR_2.
28766         (find_interesting_uses_cond): Add iv_use for both IVs in condition.
28767         (rewrite_use_compare): Simplify by removing call to function
28768         extract_cond_operands.
28770 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
28772         * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New.
28773         (extract_cond_operands): Detect condition comparing against non-
28774         invariant bound and return appropriate enum value.
28775         (find_interesting_uses_cond): Update use of extract_cond_operands.
28776         Handle its return value accordingly.
28777         (determine_group_iv_cost_cond, rewrite_use_compare): Ditto.
28779 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
28781         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Re-associate
28782         nonlinear iv_use computation in loop invariant sensitive way.
28784 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
28786         * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.
28787         (find_iv_candidates): Call relate_compare_use_with_all_cands.
28789 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
28791         * tree-ssa-loop-ivopts.c (struct iv_cand): New field inv_exprs.
28792         (dump_cand): Support iv_cand.inv_exprs.
28793         (add_candidate_1): Record invariant exprs in iv_cand.inv_exprs
28794         for candidates.
28795         (iv_ca_set_no_cp, iv_ca_set_cp, free_loop_data): Support
28796         iv_cand.inv_exprs.
28798 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
28800         * tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Move
28801         from ...
28802         * tree-ssa-address.c (multiplier_allowed_in_address_p): ... to here
28803         as local function.  Include necessary header files.
28804         * tree-ssa-loop-ivopts.h (multiplier_allowed_in_address_p): Delete.
28806 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
28808         * tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify.
28810 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
28812         * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Handle more
28813         operators: TRUNC_DIV_EXPR, BIT_AND_EXPR, BIT_IOR_EXPR, LSHIFT_EXPR,
28814         RSHIFT_EXPR and BIT_NOT_EXPR.
28816 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
28818         * tree-ssa-loop-ivopts.c (get_loop_invariant_expr): Simplify.
28819         (adjust_setup_cost): New parameter supporting round up adjustment.
28820         (struct address_cost_data): Delete.
28821         (force_expr_to_var_cost): Don't bound cost with spill_cost.
28822         (split_address_cost, ptr_difference_cost): Delete.
28823         (difference_cost, compare_aff_trees, record_inv_expr): Delete.
28824         (struct ainc_cost_data): New struct.
28825         (get_address_cost_ainc): New function.
28826         (get_address_cost, get_computation_cost): Reimplement.
28827         (determine_group_iv_cost_address): Record inv_expr for all uses of
28828         a group.
28829         (determine_group_iv_cost_cond): Call get_loop_invariant_expr.
28830         (iv_ca_has_deps): Reimplemented to ...
28831         (iv_ca_more_deps): ... this.  Check if NEW_CP introduces more deps
28832         than OLD_CP.
28833         (iv_ca_extend): Call iv_ca_more_deps.
28835 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
28837         * tree-ssa-address.c (struct mem_address): Move to header file.
28838         (valid_mem_ref_p, move_fixed_address_to_symbol): Make it global.
28839         * tree-ssa-address.h (struct mem_address): Move from C file.
28840         (valid_mem_ref_p, move_fixed_address_to_symbol): Declare.
28842 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
28844         * tree-affine.h (aff_combination_type): New interface.
28845         (aff_combination_zero_p): Remove static.
28846         (aff_combination_const_p): New interface.
28847         (aff_combination_singleton_var_p): New interfaces.
28849 2017-05-11  Richard Biener  <rguenther@suse.de>
28851         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
28852         Skip unreachable blocks and destinations.
28853         (eliminate): Move stmt removal and fixup ...
28854         (fini_eliminate): ... here.  Skip inserted exprs.
28855         (pass_pre::execute): Move fini_pre after fini_eliminate.
28856         * tree-ssa-tailmerge.c: Include tree-cfgcleanup.h.
28857         (tail_merge_optimize): Run cleanup_tree_cfg if requested by
28858         PRE to get rid of dead code that has invalid SSA form and
28859         split critical edges again.
28861 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
28863         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
28865 2017-05-11  Richard Biener  <rguenther@suse.de>
28867         * passes.c (execute_function_todo): Verify loops if they are
28868         said to be up-to-date.
28869         * cfgexpand.c (pass_expand::execute): Discard loops for -dx.
28870         * trans-mem.c (pass_tm_edges::execute): Mark loops for fixup.
28872 2017-05-10  John David Anglin  <danglin@gcc.gnu.org>
28874         PR target/80090
28875         * config/pa/pa.c (pa_assemble_integer): When outputting a SYMBOL_REF,
28876         handle calling assemble_external ourself.
28878         PR target/79027
28879         * config/pa/pa.c (pa_cannot_change_mode_class): Reject changes to/from
28880         modes with zero size.  Enhance comment.
28882 2017-05-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28884         * config/rs6000/rs6000.c (altivec_init_builtins): Define POWER8
28885         built-ins for vec_xl and vec_xst with short and char pointer
28886         arguments.
28888 2017-05-10  Sebastian Peryt  <sebastian.peryt@intel.com>
28890         * config/i386/avx512fintrin.h (_mm_mask_max_round_sd)
28891         (_mm_maskz_max_round_sd, _mm_mask_max_round_ss)
28892         (_mm_maskz_max_round_ss, _mm_mask_min_round_sd)
28893         (_mm_maskz_min_round_sd, _mm_mask_min_round_ss)
28894         (_mm_maskz_min_round_ss): New intrinsics.
28895         * config/i386/i386-builtin-types.def (V2DF, V2DF, V2DF, V2DF, UQI, INT)
28896         (V4SF, V4SF, V4SF, V4SF, UQI, INT): New function type aliases.
28897         * config/i386/i386-builtin.def (__builtin_ia32_maxsd_mask_round)
28898         (__builtin_ia32_maxss_mask_round, __builtin_ia32_minsd_mask_round)
28899         (__builtin_ia32_minss_mask_round): New builtins.
28900         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
28901         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
28902         * config/i386/sse.md (<sse>_vm<code><mode>3<round_saeonly_name>):
28903         Rename to ...
28904         (<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): ... this.
28905         (v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|%0, %1, %<iptr>2<round_saeonly_op3>}):
28906         Change to ...
28907         (v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}):
28908         ... this.
28910 2017-05-10  Sebastian Peryt  <sebastian.peryt@intel.com>
28912         * config/i386/avx512fintrin.h (_mm_mask_mul_round_sd)
28913         (_mm_maskz_mul_round_sd, _mm_mask_mul_round_ss)
28914         (_mm_maskz_mul_round_ss, _mm_mask_div_round_sd)
28915         (_mm_maskz_div_round_sd, _mm_mask_div_round_ss)
28916         (_mm_maskz_div_round_ss, _mm_mask_mul_sd, _mm_maskz_mul_sd)
28917         (_mm_mask_mul_ss, _mm_maskz_mul_ss, _mm_mask_div_sd)
28918         (_mm_maskz_div_sd, _mm_mask_div_ss, _mm_maskz_div_ss): New intrinsics.
28919         * config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
28920         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
28921         * config/i386/i386-builtin.def (__builtin_ia32_divsd_mask_round)
28922         (__builtin_ia32_divss_mask_round, __builtin_ia32_mulsd_mask_round)
28923         (__builtin_ia32_mulss_mask_round): New builtins.
28924         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
28925         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
28926         * config/i386/sse.md (<sse>_vm<multdiv_mnemonic><mode>3<round_name>):
28927         Rename to ...
28928         (<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): ... this.
28929         (v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
28930         Change to ...
28931         (v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
28932         ... this.
28934 2017-05-10  Julia Koval  <julia.koval@intel.com>
28936         * config/i386/avxintrin.h (_mm256_set_m128, _mm256_set_m128d)
28937         (_mm256_set_m128i, _mm256_setr_m128, _mm256_setr_m128d)
28938         (_mm256_setr_m128i): New intrinsics.
28940 2017-05-10  Julia Koval  <julia.koval@intel.com>
28942         * config/i386/avx512fintrin.h (_mm_mask_rcp14_sd)
28943         (_mm_maskz_rcp14_sd, _mm_mask_rcp14_ss)
28944         (_mm_maskz_rcp14_ss): New intrinsics.
28945         * config/i386/i386-builtin.def (__builtin_ia32_rcp14sd_mask)
28946         (__builtin_ia32_rcp14ss_mask): New builtins.
28947         * config/i386/sse.md (srcp14<mode>_mask): New pattern.
28949 2017-05-10  Peter Bergner  <bergner@vnet.ibm.com>
28951         PR tree-optimization/51513
28952         * tree-cfg.c (gimple_seq_unreachable_p): New function.
28953         (assert_unreachable_fallthru_edge_p): Use it.
28954         (group_case_labels_stmt): Likewise.
28955         * tree-cfg.h: Prototype it.
28956         * stmt.c: Include cfghooks.h and tree-cfg.h.
28957         (emit_case_dispatch_table) <gap_label>: New local variable.
28958         Use it to fill dispatch table gaps.
28959         Test for default_label before updating probabilities.
28960         (expand_case) <default_label>: Remove unneeded initialization.
28961         Test for unreachable default case statement and remove its edge.
28962         Set default_label accordingly.
28963         * tree-ssa-ccp.c (optimize_unreachable): Update comment.
28965 2017-05-10  Carl Love  <cel@us.ibm.com>
28967         * config/rs6000/rs6000-c: Add support for built-in functions
28968         vector signed char      vec_neg (vector signed char)
28969         vector signed short int vec_neg (vector short int)
28970         vector signed int       vec_neg (vector signed int)
28971         vector signed long long vec_neg (vector signed long long)
28972         vector float            vec_neg (vector float)
28973         vector double           vec_neg (vector double)
28974         * config/rs6000/rs6000-builtin.def: Add definitions for NEG function
28975         overload.
28976         * config/rs6000/altivec.h: Add define for vec_neg
28977         * doc/extend.texi: Update the built-in documentation for the
28978         new built-in functions.
28980 2017-05-10  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
28982         PR tree-optimization/77644
28983         * match.pd (sqrt(x) cmp sqrt(y) -> x cmp y): New pattern.
28985 2017-05-10  Nathan Sidwell  <nathan@acm.org>
28987         * dumpfile.h (TDI_lang_all): New.
28988         (TDF_KIND): New. Renumber others
28989         (TDF_LANG, TDF_TREE, TDF_RTL, TDF_IPA): Enumerate value, rather
28990         than bits.
28991         * dumpfile.c (dump_files): Mark language dumps as TDF_LANG.  add
28992         lang-all.
28993         (get_dump_file_name): Adjust suffix generation.
28994         (dump_enable_all): Use TDF_KIND.
28995         * doc/invoke.texi (-fdump-lang-all): Document.
28997         * dumpfile.h: Tabify.
28999 2017-05-10  Wilco Dijkstra  <wdijkstr@arm.com>
29001         PR target/80671
29002         * config/aarch64/cortex-a57-fma-steering.c (merge_forest):
29003         Move member access before delete.
29005 2017-05-10  Alexandre Oliva  <aoliva@redhat.com>
29007         * tree-inline.c (expand_call_inline): Split block at stmt
29008         before the call.
29010 2017-05-09  Michael Meissner  <meissner@linux.vnet.ibm.com>
29012         PR target/68163
29013         * config/rs6000/rs6000.md (f32_lr): Delete mode attributes that
29014         are now unused after splitting mov{sf,sd}_hardfloat.
29015         (f32_lr2): Likewise.
29016         (f32_lm): Likewise.
29017         (f32_lm2): Likewise.
29018         (f32_li): Likewise.
29019         (f32_li2): Likewise.
29020         (f32_lv): Likewise.
29021         (f32_sr): Likewise.
29022         (f32_sr2): Likewise.
29023         (f32_sm): Likewise.
29024         (f32_sm2): Likewise.
29025         (f32_si): Likewise.
29026         (f32_si2): Likewise.
29027         (f32_sv): Likewise.
29028         (f32_dm): Likewise.
29029         (f32_vsx): Likewise.
29030         (f32_av): Likewise.
29031         (mov<mode>_hardfloat): Split into separate movsf and movsd pieces.
29032         For movsf, order stores so the VSX stores occur before the GPR
29033         store which encourages the register allocator to use a traditional
29034         FPR instead of a GPR.  For movsd, order the stores so that the GPR
29035         store comes before the VSX stores to allow the power6 to work.
29036         This is due to the power6 not having a 32-bit integer store
29037         instruction from a FPR.
29038         (movsf_hardfloat): Likewise.
29039         (movsd_hardfloat): Likewise.
29041 2017-05-09  Martin Sebor  <msebor@redhat.com>
29043         PR translation/80280
29044         * config/sol2-c.c (cmn_err_flag_specs): Initialize new data member
29045         added in r247778.
29047         PR translation/80280
29048         * config/i386/msformat-c.c (ms_printf_flag_specs): Initialize new
29049         data member added in r247778.
29050         (ms_scanf_flag_specs, ms_strftime_flag_specs): Same.
29052 2017-05-09  Nathan Sidwell  <nathan@acm.org>
29054         * tree.h (tree_fits_shwi_p, tree_fits_uhwi_p): Unconditionally pure.
29056         * ipa-devirt.c (default_hash_traits<type_pair>): Skip struct-scope
29057         typedefs.
29059 2017-05-09  Marek Polacek  <polacek@redhat.com>
29061         * doc/invoke.texi: Fix typo.
29063 2017-05-09  Richard Biener  <rguenther@suse.de>
29065         * tree-vrp.c (vrp_val_is_max): Adjust comment.
29066         (vrp_val_is_min): Likewise.
29067         (set_value_range_to_value): Likewise.
29068         (set_value_range_to_nonnegative): Likewise.
29069         (gimple_assign_nonzero_p): Likewise.
29070         (gimple_stmt_nonzero_p): Likewise.
29071         (vrp_int_const_binop): Likewise.  Remove unreachable case.
29072         (adjust_range_with_scev): Adjust comments.
29073         (compare_range_with_value): Likewise.
29074         (extract_range_from_phi_node): Likewise.
29075         (test_for_singularity): Likewise.
29077 2017-05-09  Richard Biener  <rguenther@suse.de>
29079         * tree-vrp.c (get_single_symbol): Add assert that we don't
29080         get overflowed constants as invariant part.
29081         (compare_values_warnv): Add comment before the TREE_NO_WARNING
29082         checks.  Use wi::cmp instead of recursing for integer constants.
29083         (compare_values): Just ignore whether we assumed undefined
29084         overflow instead of failing the compare.
29085         (extract_range_for_var_from_comparison_expr): Add comment before the
29086         TREE_NO_WARNING sets.
29087         (test_for_singularity): Likewise.
29088         (extract_range_from_comparison): Do not disable optimization
29089         when we assumed undefined overflow.
29090         (extract_range_basic): Remove init of unused var.
29092 2017-05-09  Richard Biener  <rguenther@suse.de>
29094         * tree-vrp.c (vrp_int_const_binop): Use wide-ints and simplify.
29095         (extract_range_from_multiplicative_op_1): Adjust.
29096         (extract_range_from_binary_expr_1): Use int_const_binop.
29098 2017-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
29100         PR target/80101
29101         * config/rs6000/power6.md: Replace store_data_bypass_p calls with
29102         rs6000_store_data_bypass_p in seven define_bypass directives and
29103         in several comments.
29104         * config/rs6000/rs6000-protos.h: Add prototype for
29105         rs6000_store_data_bypass_p function.
29106         * config/rs6000/rs6000.c (rs6000_store_data_bypass_p): New
29107         function implements slightly different (rs6000-specific) semantics
29108         than store_data_bypass_p, returning false rather than aborting
29109         with assertion error when arguments do not satisfy the
29110         requirements of store data bypass.
29111         (rs6000_adjust_cost): Replace six calls of store_data_bypass_p with
29112         rs6000_store_data_bypass_p.
29114 2017-05-08  Max Filippov  <jcmvbkbc@gmail.com>
29116         * config/xtensa/xtensa-protos.h
29117         (xtensa_initial_elimination_offset): New declaration.
29118         * config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
29119         New function. Move its body from the INITIAL_ELIMINATION_OFFSET
29120         macro definition, add case for FRAME_POINTER_REGNUM when
29121         FRAME_GROWS_DOWNWARD.
29122         * config/xtensa/xtensa.h (FRAME_GROWS_DOWNWARD): New macro definition.
29123         (INITIAL_ELIMINATION_OFFSET): Replace body with call to
29124         xtensa_initial_elimination_offset.
29126 2017-05-08  Nathan Sidwell  <nathan@acm.org>
29128         * doc/invoke.texi: Alphabetize -fdump options.
29130 2017-05-08  Martin Sebor  <msebor@redhat.com>
29132         PR translation/80280
29133         * config/sol2-c.c (solaris_pragma_align): Correct quoting.
29135 2017-05-08  Bernd Edlinger  <bernd.edlinger@hotmail.de>
29137         * target.def (compute_frame_layout): New optional target hook.
29138         * doc/tm.texi.in (TARGET_COMPUTE_FRAME_LAYOUT): Add hook.
29139         * doc/tm.texi (TARGET_COMPUTE_FRAME_LAYOUT): Add documentation.
29140         * lra-eliminations.c (update_reg_eliminate): Call compute_frame_layout
29141         target hook.
29142         * reload1.c (verify_initial_elim_offsets): Likewise.
29143         * config/arm/arm.c (TARGET_COMPUTE_FRAME_LAYOUT): Define.
29144         (use_simple_return_p): Call arm_compute_frame_layout if needed.
29145         (arm_get_frame_offsets): Split up into this ...
29146         (arm_compute_frame_layout): ... and this function.
29148 2017-05-08  Richard Sandiford  <richard.sandiford@arm.com>
29150         * config/aarch64/constraints.md (Usa): New constraint.
29151         * config/aarch64/aarch64.md (*movsi_aarch64, *movdi_aarch64): Use it.
29153 2017-05-08  Thomas Preud'homme  <thomas.preudhomme@arm.com>
29155         * config.gcc (arm*-*-*): Set TM_MULTILIB_CONFIG from
29156         with_multilib_list after it has been checked.
29158 2017-05-08  Richard Biener  <rguenther@suse.de>
29160         * tree-ssa-pre.c (bitmap_set_and): Avoid bitmap copy.
29161         (bitmap_set_subtract_values): Likewise.
29163 2017-05-08  Richard Biener  <rguenther@suse.de>
29165         * tree-vrp.c (gimple_assign_nonzero_warnv_p): Rename to ...
29166         (gimple_assign_nonzero): ... this and remove strict_overflow_p
29167         argument.
29168         (gimple_stmt_nonzero_warnv_p): Rename to ...
29169         (gimple_stmt_nonzero_p): ... this and remove strict_overflow_p
29170         argument.
29171         (vrp_stmt_computes_nonzero): Remove strict_overflow_p argument.
29172         (extract_range_basic): Adjust, do not disable propagation on
29173         strict overflow sensitive simplification.
29174         (vrp_visit_cond_stmt): Likewise.
29176 2017-05-05  Jan Hubicka  <hubicka@ucw.cz>
29178         * ipa-inline-analysis.c (estimate_function_body_sizes): Recompute
29179         body size unconditionally.
29181 2017-05-07  Jeff Law  <law@redhat.com>
29183         Revert:
29184         2017-05-06  Jeff Law  <law@redhat.com>
29185         PR tree-optimization/78496
29186         * tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
29187         code.
29189         PR tree-optimization/78496
29190         * tree-vrp.c (simplify_assert_expr_using_ranges): New function.
29191         (simplify_stmt_using_ranges): Call it.
29192         (vrp_dom_walker::before_dom_children): Extract equivalences
29193         from an ASSERT_EXPR with an equality comparison against a
29194         constant.
29196 2017-05-06  Jeff Law  <law@redhat.com>
29198         PR tree-optimization/78496
29199         * tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
29200         code.
29202         PR tree-optimization/78496
29203         * tree-vrp.c (simplify_assert_expr_using_ranges): New function.
29204         (simplify_stmt_using_ranges): Call it.
29205         (vrp_dom_walker::before_dom_children): Extract equivalences
29206         from an ASSERT_EXPR with an equality comparison against a
29207         constant.
29209 2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
29211         * lra-constraints.c (lra_copy_reg_equiv): New function.
29212         (split_reg): Use it to copy equivalence information from the
29213         original register to the spill register.
29215 2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
29217         PR rtl-optimization/75964
29218         * simplify-rtx.c (simplify_const_relational_operation): Remove
29219         invalid handling of comparisons of integer ABS.
29221 2017-05-06  Uros Bizjak  <ubizjak@gmail.com>
29223         * config/i386/i386.c (ext_80387_constant_init): Do not explicitly
29224         initialize to zero.
29225         (init_regs): Remove declaration.
29226         (function_arg_advance_32): Initialize error_p as boolean variable.
29228 2017-05-05  Nathan Sidwell  <nathan@acm.org>
29230         * store-motion.c (remove_reachable_equiv_notes): Reformat long
29231         lines.  Use for (;;).
29233 2017-05-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29235         * config/rs6000/rs6000.c (rs6000_vect_nonmem): New static var.
29236         (rs6000_init_cost): Initialize rs6000_vect_nonmem.
29237         (rs6000_add_stmt_cost): Update rs6000_vect_nonmem.
29238         (rs6000_finish_cost): Avoid vectorizing simple copy loops with
29239         VF=2 that require versioning.
29241 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
29243         * diagnostic.h (CARET_LINE_MARGIN): Convert from macro to const
29244         int.
29246 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
29248         * diagnostic.h (diagnostic_override_option_index): Convert from
29249         macro to inline function.
29251 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
29253         * diagnostic.c (last_module_changed_p): New function.
29254         (set_last_module): New function.
29255         (diagnostic_report_current_module): Convert macro usage to
29256         the above functions.
29257         * diagnostic.h (diagnostic_context::last_module): Strengthen
29258         from const line_map * to const line_map_ordinary *.
29259         (diagnostic_last_module_changed): Delete macro.
29260         (diagnostic_set_last_module): Delete macro.
29262 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
29264         * diagnostic.c (diagnostic_impl): Replace report_diagnostic
29265         with diagnostic_report_diagnostic.
29266         (diagnostic_n_impl_richloc): Likewise.
29267         * diagnostic.h (report_diagnostic): Delete macro.
29268         * rtl-error.c (diagnostic_for_asm): Replace report_diagnostic
29269         with diagnostic_report_diagnostic.
29270         * substring-locations.c (format_warning_va): Likewise.
29272 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
29274         * diagnostic.c (diagnostic_report_diagnostic): Eliminate
29275         save/restor of format_spec.  Move option-printing code to...
29276         (print_option_information): ...this new function, and
29277         reimplement by simply printing to the pretty_printer,
29278         rather than appending to the format string.
29280 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
29282         * diagnostic.c (diagnostic_report_diagnostic): Split out pragma
29283         handling logic into...
29284         (update_effective_level_from_pragmas): ...this new function.
29286 2017-05-04  Andrew Waterman  <andrew@sifive.com>
29288         * config/riscv/riscv.opt (mstrict-align): New option.
29289         * config/riscv/riscv.h (STRICT_ALIGNMENT): Use it.  Update comment.
29290         (SLOW_UNALIGNED_ACCESS): Define.
29291         (riscv_slow_unaligned_access): Declare.
29292         * config/riscv/riscv.c (riscv_tune_info): Add slow_unaligned_access
29293         field.
29294         (riscv_slow_unaligned_access): New variable.
29295         (rocket_tune_info): Set slow_unaligned_access to true.
29296         (optimize_size_tune_info): Set slow_unaligned_access to false.
29297         (riscv_cpu_info_table): Add entry for optimize_size_tune_info.
29298         (riscv_valid_lo_sum_p): Use TARGET_STRICT_ALIGN.
29299         (riscv_option_override): Set riscv_slow_unaligned_access.
29300         * doc/invoke.texi: Add -mstrict-align to RISC-V.
29302 2017-05-04  Kito Cheng  <kito.cheng@gmail.com>
29304         * config/riscv/riscv.md: Unify indentation.
29306 2017-05-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
29308         PR target/79038
29309         PR target/79202
29310         PR target/79203
29311         * config/rs6000/rs6000.md (u code attribute): Add FIX and
29312         UNSIGNED_FIX.
29313         (extendsi<mode>2): Add support for doing sign extension via
29314         VUPKHSW and XXPERMDI if the value is in Altivec registers and we
29315         don't have ISA 3.0 instructions.
29316         (extendsi<mode>2 splitter): Likewise.
29317         (fix_trunc<mode>si2): If we are at ISA 2.07 (VSX small integer),
29318         generate the normal insns since SImode can now go in vector
29319         registers.  Disallow the special UNSPECs needed for previous
29320         machines to hide SImode being used.  Add new insns
29321         fctiw{,w}_<mode>_smallint if SImode can go in vector registers.
29322         (fix_trunc<mode>si2_stfiwx): Likewise.
29323         (fix_trunc<mode>si2_internal): Likewise.
29324         (fixuns_trunc<mode>si2): Likewise.
29325         (fixuns_trunc<mode>si2_stfiwx): Likewise.
29326         (fctiw<u>z_<mode>_smallint): Likewise.
29327         (fctiw<u>z_<mode>_mem): New combiner pattern to prevent conversion
29328         of floating point to 32-bit integer from doing a direct move to
29329         the GPR registers to do a store.
29330         (fctiwz_<mode>): Break long line.
29332 2017-05-05  Bin Cheng  <bin.cheng@arm.com>
29334         * Makefile.in (GTFILES): Add tree-ssa-loop-ivopts.c.
29335         * tree-ssa-loop-ivopts.c (compute_max_addr_offset): Delete.
29336         (addr_list, addr_offset_valid_p): New.
29337         (split_address_groups): Check offset validity with above function.
29338         (gt-tree-ssa-loop-ivopts.h): Include header file.
29340 2017-05-05  Nathan Sidwell  <nathan@acm.org>
29342         * config.gcc (arm*-*-*): Add missing 'fi'.
29344 2017-05-05  Steve Ellcey  <sellcey@cavium.com>
29346         * doc/invoke.texi (-fopt-info): Explicitly say order of options
29347         included in -fopt-info does not matter.
29348         * doc/optinfo.texi (-fopt-info): Fix description of default
29349         behavour. Explicitly say order of options included in -fopt-info
29350         does not matter.
29352 2017-05-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>
29354         * config.gcc: Allow combinations of aprofile and rmprofile values for
29355         --with-multilib-list.
29356         * config/arm/t-multilib: New file.
29357         * config/arm/t-aprofile: Remove initialization of MULTILIB_*
29358         variables.  Remove setting of ISA and floating-point ABI in
29359         MULTILIB_OPTIONS and MULTILIB_DIRNAMES.  Set architecture and FPU in
29360         MULTI_ARCH_OPTS_A and MULTI_ARCH_DIRS_A rather than MULTILIB_OPTIONS
29361         and MULTILIB_DIRNAMES respectively.  Add comment to introduce all
29362         matches.  Add architecture matches for marvel-pj4 and generic-armv7-a
29363         CPU options.
29364         * config/arm/t-rmprofile: Likewise except for the matches changes.
29365         * doc/install.texi (--with-multilib-list): Document the combination of
29366         aprofile and rmprofile values and warn about pitfalls in doing that.
29368 2017-05-05  Wilco Dijkstra  <wdijkstr@arm.com>
29370         * config/aarch64/aarch64.md (movsi_aarch64): Remove '*' from r=w.
29371         (movdi_aarch64): Likewise.
29373 2017-05-05  Jakub Jelinek  <jakub@redhat.com>
29375         PR tree-optimization/80632
29376         * tree-switch-conversion.c (struct switch_conv_info): Add target_vop
29377         field.
29378         (build_arrays): Initialize it for virtual phis.
29379         (fix_phi_nodes): Use it for virtual phis.
29381         PR tree-optimization/80558
29382         * tree-vrp.c (extract_range_from_binary_expr_1): Optimize
29383         [x, y] op z into [x op, y op z] for op & or | if conditions
29384         are met.
29386 2017-05-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
29387             Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
29389         PR target/71607
29390         * config/arm/arm.md (use_literal_pool): Remove.
29391         (64-bit immediate split): No longer takes cost into consideration
29392         if arm_disable_literal_pool is enabled.
29393         * config/arm/arm.c (arm_tls_referenced_p): Add diagnostic if TLS is
29394         used when arm_disable_literal_pool is enabled.
29395         (arm_max_const_double_inline_cost): Remove use of
29396         arm_disable_literal_pool.
29397         (push_minipool_fix): Add assert.
29398         (arm_reorg): Add return if arm_disable_literal_pool is enabled.
29399         * config/arm/vfp.md (no_literal_pool_df_immediate): New.
29400         (no_literal_pool_sf_immediate): New.
29402 2017-05-05  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
29404         PR tree-optimization/80613
29405         * tree-ssa-dce.c (propagate_necessity): Remove cases for
29406         BUILT_IN_STRDUP and BUILT_IN_STRNDUP.
29408 2017-05-05  Richard Biener  <rguenther@suse.de>
29410         * tree-ssa-pre.c (get_or_alloc_expr_for): Simplify.
29412 2017-05-05  Georg-Johann Lay  <avr@gjlay.de>
29414         * config/avr/avr.md [flag_strict_overflow]: Remove any occurence
29415         of this flag from insn conditions due to removal from r247495.
29417 2017-05-05  Wilco Dijkstra  <wdijkstr@arm.com>
29419         * config/arm/aarch-common.c (arm_early_load_addr_dep_ptr):
29420         New function.
29421         (arm_early_store_addr_dep_ptr): Likewise.
29422         * config/arm/aarch-common-protos.h
29423         (arm_early_load_addr_dep_ptr): Add prototype.
29424         (arm_early_store_addr_dep_ptr): Likewise.
29425         * config/arm/cortex-a53.md: Add new bypasses.
29427 2017-05-05  Jakub Jelinek  <jakub@redhat.com>
29429         * tree.c (next_type_uid): Change type to unsigned.
29430         (type_hash_canon): Decrement back next_type_uid if
29431         freeing a type node with the highest TYPE_UID.  For INTEGER_TYPEs
29432         also ggc_free TYPE_MIN_VALUE, TYPE_MAX_VALUE and TYPE_CACHED_VALUES
29433         if possible.
29435 2017-05-04  Martin Sebor  <msebor@redhat.com>
29437         * builtins.c: Fix a trivial typo in a comment.
29439         PR middle-end/79234
29440         * builtins.c (check_sizes): Adjust to handle reading past the end.
29441         Avoid printing excessive upper bound of ranges.  Use %E to print
29442         tree nodes instead of converting them to %wu.
29443         (expand_builtin_memchr): New function.
29444         (compute_dest_size): Rename...
29445         (compute_objsize): ...to this.
29446         (expand_builtin_memcpy): Adjust.
29447         (expand_builtin_mempcpy): Adjust.
29448         (expand_builtin_strcat): Adjust.
29449         (expand_builtin_strcpy): Adjust.
29450         (check_strncat_sizes): Adjust.
29451         (expand_builtin_strncat): Adjust.
29452         (expand_builtin_strncpy): Adjust and simplify.
29453         (expand_builtin_memset): Adjust.
29454         (expand_builtin_bzero): Adjust.
29455         (expand_builtin_memcmp): Adjust.
29456         (expand_builtin): Handle memcmp.
29457         (maybe_emit_chk_warning): Check strncat just once.
29459 2017-05-04  Martin Sebor  <msebor@redhat.com>
29461         PR preprocessor/79214
29462         PR middle-end/79222
29463         PR middle-end/79223
29464         * builtins.c (check_sizes): Add inlining context and issue
29465         warnings even when -Wno-system-headers is set.
29466         (check_strncat_sizes): Same.
29467         (expand_builtin_strncat): Same.
29468         (expand_builtin_memmove): New function.
29469         (expand_builtin_stpncpy): Same.
29470         (expand_builtin): Handle memmove and stpncpy.
29472 2017-05-04  Bin Cheng  <bin.cheng@arm.com>
29474         * tree-ssa-loop-ivopts.c (struct cost_pair): Remove field inv_expr
29475         which is not used any more.
29477 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
29479         * config/aarch64/aarch64.c (generic_tunings): Update prefetch model.
29481 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
29483         * config/aarch64/aarch64.c (cortexa35_tunings): Set jump alignment to 4.
29484         (cortexa53_tunings): Likewise.
29485         (cortexa57_tunings): Likewise.
29486         (cortexa72_tunings): Likewise.
29487         (cortexa73_tunings): Likewise.
29489 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
29491         * config/aarch64/aarch64.c (generic_tunings): Set jump alignment to 4.
29492         Set loop alignment to 8.
29494 2017-05-04  Martin Sebor  <msebor@redhat.com>
29496         PR translation/80280
29497         * builtins.c (expand_builtin_object_size): Add missing quoting to
29498         %D and like directives.
29499         * hsa-gen.c (hsa_type_for_scalar_tree_type): Same.
29500         (hsa_type_for_tree_type): Same.
29501         (verify_function_arguments): Same.
29502         * symtab.c (symbol_table::change_decl_assembler_name): Same.
29503         * varasm.c (get_section): Same.
29504         (mark_weak): Same.
29506 2017-05-04  Martin Sebor  <msebor@redhat.com>
29508         PR translation/80280
29509         * config/i386/i386.c (ix86_function_versions): Quote a %D directive.
29511 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
29513         * config/aarch64/aarch64.c (generic_addrcost_table):
29514         Change HI/TI mode setting.
29516 2017-05-04  Martin Jambor  <mjambor@suse.cz>
29518         PR tree-optimization/80622
29519         * tree-sra.c (comes_initialized_p): New function.
29520         (build_accesses_from_assign): Only set write lazily when
29521         comes_initialized_p is false.
29522         (analyze_access_subtree): Use comes_initialized_p.
29523         (propagate_subaccesses_across_link): Assert !comes_initialized_p
29524         instead of testing for PARM_DECL.
29526 2017-05-04  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29528         * config/aarch64/aarch64.md (prefetch); Adjust predicate and
29529         constraint on operand 0 to allow more general addressing modes.
29530         Adjust output template.
29531         * config/aarch64/aarch64.c (aarch64_address_valid_for_prefetch_p):
29532         New function.
29533         * config/aarch64/aarch64-protos.h
29534         (aarch64_address_valid_for_prefetch_p): Declare prototype.
29535         * config/aarch64/constraints.md (Dp): New address constraint.
29536         * config/aarch64/predicates.md (aarch64_prefetch_operand): New
29537         predicate.
29539 2017-05-04  Jan Hubicka  <hubicka@ucw.cz>
29541         * ipa-cp.c (perform_estimation_of_a_value): Drop base_time parameter;
29542         update use of estimate_ipcp_clone_size_and_time.
29543         (estimate_local_effects): Update use of
29544         estimate_ipcp_clone_size_and_time and perform_estimation_of_a_value.
29545         * ipa-inline.h (estimate_ipcp_clone_size_and_time): Update prototype.
29546         * ipa-inline-analysis.c (estimate_ipcp_clone_size_and_time):
29547         Return nonspecialized time.
29549 2017-05-04  Richard Biener  <rguenther@suse.de>
29551         * tree-ssa-alias.c (get_continuation_for_phi): Improve looking
29552         for the last VUSE which def dominates the PHI.  Directly call
29553         maybe_skip_until.
29554         (get_continuation_for_phi_1): Remove.
29556 2017-05-04  Richard Sandiford  <richard.sandiford@linaro.org>
29558         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): Add commentary
29559         to explain the use of truncating division.  Cap the number of
29560         iterations to the maximum given by nb_iterations_upper_bound,
29561         if defined.
29563 2017-05-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
29565         * configure.ac (--enable-mingw-wildcard): Add new configurable feature.
29566         * configure: Regenerate.
29567         * config.in: Regenerate.
29568         * config/i386/driver-mingw32.c: new file.
29569         * config/i386/x-mingw32: Add rule to build driver-mingw32.o.
29570         * config.host: Link driver-mingw32.o on MinGW host.
29571         * doc/install.texi: Document new --enable-mingw-wildcard configure
29572         option.
29574 2017-05-04  Marek Polacek  <polacek@redhat.com>
29576         PR tree-optimization/80612
29577         * calls.c (get_size_range): Check for INTEGRAL_TYPE_P.
29579 2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
29580             Andre Simoes Dias Vieira  <andre.simoesdiasvieira@arm.com>
29582         * config/arm/arm.md (movsi): Change TARGET_32BIT to TARGET_HAVE_MOVT.
29583         (movt splitter): Likewise.
29584         * config/arm/arm.c (arm_option_check_internal): Change arm_arch_thumb2
29585         to TARGET_HAVE_MOVT, and merge with -mslow-flash-data check.
29586         (const_ok_for_arm): Change else to else if (TARGET_THUMB2) and add else
29587         block for Thumb-1 with MOVT.
29588         (thumb2_legitimate_address_p): Move code block ...
29589         (can_avoid_literal_pool_for_label_p): ... into this new function.
29590         (thumb1_legitimate_address_p): Add check for TARGET_HAVE_MOVT and
29591         literal pool.
29592         (thumb_legitimate_constant_p): Add conditional on TARGET_HAVE_MOVT
29593         * doc/invoke.texi (-mpure-code): Change "ARMv7-M targets" for
29594         "M-profile targets with the MOVT instruction".
29596 2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
29598         * config/arm/arm-builtins.c (arm_init_builtins): Rename
29599         __builtin_arm_ldfscr to __builtin_arm_get_fpscr, and rename
29600         __builtin_arm_stfscr to __builtin_arm_set_fpscr.
29602 2017-05-04  Martin Liska  <mliska@suse.cz>
29604         * tree-vrp.c (simplify_cond_using_ranges_2): Remove unused
29605         variable cond_code.
29607 2017-05-04  Richard Biener  <rguenther@suse.de>
29609         * tree.c (array_at_struct_end_p): Handle arrays at struct
29610         end with flexarrays more conservatively.  Refactor and treat
29611         arrays of arrays or aggregates more strict.  Fix
29612         VIEW_CONVERT_EXPR handling.  Remove allow_compref argument.
29613         * tree.c (array_at_struct_end_p): Adjust prototype.
29614         * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust.
29615         * gimple-fold.c (get_range_strlen): Likewise.
29616         * tree-chkp.c (chkp_may_narrow_to_field): Likewise.
29618 2017-05-04  Richard Biener  <rguenther@suse.de>
29620         PR tree-optimization/31130
29621         * tree-vrp.c (needs_overflow_infinity): Remove as always returning
29622         false.
29623         (supports_overflow_infinity): Likewise.
29624         (is_negative_overflow_infinity): Likewise.
29625         (is_positive_overflow_infinity): Likewise.
29626         (is_overflow_infinity): Likewise.
29627         (stmt_overflow_infinity): Likewise.
29628         (overflow_infinity_range_p): Likewise.
29629         (usable_range_p): Remove as always returning true.
29630         (make_overflow_infinity): Remove.
29631         (negative_overflow_infinity): Likewise.
29632         (positive_overflow_infinity): Likewise.
29633         (avoid_overflow_infinity): Likewise.
29634         (set_value_range): Adjust accordingly.
29635         (set_value_range_to_nonnegative): Likewise, remove now unused
29636         overflow_infinity arg.
29637         (vrp_operand_equal_p): Adjust.
29638         (update_value_range): Likewise.
29639         (range_int_cst_singleton_p): Likewise.
29640         (operand_less_p): Likewise.
29641         (compare_values_warnv): Likewise.
29642         (extract_range_for_var_from_comparison_expr): Likewise.
29643         (vrp_int_const_binop): Likewise.
29644         (zero_nonzero_bits_from_vr): Likewise.
29645         (extract_range_from_multiplicative_op_1): Likewise.
29646         (extract_range_from_binary_expr_1): Likewise.
29647         (extract_range_from_unary_expr): Likewise.
29648         (extract_range_from_comparison): Likewise.
29649         (extract_range_basic): Likewise.
29650         (adjust_range_with_scev): Likewise.
29651         (compare_ranges): Likewise.
29652         (compare_range_with_value): Likewise.
29653         (dump_value_range): Likewise.
29654         (test_for_singularity): Likewise, remove strict_overflow_p parameter
29655         never used.
29656         (simplify_cond_using_ranges): Adjust.
29658 2017-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
29660         * brig-builtins.def: Added a builtin for class_f64.
29661         * builtin-types.def: Added a builtin type needed by class_f64.
29663 2017-05-03  Jason Merrill  <jason@redhat.com>
29665         * timevar.def: Add TV_CONSTEXPR.
29667 2017-05-03  David Malcolm  <dmalcolm@redhat.com>
29669         * common.opt (fdiagnostics-parseable-fixits): Fix typo.
29671 2017-05-03  Martin Jambor  <mjambor@suse.cz>
29673         * ipa-prop.c (ipa_update_after_lto_read): Removed.
29674         * ipa-prop.h (ipa_update_after_lto_read): Remove declaration.
29675         * ipa-cp.c (ipcp_propagate_stage): Do not call
29676         ipa_update_after_lto_read.
29677         * ipa-inline.c (ipa_inline): Likewise.
29679 2017-05-03  Martin Jambor  <mjambor@suse.cz>
29681         * ipa-prop.h (ipa_edge_args): Make a class.  Mark with for_user GTY
29682         tag.  Added a default constructor and a destructor.
29683         (ipa_edge_args_sum_t): New class;
29684         (ipa_edge_args_sum): Declare.
29685         (ipa_edge_args_vector): Remove declaration.
29686         (IPA_EDGE_REF): Use ipa_edge_args_sum.
29687         (ipa_free_edge_args_substructures): Remove declaration.
29688         (ipa_check_create_edge_args): Use ipa_edge_args_sum.
29689         (ipa_edge_args_info_available_for_edge_p): Likewise.
29690         * ipa-prop.c (ipa_edge_args_vector): Removed.
29691         (edge_removal_hook_holder): Likewise.
29692         (edge_duplication_hook_holder): Likewise.
29693         (ipa_edge_args_sum): New variable.
29694         (ipa_propagate_indirect_call_infos): Test ipa_edge_args_sum instead of
29695         ipa_edge_args_vector.
29696         (ipa_free_edge_args_substructures): Likewise.
29697         (ipa_free_all_edge_args): Free ipa_edge_args_sum instead of
29698         ipa_edge_args_vector.
29699         (ipa_edge_removal_hook): Turned into method
29700         ipa_edge_args_sum_t::remove.
29701         (ipa_edge_duplication_hook): Turned into method
29702         ipa_edge_args_sum_t::duplicate.
29703         (ipa_register_cgraph_hooks): Create ipa_edge_args_sum instead of
29704         registering edge hooks.
29705         (ipa_unregister_cgraph_hooks): Do not unregister edge hooks.
29706         * ipa-inline-analysis.c (estimate_function_body_sizes): Test
29707         ipa_edge_args_sum instead of ipa_edge_args_vector.
29708         * ipa-profile.c (ipa_profile): Likewise.
29710 2017-05-03  Martin Jambor  <mjambor@suse.cz>
29712         * symbol-summary.h (function_summary): New method exists.
29713         (function_summary::symtab_removal): Deallocate through release.
29714         (call_summary): New class.
29715         (gt_ggc_mx): New overload.
29716         (gt_pch_nx): Likewise.
29717         (gt_pch_nx): Likewise.
29719 2017-05-03  Jeff Law  <law@redhat.com>
29721         PR tree-optimization/78496
29722         * tree-vrp.c (simplify_cond_using_ranges_1): Renamed
29723         from simplify_cond_using_ranges.  Split off code to walk
29724         backwards through casts into ...
29725         (simplify_cond_using_ranges_2): New function.
29726         (simplify_stmt_using_ranges): Call simplify_cond_using_ranges_1.
29727         (execute_vrp): After identifying jump threads, call
29728         simplify_cond_using_ranges_2.
29730 2017-05-03  Jan Hubicka  <hubicka@ucw.cz>
29732         PR bootstrap/80609
29733         * ipa-inline.h (inline_summary): Add ctor.
29734         (create_ggc): Do not use ggc_cleared_alloc.
29736 2017-05-03  Jeff Downs  <heydowns@somuchpressure.net>
29737             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
29739         * gcc.c (handle_braces): Support escaping in switch matching
29740         text.
29741         * doc/invoke.texi (Spec Files): Document it.
29742         Remove superfluous @code markup in items.
29744 2017-05-03  David Malcolm  <dmalcolm@redhat.com>
29746         * diagnostic-show-locus.c (struct column_range): New struct.
29747         (get_affected_columns): New function.
29748         (get_printed_columns): New function.
29749         (struct correction): New struct.
29750         (correction::ensure_capacity): New function.
29751         (correction::ensure_terminated): New function.
29752         (struct line_corrections): New struct.
29753         (line_corrections::~line_corrections): New dtor.
29754         (line_corrections::add_hint): New function.
29755         (layout::print_trailing_fixits): Reimplement in terms of the new
29756         classes.
29757         (selftest::test_overlapped_fixit_printing): New function.
29758         (selftest::diagnostic_show_locus_c_tests): Call it.
29760 2017-05-03  Nathan Sidwell  <nathan@acm.org>
29762         Canonicalize canonical type hashing
29763         * tree.h (type_hash_canon_hash): Declare.
29764         * tree.c (type_hash_list, attribute_hash_list): Move into
29765         type_hash_canon_hash.
29766         (build_type_attribute_qual_variant): Break out hash code calc into
29767         type_hash_canon_hash.
29768         (type_hash_canon_hash): New.  Generic type hash computation.
29769         (build_range_type_1, build_array_type_1, build_function_type,
29770         build_method_type_directly, build_offset_type, build_complex_type,
29771         make_vector_type): Call it.
29773 2017-05-03  Richard Biener  <rguenther@suse.de>
29775         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
29776         When all DRs have unknown misaligned do not always peel
29777         when there is a store but apply the same costing model as if
29778         there were only loads.
29780 2017-05-03  Richard Biener  <rguenther@suse.de>
29782         Revert
29783         PR tree-optimization/80492
29784         * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
29785         compare_base_decls returning dont-know properly.
29787 2017-05-03  Thomas Preud'homme  <thomas.preudhomme@arm.com>
29789         * config/arm/iterators.md (CCSI): New mode iterator.
29790         (arch): New mode attribute.
29791         * config/arm/sync.md (atomic_compare_and_swap<mode>_1): Rename into ...
29792         (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1): This and ...
29793         (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): This.  Use CCSI
29794         code iterator for success result mode.
29795         * config/arm/arm.c (arm_expand_compare_and_swap): Adapt code to use
29796         the corresponding new insn generators.
29798 2017-05-03  Bin Cheng  <bin.cheng@arm.com>
29800         Revert r247509
29801         2017-05-02  Bin Cheng  <bin.cheng@arm.com>
29802         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
29804 2017-05-03  Richard Sandiford  <richard.sandiford@linaro.org>
29806         * tree-data-ref.h (SUB_CONFLICTS_IN_A): Wrap SUB argument in brackets.
29807         (SUB_CONFLICTS_IN_B, SUB_LAST_CONFLICT, SUB_DISTANCE): Likewise.
29808         (DDR_A): Wrap DDR argument in brackets.
29809         (DDR_B, DDR_AFFINE_P, DDR_ARE_DEPENDENT, DDR_SUBSCRIPTS): Likewise.
29810         (DDR_LOOP_NEST, DDR_INNER_LOOP, DDR_SELF_REFERENCE): Likewise.
29811         (DDR_REVERSED_P): Likewise.
29813 2017-05-03  Jakub Jelinek  <jakub@redhat.com>
29815         PR tree-optimization/79472
29816         * tree-switch-conversion.c (struct switch_conv_info): Add
29817         contiguous_range and default_case_nonstandard fields.
29818         (collect_switch_conv_info): Compute contiguous_range and
29819         default_case_nonstandard fields, don't clear final_bb if
29820         contiguous_range and only the default case doesn't have the required
29821         structure.
29822         (check_all_empty_except_final): Set default_case_nonstandard instead
29823         of failing if contiguous_range and the default case doesn't have empty
29824         block.
29825         (check_final_bb): Add SWTCH argument, don't fail if contiguous_range
29826         and only the default case doesn't have the required constants.  Skip
29827         virtual phis.
29828         (gather_default_values): Skip virtual phis.  Allow non-NULL CASE_LOW
29829         if default_case_nonstandard.
29830         (build_constructors): Build constant 1 just once.  Assert that default
29831         values aren't inserted in between cases if contiguous_range.  Skip
29832         virtual phis.
29833         (build_arrays): Skip virtual phis.
29834         (prune_bbs): Add DEFAULT_BB argument, don't remove that bb.
29835         (fix_phi_nodes): Don't add e2f phi arg if default_case_nonstandard.
29836         Handle virtual phis.
29837         (gen_inbound_check): Handle default_case_nonstandard case.
29838         (process_switch): Adjust check_final_bb caller.  Call
29839         gather_default_values with the first non-default case instead of
29840         default case if default_case_nonstandard.
29842 2017-05-02  Nathan Sidwell  <nathan@acm.org>
29844         * ggc-page.c (move_ptes_to_front): Replace unsigned >0 with i--
29845         check.  Fix formatting.
29847 2017-05-02  Jan Hubicka  <hubicka@ucw.cz>
29849         * ipa-inline-analysis.c (estimate_node_size_and_time): Allow roundoff
29850         errors when comparing specialized and unspecialized times.
29852 2017-05-02  David Malcolm  <dmalcolm@redhat.com>
29854         * diagnostic-show-locus.c
29855         (layout::should_print_annotation_line_p): Make private.
29856         (layout::print_annotation_line): Make private.
29857         (layout::annotation_line_showed_range_p): Make private.
29858         (layout::show_ruler): Make private.
29859         (layout::print_source_line): Make private.  Pass in line and
29860         line_width, rather than calling location_get_source_line.  Drop
29861         returned value.
29862         (layout::print_leading_fixits): New method.
29863         (layout::print_any_fixits): Rename to...
29864         (layout::print_trailing_fixits): ...this, and make private.
29865         Don't print newline fixits.
29866         (diagnostic_show_locus): Move logic for printing one row into...
29867         (layout::print_line): ...this new function.  Move the
29868         location_get_source_line call and error-handling from
29869         print_source_line to here.  Call print_leading_fixits, and rename
29870         print_any_fixits to print_trailing_fixits.
29871         (selftest::test_fixit_insert_containing_newline): Update now that
29872         newlines are partially supported.
29873         (selftest::test_fixit_insert_containing_newline_2): New test.
29874         (selftest::test_fixit_replace_containing_newline): Update comments.
29875         (selftest::diagnostic_show_locus_c_tests): Call the new test.
29876         * edit-context.c (class added_line): New class.
29877         (class edited_line): Describe newline handling in comment.
29878         (edited_line::actually_edited_p): New method.
29879         (edited_line::print_content): Delete redundant decl.
29880         (edited_line::m_predecessors): New field.
29881         (edited_file::print_content): Call edited_line::print_content.
29882         (edited_file::print_diff): Update to support newlines.
29883         (edited_file::print_diff_hunk): Likewise.
29884         (edited_file::print_run_of_changed_lines): New function.
29885         (edited_file::print_diff_line): Convert to...
29886         (print_diff_line): ...this.
29887         (edited_file::get_effective_line_count): New function.
29888         (edited_line::edited_line): Initialize new field m_predecessors.
29889         (edited_line::~edited_line): Clean up m_predecessors.
29890         (edited_line::apply_fixit): Handle newlines.
29891         (edited_line::get_effective_line_count): New function.
29892         (edited_line::print_content): New function.
29893         (edited_line::print_diff_lines): New function.
29894         (selftest::test_applying_fixits_insert_containing_newline): New
29895         test.
29896         (selftest::test_applying_fixits_replace_containing_newline): New
29897         test.
29898         (selftest::insert_line): New function.
29899         (selftest::test_applying_fixits_multiple_lines): Add example of
29900         inserting a line.
29901         (selftest::edit_context_c_tests): Call the new tests.
29903 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
29905         * tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Delete
29906         parameter cand.  Update dump information.
29907         (get_computation_cost): Update uses.
29909 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
29911         * tree-ssa-loop-ivopts.c (get_computation_aff_1): New.
29912         (get_computation_aff): Reorder parameters.  Use get_computation_aff_1.
29913         (get_computation_at, rewrite_use_address): Update use of
29914         get_computation_aff.
29916 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
29918         * tree-ssa-loop-ivopts.c (get_computation_at): Reorder parameters.
29919         (get_computation): Delete.
29920         (get_computation_cost): Implement like get_computation_cost_at.
29921         Use get_computation_at.
29922         (get_computation_cost_at): Delete.
29923         (rewrite_use_nonlinear_expr): Use get_computation_at.
29924         (rewrite_use_compare, remove_unused_ivs): Ditto.
29926 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
29928         * tree-ssa-loop-ivopts.c (rewrite_use_address): Simple refactor.
29930 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
29932         * tree-ssa-loop-ivopts.c (struct iv_ca): Rename n_regs to n_invs.
29933         (ivopts_global_cost_for_size): Rename parameter and update uses.
29934         (iv_ca_recount_cost): Update uses.
29935         (iv_ca_set_remove_invs, iv_ca_set_no_cp): Record invariants and
29936         candidates seperately in n_invs and n_cands.
29937         (iv_ca_set_add_invs, iv_ca_set_cp, iv_ca_new): Ditto.
29939 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
29941         * tree-ssa-loop-ivopts.c (struct walk_tree_data): New.
29942         (find_inv_vars_cb): New.
29943         (find_depends): Renamed to ...
29944         (find_inv_vars): ... this.
29945         (add_candidate_1, force_var_cost): Call find_inv_vars.
29946         (split_address_cost, determine_group_iv_cost_cond): Ditto.
29948 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
29950         * tree-ssa-loop-ivopts.c (struct cost_pair): Rename depends_on to
29951         inv_vars.  Add inv_exprs.
29952         (struct iv_cand): Rename depends_on to inv_vars.
29953         (struct ivopts_data): Rename max_inv_id/n_invariant_uses to
29954         max_inv_var_id/n_inv_var_uses.  Move max_inv_expr_id around.
29955         Refactor field used_inv_exprs from has_map to array n_inv_expr_uses.
29956         (dump_cand): Dump inv_vars.
29957         (tree_ssa_iv_optimize_init): Support inv_vars and inv_exprs.
29958         (record_invariant, find_depends, add_candidate_1): Ditto.
29959         (set_group_iv_cost, force_var_cost): Ditto.
29960         (split_address_cost, ptr_difference_cost, difference_cost): Ditto.
29961         (get_computation_cost_at, get_computation_cost): Ditto.
29962         (determine_group_iv_cost_generic): Ditto.
29963         (determine_group_iv_cost_address): Ditto.
29964         (determine_group_iv_cost_cond, autoinc_possible_for_pair): Ditto.
29965         (determine_group_iv_costs): Ditto.
29966         (iv_ca_recount_cost): Update call to ivopts_global_cost_for_size.
29967         (iv_ca_set_remove_invariants): Renamed to ...
29968         (iv_ca_set_remove_invs): ... this.  Support inv_vars and inv_exprs.
29969         (iv_ca_set_no_cp): Use iv_ca_set_remove_invs.
29970         (iv_ca_set_add_invariants):  Renamed to ...
29971         (iv_ca_set_add_invs): ... this.  Support inv_vars and inv_exprs.
29972         (iv_ca_set_cp): Use iv_ca_set_add_invs.
29973         (iv_ca_has_deps): Support inv_vars and inv_exprs.
29974         (iv_ca_new, iv_ca_free, iv_ca_dump, free_loop_data): Ditto.
29975         (create_new_ivs): Remove useless dump.
29977 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
29979         * tree-ssa-loop-ivopts.c (get_computation_cost_at): Remove pseudo
29980         iv_cand code.
29981         (determine_group_iv_cost_cond, determine_iv_cost): Ditto.
29982         (iv_ca_set_no_cp, create_new_iv): Ditto.
29984 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
29986         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
29988 2017-05-02  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
29990         * tree.h (EXPR_CILK_SPAWN): Use macro TREE_CHECK2 instead of
29991         function tree_check2.
29993 2017-05-02  Martin Liska  <mliska@suse.cz>
29995         * doc/gcov.texi: Add missing preposition.
29996         * gcov.c (function_info::function_info): Properly fill up
29997         all member variables.
29999 2017-05-02  Tamar Christina  <tamar.christina@arm.com>
30001         * expr.c (expand_expr_real_2): Re-cost if previous costs are the same.
30003 2017-05-02  Tamar Christina  <tamar.christina@arm.com>
30005         * simplify-rtx.c (simplify_binary_operation_1): Add LSHIFTRT case.
30007 2017-05-02  Martin Liska  <mliska@suse.cz>
30009         PR lto/77954.
30010         * lto-streamer-in.c (lto_read_tree_1): Remove
30011         LTO_STREAMER_DEBUG.
30012         * lto-streamer.c (struct tree_hash_entry): Likewise.
30013         (struct tree_entry_hasher): Likewise.
30014         (tree_entry_hasher::hash): Likewise.
30015         (tree_entry_hasher::equal): Likewise.
30016         (lto_streamer_init): Likewise.
30017         (lto_orig_address_map): Likewise.
30018         (lto_orig_address_get): Likewise.
30019         (lto_orig_address_remove): Likewise.
30020         * lto-streamer.h: Likewise.
30021         * tree-streamer-in.c (streamer_alloc_tree): Likewise.
30022         * tree-streamer-out.c (streamer_write_tree_header): Likewise.
30024 2017-05-02  Sebastian Peryt  <sebastian.peryt@intel.com>
30026         * config/i386/avx512fintrin.h (_mm_mask_add_round_sd)
30027         (_mm_maskz_add_round_sd, _mm_mask_add_round_ss)
30028         (mm_maskz_add_round_ss, _mm_mask_sub_round_sd)
30029         (mm_maskz_sub_round_sd, _mm_mask_sub_round_ss)
30030         (mm_maskz_sub_round_ss, _mm_mask_add_sd)
30031         (mm_maskz_add_sd, _mm_mask_add_ss, _mm_maskz_add_ss)
30032         (mm_mask_sub_sd, _mm_maskz_sub_sd, _mm_mask_sub_ss)
30033         (mm_maskz_sub_ss): New intrinsics.
30034         * config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
30035         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
30036         * config/i386/i386-builtin.def (__builtin_ia32_addsd_mask_round)
30037         (__builtin_ia32_addss_mask_round, __builtin_ia32_subsd_mask_round)
30038         (__builtin_ia32_subss_mask_round): New builtins.
30039         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
30040         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
30041         * config/i386/sse.md (<sse>_vm<plusminus_insn><mode>3<round_name>):
30042         Renamed to ...
30043         (<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): ... this.
30044         (v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
30045         Changed to ...
30046         (v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
30047         ... this.
30049 2017-05-02  Martin Jambor  <mjambor@suse.cz>
30051         PR tree-optimization/78687
30052         * tree-sra.c (access): New field parent.
30053         (process_subtree_disqualification): New function.
30054         (disqualify_candidate): Call it.
30055         (build_accesses_from_assign): Reset write flag if creating an
30056         assighnment link.
30057         (build_access_subtree): Fill in parent field and also prpagate
30058         down grp_write flag.
30059         (create_artificial_child_access): New parameter set_grp_write, set
30060         grp_write to its value.
30061         (propagate_subaccesses_across_link): Also propagate grp_write flag
30062         values.
30063         (propagate_all_subaccesses): Push the closest parent back to work
30064         queue if add_access_to_work_queue returned true.
30066 2017-05-02  Richard Biener  <rguenther@suse.de>
30068         * common.opt (fstrict-overflow): Alias negative to fwrapv.
30069         * doc/invoke.texi (fstrict-overflow): Remove all traces of
30070         -fstrict-overflow documentation.
30071         * tree.h (TYPE_OVERFLOW_UNDEFINED): Do not test flag_strict_overflow.
30072         (POINTER_TYPE_OVERFLOW_UNDEFINED): Test !flag_wrapv instead of
30073         flag_strict_overflow.
30074         * ipa-inline.c (can_inline_edge_p): Do not test flag_strict_overflow.
30075         * lto-opts.c (lto_write_options): Do not stream it.
30076         * lto-wrapper.c (merge_and_complain): Do not handle it.
30077         * opts.c (default_options_table): Do not set -fstrict-overflow.
30078         (finish_options): Likewise do not clear it when sanitizing.
30079         * simplify-rtx.c (simplify_const_relational_operation): Do not
30080         test flag_strict_overflow.
30082 2017-05-02  Uros Bizjak  <ubizjak@gmail.com>
30084         * config/alpha/alpha.md (*add<mode>3_ieee): Merge to add<mode>3
30085         using enabled attribute.
30086         (*sub<mode>3_ieee): Merge to sub<mode>3 using enabled attribute.
30087         (*mul<mode>3_ieee): Merge to mul<mode>3 using enabled attribute.
30088         (*div<mode>3_ieee): Merge to div<mode>3 using enabled attribute.
30089         (*sqrt<mode>2_ieee): Merge to sqrt<mode>2 using enabled attribute.
30090         (*fix_truncdfdi_ieee): Merge to *fix_truncdfdi2 using enabled attribute.
30091         (*fix_truncsfdi_ieee): Merge to *fix_truncsfdi2 using enabled attribute.
30092         (*floatdisf_ieee): Merge to floatdisf2 using enabled attribute.
30093         (*floatdidf_ieee): Merge to floatdidf2 using enabled attribute.
30094         (*truncdfsf2_ieee): Merge to truncdfsf2 using enabled attribute.
30095         (*cmpdf_ieee): Merge to *cmpdf_internal using enabled attribute.
30097 2017-05-02  Uros Bizjak  <ubizjak@gmail.com>
30099         * config/i386/i386.c (ix86_code_end): Use {FIRST,LAST}_INT_REG.
30101 2017-05-02  Richard Biener  <rguenther@suse.de>
30103         PR tree-optimization/80591
30104         Revert
30105         2017-04-10  Richard Biener  <rguenther@suse.de>
30107         * tree-ssa-structalias.c (find_func_aliases): Properly handle
30108         asm inputs.
30110 2017-05-02  Richard Biener  <rguenther@suse.de>
30112         PR tree-optimization/80549
30113         * tree-cfgcleanup.c (mfb_keep_latches): New helper.
30114         (cleanup_tree_cfg_noloop): Create forwarders to known loop
30115         headers if they do not have a preheader.
30117 2017-05-02  Martin Liska  <mliska@suse.cz>
30119         PR other/80589
30120         * common.opt: Fix typo.
30121         * doc/invoke.texi: Likewise.
30123 2017-05-01  Jan Beulich  <jbeulich@suse.com>
30125         * config/i386/sse.md (xop_vpermil2<mode>3): Do not allow operand
30126         swapping, add (x,x,m,x,n) alternative.
30128 2017-05-01  Nathan Sidwell  <nathan@acm.org>
30130         * calls.c (combine_pending_stack_adjustment_and_call): Remove
30131         unnecessary unadjusted_alignment check.
30133 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
30135         PR c++/80038
30136         * cilk_common.c (expand_builtin_cilk_detach): Move pedigree
30137         operations here.
30138         * gimplify.c (gimplify_cilk_detach): New function.
30139         (gimplify_call_expr, gimplify_modify_expr): Call it as needed.
30140         * tree-core.h: Document EXPR_CILK_SPAWN.
30141         * tree.h (EXPR_CILK_SPAWN): Define.
30143 2017-05-01  David Malcolm  <dmalcolm@redhat.com>
30145         * diagnostic-show-locus.c (layout::get_expanded_location): Rewrite
30146         to use new fixit_hint representation, using the "replace" logic.
30147         (get_line_span_for_fixit_hint): Likewise.
30148         (layout::print_any_fixits): Likewise.
30149         (selftest::test_one_liner_many_fixits): Rename to...
30150         (selftest::test_one_liner_many_fixits_1): ...this, and update
30151         comment and expected output to reflect that the multiple fix-it
30152         hints are now consolidated into one insertion.
30153         (selftest::test_one_liner_many_fixits_2): New test.
30154         (selftest::test_diagnostic_show_locus_one_liner): Update for
30155         above.
30156         (selftest::test_fixit_consolidation): Update for fix-it API
30157         change.
30158         * diagnostic.c (print_parseable_fixits): Likewise.
30159         * edit-context.c (edited_line::m_line_events): Convert from
30160         auto_vec <line_event *> to auto_vec <line_event>.
30161         (class line_event): Convert from abstract base class to a concrete
30162         class, taking over the role of replace_event.
30163         (class insert_event): Delete.
30164         (class replace_event): Rename to class line_event.  Convert to
30165         half-open range.
30166         (edit_context::add_fixits): Reimplement.
30167         (edit_context::apply_insert): Delete.
30168         (edit_context::apply_replace): Rename to...
30169         (edit_context::apply_fixit): ...this.  Convert to half-open range.
30170         (edited_file::apply_insert): Delete.
30171         (edited_file::apply_replace): Rename to...
30172         (edited_file::apply_fixit): ...this.
30173         (edited_line::~edited_line): Drop deletion of events.
30174         (edited_line::apply_insert): Delete.
30175         (edited_line::apply_replace): Rename to...
30176         (edited_line::apply_fixit): ...this.  Convert to half-open range.
30177         Update for change to type of m_line_events.
30178         * edit-context.h (edit_context::apply_insert): Delete.
30179         (edit_context::apply_replace): Rename to...
30180         (edit_context::apply_fixit): ...this.
30182 2017-05-01  Martin Sebor  <msebor@redhat.com>
30184         * gimple-ssa-sprintf.c (format_integer): Set knownrange when it's
30185         known.
30187 2017-05-01  Uros Bizjak  <ubizjak@gmail.com>
30189         PR target/68491
30190         * config/i386/cpuid.h (__get_cpuid): Always return 0 when
30191         __get_cpuid_max returns 0.
30192         (__get_cpuid_count): Ditto.
30194 2017-05-01  Eric Botcazou  <ebotcazou@adacore.com>
30196         * tree.c (substitute_in_expr) <tcc_vl_exp>: Also inline a call if the
30197         replacement expression is another instance of one of its arguments.
30199 2017-05-01  Jakub Jelinek  <jakub@redhat.com>
30201         PR target/79430
30202         * rtlanal.c (reg_set_p): If reg is a stack_pointer_rtx, also
30203         check for stack push/pop autoinc.
30204         * config/i386/i386.c (ix86_agi_dependent): Return false
30205         if the only reason why modified_in_p returned true is that
30206         addr is SP based and set_insn is a push or pop.
30208 2017-04-29  Jan Hubicka  <hubicka@ucw.cz>
30210         * ipa-inline.c (compute_inlined_call_time): Remove now unnecesary
30211         overflow check.
30213 2017-04-29  Jan Hubicka  <hubicka@ucw.cz>
30215         PR ipa/79224
30216         * ipa-inline-analysis.c (dump_predicate): Add optional parameter NL.
30217         (account_size_time): Use two predicates - exec_pred and
30218         nonconst_pred_ptr.
30219         (evaluate_conditions_for_known_args): Compute both clause and
30220         nonspec_clause.
30221         (evaluate_properties_for_edge): Evaulate both clause and nonspec_clause.
30222         (inline_summary_t::duplicate): Update.
30223         (estimate_function_body_sizes): Caluculate exec and nonconst predicates
30224         separately.
30225         (compute_inline_parameters): Likewise.
30226         (estimate_edge_size_and_time): Update caluclation of time.
30227         (estimate_node_size_and_time): Compute both time and nonspecialized
30228         time.
30229         (estimate_ipcp_clone_size_and_time): Update.
30230         (inline_merge_summary): Update.
30231         (do_estimate_edge_time): Update.
30232         (do_estimate_edge_size): Update.
30233         (do_estimate_edge_hints): Update.
30234         (inline_read_section, inline_write_summary): Stream both new predicates.
30235         * ipa-inline.c (compute_uninlined_call_time): Take uninlined_call_time
30236         as argument.
30237         (compute_inlined_call_time): Cleanup.
30238         (big_speedup_p): Update.
30239         (edge_badness): Update.
30240         * ipa-inline.h (INLINE_TIME_SCALE): Remove.
30241         (size_time_entry): Replace predicate by exec_predicate and
30242         nonconst_predicate.
30243         (edge_growth_cache_entry): Cache both time nad nonspecialized time.
30244         (estimate_edge_time): Return also nonspec_time.
30245         (reset_edge_growth_cache): Update.
30247 2017-04-29  Jakub Jelinek  <jakub@redhat.com>
30249         PR rtl-optimization/80491
30250         * ifcvt.c (noce_process_if_block): When looking for x setter
30251         with missing else_bb, don't check only the insn right before
30252         cond_earliest, but look for the last insn that x is modified in
30253         within the same bb.
30255         PR rtl-optimization/80491
30256         * alias.c (memory_modified_in_insn_p): Return true for CALL_INSNs.
30258 2017-04-29  Marc Glisse  <marc.glisse@inria.fr>
30260         PR tree-optimization/80487
30261         * tree-ssa-alias.c (stmt_kills_ref_p): Handle stpncpy and strncpy.
30263 2017-04-29  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
30265         PR tree-optimization/79697
30266         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Check if callee
30267         is BUILT_IN_STRDUP, BUILT_IN_STRNDUP, BUILT_IN_REALLOC.
30268         (propagate_necessity): Check if def_callee is BUILT_IN_STRDUP or
30269         BUILT_IN_STRNDUP.
30270         * gimple-fold.c (gimple_fold_builtin_realloc): New function.
30271         (gimple_fold_builtin): Call gimple_fold_builtin_realloc.
30273 2017-04-28  Martin Sebor  <msebor@redhat.com>
30275         PR tree-optimization/80523
30276         * gimple-ssa-sprintf.c (target_to_host_charmap): New global variable.
30277         (init_target_to_host_charmap, target_to_host, target_strtol10): New
30278         functions.
30279         (maybe_warn, format_directive, parse_directive): Use new functions.
30280         (pass_sprintf_length::execute): Call init_target_to_host_charmap.
30282 2017-04-28  Marc Glisse  <marc.glisse@inria.fr>
30284         * match.pd (X+Z OP Y+Z, X-Z OP Y-Z, Z-X OP Z-Y): New transformations.
30286 2017-04-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
30288         * configure.ac (SYSTEM_HEADER_DIR, BUILD_SYSTEM_HEADER_DIR,
30289         target_header_dir): Set correctly.
30290         * configure: Regenerated.
30291         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
30292         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
30293         instead of SYSTEM_HEADER_DIR.
30295 2017-04-28  Jan Hubicka  <hubicka@ucw.cz>
30297         * ipa-cp.c (perform_estimation_of_a_value): Turn time to sreal.
30298         (estimate_local_effects): Likewise.
30299         * ipa-inline.c (compute_inlined_call_time, want_inline_small_function_p,
30300         edge_badness, inline_small_functions, dump_overall_stats): LIkewise.
30301         * ipa-inline.h (edge_growth_cache_entry, estimate_time_after_inlining,
30302         estimate_ipcp_clone_size_and_time, do_estimate_edge_time,
30303         do_estimate_edge_time, estimate_edge_time): Likewise.
30304         * ipa-inline-analysis.c (estimate_node_size_and_time,
30305         estimate_ipcp_clone_size_and_time, do_estimate_edge_time): Likewise.
30306         (estimate_time_after_inlining): Remove.
30308 2017-04-28  Martin Liska  <mliska@suse.cz>
30310         * doc/gcov.texi: Enhance documentation of gcov.
30312 2017-04-28  Martin Liska  <mliska@suse.cz>
30314         * doc/gcov.texi: Sort options in alphabetic order.
30315         * doc/gcov-dump.texi: Likewise.
30316         * doc/gcov-tool.texi: Likewise.
30317         * gcov.c (print_usage): Likewise.
30318         * gcov-dump.c (print_usage): Likewise.
30319         * gcov-tool.c (print_merge_usage_message): Likewise.
30320         (print_rewrite_usage_message): Likewise.
30321         (print_overlap_usage_message): Likewise.
30323 2017-04-28  Martin Liska  <mliska@suse.cz>
30325         PR gcov-profile/53915
30326         * gcov.c (format_gcov): Print 'NAN %' when top > bottom.
30328 2017-04-28  Martin Liska  <mliska@suse.cz>
30330         PR gcov-profile/79891
30331         * gcov.c (add_line_counts): Assign BBs to lines just if the BB
30332         is marked by compiler as living on a line.
30333         (get_cycles_count): Remove usage of the union.
30334         (output_intermediate_file): Likewise.
30335         (find_source): Fix GNU coding style.
30336         (accumulate_line_counts): Remove old non-all block mode.
30337         (output_lines): Remove usage of the union.
30338         * profile.c (output_location): Include all BBs, even if
30339         belonging to a same line (and file) as a previous BB.
30341 2017-04-28  Martin Liska  <mliska@suse.cz>
30343         * gcov.c (process_args): Handle new argument 'w'.
30344         (read_graph_file): Assign ID to BBs.
30345         (output_branch_count): Display BB # if verbose flag is set.
30346         (output_lines): Likewise for arcs.
30347         (print_usage): Add '--verbose' option help.
30348         * doc/gcov.texi: Document --verbose (-w) option.
30350 2017-04-28  Martin Liska  <mliska@suse.cz>
30352         * gcov.c (struct block_location_info): New struct.
30353         (process_file): Fill up the new structure.
30354         (read_graph_file): Replace usage of encoding by the newly added
30355         struct.
30356         (add_line_counts): Likewise.
30357         (accumulate_line_counts): Remove usage of the union.
30358         (function_info::function_info): New function.
30359         (function_info::~function_info): Likewise.
30360         (process_file): Call delete instead of release_function.
30361         (release_function): Release the function.
30362         (release_structures): Call delete instead of release_function.
30363         (solve_flow_graph): Replace usage of num_blocks.
30364         (find_exception_blocks): Likewise.
30365         (output_lines): Fix GNU coding style.
30367 2017-04-28  Martin Liska  <mliska@suse.cz>
30369         PR driver/56469
30370         * coverage.c (coverage_remove_note_file): New function.
30371         * coverage.h: Declare the function.
30372         * toplev.c (finalize): Clean if an error has been seen.
30374 2017-04-28  Martin Liska  <mliska@suse.cz>
30376         PR gcov-profile/80031
30377         * gcov-dump.c (tag_blocks): Just print number of basic blocks.
30378         * gcov-io.h (GCOV_TAG_BLOCKS_NUM): Remove unused macro.
30379         * gcov.c (read_graph_file): Read just number of blocks.
30380         * profile.c (branch_prob): Do not stream 0 flags per a basic
30381         block.
30383 2017-04-28  Martin Liska  <mliska@suse.cz>
30385         * gcov-dump.c (tag_*): Add new argument to declarations.
30386         (dump_gcov_file): Likewise.
30387         (tag_blocks): Add and use new argument depth.
30388         (tag_arcs): Likewise.
30389         (tag_lines): Likewise.
30390         (tag_counters): Likewise.
30391         (tag_summary): Likewise.
30392         (dump_working_sets): Use depth to do a proper indentation.
30394 2017-04-28  Jakub Jelinek  <jakub@redhat.com>
30396         PR bootstrap/80531
30397         * cgraph.h (symtab_node::debug_symtab): No longer inline.
30398         * symtab.c (symtab_node::debug_symtab): Move definition here.
30400 2017-04-28  Richard Biener  <rguenther@suse.de>
30402         * lto-streamer.h (LTO_major_version): Bump to 7.
30404 2017-04-28  Richard Biener  <rguenther@suse.de>
30406         * tree-vrp.c (assert_info): New struct.
30407         (add_assert_info): New helper.
30408         (register_edge_assert_for_2): Refactor to add asserts to a vector
30409         of assert_info.
30410         (register_edge_assert_for_1): Likewise.
30411         (register_edge_assert_for): Likewise.
30412         (finish_register_edge_assert_for): New helper actually registering
30413         asserts where live on edge.
30414         (find_conditional_asserts): Adjust.
30415         (find_switch_asserts): Likewise.
30416         (evrp_dom_walker::try_find_new_range): Generalize.
30417         (evrp_dom_walker::before_dom_children): Use register_edge_assert_for.
30419 2017-04-27  Marek Polacek  <polacek@redhat.com>
30421         PR sanitizer/80349
30422         * fold-const.c (fold_binary_loc) <case EQ_EXPR, NE_EXPR>: Convert
30423         arg10 and arg11 to itype.
30425 2017-04-27  Jonathan Wakely  <jwakely@redhat.com>
30427         * doc/extend.texi (Object Size Checking): Improve grammar.
30429 2017-04-27  Richard Earnshaw  <rearnsha@arm.com>
30431         PR target/80530
30432         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Ensure
30433         that the logic for permitting reciprocal estimates matches that
30434         in use_rsqrt_p.
30436 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
30438         PR c++/80534
30439         * tree.c (type_cache_hasher::equal): Only compare
30440         TYPE_TYPELESS_STORAGE flag on non-aggregate element types.
30441         (build_array_type_1): Only hash TYPE_TYPELESS_STORAGE flag on
30442         non-aggregate element types.
30443         * tree.h (TYPE_TYPELESS_STORAGE): Fix comment typo, add more details
30444         about the flag on ARRAY_TYPEs in the comment, formatting fix.
30446 2017-04-27  Richard Biener  <rguenther@suse.de>
30448         PR middle-end/80533
30449         * emit-rtl.c (set_mem_attributes_minus_bitpos): When
30450         stripping ARRAY_REFs from MEM_EXPR make sure we're not
30451         keeping a reference to a trailing array.
30453 2017-04-27  Richard Biener  <rguenther@suse.de>
30455         PR middle-end/80539
30456         * tree-chrec.c (chrec_fold_plus_poly_poly): Deal with not
30457         being in loop-closed SSA form conservatively.
30458         (chrec_fold_multiply_poly_poly): Likewise.
30460 2017-04-27  Tamar Christina  <tamar.christina@arm.com>
30462         PR middle-end/79665
30463         * expr.c (expand_expr_real_2): Move TRUNC_MOD_EXPR, FLOOR_MOD_EXPR,
30464         CEIL_MOD_EXPR, ROUND_MOD_EXPR cases.
30466 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
30468         PR target/77728
30469         * config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): Remove.
30470         (aarch64_function_arg_alignment): Return unsigned int again, but still
30471         ignore TYPE_FIELDS chain decls other than FIELD_DECLs.
30472         (aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
30473         Don't emit -Wpsabi note.
30474         (aarch64_function_arg_boundary): Likewise.
30475         (aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
30476         caller.
30478 2017-04-26  Nathan Sidwell  <nathan@acm.org>
30480         * tree.h (crc32_unsigned_n): Declare.
30481         (crc32_unsigned, crc32_unsigned): Make inline.
30482         * tree.c (crc32_unsigned_bits): Replace with ...
30483         (crc32_unsigned_n): ... this.
30484         (crc32_unsigned, crc32_byte): Remove.
30485         (crc32_string): Remove unnecessary braces.
30487 2017-04-25  Jan Hubicka  <hubicka@ucw.cz>
30489         * ipa-cp.c (estimate_local_effects): Convert sreal to int.
30490         * ipa-inline-analysis.c (MAX_TIME): Remove.
30491         (account_size_time): Use sreal for time.
30492         (dump_inline_summary): Update.
30493         (estimate_function_body_sizes): Update.
30494         (estimate_edge_size_and_time): Update.
30495         (estimate_calls_size_and_time): Update.
30496         (estimate_node_size_and_time): Update.
30497         (inline_merge_summary): Update.
30498         (inline_update_overall_summary): Update.
30499         (estimate_time_after_inlining): Update.
30500         (inline_read_section): Update.
30501         (inline_write_summary): Update.
30502         * ipa-inline.c (compute_uninlined_call_time): Update.
30503         (compute_inlined_call_time): Update.
30504         (recursive_inlining): Update.
30505         (inline_small_functions): Update.
30506         (dump_overall_stats): Update.
30507         * ipa-inline.h: Include sreal.h.
30508         (size_time_entry): Turn time to sreal.
30509         (inline_summary): Turn self_time nad time to sreal.
30511 2017-04-25  Jan Hubicka  <hubicka@ucw.cz>
30513         * sreal.c: Include backend.h, tree.h, gimple.h, cgraph.h and
30514         data-streamer.h
30515         (sreal::stream_out, sreal::stream_in): New.
30516         * sreal.h (sreal::stream_out, sreal::stream_in): Declare.
30518 2017-04-25  Jakub Jelinek  <jakub@redhat.com>
30520         * Makefile.in (s-options): Invoke opt-gather.awk with LC_ALL=C in the
30521         environment.
30523 2017-04-25  Uros Bizjak  <ubizjak@gmail.com>
30525         PR target/70799
30526         * config/i386/i386.c (dimode_scalar_to_vector_candidate_p):
30527         Handle ASHIFTRT.
30528         (dimode_scalar_chain::compute_convert_gain): Ditto.
30529         (dimode_scalar_chain::make_vector_copies): Ditto.
30530         (dimode_scalar_chain::convert_reg): Ditto.
30531         (dimode_scalar_chain::convert_insn): Ditto.
30532         * config/i386/sse.md (VI24_AVX512BW_1): Remove mode iterator.
30533         (VI248_AVX512BW_1): New mode iterator.
30534         (<mask_codefor>ashr<mode>3<mask_name>): Merge insn pattern with
30535         <mask_codefor>ashrv2di3<mask_name> insn using VI248_AVX512BW_1
30536         mode iterator.
30538 2017-04-25  Martin Sebor  <msebor@redhat.com>
30540         PR tree-optimization/80497
30541         * gimple-ssa-sprintf.c (get_int_range): Avoid assuming all integer
30542         constants are representable in HOST_WIDE_INT.
30543         (parse_directive): Ditto.
30545 2017-04-25  Martin Sebor  <msebor@redhat.com>
30547         PR bootstrap/80486
30548         * dominance.c (dom_info::m_n_basic_blocks): Change type to unsigned.
30549         (new_zero_array): Adjust signature.
30550         (dom_info::dom_init): Used unsigned rather that size_t.
30551         (dom_info::dom_info): Same.
30553 2017-04-25  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
30554             Jakub Jelinek  <jakub@redhat.com>
30556         PR target/77728
30557         * config/arm/arm.c: Include gimple.h.
30558         (aapcs_layout_arg): Emit -Wpsabi note if arm_needs_doubleword_align
30559         returns negative, increment ncrn only if it returned positive.
30560         (arm_needs_doubleword_align): Return int instead of bool,
30561         ignore DECL_ALIGN of non-FIELD_DECL TYPE_FIELDS chain
30562         members, but if there is any such non-FIELD_DECL
30563         > PARM_BOUNDARY aligned decl, return -1 instead of false.
30564         (arm_function_arg): Emit -Wpsabi note if arm_needs_doubleword_align
30565         returns negative, increment nregs only if it returned positive.
30566         (arm_setup_incoming_varargs): Likewise.
30567         (arm_function_arg_boundary): Emit -Wpsabi note if
30568         arm_needs_doubleword_align returns negative, return
30569         DOUBLEWORD_ALIGNMENT only if it returned positive.
30571 2017-04-25  Marek Polacek  <polacek@redhat.com>
30573         PR sanitizer/80349
30574         * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
30575         first argument to type.
30577 2017-04-25  Bill Seurer  <seurer@linux.vnet.ibm.com>
30579         PR target/80482
30580         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change
30581         type checks to test for compatibility instead of equality.
30583 2017-04-25  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
30584             Jakub Jelinek  <jakub@redhat.com>
30586         PR target/77728
30587         * config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): New
30588         type.
30589         (aarch64_function_arg_alignment): Return aarch64_fn_arg_alignment
30590         struct.  Ignore DECL_ALIGN of decls other than FIELD_DECL for
30591         the alignment computation, but return their maximum in warn_alignment.
30592         (aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
30593         Emit a -Wpsabi note if warn_alignment is 16 bytes, but alignment
30594         is smaller.
30595         (aarch64_function_arg_boundary): Likewise.  Simplify using MIN/MAX.
30596         (aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
30597         caller.
30599 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
30601         * config/arc/simdext.md (dmpyh): Fix typo.
30603 2017-04-25  Richard Biener  <rguenther@suse.de>
30605         PR tree-optimization/80492
30606         * alias.c (compare_base_decls): Handle registers with asm
30607         specification conservatively.
30608         * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
30609         compare_base_decls returning dont-know properly.
30611 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
30613         * config/arc/arc.c (LEGITIMATE_OFFSET_ADDRESS_P): Delete macro.
30614         (legitimate_offset_address_p): New function.
30615         (arc_legitimate_address_p): Use above function.
30617 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
30619         * config/arc/arc.c (arc_output_mi_thunk): Emit PIC calls.
30621 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
30623         * config/arc/arc.c (arc_conditional_register_usage): Use ACCL,
30624         ACCH registers whenever they are available.
30626 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
30628         * config/arc/arc.c (arc_conditional_register_usage): Make D0, D1
30629         double regs fix when not used.
30631 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
30633         * config/arc/arc.h (REGNO_OK_FOR_BASE_P): Consider also extension
30634         core registers.
30635         (REG_OK_FOR_INDEX_P_NONSTRICT): Likewise.
30636         (REG_OK_FOR_BASE_P_NONSTRICT): Likewise.
30638 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
30640         * config/arc/arc.c (arc_output_addsi): Check for h-register class
30641         when emitting short ADD instructions.
30643 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
30645         * config/arc/arc.md (cmpsi_cc_insn_mixed): Use 'h' register
30646         constraint.
30647         (cmpsi_cc_c_insn): Likewise.
30648         (cbranchsi4_scratch): Compute proper instruction length using
30649         compact_hreg_operand.
30650         * config/arc/predicates.md (compact_hreg_operand): New predicate.
30652 2017-04-25  Richard Biener  <rguenther@suse.de>
30654         PR middle-end/80509
30655         * passes.c (pass_manager::pass_manager): Initialize
30656         m_name_to_pass_map.
30658 2017-04-25  Richard Biener  <rguenther@suse.de>
30660         PR tree-optimization/79201
30661         * tree-ssa-sink.c (statement_sink_location): Handle calls.
30663 2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
30665         PR target/80464
30666         * config/s390/vector.md: Split MEM->GPR vector moves for
30667         non-s_operand addresses.
30669 2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
30671         PR target/79895
30672         * config/s390/predicates.md (reload_const_wide_int_operand): New
30673         predicate.
30674         * config/s390/s390.md ("movti"): Remove d/P alternative.
30675         ("movti_bigconst"): New pattern definition.
30677 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
30679         PR target/80080
30680         * s390-protos.h (s390_expand_cs_hqi): Removed.
30681         (s390_expand_cs, s390_expand_atomic_exchange_tdsi): New prototypes.
30682         * config/s390/s390.c (s390_emit_compare_and_swap): Handle all integer
30683         modes as well as CCZ1mode and CCZmode.
30684         (s390_expand_atomic_exchange_tdsi, s390_expand_atomic): Adapt to new
30685         signature of s390_emit_compare_and_swap.
30686         (s390_expand_cs_hqi): Likewise, make static.
30687         (s390_expand_cs_tdsi): Generate an explicit compare before trying
30688         compare-and-swap, in some cases.
30689         (s390_expand_cs): Wrapper function.
30690         (s390_expand_atomic_exchange_tdsi): New backend specific expander for
30691         atomic_exchange.
30692         (s390_match_ccmode_set): Allow CCZmode <-> CCZ1 mode.
30693         * config/s390/s390.md ("atomic_compare_and_swap<mode>"): Merge the
30694         patterns for small and large integers.  Forbid symref memory operands.
30695         Move expander to s390.c.  Require cc register.
30696         ("atomic_compare_and_swap<DGPR:mode><CCZZ1:mode>_internal")
30697         ("*atomic_compare_and_swap<TDI:mode><CCZZ1:mode>_1")
30698         ("*atomic_compare_and_swapdi<CCZZ1:mode>_2")
30699         ("*atomic_compare_and_swapsi<CCZZ1:mode>_3"): Use s_operand to forbid
30700         symref memory operands.  Remove CC mode and call s390_match_ccmode
30701         instead.
30702         ("atomic_exchange<mode>"): Allow and implement all integer modes.
30704 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
30706         * config/s390/s390.md (define_peephole2): New peephole to help
30707         combining the load-and-test pattern with volatile memory.
30709 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
30711         * config/s390/s390.md ("cstorecc4"): Use load-on-condition and deal
30712         with CCZmode for TARGET_Z196.
30714 2017-04-25  Jakub Jelinek  <jakub@redhat.com>
30716         PR rtl-optimization/80501
30717         * combine.c (make_compound_operation_int): Set subreg_code to SET
30718         even for AND with mask of the sign bit of mode.
30720         PR rtl-optimization/80500
30721         * loop-unroll.c (combine_var_copies_in_loop_exit): Call copy_rtx on
30722         sum's initial value.
30724 2017-04-25  Julian Brown  <julian@codesourcery.com>
30725             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
30727         * config/aarch64/thunderx2t99.md (thunderx2t99_crc): New Reservation.
30729 2017-04-25  Marc Glisse  <marc.glisse@inria.fr>
30731         * fold-const.c (tree_single_nonzero_warnv_p): Handle SSA_NAME.
30733 2017-04-25  Julian Brown  <julian@codesourcery.com>
30734             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
30736         * config/aarch64/thunderx2t99.md (thunderx2t99_aes): New Reservation.
30737         (thunderx2t99_sha): New Reservation.
30739 2017-04-25  Julian Brown  <julian@codesourcery.com>
30740             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
30742         * config/aarch64/aarch64-simd.md (aarch64_simd_vec_set<mode>): Fix
30743         type for 1-element load.
30745 2017-04-24  Marc Glisse  <marc.glisse@inria.fr>
30747         * match.pd (X/[ex]C CMP Y/[ex]C): New transformation.
30749 2017-04-24  Martin Jambor  <mjambor@suse.cz>
30751         PR tree-optimization/80293
30752         * tree-sra.c (scalarizable_type_p): New parameter const_decl, make
30753         char arrays not totally scalarizable if it is false.
30754         (analyze_all_variable_accesses): Pass correct value in the new
30755         parameter.  Add a statistics counter.
30757 2017-04-24  Jan Hubicka  <hubicka@ucw.cz>
30759         PR middle-end/79931
30760         * ipa-devirt.c (dump_possible_polymorphic_call_targets): Fix ICE.
30762 2017-04-24  Richard Biener  <rguenther@suse.de>
30764         PR tree-optimization/80494
30765         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Bail
30766         out for complex types.
30768 2017-04-24  Richard Biener  <rguenther@suse.de>
30770         * tree-ssa-sccvn.h (run_scc_vn): Adjust prototype.
30771         * tree-ssa-sccvn.c (print_scc): Print SCC size.
30772         (extract_and_process_scc_for_name): Never fail but drop SCC to varying.
30773         (DFS): Adjust and never fail.
30774         (sccvn_dom_walker::fail): Remove.
30775         (sccvn_dom_walker::before_dom_children): Adjust.
30776         (run_scc_vn): Likewise and never fail.
30777         * tree-ssa-pre.c (pass_pre::execute): Adjust.
30778         (pass_fre::execute): Likewise.
30780 2017-04-24  Richard Biener  <rguenther@suse.de>
30782         PR tree-optimization/79725
30783         * tree-ssa-sink.c (statement_sink_location): Return whether
30784         failure reason was zero uses.  Move that check later.
30785         (sink_code_in_bb): Deal with zero uses by removing the stmt
30786         if possible.
30788 2017-04-24  Richard Biener  <rguenther@suse.de>
30790         PR c++/2972
30791         * tree-ssa-uninit.c (warn_uninitialized_vars): Handle some
30792         pointer-based references.
30794 2017-04-24  Richard Biener  <rguenther@suse.de>
30796         PR bootstrap/79814
30797         * pass_manager.h (pass_manager::operator new): Remove.
30798         (pass_manager::operator delete): Likewise.
30799         * passes.c (pass_manager::operator new): Remove.
30800         (pass_manager::operator delete): Likewise.
30801         (pass_manager::pass_manager): Zero individual pass members.
30803 2017-04-23  Uros Bizjak  <ubizjak@gmail.com>
30805         PR target/70799
30806         * config/i386/i386.c (dimode_scalar_to_vector_candidate_p)
30807         <case ASHIFT, case LSHIFTRT>: Also consider variable shifts.
30808         Check "XEXP (src, 1)" operand here.
30809         <case PLUS, case MINUS, case IOR, case XOR, case AND>:
30810         Check "XEXP (src, 1)" operand here.
30811         (dimode_scalar_chain::make_vector_copies): Detect count register
30812         of a shift instruction.  Zero extend count register from QImode
30813         to DImode to satisfy vector shift pattern count operand predicate.
30814         Substitute vector shift count operand with a DImode copy.
30815         (dimode_scalar_chain::convert_reg): Ditto, zero-extend from
30816         vector register.
30818 2017-04-21  Uros Bizjak  <ubizjak@gmail.com>
30820         * config/i386/i386.md (*extzvqi_mem_rex64): Move above *extzv<mode>.
30821         Remove UNSPEC_NOREX_MEM tag.  Update corresponding peephole2 pattern.
30822         (*insvqi_1_mem_rex64): Move above insv<mode>_1.  Remove
30823         UNSPEC_NOREX_MEM tag.  Update corresponding peephole2 pattern.
30824         (UNSPEC_NOREX_MEM): Remove definition.
30826 2017-04-21  Richard Biener  <rguenther@suse.de>
30828         PR tree-optimization/79547
30829         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
30830         Handle strlen, strcmp, strncmp, strcasecmp, strncasecmp, memcmp,
30831         bcmp, strspn, strcspn, __builtin_object_size and __builtin_constant_p
30832         without any constraints.
30834 2017-04-21  Richard Biener  <rguenther@suse.de>
30836         PR tree-optimization/78847
30837         * fold-const.c (split_tree): Handle POINTER_PLUS_EXPR.
30839 2017-04-21  Richard Biener  <rguenther@suse.de>
30841         * tree.h (build_qualified_type): Annotate with CXX_MEM_STAT_INFO.
30842         (build_distinct_type_copy): Likewise.
30843         (build_variant_type_copy): Likewise.
30844         * tree.c (build_qualified_type): Pass down mem-stat info.
30845         (build_distinct_type_copy): Likewise.
30846         (build_variant_type_copy): Likewise.
30848 2017-04-21  Richard Biener  <rguenther@suse.de>
30850         PR tree-optimization/80237
30851         * tree-ssa-pre.c (find_leader_in_sets): Add third set argument,
30852         defaulted to NULL.
30853         (phi_translate_1): Also allow a leader in AVAIL_OUT of pred
30854         for a simplified result.
30856 2016-04-21  Richard Biener  <rguenther@suse.de>
30858         * tree-ssa-loop-ivcanon.c (constant_after_peeling): Do not require
30859         sth as strict as a simple_iv but a chrec without symbols and an
30860         operand defined in the loop we are peeling (and not some subloop).
30861         (propagate_constants_for_unrolling): Propagate all constants.
30863 2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
30865         PR target/79804
30866         * config/i386/i386.c (print_reg): Remove assert for disalowed
30867         regno values, call output_operand_lossage instead.
30869 2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
30871         PR target/78090
30872         * config/i386/constraints.md (Yc): New register constraint.
30873         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
30874         Use Yc constraint for alternative 2 of operand 0.  Remove
30875         preferred_for_speed attribute.
30877 2017-04-20  Alexander Monakov  <amonakov@ispras.ru>
30879         * omp-low.c (lower_lastprivate_clauses): Correct handling of linear and
30880         lastprivate clauses in SIMT case.
30882 2017-04-20  Volker Reichelt  <v.reichelt@netcologne.de>
30884         * doc/invoke.texi (-Wextra-semi): Document new warning option.
30886 2017-04-20  Richard Biener  <rguenther@suse.de>
30888         PR tree-optimization/57796
30889         * tree-vect-stmts.c (vect_model_store_cost): Cost scatters
30890         as N scalar stores.
30891         (vect_model_load_cost): Cost gathers as N scalar loads.
30893 2017-04-20  Richard Biener  <rguenther@suse.de>
30895         * ggc-page.c (ggc_allocated_p): Rename to ...
30896         (safe_lookup_page_table_entry): ... this and return the lookup
30897         result.
30898         (gt_ggc_m_S): Use safe_lookup_page_table_entry.
30900 2017-04-20  Richard Biener  <rguenther@suse.de>
30902         PR tree-optimization/80453
30903         * tree-ssa-sccvn.h (struct vn_phi_s): Add cclhs and ccrhs members.
30904         * tree-ssa-sccvn.c (cond_stmts_equal_p): Use recorded lhs and rhs
30905         from the conditions.
30906         (vn_phi_eq): Pass them down.
30907         (vn_phi_lookup): Record them.
30908         (vn_phi_insert): Likewise.
30910 2017-04-20  Matthew Fortune  <matthew.fortune@imgtec.com>
30912         * config/mips/mips.c (mips_expand_vec_perm_const): Re-fix
30913         uninitialized variable warning to avoid buffer overrun.
30915 2017-04-20  Alexander Monakov  <amonakov@ispras.ru>
30917         PR other/71250
30918         * doc/invoke.texi (-Wmissing-field-initializers): Mention that warning
30919         is suppressed for '{ 0 }' in C.
30921 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
30923         * BASE-VER: Set to 8.0.0.
30925 2017-04-20  Thomas Preud'homme  <thomas.preudhomme@arm.com>
30927         * config/arm/arm.c (arm_elf_asm_cdtor): Create non-default
30928         priority .init_array and .fini_array section with SECTION_NOTYPE
30929         flag.
30931 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
30933         PR middle-end/80423
30934         * tree.h (build_array_type): Add typeless_storage default argument.
30935         * tree.c (type_cache_hasher::equal): Also compare
30936         TYPE_TYPELESS_STORAGE flag for ARRAY_TYPEs.
30937         (build_array_type): Add typeless_storage argument, set
30938         TYPE_TYPELESS_STORAGE to it, if shared also hash it, and pass to
30939         recursive call.
30940         (build_nonshared_array_type): Adjust build_array_type_1 caller.
30941         (build_array_type): Likewise.  Add typeless_storage argument.
30943 2017-04-19  Eric Botcazou  <ebotcazou@adacore.com>
30944             Jakub Jelinek  <jakub@redhat.com>
30946         PR tree-optimization/80426
30947         * tree-vrp.c (extract_range_from_binary_expr_1): For an additive
30948         operation on symbolic operands, also compute the overflow for the
30949         invariant part when the operation degenerates into a negation.
30951 2017-04-19  Jakub Jelinek  <jakub@redhat.com>
30953         PR debug/80461
30954         * dwarf2out.c (modified_type_die, gen_type_die_with_usage):
30955         Check for t with zero TYPE_QUALS_NO_ADDR_SPACE.
30957         PR debug/80436
30958         * tree-ssa-loop-manip.c (find_uses_to_rename_def): Ignore debug uses.
30960 2017-04-19  Georg-Johann Lay  <avr@gjlay.de>
30962         PR target/80462
30963         * config/avr/avr.c (tree.h): Include it.
30964         (cgraph.h): Include it.
30965         (avr_encode_section_info): Don't warn for uninitialized progmem
30966         variable if it's just an alias.
30968 2017-04-19  Richard Biener  <rguenther@suse.de>
30970         PR ipa/65972
30971         * auto-profile.c (afdo_vpt_for_early_inline): Update SSA
30972         when needed by AutoPGO.
30974 2017-04-19  Paulo J. Matos  <paulo@matos-sorge.com>
30976         PR lto/50345
30977         * doc/lto.texi: Remove an extra 'that'.
30979 2017-04-19  Segher Boessenkool  <segher@kernel.crashing.org>
30981         PR rtl-optimization/80429
30982         * ira.c (split_live_ranges_for_shrink_wrap): Don't split regs that
30983         are only used in debug insns.
30985 2017-04-19  Eric Botcazou  <ebotcazou@adacore.com>
30986             Vladimir Makarov  <vmakarov@redhat.com>
30988         * config/sparc/predicates.md (input_operand): Add comment.  Return
30989         true for any memory operand when LRA is in progress.
30990         * config/sparc/sparc.c (sparc_expand_move): Minor formatting fix.
30992 2017-04-18  Jeff Law  <law@redhat.com>
30994         PR target/74563
30995         * mips.md ({return,simple_return}_internal): Do not overwrite
30996         operands[0].
30998 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
31000         PR tree-optimization/80443
31001         * tree-vrp.c (intersect_ranges): For signed 1-bit precision type,
31002         instead of adding 1, subtract -1 and similarly instead of subtracting
31003         1 add -1.
31005 2017-04-18  Richard Sandiford  <richard.sandiford@arm.com>
31007         PR rtl-optimization/80357
31008         * haifa-sched.c (tmp_bitmap): New variable.
31009         (model_recompute): Handle duplicate use records.
31010         (alloc_global_sched_pressure_data): Initialize tmp_bitmap.
31011         (free_global_sched_pressure_data): Free it.
31013 2017-04-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
31015         Revert:
31016         2017-02-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
31017         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
31018         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
31019         instead of SYSTEM_HEADER_DIR.
31021 2017-04-18  Jeff Law  <law@redhat.com>
31023         PR middle-end/80422
31024         * cfgcleanup.c (try_crossjump_to_edge): Verify SRC1 and SRC2 have
31025         predecessors after walking up the insn chain.
31027 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
31029         PR debug/80263
31030         * dwarf2out.c (modified_type_die): Try harder not to emit internal
31031         sizetype type into debug info.
31033 2017-04-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
31035         PR target/80099
31036         * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Eliminate
31037         unneeded test for TARGET_UPPER_REGS_SF.
31038         * config/rs6000/vsx.md (vsx_extract_v4sf_var): Likewise.
31040 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
31042         PR sanitizer/80444
31043         * sancov.c (sancov_pass): Use gsi_start_nondebug_after_labels_bb
31044         instead of gsi_after_labels.
31046 2017-04-18  Jeff Law  <law@redhat.com>
31048         * regcprop.c (maybe_mode_change): Avoid creating copies of the
31049         stack pointer.
31051         Revert:
31052         2017-04-13  Jeff Law  <law@redhat.com>
31053         * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
31054         in operands[1] if it is a MEM and TARGET_MIPS16 is active.
31056 2017-04-18  Georg-Johann Lay  <avr@gjlay.de>
31058         PR target/79453
31059         * config/avr/avr.c (intl.h): Include it.
31060         (avr_pgm_check_var_decl) [reason]: Wrap diagnostic snippets into _().
31062 2017-04-18  Martin Liska  <mliska@suse.cz>
31064         PR gcov-profile/78783
31065         * gcov-tool.c (gcov_output_files): Validate that destination
31066         file is either removed by the tool or by a user.
31068 2017-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
31069             Guy Benyei  <guybe@mellanox.com>
31071         * config/arc/arc.c (arc_reorg): Move loop_end_id into a more local
31072         block, and do not negate it, the stored id is already negative.
31074 2017-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
31076         * config/arc/arc.md (doloop_begin_i): Use @pcl assembler syntax.
31078 2017-04-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
31080         PR target/80098
31081         * config/rs6000/rs6000-cpus.def (OTHER_P9_VECTOR_MASKS): Define
31082         masks of options that should be turned off if the VSX vector
31083         options are turned off.
31084         (OTHER_P8_VECTOR_MASKS): Likewise.
31085         (OTHER_VSX_VECTOR_MASKS): Likewise.
31086         * config/rs6000/rs6000.c (rs6000_option_override_internal): Call
31087         rs6000_disable_incompatible_switches to validate no type switches
31088         like -mvsx.
31089         (rs6000_incompatible_switch): New function to disallow turning on
31090         other vector options if -mno-vsx, -mno-power8-vector, or
31091         -mno-power9-vector are specified.
31093 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
31095         * config/arc/arc.h (CRT_CALL_STATIC_FUNCTION): Use long calls.
31097 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
31099         * config/arc/arc-protos.h (arc_decl_pretend_args): Remove.
31100         * config/arc/arc.c (arc_decl_pretend_args): Likewise.
31101         * config/arc/arc.h (CFA_FRAME_BASE_OFFSET): Likewise.
31102         (ARG_POINTER_CFA_OFFSET): Likewise.
31104 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
31106         * config/arc/arc.c (arc_mode_dependent_address_p): Relax
31107         conditions to take advantage of various optimizations.
31109 2017-04-13  Jeff Law  <law@redhat.com>
31111         * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
31112         in operands[1] if it is a MEM and TARGET_MIPS16 is active.
31113         (zero_extendsidi2_dext): Likewise.
31115 2017-04-13  Jakub Jelinek  <jakub@redhat.com>
31117         PR sanitizer/80403
31118         * fold-const.c (fold_ternary_loc): Revert
31119         use op0 instead of fold_convert_loc (loc, type, arg0) part of
31120         2017-04-12 change.
31122 2017-04-13  Vladimir Makarov  <vmakarov@redhat.com>
31124         PR rtl-optimization/80343
31125         * lra-remat.c (update_scratch_ops): Assign original hard reg to
31126         new scratch pseudo.
31128 2017-04-13  Denis Khalikov <d.khalikov@partner.samsung.com>
31130         PR sanitizer/80414
31131         * ubsan.c (ubsan_expand_bounds_ifn): Pass original index
31132         to ubsan_encode_value.
31134 2017-04-13  Jeff Law  <law@redhat.com>
31136         * reload1.c (eliminate_regs_1): Call gen_rtx_raw_SUBREG for SUBREGs
31137         appearing in DEBUG_INSNs.
31139 2017-04-13  Martin Liska  <mliska@suse.cz>
31141         PR gcov-profile/80413
31142         * gcov-io.c (gcov_write_string): Copy to buffer just when
31143         allocated size is greater than zero.
31145 2017-04-13  Jakub Jelinek  <jakub@redhat.com>
31147         PR debug/80321
31148         * dwarf2out.c (decls_for_scope): Ignore declarations of
31149         current_function_decl in BLOCK_NONLOCALIZED_VARS.
31151 2017-04-12  Jan Hubicka  <hubicka@ucw.cz>
31153         PR lto/69953
31154         * ipa-visibility.c (non_local_p): Fix typos.
31155         (localize_node): When localizing symbol in same comdat group,
31156         dissolve the group only when we know external symbols are going
31157         to be privatized.
31158         (function_and_variable_visibility): Do not localize DECL_EXTERNAL.
31160 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
31162         PR tree-optimization/79390
31163         * optabs.c (emit_conditional_move): If the preferred op2/op3 operand
31164         order does not result in usable sequence, retry with reversed operand
31165         order.
31167         PR sanitizer/80403
31168         PR sanitizer/80404
31169         PR sanitizer/80405
31170         * fold-const.c (fold_ternary_loc): Use op1 instead of arg1 as argument
31171         to fold_build2_loc.  Convert TREE_OPERAND (tem, 0) to type.  Use
31172         op0 instead of fold_convert_loc (loc, type, arg0).
31174 2017-04-12  Jeff Law  <law@redhat.com>
31176         * genattrtab.c (write_eligible_delay): Verify DELAY_INSN still
31177         has a delay slot in the generated code.
31179         * config/cris/cris.md (cris_preferred_reload_class): Return
31180         GENNONACR_REGS rather than GENERAL_REGS.
31182 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
31184         PR c/80163
31185         * expr.c <CASE_CONVERT>: For EXPAND_INITIALIZER determine SIGN_EXTEND
31186         vs. ZERO_EXTEND based on signedness of treeop0's type rather than
31187         signedness of the result type.
31189 2017-04-12  Richard Biener  <rguenther@suse.de>
31190             Jeff Law  <law@redhat.com>
31192         PR tree-optimization/80359
31193         * tree-ssa-dse.c (maybe_trim_partially_dead_store): Do not
31194         trim stores to TARGET_MEM_REFs.
31196 2017-04-12  Richard Biener  <rguenther@suse.de>
31198         PR tree-optimization/79390
31199         * gimple-ssa-split-paths.c (is_feasible_trace): Restrict
31200         threading case even more.
31202 2017-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
31204         PR target/80382
31205         * config/rs6000/sync.md (atomic_load<mode>, atomic_store<mode): Test
31206         for quad_address_p for TImode, instead of just not indexed_address.
31208 2017-04-12  Richard Biener  <rguenther@suse.de>
31209             Bernd Edlinger  <bernd.edlinger@hotmail.de>
31211         PR middle-end/79671
31212         * alias.c (component_uses_parent_alias_set_from): Handle
31213         TYPE_TYPELESS_STORAGE.
31214         (get_alias_set): Likewise.
31215         * tree-core.h (tree_type_common): Add typeless_storage flag.
31216         * tree.h (TYPE_TYPELESS_STORAGE): New macro.
31217         * stor-layout.c (place_union_field): Set TYPE_TYPELESS_STORAGE
31218         for types containing members with TYPE_TYPELESS_STORAGE.
31219         (place_field): Likewise.
31220         (layout_type): Likewise for ARRAY_TYPE.
31221         * lto-streamer-out.c (hash_tree): Hash TYPE_TYPELESS_STORAGE.
31222         * tree-streamer-in.c (unpack_ts_type_common_value_fields): Stream
31223         TYPE_TYPELESS_STORAGE.
31224         * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
31226 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
31228         PR sanitizer/80349
31229         * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
31230         first argument to type.
31232 2017-04-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31234         PR target/80376
31235         PR target/80315
31236         * config/rs6000/rs6000.c (rs6000_expand_unop_builtin): Return
31237         CONST0_RTX (mode) rather than const0_rtx where appropriate.
31238         (rs6000_expand_binop_builtin): Likewise.
31239         (rs6000_expand_ternop_builtin): Likewise; also add missing
31240         vsx_xxpermdi_* variants; also fix typo (arg1 => arg2) for
31241         vshasigma built-ins.
31242         * doc/extend.texi: Document that vec_xxpermdi's third argument
31243         must be a constant.
31245 2017-04-11  Uros Bizjak  <ubizjak@gmail.com>
31247         * config/i386/i386.c (dimode_scalar_chain::compute_convert_gain):
31248         Use shift_const cost parameter when calculating gain of STV shifts.
31250 2017-04-11  Vladimir Makarov  <vmakarov@redhat.com>
31252         PR rtl-optimization/70478
31253         * lra-constraints.c (process_alt_operands): Check memory for
31254         disfavoring memory insn operand.
31256 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
31258         PR middle-end/80100
31259         * simplify-rtx.c (simplify_binary_operation_1) <case IOR>: Perform
31260         left shift in unsigned HOST_WIDE_INT type.
31262         PR rtl-optimization/80385
31263         * simplify-rtx.c (simplify_unary_operation_1): Don't transform
31264         (not (neg X)) into (plus X -1) for complex or non-integral modes.
31266         PR libgomp/80394
31267         * omp-low.c (scan_omp_task): Don't optimize away empty tasks
31268         if they have any depend clauses.
31270 2017-04-11  Martin Liska  <mliska@suse.cz>
31272         PR ipa/80212
31273         * cgraph.c (cgraph_node::dump): Dump calls_comdat_local.
31274         * ipa-split.c (split_function): Create a local comdat symbol
31275         if caller is in a comdat group.
31277 2017-04-11  Martin Liska  <mliska@suse.cz>
31279         PR ipa/80212
31280         * ipa-cp.c (determine_versionability): Handle calls_comdat_local
31281         flags.
31283 2017-04-11  Martin Sebor  <msebor@redhat.com>
31285         PR middle-end/80364
31286         * gimple-ssa-sprintf.c (get_int_range): Remove second argument and
31287         always use the int type.  Use INTEGRAL_TYPE_P() rather than testing
31288         for INTEGER_TYPE.
31289         (directive::set_width, directive::set_precision, format_character):
31290         Adjust.
31291         (parse_directive): Use INTEGRAL_TYPE_P() rather than testing for
31292         INTEGER_TYPE.
31294 2017-04-11  Richard Earnshaw  <rearnsha@arm.com>
31296         PR target/80389
31297         * config/arm/arm.c (arm_configure_build_target): When -mcpu and -arch
31298         conflict, set target->arch_name instead of target->cpu_name.
31300 2017-04-11  Richard Biener  <rguenther@suse.de>
31302         PR tree-optimization/80374
31303         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Use
31304         build_zero_cst, remove fold_convertible_p check again.
31306 2017-04-11  Martin Liska  <mliska@suse.cz>
31308         PR sanitizer/70878
31309         * ubsan.c (instrument_object_size): Do not instrument register
31310         variables.
31312 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
31314         PR target/80381
31315         * config/i386/i386-builtin-types.def
31316         (V16HI_FTYPE_V16HI_INT_V16HI_UHI_COUNT,
31317         V16HI_FTYPE_V16HI_V8HI_V16HI_UHI_COUNT,
31318         V16SI_FTYPE_V16SI_INT_V16SI_UHI_COUNT,
31319         V16SI_FTYPE_V16SI_V4SI_V16SI_UHI_COUNT,
31320         V2DI_FTYPE_V2DI_INT_V2DI_UQI_COUNT,
31321         V2DI_FTYPE_V2DI_V2DI_V2DI_UQI_COUNT,
31322         V32HI_FTYPE_V32HI_INT_V32HI_USI_COUNT,
31323         V32HI_FTYPE_V32HI_V8HI_V32HI_USI_COUNT,
31324         V4DI_FTYPE_V4DI_INT_V4DI_UQI_COUNT,
31325         V4DI_FTYPE_V4DI_V2DI_V4DI_UQI_COUNT,
31326         V4SI_FTYPE_V4SI_INT_V4SI_UQI_COUNT,
31327         V4SI_FTYPE_V4SI_V4SI_V4SI_UQI_COUNT,
31328         V8DI_FTYPE_V8DI_INT_V8DI_UQI_COUNT,
31329         V8DI_FTYPE_V8DI_V2DI_V8DI_UQI_COUNT,
31330         V8HI_FTYPE_V8HI_INT_V8HI_UQI_COUNT,
31331         V8HI_FTYPE_V8HI_V8HI_V8HI_UQI_COUNT,
31332         V8SI_FTYPE_V8SI_INT_V8SI_UQI_COUNT,
31333         V8SI_FTYPE_V8SI_V4SI_V8SI_UQI_COUNT): New function type aliases.
31334         * config/i386/i386-builtin.def (__builtin_ia32_pslld512_mask,
31335         __builtin_ia32_pslldi512_mask, __builtin_ia32_psllq512_mask,
31336         __builtin_ia32_psllqi512_mask, __builtin_ia32_psrad512_mask,
31337         __builtin_ia32_psradi512_mask, __builtin_ia32_psraq512_mask,
31338         __builtin_ia32_psraqi512_mask, __builtin_ia32_psrld512_mask,
31339         __builtin_ia32_psrldi512_mask, __builtin_ia32_psrlq512_mask,
31340         __builtin_ia32_psrlqi512_mask, __builtin_ia32_psllwi128_mask,
31341         __builtin_ia32_pslldi128_mask, __builtin_ia32_psllqi128_mask,
31342         __builtin_ia32_psllw128_mask, __builtin_ia32_pslld128_mask,
31343         __builtin_ia32_psllq128_mask, __builtin_ia32_psllwi256_mask,
31344         __builtin_ia32_psllw256_mask, __builtin_ia32_pslldi256_mask,
31345         __builtin_ia32_pslld256_mask, __builtin_ia32_psllqi256_mask,
31346         __builtin_ia32_psllq256_mask, __builtin_ia32_psradi128_mask,
31347         __builtin_ia32_psrad128_mask, __builtin_ia32_psradi256_mask,
31348         __builtin_ia32_psrad256_mask, __builtin_ia32_psraqi128_mask,
31349         __builtin_ia32_psraq128_mask, __builtin_ia32_psraqi256_mask,
31350         __builtin_ia32_psraq256_mask, __builtin_ia32_psrldi128_mask,
31351         __builtin_ia32_psrld128_mask, __builtin_ia32_psrldi256_mask,
31352         __builtin_ia32_psrld256_mask, __builtin_ia32_psrlqi128_mask,
31353         __builtin_ia32_psrlq128_mask, __builtin_ia32_psrlqi256_mask,
31354         __builtin_ia32_psrlq256_mask, __builtin_ia32_psrawi256_mask,
31355         __builtin_ia32_psraw256_mask, __builtin_ia32_psrawi128_mask,
31356         __builtin_ia32_psraw128_mask, __builtin_ia32_psrlwi256_mask,
31357         __builtin_ia32_psrlw256_mask, __builtin_ia32_psrlwi128_mask,
31358         __builtin_ia32_psrlw128_mask, __builtin_ia32_psllwi512_mask,
31359         __builtin_ia32_psllw512_mask, __builtin_ia32_psrawi512_mask,
31360         __builtin_ia32_psraw512_mask, __builtin_ia32_psrlwi512_mask,
31361         __builtin_ia32_psrlw512_mask): Use _COUNT suffixed function type
31362         aliases.
31363         * config/i386/i386.c (ix86_expand_args_builtin): Rename last_arg_count
31364         flag to second_arg_count, handle 4 argument function type _COUNT
31365         aliases, handle second_arg_count on second argument rather than last.
31367 2017-04-10  Jeff Law  <law@redhat.com>
31369         PR tree-optimization/80374
31370         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Do not try to
31371         record anything if we can not convert integer_zero_node to the
31372         desired type.
31374 2017-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
31376         PR target/80108
31377         * config/rs6000/rs6000.c (rs6000_option_override_internal):
31378         Enhance special handling given to the TARGET_P9_MINMAX option in
31379         relation to certain other options.
31381 2017-04-10  Bin Cheng  <bin.cheng@arm.com>
31383         PR tree-optimization/80153
31384         * tree-ssa-loop-ivopts.c (add_iv_candidate_for_use): Check and
31385         remove POINTER_PLUS_EXPR's base part directly, rather than through
31386         aff_tree.
31388 2017-04-10  Richard Biener  <rguenther@suse.de>
31389             Bin Cheng  <bin.cheng@arm.com>
31391         PR tree-optimization/80153
31392         * tree-affine.c (aff_combination_to_tree): Get base pointer from
31393         the first element of pointer type aff_tree.  Build result expr in
31394         aff_tree's type.
31395         (add_elt_to_tree): Convert to type unconditionally.  Remove other
31396         fold_convert calls.
31397         * tree-ssa-loop-ivopts.c (alloc_iv): Pass in consistent types.
31398         (rewrite_use_nonlinear_expr): Check invariant using iv information.
31400 2017-04-10  Richard Biener  <rguenther@suse.de>
31402         * tree-ssa-structalias.c (find_func_aliases): Properly handle
31403         asm inputs.
31405 2017-04-10  Vladimir Makarov  <vmakarov@redhat.com>
31407         PR rtl-optimization/70478
31408         * lra-constraints.c (curr_small_class_check): New.
31409         (update_and_check_small_class_inputs): New.
31410         (process_alt_operands): Update curr_small_class_check.  Disfavor
31411         alternative insn memory operands.  Check available regs for small
31412         class operands.
31414 2017-03-31  Matthew Fortune  <matthew.fortune@imgtec.com>
31416         PR target/80057
31417         * config/mips/mips.opt (-mvirt): Update description.
31418         * doc/invoke.texi (-mvirt): Likewise.
31420 2017-04-10  Richard Biener  <rguenther@suse.de>
31422         PR middle-end/80362
31423         * fold-const.c (fold_binary_loc): Look at unstripped ops when
31424         looking for NEGATE_EXPR in -A / -B to A / B folding.
31426 2017-04-10  Martin Liska  <mliska@suse.cz>
31428         PR gcov-profile/80224
31429         * gcov.c (print_usage): Fix usage string.
31430         (get_gcov_intermediate_filename): Remove.
31431         (output_gcov_file): Use both for normal and intermediate format.
31432         (generate_results): Do not initialize special file for
31433         intermediate format.
31435 2017-04-10  Richard Biener  <rguenther@suse.de>
31437         PR tree-optimization/80304
31438         * tree-ssa-loop-im.c (ref_indep_loop_p_1): Also recurse
31439         for safelen.
31441 2017-04-10  Nathan Sidwell  <nathan@acm.org>
31443         PR target/79905
31444         * config/rs6000/rs6000.c (rs6000_vector_type): New.
31445         (rs6000_init_builtins): Use it.
31447 2016-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
31449         * config/arm/arm.md (<mrc>): Add mode to SET source.
31450         (<mrrc>): Likewise.
31452 2017-04-10  Richard Biener  <rguenther@suse.de>
31454         PR middle-end/80344
31455         * gimplify.c (is_gimple_mem_rhs_or_call): Allow CLOBBERs.
31457 2017-04-10  Jakub Jelinek  <jakub@redhat.com>
31459         PR target/80324
31460         * config/i386/avx512fintrin.h (_mm512_reduce_add_epi32,
31461         _mm512_reduce_mul_epi32, _mm512_reduce_and_epi32,
31462         _mm512_reduce_or_epi32, _mm512_mask_reduce_add_epi32,
31463         _mm512_mask_reduce_mul_epi32, _mm512_mask_reduce_and_epi32,
31464         _mm512_mask_reduce_or_epi32, _mm512_reduce_min_epi32,
31465         _mm512_reduce_max_epi32, _mm512_reduce_min_epu32,
31466         _mm512_reduce_max_epu32, _mm512_mask_reduce_min_epi32,
31467         _mm512_mask_reduce_max_epi32, _mm512_mask_reduce_min_epu32,
31468         _mm512_mask_reduce_max_epu32, _mm512_reduce_add_ps,
31469         _mm512_reduce_mul_ps, _mm512_mask_reduce_add_ps,
31470         _mm512_mask_reduce_mul_ps, _mm512_reduce_min_ps, _mm512_reduce_max_ps,
31471         _mm512_mask_reduce_min_ps, _mm512_mask_reduce_max_ps,
31472         _mm512_reduce_add_epi64, _mm512_reduce_mul_epi64,
31473         _mm512_reduce_and_epi64, _mm512_reduce_or_epi64,
31474         _mm512_mask_reduce_add_epi64, _mm512_mask_reduce_mul_epi64,
31475         _mm512_mask_reduce_and_epi64, _mm512_mask_reduce_or_epi64,
31476         _mm512_reduce_min_epi64, _mm512_reduce_max_epi64,
31477         _mm512_mask_reduce_min_epi64, _mm512_mask_reduce_max_epi64,
31478         _mm512_reduce_min_epu64, _mm512_reduce_max_epu64,
31479         _mm512_mask_reduce_min_epu64, _mm512_mask_reduce_max_epu64,
31480         _mm512_reduce_add_pd, _mm512_reduce_mul_pd, _mm512_mask_reduce_add_pd,
31481         _mm512_mask_reduce_mul_pd, _mm512_reduce_min_pd, _mm512_reduce_max_pd,
31482         _mm512_mask_reduce_min_pd, _mm512_mask_reduce_max_pd): New intrinsics.
31484 2017-04-08  Vladimir Makarov  <vmakarov@redhat.com>
31486         PR rtl-optimization/70478
31487         * lra-constraints.c: Reverse the last patch.
31489 2017-04-08  Andreas Tobler  <andreast@gcc.gnu.org>
31491         * config/aarch64/aarch64-freebsd.h: Define MCOUNT_NAME.
31492         Add comment for WCHAR_T.
31494 2017-04-08  Martin Liska  <mliska@suse.cz>
31496         Revert:
31497         2017-04-07  Martin Liska  <mliska@suse.cz>
31499         PR ipa/80212
31500         * ipa-split.c (split_function): Add function part to a same comdat
31501         group.
31503 2017-04-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
31505         PR target/80358
31506         * config/rs6000/rs6000.c (expand_block_compare): Fix boundary check.
31508 2017-04-07  Pat Haugen  <pthaugen@us.ibm.com>
31510         * rs6000/rs6000.c (vec_load_pendulum): Rename...
31511         (vec_pairing): ...to this.
31512         (power9_sched_reorder2): Rewrite code for pairing vector/vecload insns.
31513         (rs6000_sched_init): Adjust for name change.
31514         (struct rs6000_sched_context): Likewise.
31515         (rs6000_init_sched_context): Likewise.
31516         (rs6000_set_sched_context): Likewise.
31518 2017-04-07  Jakub Jelinek  <jakub@redhat.com>
31520         PR target/80322
31521         PR target/80323
31522         PR target/80325
31523         PR target/80326
31524         * config/i386/avxintrin.h (_mm256_cvtsd_f64, _mm256_cvtss_f32): New
31525         intrinsics.
31526         * config/i386/avx512fintrin.h (_mm512_int2mask, _mm512_mask2int,
31527         _mm512_abs_ps, _mm512_mask_abs_ps, _mm512_abs_pd, _mm512_mask_abs_pd,
31528         _mm512_cvtsd_f64, _mm512_cvtss_f32): Likewise.
31530 2017-04-07  Andreas Tobler  <andreast@gcc.gnu.org>
31532         * config/aarch64/aarch64-freebsd.h: Define WCHAR_TYPE.
31534 2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>
31536         PR rtl-optimization/70703
31537         * ira-color.c (update_conflict_hard_regno_costs): Use
31538         int64_t instead of HOST_WIDE_INT.
31540 2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>
31542         PR rtl-optimization/70478
31543         * lra-constraints.c (process_alt_operands): Disfavor alternative
31544         insn memory operands.
31546 2017-04-07  Jeff Law  <law@redhat.com>
31548         * config/iq2000/iq2000.c (final_prescan_insn): Do not separate a
31549         CALL and NOTE_INSN_CALL_ARG_LOCATION.
31551 2017-04-07  Martin Liska  <mliska@suse.cz>
31553         PR target/79889
31554         * config/aarch64/aarch64.c (aarch64_process_target_attr):
31555         Show error message instead of an ICE.
31557 2017-04-07  Martin Liska  <mliska@suse.cz>
31559         PR ipa/80212
31560         * ipa-split.c (split_function): Add function part to a same comdat
31561         group.
31563 2017-04-07  Richard Biener  <rguenther@suse.de>
31565         PR middle-end/80341
31566         * tree.c (get_unwidened): Also handle ! for_type case for
31567         INTEGER_CSTs.
31568         * convert.c (do_narrow): Split out from ...
31569         (convert_to_integer_1): ... here.  Do not pass final truncation
31570         type to get_unwidened for TRUNC_DIV_EXPR.
31572 2017-04-07  Richard Biener  <rguenther@suse.de>
31574         * tree-affine.c (wide_int_ext_for_comb): Take type rather
31575         than aff_tree.
31576         (aff_combination_const): Adjust.
31577         (aff_combination_scale): Likewise.
31578         (aff_combination_add_elt): Likewise.
31579         (aff_combination_add_cst): Likewise.
31580         (aff_combination_convert): Likewise.
31581         (add_elt_to_tree): Likewise.  Remove unused argument.
31582         (aff_combination_to_tree): Adjust calls to add_elt_to_tree.
31584 2017-04-07  Sebastian Huber  <sebastian.huber@embedded-brains.de>
31586         * config/arm/arm.h (ARM_DEFAULT_SHORT_ENUMS): Provide default
31587         definition.
31588         * config/arm/arm.c (arm_default_short_enums): Use
31589         ARM_DEFAULT_SHORT_ENUMS.
31590         * config/arm/rtems.h (ARM_DEFAULT_SHORT_ENUMS): Define.
31592 2017-04-06  Jakub Jelinek  <jakub@redhat.com>
31594         PR debug/80234
31595         * dwarf2out.c (gen_member_die): Handle C++17 inline static data
31596         members with redundant out-of-class redeclaration.
31598 2017-04-06  Uros Bizjak  <ubizjak@gmail.com>
31600         PR target/80286
31601         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): New pattern.
31602         * config/i386/i386.md (*zero_extendsidi2):
31603         Add (?*x,*x) and (?*v,*v) alternatives.
31605 2017-04-06  Uros Bizjak  <ubizjak@gmail.com>
31607         PR target/79733
31608         * config/i386/i386.c (ix86_expand_builtin)
31609         <case IX86_BUILTIN_K{,OR}TEST{C,Z}{8,16,32,64}>: Determine insn operand
31610         mode from insn data. Convert operands to insn operand mode.
31611         Copy operands that don't satisfy insn predicate to a register.
31613 2017-04-06  Sam Thursfield  <sam.thursfield@codethink.co.uk>
31615         * config/rs6000/x-aix: Increase memory limit for genautomata on AIX.
31616         Update comments.
31618 2017-04-06  Richard Biener  <rguenther@suse.de>
31620         PR tree-optimization/80334
31621         * tree-ssa-loop-ivopts.c (rewrite_use_address): Properly
31622         preserve alignment of accesses.
31624 2017-04-06  Richard Biener  <rguenther@suse.de>
31626         PR tree-optimization/80262
31627         * tree-sra.c (build_ref_for_offset): Preserve address-space
31628         information.
31629         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
31630         Drop useless address-space information on MEM_REF offsets.
31632 2017-04-05  Andreas Schwab  <schwab@linux-m68k.org>
31634         * builtins.def (BUILT_IN_UPDATE_SETJMP_BUF): Fix type.
31636 2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>
31638         PR rtl-optimization/70703
31639         * ira-color.c (update_conflict_hard_regno_costs): Use
31640         HOST_WIDE_INT instead of long.
31642 2017-04-05  Uros Bizjak  <ubizjak@gmail.com>
31644         PR target/80298
31645         * config/i386/mmintrin.h: Add -msse target option when __SSE__ is
31646         not defined for x86_64 target.  Add -mmmx target option when __SSE2__
31647         is not defined.
31648         * config/i386/mm3dnow.h: Add -msse target when __SSE__ is not defined
31649         for x86_64 target.  Handle -m3dnowa option.
31651 2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>
31653         PR rtl-optimization/70703
31654         * ira-color.c (update_costs_from_allocno): Use the smallest mode.
31655         (update_conflict_hard_regno_costs): Use long instead of unsigned
31656         arithmetic for cost calculation.
31658 2017-04-05  Jakub Jelinek  <jakub@redhat.com>
31659             Bernd Edlinger  <bernd.edlinger@hotmail.de>
31661         PR sanitizer/80308
31662         * asan.c (asan_store_shadow_bytes): Fix location of last_chunk_value
31663         for big endian.
31665 2017-04-05  Eric Botcazou  <ebotcazou@adacore.com>
31667         PR target/78002
31668         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Replace
31669         ptr_mode with Pmode throughout.
31670         * config/aarch64/aarch64.md (probe_stack_range_<PTR:mode): Rename
31671         into probe_stack_range and use DImode.
31673 2017-04-05  Dominik Vogt  <vogt@linux.vnet.ibm.com>
31675         PR target/79890
31676         * config/s390/s390.c (s390_register_info_gprtofpr): Return if
31677         call_eh_return is true.
31679 2017-04-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
31681         * config/s390/s390-c.c (s390_resolve_overloaded_builtin):
31682         Initialize last_match_fntype_index.
31684 2017-04-05  Jakub Jelinek  <jakub@redhat.com>
31686         PR target/80310
31687         * tree-nvr.c: Include internal-fn.h.
31688         (pass_return_slot::execute): Ignore internal calls without
31689         direct optab.
31691 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
31692             Richard Biener  <rguenther@suse.de>
31694         PR c++/80297
31695         * genmatch.c (capture::gen_transform): For GENERIC unshare_expr
31696         captures used multiple times, except for the last use.
31697         * generic-match-head.c: Include gimplify.h.
31699 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
31701         PR tree-optimization/79390
31702         * target.h (struct noce_if_info): Declare.
31703         * targhooks.h (default_noce_conversion_profitable_p): Declare.
31704         * target.def (noce_conversion_profitable_p): New target hook.
31705         * ifcvt.h (struct noce_if_info): New type, moved from ...
31706         * ifcvt.c (struct noce_if_info): ... here.
31707         (noce_conversion_profitable_p): Renamed to ...
31708         (default_noce_conversion_profitable_p): ... this.  No longer
31709         static nor inline.
31710         (noce_try_store_flag_constants, noce_try_addcc,
31711         noce_try_store_flag_mask, noce_try_cmove, noce_try_cmove_arith,
31712         noce_convert_multiple_sets): Use targetm.noce_conversion_profitable_p
31713         instead of noce_conversion_profitable_p.
31714         * config/i386/i386.c: Include ifcvt.h.
31715         (ix86_option_override_internal): Don't override
31716         PARAM_MAX_RTL_IF_CONVERSION_INSNS default.
31717         (ix86_noce_conversion_profitable_p): New function.
31718         (TARGET_NOCE_CONVERSION_PROFITABLE_P): Redefine.
31719         * config/i386/x86-tune.def (X86_TUNE_ONE_IF_CONV_INSN): Adjust comment.
31720         * doc/tm.texi.in (TARGET_NOCE_CONVERSION_PROFITABLE_P): Add.
31721         * doc/tm.texi: Regenerated.
31723 2017-04-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31725         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Grammar
31726         correction.
31728 2017-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
31730         PR target/80307
31731         * config/arm/arm.c (thumb1_rtx_costs): Give a cost of 32
31732         instructions for small multiply cores.
31734 2017-04-04  Jeff Law  <law@redhat.com>
31736         * config/mips/mips.c (mips_multi_add): Zero initialize the newly
31737         added member.
31738         (mips_expand_vec_perm_const): Initialize elements in orig_perm
31739         that are not set by the loop over the elements.
31741 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
31743         PR target/80286
31744         * config/i386/i386.c (ix86_expand_args_builtin): If op has scalar
31745         int mode, convert_modes it to mode as unsigned, otherwise use
31746         lowpart_subreg to mode rather than SImode.
31747         * config/i386/sse.md (<mask_codefor>ashr<mode>3<mask_name>,
31748         ashr<mode>3, ashr<mode>3<mask_name>, <shift_insn><mode>3<mask_name>):
31749         Use DImode instead of SImode for the shift count operand.
31750         * config/i386/mmx.md (mmx_ashr<mode>3, mmx_<shift_insn><mode>3):
31751         Likewise.
31753 2017-04-04  Richard Biener  <rguenther@suse.de>
31755         PR middle-end/80281
31756         * match.pd (A + (-B) -> A - B): Make sure to preserve unsigned
31757         arithmetic done for the negate or the plus.  Simplify.
31758         (A - (-B) -> A + B): Likewise.
31759         * fold-const.c (split_tree): Make sure to not negate pointers.
31761 2017-04-04  Segher Boessenkool  <segher@kernel.crashing.org>
31763         PR rtl-optimization/60818
31764         * simplify-rtx.c (simplify_binary_operation_1): Do not replace
31765         a compare of comparisons with the thing compared if this results
31766         in a different machine mode.
31768 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
31770         * alias.c (base_alias_check): Fix typo in comment.
31771         * cgraph.h (class ipa_polymorphic_call_context): Likewise.
31772         * cgraphunit.c (symbol_table::compile): Likewise.
31773         * collect2.c (maybe_run_lto_and_relink): Likewise.
31774         * config/arm/arm.c (arm_thumb1_mi_thunk): Likewise.
31775         * config/avr/avr-arch.h (avr_arch_info_t): Likewise.
31776         * config/avr/avr.c (avr_map_op_t): Likewise.
31777         * config/cr16/cr16.h (DATA_ALIGNMENT): Likewise.
31778         * config/epiphany/epiphany.c (TARGET_ARG_PARTIAL_BYTES): Likewise.
31779         * config/epiphany/epiphany.md (movcc): Likewise.
31780         * config/i386/i386.c (legitimize_pe_coff_extern_decl): Likewise.
31781         * config/m68k/m68k.c (struct _sched_ib, m68k_sched_variable_issue):
31782         Likewise.
31783         * config/mips/mips.c (mips_save_restore_reg): Likewise.
31784         * config/rx/rx.c (rx_is_restricted_memory_address): Likewise.
31785         * config/s390/s390.c (Z10_EARLYLOAD_DISTANCE): Likewise.
31786         * config/sh/sh.c (sh_rtx_costs): Likewise.
31787         * fold-const.c (fold_truth_andor): Likewise.
31788         * genautomata.c (collapse_flag): Likewise.
31789         * gengtype.h (struct type::u::s): Likewise.
31790         * gensupport.c (has_subst_attribute, add_mnemonic_string): Likewise.
31791         * input.c (FORMAT_AMOUNT): Likewise.
31792         * ipa-cp.c (class ipcp_lattice, agg_replacements_to_vector)
31793         (known_aggs_to_agg_replacement_list): Likewise.
31794         * ipa-inline-analysis.c: Likewise.
31795         * ipa-inline.h (estimate_edge_time, estimate_edge_hints): Likewise.
31796         * ipa-polymorphic-call.c
31797         (ipa_polymorphic_call_context::restrict_to_inner_class): Likewise.
31798         * loop-unroll.c (analyze_insn_to_expand_var): Likewise.
31799         * lra.c (lra_optional_reload_pseudos, lra_subreg_reload_pseudos):
31800         Likewise.
31801         * modulo-sched.c (apply_reg_moves): Likewise.
31802         * omp-expand.c (build_omp_regions_1): Likewise.
31803         * trans-mem.c (struct tm_wrapper_hasher): Likewise.
31804         * tree-ssa-loop-ivopts.c (may_eliminate_iv): Likewise.
31805         * tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Likewise.
31806         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
31807         * value-prof.c: Likewise.
31808         * var-tracking.c (val_reset): Likewise.
31810 2017-04-03  Richard Biener  <rguenther@suse.de>
31812         PR tree-optimization/80275
31813         * fold-const.c (split_address_to_core_and_offset): Handle
31814         POINTER_PLUS_EXPR.
31816 2017-04-03  Eric Botcazou  <ebotcazou@adacore.com>
31818         * tree-nested.c (get_descriptor_type): Make sure that the alignment of
31819         descriptors is at least equal to that of functions.
31821 2017-04-02  Uros Bizjak  <ubizjak@gmail.com>
31823         * config/i386/sse.md (movdi_to_sse): Add missing DONE.
31825 2017-04-02  Uros Bizjak  <ubizjak@gmail.com>
31827         PR target/80250
31828         * config/i386/sse.md (mov<IMOD4:mode>): Remove insn pattern.
31829         (mov<IMOD4:mode>): New expander.
31830         (*mov<IMOD4:mode>_internal): New insn and split pattern.
31832 2017-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
31834         PR rtl-optimization/79405
31835         * fwprop.c (propagations_left): New variable.
31836         (forward_propagate_into): Decrement it.
31837         (fwprop_init): Initialize it.
31838         (fw_prop): If the variable has reached zero, stop propagating.
31839         (fwprop_addr): Ditto.
31841 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
31843         PR debug/79255
31844         * dwarf2out.c (decls_for_scope): If BLOCK_NONLOCALIZED_VAR is
31845         a FUNCTION_DECL, pass it as decl instead of origin to
31846         process_scope_var.
31848 2017-03-31  Alexander Monakov  <amonakov@ispras.ru>
31850         * config/nvptx/nvptx.c (nvptx_output_softstack_switch): Correct format
31851         string.
31853 2017-03-31  Pat Haugen  <pthaugen@us.ibm.com>
31855         PR target/80107
31856         * config/rs6000/rs6000.md (extendhi<mode>2): Add test for
31857         TARGET_VSX_SMALL_INTEGER.
31859 2017-03-31  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31861         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
31862         reference to the OpenPOWER 64-Bit ELF V2 ABI Specification.
31864 2017-03-31  Matthew Fortune  <matthew.fortune@imgtec.com>
31866         * config/mips/mips-msa.md (msa_vec_extract_<msafmt_f>): Update
31867         extraction from odd-numbered MSA register.
31869 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
31871         PR middle-end/80173
31872         * expmed.c (store_bit_field_1): Don't attempt to create
31873         a word subreg out of hard registers wider than word if they
31874         have HARD_REGNO_NREGS of 1 for their mode.
31876         PR middle-end/80163
31877         * varasm.c (initializer_constant_valid_p_1): Disallow sign-extending
31878         conversions to integer types wider than word and pointer.
31880         PR debug/80025
31881         * cselib.h (rtx_equal_for_cselib_1): Add depth argument.
31882         (rtx_equal_for_cselib_p): Pass 0 to it.
31883         * cselib.c (cselib_hasher::equal): Likewise.
31884         (rtx_equal_for_cselib_1): Add depth argument.  If depth
31885         is 128, don't look up VALUE locs and punt.  Increment
31886         depth in recursive calls when walking VALUE locs.
31888 2017-03-31  Bernd Edlinger  <bernd.edlinger@hotmail.de>
31890         * gcov.c (md5sum_to_hex): Fix output of MD5 hex bytes.
31891         (make_gcov_file_name): Use the canonical path name for generating
31892         the MD5 value.
31893         (read_line): Fix handling of files with ascii null bytes.
31895 2017-03-30  Matthew Fortune  <matthew.fortune@imgtec.com>
31897         * config/mips/mips.c (mips_expand_vector_init): Create a const_vector
31898         to initialise a vector register instead
31899         of using a const_int.
31901 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
31903         PR translation/80189
31904         * gimplify.c (omp_default_clause): Use %qs instead of %s in
31905         diagnostic messages.
31907 2017-03-30  Peter Bergner  <bergner@vnet.ibm.com>
31909         PR target/80246
31910         * config/rs6000/dfp.md (dfp_dxex_<mode>): Update mode of operand 0.
31911         (dfp_diex_<mode>): Update mode of operand 1.
31912         * doc/extend.texi (dxex, dxexq): Document change to return type.
31913         (diex, diexq): Document change to argument type.
31915 2017-03-30  Martin Jambor  <mjambor@suse.cz>
31917         PR ipa/77333
31918         * cgraph.h (cgraph_build_function_type_skip_args): Declare.
31919         * cgraph.c (redirect_call_stmt_to_callee): Set gimple fntype so that
31920         it reflects the signature changes performed at the callee side.
31921         * cgraphclones.c (build_function_type_skip_args): Make public, renamed
31922         to cgraph_build_function_type_skip_args.
31923         (build_function_decl_skip_args): Adjust call to the above function.
31925 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
31927         PR target/80206
31928         * config/i386/sse.md
31929         (<extract_type>_vextract<shuffletype><extract_suf>_mask): Use
31930         register as dest whenever it is a MEM not rtx_equal_p to the
31931         corresponding dup operand, and when forcing into reg move the
31932         reg into the memory afterwards.
31933         (<extract_type_2>_vextract<shuffletype><extract_suf_2>_mask):
31934         Likewise.  Use <ssehalfvecmode> instead of <ssequartermode>
31935         for the force_reg mode.
31936         (avx512vl_vextractf128<mode>): Use register as dest either
31937         always when a MEM, or when it is a MEM not rtx_equal_p to the
31938         corresponding dup operand, or even not when it is a CONST_VECTOR
31939         depending on the mode and lo vs. hi.
31940         (avx512dq_vextract<shuffletype>64x2_1_maskm): Remove extraneous
31941         parens.
31942         (avx512f_vextract<shuffletype>32x4_1_maskm): Likewise.
31943         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name>):
31944         Likewise.  Require that operands[2] is even.
31945         (<mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name>):
31946         Remove extraneous parens.  Require that operands[2] is a multiple
31947         of 4.
31948         (vec_extract_lo_<mode><mask_name>): Don't bother testing if
31949         operands[0] is a MEM if <mask_applied>, the predicates/constraints
31950         disallow memory then.
31952 2017-03-30  Richard Biener  <rguenther@suse.de>
31954         PR tree-optimization/77498
31955         * tree-ssa-pre.c (phi_translate_1): Do not allow simplifications
31956         to non-constants over backedges.
31958 2017-03-29  Segher Boessenkool  <segher@kernel.crashing.org>
31960         PR rtl-optimization/80233
31961         * combine.c (combine_instructions): Only take NONDEBUG_INSN_P insns
31962         as last_combined_insn.  Do not test for BARRIER_P separately.
31964 2017-03-29  Andreas Schwab  <schwab@suse.de>
31966         PR ada/80146
31967         * calls.c (prepare_call_address): Convert funexp to Pmode before
31968         copying to temp reg.
31970 2017-03-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31972         PR tree-optimization/80158
31973         * gimple-ssa-strength-reduction.c (replace_mult_candidate):
31974         Handle possible future case of more than one alternate
31975         interpretation.
31976         (replace_rhs_if_not_dup): Likewise.
31977         (replace_one_candidate): Likewise.
31979 2017-03-28  Vladimir Makarov  <vmakarov@redhat.com>
31981         PR rtl-optimization/80193
31982         * ira.c (ira): Do not check allocation for LRA.
31984 2017-03-28  Alexander Monakov  <amonakov@ispras.ru>
31986         * config/nvptx/nvptx-protos.h (nvptx_output_simt_enter): Declare.
31987         (nvptx_output_simt_exit): Declare.
31988         * config/nvptx/nvptx.c (nvptx_init_unisimt_predicate): Use
31989         cfun->machine->unisimt_location.  Handle NULL unisimt_predicate.
31990         (init_softstack_frame): Move initialization of crtl->is_leaf to...
31991         (nvptx_declare_function_name): ...here.  Emit declaration of local
31992         memory space buffer for omp_simt_enter insn.
31993         (nvptx_output_unisimt_switch): New.
31994         (nvptx_output_softstack_switch): New.
31995         (nvptx_output_simt_enter): New.
31996         (nvptx_output_simt_exit): New.
31997         * config/nvptx/nvptx.h (struct machine_function): New fields
31998         has_simtreg, unisimt_location, simt_stack_size, simt_stack_align.
31999         * config/nvptx/nvptx.md (UNSPECV_SIMT_ENTER): New unspec.
32000         (UNSPECV_SIMT_EXIT): Ditto.
32001         (omp_simt_enter_insn): New insn.
32002         (omp_simt_enter): New expansion.
32003         (omp_simt_exit): New insn.
32004         * config/nvptx/nvptx.opt (msoft-stack-reserve-local): New option.
32006         * internal-fn.c (expand_GOMP_SIMT_ENTER): New.
32007         (expand_GOMP_SIMT_ENTER_ALLOC): New.
32008         (expand_GOMP_SIMT_EXIT): New.
32009         * internal-fn.def (GOMP_SIMT_ENTER): New internal function.
32010         (GOMP_SIMT_ENTER_ALLOC): Ditto.
32011         (GOMP_SIMT_EXIT): Ditto.
32012         * target-insns.def (omp_simt_enter): New insn.
32013         (omp_simt_exit): Ditto.
32014         * omp-low.c (struct omplow_simd_context): New fields simt_eargs,
32015         simt_dlist.
32016         (lower_rec_simd_input_clauses): Implement SIMT privatization.
32017         (lower_rec_input_clauses): Likewise.
32018         (lower_lastprivate_clauses): Handle SIMT privatization.
32020         * omp-offload.c: Include langhooks.h, tree-nested.h, stor-layout.h.
32021         (ompdevlow_adjust_simt_enter): New.
32022         (find_simtpriv_var_op): New.
32023         (execute_omp_device_lower): Handle IFN_GOMP_SIMT_ENTER,
32024         IFN_GOMP_SIMT_ENTER_ALLOC, IFN_GOMP_SIMT_EXIT.
32026         * tree-inline.h (struct copy_body_data): New field dst_simt_vars.
32027         * tree-inline.c (expand_call_inline): Handle SIMT privatization.
32028         (copy_decl_for_dup_finish): Ditto.
32030         * tree-ssa.c (execute_update_addresses_taken): Handle GOMP_SIMT_ENTER.
32032 2017-03-28  Uros Bizjak  <ubizjak@gmail.com>
32034         PR target/53383
32035         * config/i386/i386.c (ix86_option_override_internal): Always
32036         allow -mpreferred-stack-boundary=3 for 64-bit targets.
32038 2017-03-28  Bin Cheng  <bin.cheng@arm.com>
32040         * tree-vect-loop.c (optimize_mask_stores): Add bb to the right loop.
32042 2017-03-28  Bin Cheng  <bin.cheng@arm.com>
32044         * tree-vect-loop-manip.c (slpeel_add_loop_guard): New param and
32045         mark new edge's irreducible flag accordign to it.
32046         (vect_do_peeling): Check loop preheader edge's irreducible flag
32047         and pass it to function slpeel_add_loop_guard.
32049 2017-03-28  Richard Sandiford  <richard.sandiford@arm.com>
32051         PR tree-optimization/80218
32052         * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
32053         Update block frequencies and counts.
32055 2017-03-28  Richard Biener  <rguenther@suse.de>
32057         PR tree-optimization/78644
32058         * tree-ssa-ccp.c (evaluate_stmt): When we may not use the value
32059         of a simplification result we may not use it at all.
32061 2017-03-28  Richard Biener  <rguenther@suse.de>
32063         PR ipa/80205
32064         * tree-inline.c (copy_phis_for_bb): Do not create PHI node
32065         without arguments, generate default definition of a SSA name.
32067 2017-03-28  Richard Biener  <rguenther@suse.de>
32069         PR middle-end/80222
32070         * gimple-fold.c (gimple_fold_indirect_ref): Do not touch
32071         TYPE_REF_CAN_ALIAS_ALL references.
32072         * fold-const.c (fold_indirect_ref_1): Likewise.
32074 2017-03-28  Martin Liska  <mliska@suse.cz>
32076         PR ipa/80104
32077         * cgraphunit.c (cgraph_node::expand_thunk): Mark argument of a
32078         thunk call as DECL_GIMPLE_REG_P when vector or complex type.
32080 2017-03-28  Claudiu Zissulescu  <claziss@synopsys.com>
32081             Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
32083         * config/arc/arc.h (CPP_SPEC): Add subtarget_cpp_spec.
32084         (EXTRA_SPECS): Define.
32085         (SUBTARGET_EXTRA_SPECS): Likewise.
32086         (SUBTARGET_CPP_SPEC): Likewise.
32087         * config/arc/elf.h (EXTRA_SPECS): Renamed to
32088         SUBTARGET_EXTRA_SPECS.
32089         * config/arc/linux.h (SUBTARGET_CPP_SPEC): Define.
32091 2017-03-28  Claudiu Zissulescu  <claziss@synopsys.com>
32093         * config/arc/simdext.md (vst64_insn): Update pattern.
32094         (vld32wh_insn): Likewise.
32095         (vld32wl_insn): Likewise.
32096         (vld64_insn): Likewise.
32097         (vld32_insn): Likewise.
32099 2017-03-28  Marek Polacek  <polacek@redhat.com>
32101         PR sanitizer/80067
32102         * fold-const.c (fold_comparison): Use protected_set_expr_location
32103         instead of SET_EXPR_LOCATION.
32105 2017-03-28  Markus Trippelsdorf  <markus@trippelsdorf.de>
32107         * tree.c (add_expr): Avoid name lookup warning.
32109 2017-03-27  Jeff Law  <law@redhat.com>
32111         PR tree-optimization/80216
32112         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Fix typo in
32113         function name.  Limit recursion depth.
32114         (record_temporary_equivalences): Corresponding changes.
32116 2017-03-27  Jonathan Wakely  <jwakely@redhat.com>
32118         * doc/invoke.texi (-Wno-narrowing): Reorder so default behavior is
32119         covered first.
32121 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
32123         PR target/80102
32124         * reg-notes.def (REG_CFA_NOTE): Define.  Use it for CFA related
32125         notes.
32126         * cfgcleanup.c (reg_note_cfa_p): New array.
32127         (insns_have_identical_cfa_notes): New function.
32128         (old_insns_match_p): Don't cross-jump in between /f
32129         and non-/f instructions.  If both i1 and i2 are frame related,
32130         verify all CFA notes, their order and content.
32132 2017-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
32134         PR target/78543
32135         * config/rs6000/rs6000.md (bswaphi2_extenddi): Combine bswap
32136         HImode and SImode with zero extend to DImode to one insn.
32137         (bswap<mode>2_extenddi): Likewise.
32138         (bswapsi2_extenddi): Likewise.
32139         (bswaphi2_extendsi): Likewise.
32140         (bswaphi2): Combine bswap HImode and SImode into one insn.
32141         Separate memory insns from swapping register.
32142         (bswapsi2): Likewise.
32143         (bswap<mode>2): Likewise.
32144         (bswaphi2_internal): Delete, no longer used.
32145         (bswapsi2_internal): Likewise.
32146         (bswap<mode>2_load): Split bswap HImode/SImode into separate load,
32147         store, and gpr<-gpr swap insns.
32148         (bswap<mode>2_store): Likewise.
32149         (bswaphi2_reg): Register only splitter, combine with the splitter.
32150         (bswaphi2 splitter): Likewise.
32151         (bswapsi2_reg): Likewise.
32152         (bswapsi2 splitter): Likewise.
32153         (bswapdi2): If we have the LDBRX and STDBRX instructions, split
32154         the insns into load, store, and register/register insns.
32155         (bswapdi2_ldbrx): Likewise.
32156         (bswapdi2_load): Likewise.
32157         (bswapdi2_store): Likewise.
32158         (bswapdi2_reg): Likewise.
32160 2017-03-27  Gunther Nikl  <gnikl@users.sourceforge.net>
32162         * system.h (HAVE_DESIGNATED_INITIALIZERS): Fix non C++ case.
32163         (HAVE_DESIGNATED_UNION_INITIALIZERS): Likewise.
32165 2017-03-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
32167         PR target/80103
32168         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Edit and
32169         add comments.
32170         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
32171         special handling for target option conflicts between dform
32172         options (-mpower9-dform, -mpower9-dform-vector,
32173         -mpower9-dform-scalar) and -mno-direct-move.
32175 2017-03-27  Richard Biener  <rguenther@suse.de>
32177         PR tree-optimization/80181
32178         * tree-ssa-ccp.c (likely_value): UNDEFINED ^ X is UNDEFINED.
32180 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
32182         * config/arc/predicates.md (move_double_src_operand): Replace the
32183         call to move_double_src_operand with a call to address_operand.
32185 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
32187         * config/arc/elf.h (ARGET_ARC_TP_REGNO_DEFAULT): Define.
32188         * config/arc/linux.h (ARGET_ARC_TP_REGNO_DEFAULT): Likewise.
32189         * config/arc/arc.opt (mtp-regno): Use ARGET_ARC_TP_REGNO_DEFAULT.
32191 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
32193         * config/arc/predicates.md (long_immediate_loadstore_operand):
32194         Consider scaled addresses cases.
32196 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
32198         * config/arc/arc.c (arc_epilogue_uses): BLINK should be also
32199         restored when in interrupt.
32200         * config/arc/arc.md (simple_return): ARCv2 rtie instruction
32201         doesn't have delay slot.
32203 2017-03-27  Richard Biener  <rguenther@suse.de>
32205         PR ipa/79776
32206         * tree-ssa-structalias.c (associate_varinfo_to_alias): Skip
32207         inlined thunk clones.
32209 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
32211         PR sanitizer/80168
32212         * asan.c (instrument_derefs): Copy over last operand from
32213         original COMPONENT_REF to the new COMPONENT_REF with
32214         DECL_BIT_FIELD_REPRESENTATIVE.
32215         * ubsan.c (instrument_object_size): Likewise.
32217 2017-03-27  Richard Biener  <rguenther@suse.de>
32219         PR tree-optimization/80170
32220         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Make
32221         sure DR/SCEV didnt fold in constants we do not see when looking
32222         at the reference base alignment.
32224 2017-03-27  Richard Biener  <rguenther@suse.de>
32226         PR middle-end/80171
32227         * gimple-fold.c (fold_ctor_reference): Properly guard against
32228         NULL return value from canonicalize_constructor_val.
32230 2017-03-25  Uros Bizjak  <ubizjak@gmail.com>
32232         PR target/80180
32233         * config/i386/i386.c (ix86_expand_builtin)
32234         <IX86_BUILTIN_RDSEED{16,32,64}_STEP>: Do not expand arg0 between
32235         flags reg setting and flags reg using instructions.
32236         <IX86_BUILTIN_RDRAND{16,32,64}_STEP>: Ditto.  Use non-flags reg
32237         clobbering instructions to zero extend op2.
32239 2017-03-25  Gerald Pfeifer  <gerald@pfeifer.com>
32241         * doc/install.texi (Configuration) <--with-aix-soname>:
32242         Update link to AIX ld.
32244 2017-03-25  Bernd Schmidt  <bschmidt@redhat.com>
32246         PR rtl-optimization/80160
32247         PR rtl-optimization/80159
32248         * lra-assigns.c (must_not_spill_p): Tighten new test to also take
32249         reg_alternate_class into account.
32251 2017-03-24  Vladimir Makarov  <vmakarov@redhat.com>
32253         PR target/80148
32254         * lra-assigns.c (assign_by_spills): Add spilled non-reload pseudos
32255         to consider in curr_insn_transform.
32257 2017-03-24  Jakub Jelinek  <jakub@redhat.com>
32259         * genrecog.c (validate_pattern): Add VEC_SELECT validation.
32260         * genmodes.c (emit_min_insn_modes_c): Call emit_mode_nunits
32261         and emit_mode_inner.
32263 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32265         * config/s390/s390-builtins.def: Add VXE builtins.  Add a flags
32266         argument to the overloaded builtin variants.  Use the new flag to
32267         deprecate certain builtin variants.
32268         * config/s390/s390-builtin-types.def: Add new builtin types.
32269         * config/s390/s390-builtins.h: Support new flags field for
32270         overloaded builtins.
32271         * config/s390/s390-c.c (OB_DEF_VAR): New flags field.
32272         (s390_macro_to_expand): Enable vector float data type.
32273         (s390_cpu_cpp_builtins_internal): Indicate support of the new
32274         builtins by incrementing the __VEC__ version number.
32275         (s390_expand_overloaded_builtin): Support expansion of vec_xl and
32276         vec_xst.
32277         (s390_resolve_overloaded_builtin): Emit error messages depending
32278         on the builtin flags.
32279         * config/s390/s390.c (s390_expand_builtin): Support additional
32280         flags argument.  Change error message to match the messages
32281         emitted in s390-c.c.
32282         * config/s390/s390.md: New UNSPEC_* constants.
32283         (op_type): Add new instruction types.
32284         * config/s390/vecintrin.h: Add new builtins and test data class
32285         constants.
32286         * config/s390/vx-builtins.md (V_HW_32_64): Add V4SF.
32287         (V_HW_4, VEC_HW, VECF_HW): New mode iterators.
32288         (VEC_INEXACT, VEC_NOINEXACT): New constants.
32289         ("vec_splats<mode>", "vec_insert<mode>", "vec_promote<mode>")
32290         ("vec_insert_and_zero<mode>", "vec_mergeh<mode>")
32291         ("vec_mergel<mode>"): V_HW -> VEC_HW.
32293         ("vlrlrv16qi", "vstrlrv16qi", "vbpermv16qi", "vec_msumv2di")
32294         ("vmslg", "*vftci<mode>_cconly", "vftci<mode>_intcconly")
32295         ("*vftci<mode>", "vftci<mode>_intcc", "vec_double_s64")
32296         ("vec_double_u64", "vfmin<mode>", "vfmax<mode>"): New definition.
32298         ("and_av2df3", "and_cv2df3", "vec_andc_av2df3")
32299         ("vec_andc_cv2df3", "xor_av2df3", "xor_cv2df3", "vec_nor_av2df3")
32300         ("vec_nor_cv2df3", "ior_av2df3", "ior_cv2df3", "vec_nabs")
32301         ("*vftcidb", "*vftcidb_cconly", "vftcidb"): Remove definition.
32303         ("vec_all_<fpcmpcc:code>v2df", "vec_any_<fpcmpcc:code>v2df")
32304         ("vec_scatter_elementv4si_DI", "vec_cmp<fpcmp:code>v2df")
32305         ("vec_di_to_df_s64", "vec_di_to_df_u64", "vec_df_to_di_u64")
32306         ("vfidb", "*vldeb", "*vledb", "*vec_cmp<insn_cmp>v2df_cconly")
32307         ("vec_cmpeqv2df_cc", "vec_cmpeqv2df_cc", "vec_cmphv2df_cc")
32308         ("vec_cmphev2df_cc", "*vec_cmpeqv2df_cc")
32309         ("*vec_cmphv2df_cc", "*vec_cmphev2df_cc"): Enable new modes as ...
32311         ("vec_all_<fpcmpcc:code><mode>", "vec_any_<fpcmpcc:code><mode>")
32312         ("vec_scatter_element<V_HW_4:mode>_DI")
32313         ("vec_cmp<fpcmp:code><mode>", "vcdgb", "vcdlgb", "vclgdb")
32314         ("vec_fpint<mode>", "vflls")
32315         ("vflrd", "*vec_cmp<insn_cmp><mode>_cconly", "vec_cmpeq<mode>_cc")
32316         ("vec_cmpeq<mode>_cc", "vec_cmph<mode>_cc", "vec_cmphe<mode>_cc")
32317         ("*vec_cmpeq<mode>_cc", "*vec_cmph<mode>_cc")
32318         ("*vec_cmphe<mode>_cc"): ... these.
32320         ("vec_ctd_s64", "vec_ctsl", "vec_ctul", "vec_st2f"): Use rounding
32321         mode constant instead of magic value.
32323 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32325         * config/s390/s390.c (s390_expand_vec_compare): Support other
32326         vector floating point modes than just V2DF.
32327         (s390_expand_vcond): Likewise.
32328         (s390_hard_regno_mode_ok): Allow SFmode values in VRs.
32329         (s390_cannot_change_mode_class): Prevent mode changes between TF
32330         and V1TF in vector registers.
32331         * config/s390/s390.md (DF, SF): New mode attributes.
32332         ("*cmp<mode>_ccs", "add<mode>3", "sub<mode>3", "mul<mode>3")
32333         ("fma<mode>4", "fms<mode>4", "div<mode>3", "*neg<mode>2"): Add
32334         SFmode support for VRs.
32335         * config/s390/vector.md (V_HW, V_HW2, VT_HW, ti*, nonvec): Add new
32336         vector fp modes.
32337         (VFT, VF_HW): New mode iterators.
32338         (vw, sdx): New mode attributes.
32339         ("addv2df3", "subv2df3", "mulv2df3", "divv2df3", "sqrtv2df2")
32340         ("fmav2df4","fmsv2df4", "negv2df2", "absv2df2", "*negabsv2df2")
32341         ("smaxv2df3", "sminv2df3", "*vec_cmp<VFCMP_HW_OP:code>v2df_nocc")
32342         ("vec_cmpuneqv2df", "vec_cmpltgtv2df", "vec_orderedv2df")
32343         ("vec_unorderedv2df"): Adjust the v2df only patterns to support
32344         also the new vector floating point modes.  Renaming to ...
32346         ("add<mode>3", "sub<mode>3", "mul<mode>3", "div<mode>3")
32347         ("sqrt<mode>2", "fma<mode>4", "fms<mode>4", "neg<mode>2")
32348         ("abs<mode>2", "negabs<mode>2", "smax<mode>3")
32349         ("smin<mode>3", "*vec_cmp<VFCMP_HW_OP:code><mode>_nocc")
32350         ("vec_cmpuneq<mode>", "vec_cmpltgt<mode>", "vec_ordered<mode>")
32351         ("vec_unordered<mode>"): ... these.
32353         ("neg_fma<mode>4", "neg_fms<mode>4", "*smax<mode>3_vxe")
32354         ("*smin<mode>3_vxe", "*sminv2df3_vx", "*vec_extendv4sf")
32355         ("*vec_extendv2df"): New insn definitions.
32357 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32359         * config/s390/s390.md ("*adddi3_sign", "*subdi3_sign", "mulditi3")
32360         ("mulditi3_2", "*muldi3_sign"): New patterns.
32361         ("muldi3", "*muldi3", "mulsi3", "*mulsi3"): Add an expander and
32362         rename the pattern definition.
32364 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32366         * config/s390/s390.md ("indirect_jump"): Turn insn definition into
32367         expander.
32368         ("*indirect_jump", "*indirect2_jump"): New pattern definitions.
32370 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32372         * config/s390/s390.c (s390_expand_vec_init): Use vllezl
32373         instruction if possible.
32374         * config/s390/vector.md (vec_halfnumelts): New mode
32375         attribute.
32376         ("*vec_vllezlf<mode>"): New pattern.
32378 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32380         * config/s390/vector.md ("popcountv16qi2", "popcountv8hi2")
32381         ("popcountv4si2", "popcountv2di2"): Rename to ...
32382         ("popcount<mode>2", "popcountv8hi2_vx", "popcountv4si2_vx")
32383         ("popcountv2di2_vx"): ... these and add !TARGET_VXE to the
32384         condition.
32385         ("popcount<mode>2_vxe"): New pattern.
32387 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32389         * common/config/s390/s390-common.c (processor_flags_table): Add
32390         arch12.
32391         * config.gcc: Add arch12.
32392         * config/s390/driver-native.c (s390_host_detect_local_cpu):
32393         Default to arch12 for unknown CPU model numbers.
32394         * config/s390/s390-builtins.def: Add B_VXE builtin flag.
32395         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Adjust
32396         PROCESSOR_max sanity check.
32397         * config/s390/s390-opts.h (enum processor_type): Add
32398         PROCESSOR_ARCH12.
32399         * config/s390/s390.c (processor_table): Add arch12.
32400         (s390_expand_builtin): Add check for B_VXE flag.
32401         (s390_issue_rate): Add PROCESSOR_ARCH12.
32402         (s390_get_sched_attrmask): Likewise.
32403         (s390_get_unit_mask): Likewise.
32404         (s390_sched_score): Enable z13 scheduling for arch12.
32405         (s390_sched_reorder): Likewise.
32406         (s390_sched_variable_issue): Likewise.
32407         * config/s390/s390.h (enum processor_flags): Add PF_ARCH12 and
32408         PF_VXE.
32409         (s390_tune_attr): Use z13 scheduling also for arch12.
32410         (TARGET_CPU_ARCH12, TARGET_CPU_ARCH12_P, TARGET_CPU_VXE)
32411         (TARGET_CPU_VXE_P, TARGET_ARCH12, TARGET_ARCH12_P, TARGET_VXE)
32412         (TARGET_VXE_P): New macros.
32413         * config/s390/s390.md: Add arch12 to cpu attribute.  Add arch12
32414         and vxe to cpu_facility.  Add arch12 and vxe to enabled attribute.
32415         * config/s390/s390.opt: Add arch12 as processor_type.
32417 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32419         * config/s390/s390.md
32420         ("fixuns_truncdddi2", "fixuns_trunctddi2")
32421         ("fixuns_trunc<BFP:mode><GPR:mode>2"): Merge into ...
32422         ("fixuns_trunc<FP:mode><GPR:mode>2"): New expander.
32424         ("fixuns_trunc<BFP:mode><GPR:mode>2", "fixuns_trunc<mode>si2"):
32425         Rename expanders to ...
32427         ("fixuns_trunc<BFP:mode><GPR:mode>2_emu")
32428         ("fixuns_truncdddi2_emu"): ... these.
32430         ("fixuns_trunc<mode>si2_emu"): New expander.
32432         ("*fixuns_truncdfdi2_z13"): Rename to ...
32433         ("*fixuns_truncdfdi2_vx"): ... this.
32435 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32437         * config/s390/2964.md: Remove the single element vector compare
32438         instructions which are no longer used.
32439         * config/s390/s390.c (s390_select_ccmode): Remove handling of
32440         vector CCmodes.
32441         (s390_canonicalize_comparison): Remove handling of DFmode
32442         compares.
32443         (s390_expand_vec_compare_scalar): Remove function.
32444         (s390_emit_compare): Don't call s390_expand_vec_compare_scalar.
32445         * config/s390/s390.md ("*vec_cmp<insn_cmp>df_cconly"): Remove
32446         pattern.
32447         ("*cmp<mode>_ccs"): Add wfcdb instruction.
32449 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32451         * config/s390/s390.md ("mov<mode>_64dfp" DD_DF): Use vleig for loading a
32452         FP zero.
32453         ("*mov<mode>_64" DD_DF): Remove the vector instructions. These
32454         will anyway by matched by mov<mode>_64dfp.
32456 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32458         * config/s390/s390.md ("mov<mode>" SD_SF): Change vleg/vsteg to
32459         vlef/vstef.  Add missing operand to vleif.
32461 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32463         * config/s390/s390.c (s390_expand_vec_init): Enable vector load
32464         pair for all vector types with 64 bit elements.
32465         * config/s390/vx-builtins.md (V_HW_64): Move mode iterator to ...
32466         * config/s390/vector.md (V_HW_64): ... here.
32467         (V_128_NOSINGLE): New mode iterator.
32468         ("vec_init<V_HW:mode>"): Use V_128 as mode iterator.
32469         ("*vec_splat<mode>"): Use V_128_NOSINGLE mode iterator.
32470         ("*vec_tf_to_v1tf", "*vec_ti_to_v1ti"): New pattern definitions.
32471         ("*vec_load_pairv2di"): Change to ...
32472         ("*vec_load_pair<mode>"): ... this one.
32474 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32476         * config/s390/constraints.md: Add comments.
32477         (jKK): Reject element sizes > 8 bytes.
32478         * config/s390/s390.c (s390_split_ok_p): Enable splitting also for
32479         s_operands.
32480         * config/s390/s390.md: Add the s_operand checks formerly in
32481         s390_split_ok_p to various splitters where they are still
32482         required.
32483         * config/s390/vector.md ("mov<mode>" V_128): Add GPR alternatives
32484         for 128 bit vectors.  Plus two splitters.
32486 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32488         * config/s390/s390.md: Rename the cpu facilty vec to vx throughout
32489         the file.
32491 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32493         PR target/79893
32494         * config/s390/s390-c.c (s390_adjust_builtin_arglist): Issue an
32495         error if the boundary argument is not constant.
32497 2017-03-24  Jakub Jelinek  <jakub@redhat.com>
32499         PR rtl-optimization/80112
32500         * loop-doloop.c (doloop_condition_get): Don't check condition
32501         if cmp isn't SET with IF_THEN_ELSE src.
32503 2017-03-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
32505         PR tree-optimization/80158
32506         * gimple-ssa-strength-reduction.c (replace_mult_candidate): When
32507         replacing a candidate statement, also replace it for the
32508         candidate's alternate interpretation.
32509         (replace_rhs_if_not_dup): Likewise.
32510         (replace_one_candidate): Likewise.
32512 2017-03-24  Richard Biener  <rguenther@suse.de>
32514         PR tree-optimization/80167
32515         * graphite-isl-ast-to-gimple.c
32516         (translate_isl_ast_to_gimple::is_valid_rename): Handle default-defs
32517         properly.
32518         (translate_isl_ast_to_gimple::get_rename): Likewise.
32520 2017-03-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>
32522         * config/rs6000/rs6000.c (rs6000_option_override_internal): Change
32523         handling of certain combinations of target options, including the
32524         combinations -mpower8-vector vs. -mno-vsx, -mpower9-vector vs.
32525         -mno-power8-vector, and -mpower9_dform vs. -mno-power9-vector.
32527 2017-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
32529         PR target/71436
32530         * config/arm/arm.md (*load_multiple): Add reload_completed to
32531         matching condition.
32533 2017-03-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
32534             Richard Biener  <rguenth@suse.de>
32536         PR tree-optimization/79908
32537         PR tree-optimization/80136
32538         * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
32539         been cast away, gimplify_and_add suffices.
32541 2017-03-23  Markus Trippelsdorf  <markus@trippelsdorf.de>
32543         * tree-vrp.c (identify_jump_threads): Delete avail_exprs.
32545 2017-03-23  Richard Biener  <rguenther@suse.de>
32547         PR tree-optimization/80032
32548         * gimplify.c (gimple_push_cleanup): Forced unconditional
32549         cleanups still have to go to the conditional_cleanups
32550         sequence.
32552 2017-03-22  Jakub Jelinek  <jakub@redhat.com>
32554         PR tree-optimization/80072
32555         * tree-ssa-reassoc.c (struct operand_entry): Change id field type
32556         to unsigned int.
32557         (next_operand_entry_id): Change type to unsigned int.
32558         (sort_by_operand_rank): Make sure to return the right return value
32559         even if unsigned fields are bigger than INT_MAX.
32560         (struct oecount): Change cnt and id type to unsigned int.
32561         (oecount_hasher::equal): Formatting fix.
32562         (oecount_cmp): Make sure to return the right return value
32563         even if unsigned fields are bigger than INT_MAX.
32564         (undistribute_ops_list): Change next_oecount_id type to unsigned int.
32566         PR c++/80129
32567         * gimplify.c (gimplify_modify_expr_rhs) <case COND_EXPR>: Clear
32568         TREE_READONLY on result if writing it more than once.
32570         PR sanitizer/80110
32571         * doc/invoke.texi (-fsanitize=thread): Document that with
32572         -fnon-call-exceptions atomics are not able to throw
32573         exceptions.
32575         PR sanitizer/80110
32576         * tsan.c: Include tree-eh.h.
32577         (instrument_builtin_call): Call maybe_clean_eh_stmt or
32578         maybe_clean_or_replace_eh_stmt where needed.
32579         (instrument_memory_accesses): Add cfg_changed argument.
32580         Call gimple_purge_dead_eh_edges on each block and set *cfg_changed
32581         if it returned true.
32582         (tsan_pass): Adjust caller.  Return TODO_cleanup_cfg if cfg_changed.
32584         PR rtl-optimization/63191
32585         * config/i386/i386.c (ix86_delegitimize_address): Turn into small
32586         wrapper function, moved the whole old content into ...
32587         (ix86_delegitimize_address_1): ... this.  New inline function.
32588         (ix86_find_base_term): Use ix86_delegitimize_address_1 with
32589         true as last argument instead of ix86_delegitimize_address.
32591 2017-03-22  Wilco Dijkstra  <wdijkstr@arm.com>
32593         * config/aarch64/aarch64.c (generic_branch_cost): Copy
32594         cortexa57_branch_cost.
32596 2017-03-22  Wilco Dijkstra  <wdijkstr@arm.com>
32598         * config/aarch64/aarch64.c (generic_tunings): Add AES fusion.
32600 2017-03-21  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
32602         PR target/80123
32603         * doc/md.texi (Constraints): Document wA constraint.
32604         * config/rs6000/constraints.md (wA): New.
32605         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Add wA reg_class.
32606         (rs6000_init_hard_regno_mode_ok): Init wA constraint.
32607         * config/rs6000/rs6000.h (RS6000_CONSTRAINT_wA): New.
32608         * config/rs6000/vsx.md (vsx_splat_<mode>): Use wA constraint.
32610 2017-03-22  Cesar Philippidis  <cesar@codesourcery.com>
32612         PR c++/80029
32613         * gimplify.c (is_oacc_declared): New function.
32614         (oacc_default_clause): Use it to set default flags for acc declared
32615         variables inside parallel regions.
32616         (gimplify_scan_omp_clauses): Strip firstprivate pointers for acc
32617         declared variables.
32618         (gimplify_oacc_declare): Gimplify the declare clauses.  Add the
32619         declare attribute to any decl as necessary.
32621 2017-03-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
32623         PR target/80082
32624         * config/arm/arm-isa.h (isa_bit_lpae): New feature bit.
32625         (ISA_ARMv7ve): Add isa_bit_lpae to the definition.
32626         * config/arm/arm-protos.h (arm_arch7ve): Rename into ...
32627         (arm_arch_lpae): This.
32628         * config/arm/arm.c (arm_arch7ve): Rename into ...
32629         (arm_arch_lpae): This.  Define it in term of isa_bit_lpae.
32630         * config/arm/arm.h (TARGET_HAVE_LPAE): Redefine in term of
32631         arm_arch_lpae.
32633 2017-03-22  Martin Liska  <mliska@suse.cz>
32635         PR target/79906
32636         * config/rs6000/rs6000.c (rs6000_inner_target_options): Show
32637         error message instead of an ICE.
32639 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
32641         * doc/extend.texi (6.11 Additional Floating Types): Revise.
32643 2017-03-21  Kelvin Nilsen  <kelvin@gcc.gnu.org>
32645         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
32646         comments.
32647         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
32648         comments.
32650 2017-03-21  Martin Sebor  <msebor@redhat.com>
32652         * doc/extend.texi: Use "cannot" instead of "can't."
32653         * doc/hostconfig.texi: Same.
32654         * doc/install.texi: Same.
32655         * doc/invoke.texi: Same.
32656         * doc/loop.texi: Same.
32657         * doc/md.texi: Same.
32658         * doc/objc.texi: Same.
32659         * doc/rtl.texi: Same.
32660         * doc/tm.texi: Same.
32661         * doc/tm.texi.in: Same.
32662         * doc/trouble.texi: Same.
32664 2017-03-21  Alexandre Oliva  <aoliva@redhat.com>
32666         PR debug/63238
32667         * dwarf2out.c (struct checksum_attributes): Add at_alignment.
32668         (collect_checksum_attributes): Set it.
32669         (die_checksum_ordered): Use it.
32671 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
32673         PR tree-optimization/79908
32674         * tree-stdarg.c (expand_ifn_va_arg_1): Revert the following
32675         change: For a VA_ARG whose LHS has been cast away, use
32676         force_gimple_operand to construct the side effects.
32678 2017-03-21  David Malcolm  <dmalcolm@redhat.com>
32680         PR translation/80001
32681         * omp-offload.c (oacc_loop_fixed_partitions): Make diagnostics
32682         more amenable to translation.
32683         (oacc_loop_auto_partitions): Likewise.
32685 2017-03-21  Marek Polacek  <polacek@redhat.com>
32686             Martin Sebor  <msebor@redhat.com>
32688         PR tree-optimization/80109
32689         * gimple-ssa-warn-alloca.c (alloca_call_type): Only call get_range_info
32690         on INTEGRAL_TYPE_P.
32692 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
32693             Segher Boessenkool  <segher@kernel.crashing.org>
32695         PR target/80125
32696         * combine.c (can_combine_p): Revert the 2017-03-20 change, only
32697         check reg_used_between_p between insn and one of succ or succ2
32698         depending on if succ is artificial insn not inserted into insn
32699         stream.
32701 2017-03-21  Martin Liska  <mliska@suse.cz>
32703         PR gcov-profile/80081
32704         * Makefile.in: Add gcov-dump and fix installation of gcov-tool.
32705         * doc/gcc.texi: Include gcov-dump stuff.
32706         * doc/gcov-dump.texi: New file.
32708 2017-03-21  Toma Tabacu  <toma.tabacu@imgtec.com>
32710         PR rtl-optimization/79150
32711         * config/mips/mips.c (mips_block_move_loop): Emit a NOP after the
32712         conditional jump, if the jump is the last insn of the loop.
32714 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
32715             Richard Biener  <rguenth@suse.de>
32717         PR tree-optimization/79908
32718         * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
32719         been cast away, use force_gimple_operand to construct the side
32720         effects.
32722 2017-03-21  Martin Liska  <mliska@suse.cz>
32724         PR libfortran/79956
32725         * simplify-rtx.c (simplify_immed_subreg): Initialize a variable
32726         to NULL.
32728 2017-03-21  Brad Spengler <spender@grsecurity.net>
32730         PR plugins/80094
32731         * plugin.c (htab_hash_plugin): New function.
32732         (add_new_plugin): Use it and adjust.
32733         (parse_plugin_arg_opt): Adjust.
32734         (init_one_plugin): Likewise.
32736 2017-03-21  Richard Biener  <rguenther@suse.de>
32738         PR tree-optimization/80032
32739         * gimplify.c (gimple_push_cleanup): Add force_uncond parameter,
32740         if set force the cleanup to happen unconditionally.
32741         (gimplify_target_expr): Push inserted clobbers with force_uncond
32742         to avoid them being removed by control-dependent DCE.
32744 2017-03-21  Richard Biener  <rguenther@suse.de>
32746         PR tree-optimization/80122
32747         * tree-inline.c (copy_bb): Do not expans va-arg packs or
32748         va_arg_pack_len when the inlined call stmt requires pack
32749         expansion itself.
32750         * tree-inline.h (struct copy_body_data): Make call_stmt a gcall *.
32752 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
32754         PR sanitizer/78158
32755         * tsan.c (instrument_builtin_call): If the memory model argument
32756         is not a constant, assume it is valid.
32758         PR c/67338
32759         * fold-const.c (round_up_loc): Negate divisor in unsigned type to
32760         avoid UB.
32762 2017-03-20  Segher Boessenkool  <segher@kernel.crashing.org>
32764         PR rtl-optimization/79910
32765         * combine.c (can_combine_p): Do not allow combining an I0 or I1
32766         if its dest is used by an insn before I2 (other than the combined
32767         insns themselves, which are properly handled already).
32769 2017-03-20  Segher Boessenkool  <segher@kernel.crashing.org>
32771         Revert:
32772         2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
32774         * combine.c (record_used_regs): New static function.
32775         (try_combine): Handle situations where there is an additional
32776         instruction between I2 and I3 which needs to have a LOG_LINK
32777         updated.
32779         Revert:
32780         2017-03-17  Jim Wilson  <jim.wilson@linaro.org>
32782         * combine.c (try_combine): Delete redundant i1 test.  Call
32783         prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
32785 2017-03-20  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
32787         PR target/80083
32788         * config/rs6000/rs6000.md (*movsi_internal1): Fix constraints for
32789         alternatives 13/14.
32791 2017-03-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
32793         PR tree-optimization/80054
32794         * gimple-ssa-strength-reduction.c (all_phi_incrs_profitable): Fail
32795         the optimization if a PHI or any of its arguments is not dominated
32796         by the candidate's basis.  Use gphi* rather than gimple* as
32797         appropriate.
32798         (replace_profitable_candidates): Clean up a gimple* variable that
32799         should be a gphi* variable.
32801 2017-03-20  Martin Sebor  <msebor@redhat.com>
32803         PR c++/52477
32804         * doc/extend.texi (attribute constructor): Document present limitation.
32806 2017-03-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
32808         PR target/79963
32809         * config/rs6000/altivec.h (vec_all_ne): Under __cplusplus__ and
32810         __POWER9_VECTOR__ #ifdef control, change template definition to
32811         use Power9-specific built-in function.
32812         (vec_any_eq): Likewise.
32813         * config/rs6000/vector.md (vector_ae_v2di_p): Change the flag used
32814         to control outcomes from this test.
32815         (vector_ae_<mode>p): For VEC_F modes, likewise.
32817 2017-03-20  Ian Lance Taylor  <iant@google.com>
32819         * config/i386/i386.c (ix86_function_regparm): Save an extra
32820         register for -fsplit-stack with DECL_STATIC_CHAIN.
32822 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com>
32824         PR target/79912
32825         * config/riscv/riscv.c (riscv_preferred_reload_class): Remove.
32826         (TARGET_PREFERRED_RELOAD_CLASS): Likewise.
32828 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com>
32830         * config/riscv/riscv.c (riscv_print_operand): Use "fence
32831         iorw,ow".
32832         * config/riscv/sync.mc (mem_thread_fence_1): Use "fence
32833         iorw,iorw".
32835 2017-03-20  Marek Polacek  <polacek@redhat.com>
32837         PR sanitizer/80063
32838         * asan.c (DEF_SANITIZER_BUILTIN): Use do { } while (0).
32840 2017-03-20  Richard Biener  <rguenther@suse.de>
32842         PR tree-optimization/80113
32843         * graphite-isl-ast-to-gimple.c (copy_loop_phi_nodes): Do not
32844         allocate extra SSA name for PHI def.
32845         (add_close_phis_to_outer_loops): Likewise.
32846         (add_close_phis_to_merge_points): Likewise.
32847         (copy_loop_close_phi_args): Likewise.
32848         (copy_cond_phi_nodes): Likewise.
32850 2017-03-20  Martin Liska  <mliska@suse.cz>
32852         PR middle-end/79753
32853         * tree-chkp.c (chkp_build_returned_bound): Do not build
32854         returned bounds for a LHS that's not a BOUNDED_P type.
32856 2017-03-20  Martin Liska  <mliska@suse.cz>
32858         PR target/79769
32859         PR target/79770
32860         * tree-chkp.c (chkp_find_bounds_1): Handle REAL_CST,
32861         COMPLEX_CST and VECTOR_CST.
32863 2017-03-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32865         PR target/78857
32866         * config/s390/s390.md ("cmp<mode>_ccs_0"): Add a clobber of the
32867         target operand.  A new splitter adds the clobber statement in case
32868         the target operand is dead anyway.
32870 2017-03-19  Gerald Pfeifer  <gerald@pfeifer.com>
32872         * doc/install.texi (Specific) <sparc-*-linux*>: No longer refer
32873         to age-old versions of binutils and glibc.
32875 2017-03-18  Segher Boessenkool  <segher@kernel.crashing.org>
32877         * doc/contrib.texi (Contributors): Remove duplicate entry for myself.
32879 2017-03-18  Gerald Pfeifer  <gerald@pfeifer.com>
32881         * doc/contrib.texi (Contributors): Add Segher Boessenkool.
32883 2017-03-18  Gerald Pfeifer  <gerald@pfeifer.com>
32885         * doc/install.texi (Specific) <arm-*-eabi>: Remove old
32886         requirement for binutils 2.13.
32888 2017-03-17  Jim Wilson  <jim.wilson@linaro.org>
32890         * combine.c (try_combine): Delete redundant i1 test.  Call
32891         prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
32893 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com
32895         * doc/install.texi (Specific) <riscv32-*-elf>: Add riscv32-*-elf,
32896         riscv32-*-linux, riscv64-*-elf, riscv64-*-linux to the table of
32897         contents.
32898         <riscv64-*-elf>: Re-arrange section
32899         <riscv32-*-elf>: Add a note about requiring binutils 2.28.
32900         <riscv32-*-linux>: Likewise.
32901         <riscv64-*-elf>: Likewise
32902         <riscv64-*-linux>: Likewise.
32904 2017-03-17  Richard Earnshaw  <rearnsha@arm.com>
32906         PR target/80052
32907         * aarch64.opt(verbose-cost-dump): Fix typo.
32909 2017-03-17  Pat Haugen  <pthaugen@us.ibm.com>
32911         PR target/79951
32912         * config/rs6000/rs6000.md (copysign<mode>3_fcpsgn): Test
32913         for VECTOR_UNIT_VSX_P (<MODE>mode) too.
32915 2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
32917         * reload.c (find_reloads): When reloading a nonoffsettable address,
32918         use RELOAD_OTHER for it and its address reloads.
32920         PR rtl-optimization/79910
32921         * combine.c (record_used_regs): New static function.
32922         (try_combine): Handle situations where there is an additional
32923         instruction between I2 and I3 which needs to have a LOG_LINK
32924         updated.
32926 2017-03-17  Jeff Law  <law@redhat.com>
32928         PR tree-optimization/71437
32929         * tree-vrp.c (simplify_stmt_for_jump_threading): Lookup the
32930         conditional in the hash table first.
32931         (vrp_dom_walker::before_dom_children): Extract condition from
32932         ASSERT_EXPR.  Record condition, its inverion and any implied
32933         conditions as well.
32935 2017-03-17  Marek Polacek  <polacek@redhat.com>
32936             Markus Trippelsdorf  <markus@trippelsdorf.de>
32938         PR tree-optimization/80079
32939         * gimple-ssa-store-merging.c (class pass_store_merging): Initialize
32940         m_stores_head.
32942 2017-03-17  Richard Biener  <rguenther@suse.de>
32944         PR middle-end/80075
32945         * tree-eh.c (stmt_could_throw_1_p): Only handle gimple assigns.
32946         Properly verify the LHS before the RHS possibly claims to be
32947         handled.
32948         (stmt_could_throw_p): Hande gimple conds fully here.  Clobbers
32949         do not throw.
32951 2017-03-17  Martin Jambor  <mjambor@suse.cz>
32953         * doc/invoke.texi (Option Options): Include -fipa-vrp in the list.
32954         (List of -O2 options): Likewise.
32955         (-fipa-bit-cp): Replace "ipa" with "interprocedural."
32956         (-fipa-vrp) New.
32958 2017-03-17  Tom de Vries  <tom@codesourcery.com>
32960         * gcov-dump.c (print_usage): Print bug_report_url.
32962 2017-03-17  Richard Biener  <rguenther@suse.de>
32964         PR middle-end/80050
32965         * genmatch.c (parser::next): Remove pointless check for CPP_EOF.
32966         (parser::peek): Likewise.
32968 2017-03-17  Richard Biener  <rguenther@suse.de>
32970         PR tree-optimization/80048
32971         * sese.c (free_sese_info): Properly release rename_map and
32972         copied_bb_map elements.
32974 2017-03-16  Alexandre Oliva  <aoliva@redhat.com>
32976         * gimple-ssa-store-merging.c (struct imm_store_chain_info):
32977         Add linked-list forward and backlinks.  Insert on
32978         construction, remove on destruction.
32979         (class pass_store_merging): Add m_stores_head field.
32980         (pass_store_merging::terminate_and_process_all_chains):
32981         Iterate over m_stores_head list.
32982         (pass_store_merging::terminate_all_aliasing_chains):
32983         Likewise.
32984         (pass_store_merging::execute): Check for debug stmts first.
32985         Push new chains onto the m_stores_head stack.
32987 2017-03-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
32989         PR target/71294
32990         * config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Allow a
32991         SPLAT operation on ISA 2.07 64-bit systems that have direct move,
32992         but no MTVSRDD support, by doing MTVSRD and XXPERMDI.
32994 2017-03-16  Jeff Law  <law@redhat.com>
32996         PR tree-optimization/71437
32997         * tree-ssa-dom.c (dom_opt_dom_walker): Remove thread_across_edge
32998         member function.  Implementation moved into after_dom_children
32999         member function and into the threader's thread_outgoing_edges
33000         function.
33001         (dom_opt_dom_walker::after_dom_children): Simplify by moving
33002         some code into new thread_outgoing_edges.
33003         * tree-ssa-threadedge.c (thread_across_edge): Make static and simplify
33004         definition.  Simplify marker handling (do it here).   Assume we always
33005         have the available expression and the const/copies tables.
33006         (thread_outgoing_edges): New function extracted from tree-ssa-dom.c
33007         and tree-vrp.c
33008         * tree-ssa-threadedge.h (thread_outgoing_edges): Declare.
33009         * tree-vrp.c (equiv_stack): No longer file scoped.
33010         (vrp_dom_walker): New class.
33011         (vrp_dom_walker::before_dom_children): New member function.
33012         (vrp_dom_walker::after_dom_children): Likewise.
33013         (identify_jump_threads):  Setup domwalker.  Use it rather than
33014         walking edges in a random order by hand.  Simplify setup/finalization.
33015         (finalize_jump_threads): Remove.
33016         (vrp_finalize): Do not call identify_jump_threads here.
33017         (execute_vrp): Do it here instead and call thread_through_all_blocks
33018         here too.
33020         PR tree-optimization/71437
33021         * tree-ssa-dom.c (pfn_simplify): Add basic_block argument.  All
33022         callers changed.
33023         (simplify_stmt_for_jump_threading): Add basic_block argument.  All
33024         callers changed.
33025         (lhs_of_dominating_assert): Moved from here into tree-vrp.c.
33026         (dom_opt_dom_walker::thread_across_edge): Remove
33027         handle_dominating_asserts argument.  All callers changed.
33028         (record_temporary_equivalences_from_stmts_at_dest): Corresponding
33029         changes.  Remove calls to lhs_of_dominating_assert.  Other
33030         uses of handle_dominating_asserts turn into unconditional code
33031         (simplify_control_stmt_condition_1): Likewise.
33032         (simplify_control_stmt_condition): Likewise.
33033         (thread_through_normal_block, thread_across_edge): Likewise.
33034         * tree-ssa-threadedge.h (thread_across_edge): Corresponding changes.
33035         * tree-vrp.c (lhs_of_dominating_assert): Move here.  Return original
33036         object if it is not an SSA_NAME.
33037         (simplify_stmt_for_jump_threading): Call lhs_of_dominating_assert
33038         before calling into the VRP specific simplifiers.
33039         (identify_jump_threads): Remove handle_dominating_asserts
33040         argument.
33042 2017-03-16  Jakub Jelinek  <jakub@redhat.com>
33044         PR fortran/79886
33045         * tree-diagnostic.c (default_tree_printer): No longer static.
33046         * tree-diagnostic.h (default_tree_printer): New prototype.
33048 2017-03-16  Tamar Christina  <tamar.christina@arm.com>
33050         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>)
33051         Change ins into fmov.
33053 2017-03-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
33055         * config/aarch64/iterators.md (h_con): Return "x" for V4HF and V8HF.
33056         * config/aarch64/aarch64-simd.md (*aarch64_fma4_elt_from_dup<mode>):
33057         Use h_con constraint for operand 1.
33058         (*aarch64_fnma4_elt_from_dup<mode>): Likewise.
33059         (*aarch64_mulx_elt_from_dup<mode>): Likewise for operand 2.
33061 2017-03-15  Jeff Law  <law@redhat.com>
33063         PR tree-optimization/71437
33064         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): New function.
33065         (record_temporary_equivalences): Use it.
33067         PR tree-optimization/71437
33068         * tree-ssa-dom.c (struct cond_equivalence): Moved from here into
33069         tree-ssa-scopedtables.
33070         (lookup_avail_expr, build_and_record_new_cond): Likewise.
33071         (record_conditions, record_cond, vuse_eq): Likewise.
33072         (record_edge_info): Adjust to API tweak of record_conditions.
33073         (simplify_stmt_for_jump_threading): Similarly for lookup_avail_expr.
33074         (record_temporary_equivalences, optimize_stmt): Likewise.
33075         (eliminate_redundant_computations): Likewise.
33076         (record_equivalences_from_stmt): Likewise.
33077         * tree-ssa-scopedtables.c: Include options.h and params.h.
33078         (vuse_eq): New function, moved from tree-ssa-dom.c
33079         (build_and_record_new_cond): Likewise.
33080         (record_conditions): Likewise.  Accept vector of conditions rather
33081         than edge_equivalence structure for first argument.
33082         for the first argument.
33083         (avail_exprs_stack::lookup_avail_expr): New member function, moved
33084         from tree-ssa-dom.c.
33085         (avail_exprs_stack::record_cond): Likewise.
33086         * tree-ssa-scopedtables.h (struct cond_equivalence): Moved here
33087         from tree-ssa-dom.c.
33088         (avail_exprs_stack): Add new member functions lookup_avail_expr
33089         and record_cond.
33090         (record_conditions): Declare.
33092 2017-03-15  Vladimir Makarov  <vmakarov@redhat.com>
33094         PR target/80017
33095         * lra-constraints.c (process_alt_operands): Increase reject for
33096         reloading an input/output operand.
33098 2017-03-15  Michael Meissner  <meissner@linux.vnet.ibm.com>
33100         PR target/79038
33101         * config/rs6000/rs6000.md (float<QHI:mode><IEEE128:mode>2): Define
33102         insns to convert from signed/unsigned char/short to IEEE 128-bit
33103         floating point.
33104         (floatuns<QHI:mode><IEEE128:mode>2): Likewise.
33106 2017-03-15  Uros Bizjak  <ubizjak@gmail.com>
33108         PR target/80019
33109         * config/i386/i386.c (ix86_vector_duplicate_value): Create
33110         subreg of inner mode for values already in registers.
33112 2017-03-15  Bernd Schmidt  <bschmidt@redhat.com>
33114         * config/c6x/c6x.c (hwloop_optimize): Handle case where the old
33115         iteration reg is used after the loop.
33117 2017-03-14  Martin Sebor  <msebor@redhat.com>
33119         PR tree-optimization/79800
33120         * gimple-ssa-sprintf.c (format_floating: Add argument.  Handle
33121         precision in negative-positive range.
33122         (format_floating): Call non-const overload with adjusted precision.
33124 2017-03-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
33126         PR target/79947
33127         * config/rs6000/rs6000.h (TARGET_FRSQRTES): Add check for
33128         -mpowerpc-gfxopt.
33130 2017-03-14  Martin Sebor  <msebor@redhat.com>
33132         PR middle-end/80020
33133         * builtin-attrs.def (ATTR_ALLOC_SIZE_2_NOTHROW_LIST): New macro.
33134         * builtins.def (aligned_alloc): Use it.
33136         PR c/79936
33137         * Makefile.in (GTFILES): Add calls.c.
33138         * calls.c: Include "gt-calls.h".
33140 2017-03-14  Bernd Schmidt  <bschmidt@redhat.com>
33142         PR rtl-optimization/79728
33143         * regs.h (struct target_regs): New field
33144         x_contains_allocatable_regs_of_mode.
33145         (contains_allocatable_regs_of_mode): New macro.
33146         * reginfo.c (init_reg_sets_1): Initialize it, and change
33147         contains_reg_of_mode so it includes global regs as well.
33148         * reload.c (push_reload): Use contains_allocatable_regs_of_mode
33149         rather than contains_regs_of_mode.
33151 2017-03-14  Martin Liska  <mliska@suse.cz>
33153         * doc/invoke.texi: Document options that can't be combined with
33154         -fcheck-pointer-bounds.
33156 2017-03-14  Martin Liska  <mliska@suse.cz>
33158         PR middle-end/79831
33159         * doc/invoke.texi (-Wchkp): Document the option.
33161 2017-03-14  Martin Liska  <mliska@suse.cz>
33163         * Makefile.in: Install gcov-dump.
33165 2017-03-14  Martin Liska  <mliska@suse.cz>
33167         * multiple_target.c (expand_target_clones): Bail out for
33168         an invalid attribute.
33170 2017-03-14  Richard Biener  <rguenther@suse.de>
33172         * alias.c (struct alias_set_entry): Pack properly.
33173         * cfgloop.h (struct loop): Likewise.
33174         * cse.c (struct set): Likewise.
33175         * ipa-utils.c (struct searchc_env): Likewise.
33176         * loop-invariant.c (struct invariant): Likewise.
33177         * lra-remat.c (struct cand): Likewise.
33178         * recog.c (struct change_t): Likewise.
33179         * rtl.h (struct address_info): Likewise.
33180         * symbol-summary.h (function_summary): Likewise.
33181         * tree-loop-distribution.c (struct partition): Likewise.
33182         * tree-object-size.c (struct object_size_info): Likewise.
33183         * tree-ssa-loop-ivopts.c (struct cost_pair): Likewise.
33184         * tree-ssa-threadupdate.c (struct ssa_local_info_t): Likewise.
33185         * tree-vect-data-refs.c (struct _vect_peel_info): Likewise.
33186         * tree-vect-slp.c (struct _slp_oprnd_info): Likewise.
33187         * tree-vect-stmts.c (struct simd_call_arg_info): Likewise.
33188         * tree-vectorizer.h (struct _loop_vec_info): Likewise.
33189         (struct _stmt_vec_info): Likewise.
33191 2017-03-14  Martin Liska  <mliska@suse.cz>
33193         PR target/79892
33194         * multiple_target.c (create_dispatcher_calls): Check that
33195         a target can create a function dispatcher.
33197 2017-03-14  Martin Liska  <mliska@suse.cz>
33199         PR lto/66295
33200         * multiple_target.c (expand_target_clones): Drop local.local
33201         flag for default implementation.
33203 2017-03-14  Richard Biener  <rguenther@suse.de>
33205         PR tree-optimization/80030
33206         * tree-vect-stmts.c (vectorizable_store): Plug memleak.
33208 2017-03-13  Kito Cheng  <kito.cheng@gmail.com>
33210         * config/riscv/riscv.c (riscv_emit_float_compare>: Use
33211         gcc_fallthrough() instead of __attribute__((fallthrough));
33213 2017-03-13  Gerald Pfeifer  <gerald@pfeifer.com>
33215         * doc/gcc.texi: Remove "up" link to (DIR).
33216         * doc/gccint.texi: Ditto.
33218 2017-03-13  Gerald Pfeifer  <gerald@pfeifer.com>
33220         * doc/install.texi (Specific) <avr>: Remove reference to
33221         binutils 2.13.
33223 2017-03-13  Jeff Law  <law@redhat.com>
33225         * config/riscv/riscv.c (riscv_emit_float_compare): Use fallthru
33226         attribute rather than comments.
33228         * config/pdp11/pdp11.md (movmemhi): Adjust operand numbers to
33229         match_scratch operand is highest.
33231 2017-03-13  Martin Liska  <mliska@suse.cz>
33233         PR middle-end/78339
33234         * ipa-pure-const.c (warn_function_noreturn): If the declarations
33235         is a CHKP clone, use original declaration.
33237 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
33239         * config/arc/arc.c (arc_init): Use multiplier whenever we have it.
33240         (arc_conditional_register_usage): Use a different allocation order
33241         when optimizing for size.
33242         * common/config/arc/arc-common.c (arc_option_optimization_table):
33243         Section anchors default on when optimizing for size.
33245 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
33247         * config/arc/arc.md (*tst_bitfield_tst): Fix pattern.
33249 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
33251         * config/arc/arc.c (arc_output_addsi): Emit code density adds.
33252         * config/arc/arc.md (cpu_facility): Add cd variant.
33253         (*movqi_insn): Add code density variant.
33254         (*movhi_insn): Likewise.
33255         (*movqi_insn): Likewise.
33256         (*addsi3_mixed): Likewise.
33257         (subsi3_insn): Likewise.
33259 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
33261         * config/arc/arc.md (movsi_cond_exec): Update constraint.
33263 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
33265         * config/arc/arc.c (arc_legitimize_pic_address): Handle PIC
33266         expressions with MINUS and UNARY ops.
33268 2017-03-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
33270         PR target/79911
33271         * config/arm/neon.md (vec_sel_widen_ssum_lo<VQI:mode><VW:mode>3):
33272         Rename to...
33273         (vec_sel_widen_ssum_lo<mode><V_half>3): ... This. Avoid mismatch
33274         between vec_select and vector argument.
33275         (vec_sel_widen_ssum_hi<VQI:mode><VW:mode>3): Rename to...
33276         (vec_sel_widen_ssum_hi<mode><V_half>3): ... This. Likewise.
33277         (vec_sel_widen_usum_lo<VQI:mode><VW:mode>3): Rename to...
33278         (vec_sel_widen_usum_lo<mode><V_half>3): ... This.
33279         (vec_sel_widen_usum_hi<VQI:mode><VW:mode>3): Rename to...
33280         (vec_sel_widen_usum_hi<mode><V_half>3): ... This.
33282 2017-03-13  Richard Biener  <rguenther@suse.de>
33284         PR other/79991
33285         * params.def (vect-max-peeling-for-alignment): Fix typo.
33287 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
33289         * doc/install.texi (Specific) <mips-*-*>: Remove description of
33290         issue that only occurred with binutils below 2.18.
33292 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
33294         * doc/install.texi (Specific) <cris-axis-elf>: No longer
33295         refer to binutils 2.11/2.12 minimum.
33297 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
33299         * doc/install.texi (Specific) <powerpc-*-*>: Remove link to
33300         ftp.kernel.org and simplify binutils requirement.
33302 2017-03-11  Gerald Pfeifer  <gerald@pfeifer.com>
33304         * doc/invoke.texi (Warning Options): Fix spelling of link-time
33305         optimization.
33306         (Optimize Options): Ditto.  Also remove redundancy.
33308 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
33310         PR translation/79848
33311         * ipa-devirt.c (warn_types_mismatch): Simplify uses of "%<%s%>" to
33312         "%qs".
33313         * ipa-pure-const.c (suggest_attribute): Likewise.  Convert _
33314         to G_ to avoid double translation.
33316 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
33318         PR translation/79923
33319         * auto-profile.c (get_combined_location): Convert leading
33320         character of diagnostics to lower case and remove trailing period.
33321         (read_profile): Likewise for various diagnostics.
33322         * config/arm/arm.c (arm_option_override): Remove trailing period
33323         from various diagnostics.
33324         * config/msp430/msp430.c (msp430_expand_delay_cycles): Likewise.
33325         (msp430_expand_delay_cycles): Likewise.
33327 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
33329         PR target/79925
33330         * config/aarch64/aarch64.c (aarch64_validate_mcpu): Quote the
33331         full command-line argument, rather than just "str".
33332         (aarch64_validate_march): Likewise.
33333         (aarch64_validate_mtune): Likewise.
33335 2017-03-10  Bernd Schmidt  <bschmidt@redhat.com>
33337         PR rtl-optimization/78911
33338         * lra-assigns.c (must_not_spill_p): New function.
33339         (spill_for): Use it.
33341 2017-03-10  Jakub Jelinek  <jakub@redhat.com>
33343         PR tree-optimization/79981
33344         * tree-vrp.c (extract_range_basic): Handle IMAGPART_EXPR of
33345         ATOMIC_COMPARE_EXCHANGE ifn result.
33346         (stmt_interesting_for_vrp, vrp_visit_stmt): Handle
33347         IFN_ATOMIC_COMPARE_EXCHANGE.
33349 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
33351         PR driver/79875
33352         * opts.c (parse_sanitizer_options): Add missing question mark to
33353         "did you mean" message.
33355 2017-03-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
33357         * config/rs6000/rs6000-builtin.def (VMULEUB_UNS): Remove orphaned
33358         built-in.
33359         (VMULEUH_UNS): Likewise.
33360         (VMULOUB_UNS): Likewise.
33361         (VMULOUH_UNS): Likewise.
33362         * config/rs6000/rs6000.c (builtin_function_type): Remove
33363         references to ALTIVEC_BUILTIN_VMUL[EO]U[BH]_UNS.
33365 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
33367         PR bootstrap/79952
33368         * read-rtl-function.c (function_reader::read_rtx_operand): Update
33369         x with result of extra_parsing_for_operand_code_0.
33370         (function_reader::extra_parsing_for_operand_code_0): Convert
33371         return type from void to rtx, returning x.  When reading
33372         SYMBOL_REF with SYMBOL_FLAG_HAS_BLOCK_INFO, reallocate x to the
33373         larger size containing struct block_symbol.
33375 2017-03-10  Segher Boessenkool  <segher@kernel.crashing.org>
33377         * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
33378         -mfloat128-hardware without -m64.
33380 2017-03-10  Will Schmidt <will_schmidt@vnet.ibm.com>
33382         PR target/79941
33383         * config/rs6000/rs6000.c (builtin_function_type): Add VMUL*U[HB]
33384         entries to the case statement that marks unsigned arguments to
33385         overloaded functions.
33387 2017-03-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
33389         * config/rs6000/rs6000.c (rs6000_option_override_internal): Fix
33390         two typographic errors in the handling of TARGET_UPPER_REGS_DI.
33392 2017-03-10  Pat Haugen  <pthaugen@us.ibm.com>
33394         PR target/79907
33395         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Test
33396         TARGET_UPPER_REGS_DI when setting 'wi' constraint regclass.
33398 2017-03-10  Martin Liska  <mliska@suse.cz>
33400         PR target/65705
33401         PR target/69804
33402         * toplev.c (process_options): Enable MPX with LSAN and UBSAN.
33403         * tree-chkp.c (chkp_walk_pointer_assignments): Verify that
33404         FIELD != NULL.
33406 2017-03-10  Olivier Hainque  <hainque@adacore.com>
33408         * tree-switch-conversion (array_value_type): Start by resetting
33409         candidate type to it's main variant.
33411 2017-03-10  Jakub Jelinek  <jakub@redhat.com>
33413         PR rtl-optimization/79909
33414         * combine.c (try_combine): Use simplify_replace_rtx on individual
33415         CALL_INSN_FUNCTION_USAGE elements instead of replace_rtx on copy_rtx
33416         of the whole CALL_INSN_FUNCTION_USAGE.
33418         PR tree-optimization/79972
33419         * gimple-ssa-warn-alloca.c (alloca_call_type): Only call
33420         get_range_info on SSA_NAMEs.  Formatting fixes.
33422 2017-03-10  Richard Biener  <rguenther@suse.de>
33423             Jakub Jelinek  <jakub@redhat.com>
33425         PR tree-optimization/77975
33426         * tree-ssa-loop-niter.c (get_base_for): Allow phi argument from latch
33427         edge to be constant.
33428         (get_val_for): For constant x return it.  Formatting fix.
33429         (loop_niter_by_eval): Avoid pointless looping if the next iteration
33430         would use the same bases as the current one.
33432 2017-03-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
33434         * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Use rotate
33435         instead of vec_select for V1TImode.
33436         * conifg/rs6000/vsx.md (VSX_LE): Remove mode iterator that is no
33437         longer needed.
33438         (VSX_LE_128): Add V1TI to this mode iterator.
33439         (*vsx_le_perm_load_<mode>): Change to use VSX_D mode iterator.
33440         (*vsx_le_perm_store_<mode>): Likewise.
33441         (pre-reload splitter for VSX stores): Likewise.
33442         (post-reload splitter for VSX stores): Likewise.
33443         (*vsx_xxpermdi2_le_<mode>): Likewise.
33444         (*vsx_lxvd2x2_le_<mode>): Likewise.
33445         (*vsx_stxvd2x2_le_<mode>): Likewise.
33447 2017-03-09  Michael Eager  <eager@eagercon.com>
33449         Correct failures with --enable-checking=yes,rtl.
33451         * config/microblaze/microblaze.c (microblaze_expand_shift):
33452         Replace GET_CODE test with CONST_INT_P and INTVAL test with
33453         test for const0_rtx.
33454         * config/microblaze/microblaze.md (ashlsi3_byone, ashrsi3_byone,
33455         lshrsi3_byone): Replace INTVAL with test for const1_rtx.
33457 2017-03-09  Richard Biener  <rguenther@suse.de>
33459         PR tree-optimization/79977
33460         * graphite-scop-detection.c (scop_detection::merge_sese):
33461         Handle the case of extra exits to blocks dominating the entry.
33463 2017-03-09  Toma Tabacu  <toma.tabacu@imgtec.com>
33465         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
33466         Document rdynamic.
33468 2017-03-09  Vladimir Makarov  <vmakarov@redhat.com>
33470         PR rtl-optimization/79949
33471         * lra-constraints.c (process_alt_operands): Check memory when
33472         trying to predict a cycle.  Print about the overall increase.
33474 2017-03-09  Richard Biener  <rguenther@suse.de>
33476         PR middle-end/79971
33477         * gimple-expr.c (useless_type_conversion_p): Preserve
33478         TYPE_SATURATING for fixed-point types.
33480 2017-03-09  Richard Biener  <rguenther@suse.de>
33482         PR ipa/79970
33483         * ipa-prop.c (ipa_modify_formal_parameters): Avoid changing
33484         alignment of BLKmode params.
33486 2017-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
33488         PR target/79913
33489         * config/aarch64/iterators.md (VALL_F16_NO_V2Q): New mode iterator.
33490         (VALL_NO_V2Q): Likewise.
33491         (VDQF_DF): Delete.
33492         * config/aarch64/aarch64-simd.md
33493         (aarch64_dup_lane_<vswap_width_name><mode>): Use VALL_F16_NO_V2Q
33494         iterator.
33495         (*aarch64_simd_vec_copy_lane_<vswap_width_name><mode>): Use
33496         VALL_NO_V2Q mode iterator.
33497         (*aarch64_vgetfmulx<mode>): Use VDQF iterator.
33499 2017-03-09  Martin Liska  <mliska@suse.cz>
33501         PR tree-optimization/79631
33502         * tree-chkp-opt.c (chkp_is_constant_addr): Call
33503         tree_int_cst_sign_bit just for INTEGER constants.
33505 2017-03-09  Martin Liska  <mliska@suse.cz>
33507         PR target/65705
33508         PR target/69804
33509         * toplev.c (process_options): Disable -fcheck-pointer-bounds with
33510         sanitizers.
33512 2017-03-09  Marek Polacek  <polacek@redhat.com>
33514         PR c++/79672
33515         * tree.c (inchash::add_expr): Handle TREE_VEC.
33517 2017-03-09  Martin Liska  <mliska@suse.cz>
33519         PR ipa/79764
33520         (chkp_narrow_size_and_offset): New function.
33521         (chkp_parse_array_and_component_ref): Support BIT_FIELD_REF.
33522         (void chkp_parse_bit_field_ref): New function.
33523         (chkp_make_addressed_object_bounds): Add case for BIT_FIELD_REF.
33524         (chkp_process_stmt): Use chkp_parse_bit_field_ref.
33526 2017-03-09  Martin Liska  <mliska@suse.cz>
33528         PR ipa/79761
33529         * tree-chkp.c (chkp_get_bound_for_parm): Get bounds for a param.
33530         (chkp_find_bounds_1): Remove gcc_unreachable.
33532 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
33534         PR sanitizer/79944
33535         * asan.c (get_mem_refs_of_builtin_call): For BUILT_IN_ATOMIC* and
33536         BUILT_IN_SYNC*, determine the access type from the size suffix and
33537         always build a MEM_REF with that type.  Handle forgotten
33538         BUILT_IN_SYNC_FETCH_AND_NAND_16 and BUILT_IN_SYNC_NAND_AND_FETCH_16.
33540         PR target/79932
33541         * config/i386/avx512vlintrin.h (_mm256_cmpge_epi32_mask,
33542         _mm256_cmpge_epi64_mask, _mm256_cmpge_epu32_mask,
33543         _mm256_cmpge_epu64_mask, _mm256_cmple_epi32_mask,
33544         _mm256_cmple_epi64_mask, _mm256_cmple_epu32_mask,
33545         _mm256_cmple_epu64_mask, _mm256_cmplt_epi32_mask,
33546         _mm256_cmplt_epi64_mask, _mm256_cmplt_epu32_mask,
33547         _mm256_cmplt_epu64_mask, _mm256_cmpneq_epi32_mask,
33548         _mm256_cmpneq_epi64_mask, _mm256_cmpneq_epu32_mask,
33549         _mm256_cmpneq_epu64_mask, _mm256_mask_cmpge_epi32_mask,
33550         _mm256_mask_cmpge_epi64_mask, _mm256_mask_cmpge_epu32_mask,
33551         _mm256_mask_cmpge_epu64_mask, _mm256_mask_cmple_epi32_mask,
33552         _mm256_mask_cmple_epi64_mask, _mm256_mask_cmple_epu32_mask,
33553         _mm256_mask_cmple_epu64_mask, _mm256_mask_cmplt_epi32_mask,
33554         _mm256_mask_cmplt_epi64_mask, _mm256_mask_cmplt_epu32_mask,
33555         _mm256_mask_cmplt_epu64_mask, _mm256_mask_cmpneq_epi32_mask,
33556         _mm256_mask_cmpneq_epi64_mask, _mm256_mask_cmpneq_epu32_mask,
33557         _mm256_mask_cmpneq_epu64_mask, _mm_cmpge_epi32_mask,
33558         _mm_cmpge_epi64_mask, _mm_cmpge_epu32_mask, _mm_cmpge_epu64_mask,
33559         _mm_cmple_epi32_mask, _mm_cmple_epi64_mask, _mm_cmple_epu32_mask,
33560         _mm_cmple_epu64_mask, _mm_cmplt_epi32_mask, _mm_cmplt_epi64_mask,
33561         _mm_cmplt_epu32_mask, _mm_cmplt_epu64_mask, _mm_cmpneq_epi32_mask,
33562         _mm_cmpneq_epi64_mask, _mm_cmpneq_epu32_mask, _mm_cmpneq_epu64_mask,
33563         _mm_mask_cmpge_epi32_mask, _mm_mask_cmpge_epi64_mask,
33564         _mm_mask_cmpge_epu32_mask, _mm_mask_cmpge_epu64_mask,
33565         _mm_mask_cmple_epi32_mask, _mm_mask_cmple_epi64_mask,
33566         _mm_mask_cmple_epu32_mask, _mm_mask_cmple_epu64_mask,
33567         _mm_mask_cmplt_epi32_mask, _mm_mask_cmplt_epi64_mask,
33568         _mm_mask_cmplt_epu32_mask, _mm_mask_cmplt_epu64_mask,
33569         _mm_mask_cmpneq_epi32_mask, _mm_mask_cmpneq_epi64_mask,
33570         _mm_mask_cmpneq_epu32_mask, _mm_mask_cmpneq_epu64_mask): Move
33571         definitions outside of __OPTIMIZE__ guarded section.
33573         PR target/79932
33574         * config/i386/avx512bwintrin.h (_mm512_packs_epi32,
33575         _mm512_maskz_packs_epi32, _mm512_mask_packs_epi32,
33576         _mm512_packus_epi32, _mm512_maskz_packus_epi32,
33577         _mm512_mask_packus_epi32): Move definitions outside of __OPTIMIZE__
33578         guarded section.
33580 2017-03-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
33582         * config/s390/vx-builtins.md ("vfee<mode>", "vfeez<mode>")
33583         ("vfenez<mode>"): Add missing constraints.
33585 2017-03-08  Martin Sebor  <msebor@redhat.com>
33587         PR target/79928
33588         * config/nds32/nds32.c (nds32_option_override):
33589         Fix misspelled diagnostic.
33591 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
33593         PR c/79940
33594         * gimplify.c (gimplify_omp_for): Replace index var in outer
33595         taskloop statement with an artificial variable and add
33596         OMP_CLAUSE_PRIVATE clause for it.
33598 2017-03-08  Richard Biener  <rguenther@suse.de>
33600         PR tree-optimization/79955
33601         * tree-ssa-uninit.c (warn_uninitialized_vars): Do not warn
33602         for accesses that are completely outside of the variable.
33604 2017-03-08  Andrew Haley  <aph@redhat.com>
33606         PR tree-optimization/79943
33607         * tree-ssa-loop-split.c (compute_new_first_bound): When
33608         calculating the new upper bound, (END-BEG) should be added, not
33609         subtracted.
33611 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
33613         * config/avr/avr.md (setmemhi): Make sure match_dup
33614         operand number comes before match_scratch.
33616 2017-03-08  Richard Biener  <rguenther@suse.de>
33618         PR tree-optimization/79920
33619         * tree-vect-slp.c (vect_create_mask_and_perm): Remove and inline
33620         with ncopies == 1 to ...
33621         (vect_transform_slp_perm_load): ... here.  Properly compute
33622         all element loads by iterating VF times over the group.  Do
33623         not handle ncopies (computed in a broken way) in
33624         vect_create_mask_and_perm.
33626 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
33628         PR sanitizer/79904
33629         * internal-fn.c (expand_vector_ubsan_overflow): If arg0 or arg1
33630         is a uniform vector, use uniform_vector_p return value instead of
33631         building ARRAY_REF on folded VIEW_CONVERT_EXPR to array type.
33633 2017-03-07  Marek Polacek  <polacek@redhat.com>
33635         PR middle-end/79809
33636         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Use HOST_WIDE_INT.
33637         (alloca_call_type): Likewise.
33639 2017-03-07  Martin Liska  <mliska@suse.cz>
33641         * gcov.c (process_args): Put comment to correct location.
33643 2017-03-07  Martin Liska  <mliska@suse.cz>
33645         PR middle-end/68270
33646         * tree-chkp.c (chkp_may_narrow_to_field): Add new argument ref.
33647         Use array_at_struct_end_p instead of DECL_CHAIN (field).
33648         (chkp_narrow_bounds_for_field): Likewise.
33649         (chkp_parse_array_and_component_ref): Pass one more argument to
33650         call.
33652 2017-03-07  Richard Biener  <rguenther@suse.de>
33654         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve
33655         preheaders.
33657 2017-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
33659         * config/i386/i386.c (ix86_local_alignment): Align most aggregates
33660         of 16 bytes and more to 16 bytes, not those of 16 bits and more.
33662 2017-03-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
33664         PR c/79855
33665         * params.def (PARAM_STORE_MERGING_ALLOW_UNALIGNED): Add full stop
33666         to end of description.
33667         (PARAM_MAX_STORES_TO_MERGE): Likewise.
33669 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
33671         PR rtl-optimization/79901
33672         * config/i386/sse.md (*avx512bw_<code><mode>3<mask_name>): Renamed to
33673         ...
33674         (*avx512f_<code><mode>3<mask_name>): ... this.
33675         (<code><mode>3 with maxmin code iterator): Use VI8_AVX2_AVX512F
33676         iterator instead of VI8_AVX2_AVX512BW.
33678         PR rtl-optimization/79901
33679         * expr.c (expand_expr_real_2): For vector MIN/MAX, if there is no
33680         min/max expander, expand it using expand_vec_cond_expr.
33682         PR sanitizer/79897
33683         * ubsan.c (ubsan_encode_value): Call mark_addressable on the
33684         temporary.
33686 2017-03-06  Jakub Jelinek  <jakub@redhat.com>
33688         PR c++/79821
33689         * dwarf2out.h (dw_vec_const): Change array type from unsigned char *
33690         to void * for PCH reasons.
33691         * dwarf2out.c (output_loc_operands, output_die): Cast
33692         v.val_vec.array to unsigned char *.
33694 2017-03-06  John David Anglin  <danglin@gcc.gnu.org>
33696         PR target/77850
33697         * config/pa/pa-64.h (PAD_VARARGS_DOWN): Don't pad down complex and
33698         vector types.
33700 2017-03-06  Vladimir Makarov  <vmakarov@redhat.com>
33702         PR rtl-optimization/79571
33703         * lra-constraints.c (process_alt_operands): Calculate static
33704         reject and subtract it from overall when only addresses will be
33705         reloaded.
33707 2017-03-06  Julia Koval  <julia.koval@intel.com>
33709         PR target/79793
33710         * config/i386/i386.c (ix86_minimum_incoming_stack_boundary): Set
33711         incoming stack boundary to 128 for 64-bit targets.
33713 2017-03-06  Richard Biener  <rguenther@suse.de>
33715         PR tree-optimization/79894
33716         * tree-vectorizer.c (vectorize_loops): Set loop_vectorized_call
33717         to NULL after folding it.
33719 2017-03-06  Richard Biener  <rguenther@suse.de>
33721         PR tree-optimization/79824
33722         * tree-vect-stmts.c (get_group_load_store_type): Fix alignment
33723         check disabling peeling for gaps.
33725 2017-03-06  Toma Tabacu  <toma.tabacu@imgtec.com>
33727         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
33728         attributes): Document gettimeofday.
33730 2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>
33732         * config/s390/s390.c (s390_option_override_internal): Set
33733         PARAM_MIN_VECT_LOOP_BOUND
33735 2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>
33737         * config/s390/s390.c (s390_asm_output_function_label): Use nopr %r0.
33738         * config/s390/s390.md: Likewise.
33740 2017-03-06  Jakub Jelinek  <jakub@redhat.com>
33742         PR target/79812
33743         * config/i386/sse.md (VI8F_256_512): Remove mode iterator.
33744         (<avx2_avx512>_perm<mode>): Rename to ...
33745         (avx2_perm<mode>): ... this.  Use VI8F_256 iterator instead
33746         of VI8F_256_512.
33747         (<avx512>_perm<mode>_mask): Rename to ...
33748         (avx512vl_perm<mode>_mask): ... this.  Use VI8F_256 iterator instead
33749         of VI8F_256_512.
33750         (<avx2_avx512>_perm<mode>_1<mask_name>): Rename to ...
33751         (avx2_perm<mode>_1<mask_name): ... this.  Use VI8F_256 iterator
33752         instead of VI8F_256_512.
33753         (avx512f_perm<mode>): New define_expand.
33754         (avx512f_perm<mode>_mask): Likewise.
33755         (avx512f_perm<mode>_1<mask_name>): New define_insn.
33756         (<avx512>_vec_dup<mode>_1): Fix up vec_select mode.
33758 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
33760         * config/mips/mips-msa.md (msa_fmax_a_<msafmt>, msa_fmin_a_<msafmt>,
33761         msa_max_a_<msafmt>, msa_min_a_<msafmt>): Introduce mode interator for
33762         if_then_else.
33763         (smin<mode>3, smax<mode>3): Change operand print code from 'B' to 'E'.
33765 2017-03-06  Martin Liska  <mliska@suse.cz>
33767         PR sanitize/79783
33768         * asan.c (asan_expand_poison_ifn): Do not expand ASAN_POISON
33769         when having a SSA NAME w/o VAR_DECL assigned to it.
33771 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
33773         * config/mips/mips-msa.md (msa_dotp_<su>_d, msa_dpadd_<su>_d,
33774         msa_dpsub_<su>_d): Fix MODE for vec_select.
33776 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
33778         * config/mips/mips.c (mips_gen_const_int_vector): Change type of last
33779         argument.
33780         * config/mips/mips-protos.h (mips_gen_const_int_vector): Likewise.
33782 2017-03-06  Richard Biener  <rguenther@suse.de>
33784         * lto-streamer.c (lto_check_version): Use %qs in diagnostics.
33785         * plugin.c (register_plugin_info): Likewise.
33786         * tree-chkp.c (chkp_make_static_const_bounds): Likewise.
33788 2017-03-05  Jakub Jelinek  <jakub@redhat.com>
33790         * config/i386/sse.md (sse_storehps, sse_storelps,
33791         avx_<castmode><avxsizesuffix>_<castmode>,
33792         avx512f_<castmode><avxsizesuffix>_<castmode>,
33793         avx512f_<castmode><avxsizesuffix>_256<castmode>): Require
33794         in condition that at least one operand is not a MEM.
33796 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
33798         PR middle-end/79805
33799         * internal-fn.def (ATOMIC_BIT_TEST_AND_SET, ATOMIC_BIT_TEST_AND_RESET,
33800         ATOMIC_BIT_TEST_AND_COMPLEMENT, ATOMIC_COMPARE_EXCHANGE): Remove
33801         ECF_NOTHROW.
33802         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Set
33803         gimple_call_nothrow_p flag based on whether original builtin can throw.
33804         If it can, emit following stmts on the fallthrough edge.
33805         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Similarly, except
33806         don't create new bb if inserting just debug stmts on the edge, try to
33807         insert them on the fallthru bb or just reset debug stmts.
33809 2017-03-03  Segher Boesssenkool  <segher@kernel.crashing.org>
33811         PR target/43763
33812         * config/rs6000/rs6000.c (rs6000_final_prescan_insn): Save and
33813         restore recog_data (including the operand rtxes inside it) around
33814         the call to get_insn_template.
33816 2017-03-03  Martin Sebor  <msebor@redhat.com>
33818         PR tree-optimization/79699
33819         * context.c (context::~context): Free MPFR caches to avoid
33820         a memory leak on program exit.
33822 2017-03-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
33824         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
33825         Use wide_int::ulow () instead of .elt (0).
33827 2017-03-03  Uros Bizjak  <ubizjak@gmail.com>
33829         * config/i386/i386.md (*pushtf): Change *roF constraint to *roC.
33830         (*pushxf): Limit oF constraint to 32bit targets and add oC
33831         constraint for 64bit targets.
33832         (pushxf splitter): Use PUSH_ROUNDING to calculate stack adjustment.
33833         (*pushdf): Change rmF constraint to rmC.
33835 2017-03-03  Martin Liska  <mliska@suse.cz>
33837         * tree-ssa-loop-prefetch.c (pass_loop_prefetch::execute):
33838         Remove unused variable.
33840 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
33842         PR target/79807
33843         * config/i386/i386.c (ix86_expand_multi_arg_builtin): If target
33844         is a memory operand, increase num_memory.
33845         (ix86_expand_args_builtin): Likewise.
33847 2017-03-03  Jan Hubicka  <jh@suse.cz>
33849         PR lto/79760
33850         * ipa-devirt.c (maybe_record_node): Properly handle
33851         __cxa_pure_virtual visibility.
33853 2017-03-03  Martin Liska  <mliska@suse.cz>
33855         PR tree-optimization/79803
33856         * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Remove
33857         assert.
33858         (pass_loop_prefetch::execute): Disabled optimization if an
33859         assumption about L1 cache size is not met.
33861 2017-03-03  Martin Liska  <mliska@suse.cz>
33863         PR rtl-optimization/79574
33864         * gcse.c (struct gcse_expr): Use HOST_WIDE_INT instead of int.
33865         (hash_scan_set): Likewise.
33866         (dump_hash_table): Likewise.
33867         (hoist_code): Likewise.
33869 2017-03-03  Richard Biener  <rguenther@suse.de>
33871         * fixed-value.c (fixed_from_string): Restore use of elt (1)
33872         in place of uhigh ().
33873         (fixed_convert_from_real): Likewise.
33875 2017-03-03  Uros Bizjak  <ubizjak@gmail.com>
33877         PR target/79514
33878         * config/i386/i386.md (*pushxf_rounded): Use Pmode instead of DImode.
33880 2017-03-03  Richard Biener  <rguenther@suse.de>
33882         PR middle-end/79818
33883         * match.pd ( X +- C1 CMP C2 -> X CMP C2 -+ C1): Add missing
33884         TYPE_OVERFLOW_UNDEFINED check.
33886 2017-03-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
33888         * config/rs6000/vector.md (vector_ne_<mode>_p): Correct operand
33889         numbers.
33890         (vector_ae_<mode>_p): Likewise.
33891         (vector_nez_<mode>_p): Likewise.
33892         (vector_ne_v2di_p): Likewise.
33893         (vector_ae_v2di_p): Likewise.
33894         (vector_ne_<mode>_p): Likewise.
33895         * config/rs6000/vsx.md (vsx_tsqrt<mode>2_fg): Correct operand
33896         numbers.
33897         (vsx_tsqrt<mode>2_fe): Likewise.
33899 2017-03-02  Uros Bizjak  <ubizjak@gmail.com>
33901         PR target/79514
33902         * config/i386/i386.md (*pushxf_rounded): New insn_and_split pattern.
33904 2017-03-02  Jakub Jelinek  <jakub@redhat.com>
33906         PR rtl-optimization/79780
33907         * cprop.c (one_cprop_pass): When second and further conditional trap
33908         in a single basic block is turned into an unconditional trap, turn it
33909         into a deleted note to avoid RTL verification failures.
33911 2017-03-02  Richard Biener  <rguenther@suse.de>
33913         * fold-const.c (const_binop): Use ulow () instead of elt (0).
33915 2017-03-02  Richard Biener  <rguenther@suse.de>
33917         PR tree-optimization/79345
33918         PR c++/42000
33919         * tree-ssa-alias.c (walk_aliased_vdefs_1): Take a limit
33920         param and abort the walk, returning -1 if it is hit.
33921         (walk_aliased_vdefs): Take a limit param and pass it on.
33922         * tree-ssa-alias.h (walk_aliased_vdefs): Add a limit param,
33923         defaulting to 0 and return a signed int.
33924         * tree-ssa-uninit.c (struct check_defs_data): New struct.
33925         (check_defs): New helper.
33926         (warn_uninitialized_vars): Use walk_aliased_vdefs to warn
33927         about uninitialized memory.
33928         * fixed-value.c (fixed_from_string): Use ulow/uhigh to avoid
33929         bogus uninitialized warning.
33930         (fixed_convert_from_real): Likewise.
33932 2017-03-02  Bin Cheng  <bin.cheng@arm.com>
33934         PR tree-optimization/66768
33935         * tree-ssa-loop-ivopts.c (find_interesting_uses_address): Skip addr
33936         iv_use if base object can't be determined.
33938 2017-03-02  Jakub Jelinek  <jakub@redhat.com>
33940         PR tree-optimization/79345
33941         * gensupport.h (struct pattern_stats): Add min_scratch_opno field.
33942         * gensupport.c (get_pattern_stats_1) <case MATCH_SCRATCH>: Update it.
33943         (get_pattern_stats): Initialize it.
33944         * genemit.c (gen_expand): Verify match_scratch numbers come after
33945         match_operand/match_dup numbers.
33946         * config/i386/i386.md (<s>mul<mode>3_highpart): Swap match_dup and
33947         match_scratch numbers.
33948         * config/i386/sse.md (avx2_gathersi<mode>, avx2_gatherdi<mode>):
33949         Likewise.
33950         * config/s390/s390.md (trunctdsd2): Likewise.
33952 2017-03-02  Richard Biener  <rguenther@suse.de>
33954         * wide-int.h (wide_int_storage::operator=): Implement in terms
33955         of wi::copy.
33957 2017-03-02  Richard Biener  <rguenther@suse.de>
33959         PR tree-optimization/79777
33960         * tree-ssa-pre.c (eliminate_insert): Give up if we simplify
33961         the to insert expression to sth existing.
33963 2017-03-01  Martin Sebor  <msebor@redhat.com>
33965         PR middle-end/79692
33966         * gimple-ssa-sprintf.c
33967         (directive::known_width_and_precision): New function.
33968         (format_integer): Use it.
33969         (get_mpfr_format_length): Consider the full range of precision
33970         when computing %g output with the # flag.  Set the likely byte
33971         count to 3 rather than 1 when precision is indeterminate.
33972         (format_floating): Correct the lower bound of precision.
33974 2017-03-01  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
33976         * doc/invoke.texi: Document default code model for 64-bit Linux.
33978 2017-03-01  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
33980         PR target/79752
33981         * config/rs6000/rs6000.md (peephole2 for udiv/umod): Should emit
33982         udiv rather than div since input pattern is unsigned.
33984 2017-03-01  Uros Bizjak  <ubizjak@gmail.com>
33986         * config/i386/i386.c (print_reg): Warn for values of
33987         unsupported size in integer register.
33989 2017-03-01  Michael Meissner  <meissner@linux.vnet.ibm.com>
33991         PR target/79439
33992         * config/rs6000/predicates.md (current_file_function_operand): Do
33993         not allow self calls to be local if the function is replaceable.
33995 2017-03-01  Kelvin Nilsen  <kelvin@gcc.gnu.org>
33997         PR target/79395
33998         * config/rs6000/altivec.h (vec_ctz and others): Change the
33999         preprocessor macro that controls conditional compilation from
34000         _ARCH_PWR9 to __POWER9_VECTOR__.
34001         (vec_all_ne): Change parameterization of __altivec_scalar_pred
34002         macro expansion under preprocessor #ifdef __POWER9_VECTOR__
34003         control (instead of _ARCH_PWR9 control) so that template
34004         definition uses power9-specific function.
34005         (vec_any_eq): Likewise.
34006         (vec_all_ne): Change macro definition to use a power9-specific
34007         expansion under #ifdef __POWER9_VECTOR__ control (instead of
34008         _ARCH_PWR9 control).
34009         (vec_any_eq) Likewise.
34010         * config/rs6000/rs6000-builtin.def (CMPNEF): Remove BU_P9V_AV_2
34011         expansion for CMPNEF to remove support for xvcmpnesp instruction.
34012         (CMPNED): Remove BU_P9V_AV2 expansion for CMPNED to remove
34013         support for xvcmpnedp instruction.
34014         (VCMPNEB_P): Replace BU_P9V_AV_P macro expansion with BU_P9V_AV_2
34015         macro expansion so that Power9 implementation of vec_all_ne does
34016         not use the AltiVec predicate framework.
34017         (VCMPNEH_P): Likewise.
34018         (VCMPNEW_P): Likewise.
34019         (VCMPNED_P): Likewise.
34020         (VCMPNEFP_P): Likewise.
34021         (VCMPNEDP_P): Likewise.
34022         (VCMPAEB_P): Add BU_P9V_AV_2 macro expansion to change
34023         implementation of vec_any_eq to not use AltiVec predicate
34024         framework.
34025         (VCMPAEH_P): Likewise.
34026         (VCMPAEW_P): Likewise.
34027         (VCMPAED_P): Likewise.
34028         (VCMPAEFP_P): Likewise.
34029         (VCMPAEDP_P): Likewise.
34030         (VCMPNE_P): Replace BU_P9V_OVERLOAD_P macro expansion with
34031         BU_P9V_OVERLOAD_2 so that Power9 implementation of vec_all_ne does
34032         not use the AltiVec predicate framework.
34033         (VCMPAE_P): Add BU_P9V_OVERLOAD_2 macro to change implementation
34034         of vec_any_eq to not use AltiVec predicate framework.
34035         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
34036         support for predefined __POWER9_VECTOR__ macro to indicate that
34037         Power9 instruction selection is enabled.
34038         (altivec_overloaded_builtins): Remove extraneous
34039         ALTIVEC_BUILTIN_VEC_CMPNE entry for overloaded
34040         function argument types RS6000_BTI_bool_V16QI and
34041         RS6000_BTI_bool_V16QI.  Remove erroneous ALTIVEC_BUILTIN_VEC_CMPNE
34042         entry for overloaded function argument types RS6000_BTI_bool_V4SI
34043         andRS6000_BTI_bool_V4SI, mapping to P9V_BUILTIN_CMPNEB.  Remove
34044         two entries mapping to P9V_BUITIN_CMPNED and one entry mapping to
34045         P9V_BUILTIN_CMPNEF to force use of instructions not specific to
34046         Power9 for implementations of vec_cmpne.  Change the signature for
34047         all definitions of the overloaded P9V_BUILTIN_VEC_CMPNE_P function
34048         (representing vec_all_ne) to remove the previously described first
34049         argument of type RS6000_BTI_INTSI, as this was an artifact of
34050         reliance on the AltiVec predicate framework, which is no longer
34051         used in the implementation of these functions.  Add
34052         P9V_BUILTIN_VEC_VCMPAE_P entries (representing the vec_anyeq
34053         function) to match all of the P9V_BUILTIN_VEC_VCMNE_P entries
34054         since, unlike the AltiVec predicate framework implementation, we
34055         do not share function descriptors between vec_alle and vec_anyeq.
34056         (altivec_resolve_overloaded_builtin): Add SFmode and DFmode to the
34057         set of modes that receive special treatment even when
34058         TARGET_P9_VECTOR is true.  The special treatment emits code that
34059         does not depend on Power9 instructions.
34060         * config/rs6000/vector.md (vector_ne_<mode>_p): Change this
34061         define_expand to not rely on AltiVec predicate framework.
34062         (vector_ae_<mode>p): New define_expand to represent vec_any_eq
34063         function.
34064         (vector_ne_v2di_p): Change this define_expand to not rely on
34065         AltiVec predicate framework.
34066         (vector_ae_v2di_p): New define_expand to represent vec_any_eq
34067         function.
34068         (vector_ne_<mode>_p): Change this define_expand to not rely on
34069         AltiVec predicate framework.
34070         (vector_ae_<mode>p): New define_expand to represent vec_any_eq
34071         function.
34072         * config/rs6000/vsx.md (*vsx_ne_<mode>_p): For modes VSX_EXTRACT_I
34073         (V16QI, V8HI, V4SI), correct a typo in the code emitted for this
34074         define_insn pattern.
34075         (*vsx_ne_<mode>_p): For modes VSX_F (V4SF and V2DF), remove this
34076         define_insn pattern because the xvcmpne<VSs>. instruction is not
34077         supported.
34078         (vcmpne<VSs>): Remove this define_insn because xvcmpne<VSs>
34079         instruction is not supported.
34081 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
34083         * config/nvptx/nvptx.c: Include intl.h.
34085 2017-03-01  Martin Jambor  <mjambor@suse.cz>
34087         PR lto/78140
34088         * ipa-prop.h (ipa_bits): Removed field known.
34089         (ipa_jump_func): Removed field vr_known.  Changed fields bits and m_vr
34090         to pointers.  Adjusted their comments to warn about their sharing.
34091         (ipcp_transformation_summary): Change bits to a vector of pointers.
34092         (ipa_check_create_edge_args): Moved to ipa-prop.c, declare.
34093         (ipa_get_ipa_bits_for_value): Declare.
34094         * tree-vrp.h (value_range): Mark as GTY((for_user)).
34095         * ipa-prop.c (ipa_bit_ggc_hash_traits): New.
34096         (ipa_bits_hash_table): Likewise.
34097         (ipa_vr_ggc_hash_traits): Likewise.
34098         (ipa_vr_hash_table): Likewise.
34099         (ipa_print_node_jump_functions_for_edge): Adjust for bits and m_vr
34100         being pointers and vr_known being removed.
34101         (ipa_set_jf_unknown): Likewise.
34102         (ipa_get_ipa_bits_for_value): New function.
34103         (ipa_set_jfunc_bits): Likewise.
34104         (ipa_get_value_range): New overloaded functions.
34105         (ipa_set_jfunc_vr): Likewise.
34106         (ipa_compute_jump_functions_for_edge): Use the above functions to
34107         construct bits and vr parts of jump functions.
34108         (ipa_check_create_edge_args): Move here from ipa-prop.h, also allocate
34109         ipa_bits_hash_table and ipa_vr_hash_table if they do not already
34110         exist.
34111         (ipcp_grow_transformations_if_necessary): Also allocate
34112         ipa_bits_hash_table and ipa_vr_hash_table if they do not already
34113         exist.
34114         (ipa_node_params_t::duplicate): Do not copy bits, just pointers to
34115         them.  Fix too long lines.
34116         (ipa_write_jump_function): Adjust for bits and m_vr being pointers and
34117         vr_known being removed.
34118         (ipa_read_jump_function): Use new setter functions to construct bits
34119         and vr parts of jump functions or set them to NULL.
34120         (write_ipcp_transformation_info): Adjust for bits being pointers.
34121         (read_ipcp_transformation_info): Likewise.
34122         (ipcp_update_bits): Likewise.  Fix excessively long lines a trailing
34123         space.
34124         Include gt-ipa-prop.h.
34125         * ipa-cp.c (propagate_bits_across_jump_function): Adjust for bits
34126         being pointers.
34127         (ipcp_store_bits_results): Likewise.
34128         (propagate_vr_across_jump_function): Adjust for m_vr being a pointer.
34129         Do not write to existing jump functions but use a temporary instead.
34131 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
34133         PR c++/79681
34134         * fold-const.c (make_bit_field_ref): If orig_inner is COMPONENT_REF,
34135         attempt to use its first operand as BIT_FIELD_REF base.
34137 2017-03-01  Richard Biener  <rguenther@suse.de>
34139         PR middle-end/79721
34140         * tree-chrec.c (chrec_evaluate): Perform computation of Newtons
34141         interpolating formula in wrapping arithmetic.
34142         (chrec_apply): Convert chrec_evaluate return value to wanted type.
34144 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
34146         PR tree-optimization/79734
34147         * tree-vect-generic.c (expand_vector_condition): Optimize
34148         AVX512 vector boolean VEC_COND_EXPRs into bitwise operations.
34149         Handle VEC_COND_EXPR where comparison has different inner width from
34150         type's inner width.
34152 2017-02-28  Sandra Loosemore  <sandra@codesourcery.com>
34154         * doc/invoke.texi (ARC Options): Copy-edit to fix punctuation,
34155         markup, and similar issues.  Remove @opindex entries for things
34156         that aren't options.  Add missing -mmpy-option entries.
34158 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
34160         PR tree-optimization/79737
34161         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): If bitlen is
34162         a multiple of BITS_PER_UNIT and !BYTES_BIG_ENDIAN, clear
34163         tmpbuf[byte_size - 1].  Call natice_encode_expr with byte_size - 1
34164         instead of byte_size.  Formatting fix.
34165         (shift_bytes_in_array_right): Formatting fix.
34167 2017-02-28  Eric Botcazou  <ebotcazou@adacore.com>
34169         PR target/79749
34170         * config/sparc/sparc.c (sparc_frame_pointer_required): Add missing
34171         condition on optimize for the leaf function test.
34173 2017-02-28  Martin Liska  <mliska@suse.cz>
34175         PR lto/79625
34176         * read-rtl-function.c (function_reader::handle_unknown_directive):
34177         Bail out when one uses -flto.
34179 2017-02-28  Martin Liska  <mliska@suse.cz>
34181         * common.opt: Replace space with tabular for options of <number>
34182         type.
34183         * config/i386/i386.opt: Show <number> value for
34184         -mlarge-data-threshold.
34185         * opts.c (print_filtered_help): Do not display number in hexadecimal
34186         format.
34188 2017-02-28  Martin Liska  <mliska@suse.cz>
34190         * common.opt: Fix --help=option -Q for options which are of
34191         an enum type.
34193 2017-02-28  Uros Bizjak  <ubizjak@gmail.com>
34195         * config/i386/i386.c (print_reg): Error out for values
34196         of 8-bit size in invalid integer register.
34198 2017-02-28  Martin Sebor  <msebor@redhat.com>
34200         PR tree-optimization/79691
34201         * passes.def (pass_all_optimizations_g): Enable pass_sprintf_length.
34203 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
34205         PR target/79729
34206         * config/i386/i386.c (ix86_print_operand) <case 'R'>: Replace
34207         gcc_unreachable with output_operand_lossage.
34209 2017-02-28  Richard Biener  <rguenther@suse.de>
34211         PR tree-optimization/79740
34212         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Allow redundant
34213         inserts.
34214         (visit_nary_op): Insert the nary into the hashtable if we
34215         pattern-matched sth.
34216         * tree-ssa-pre.c (eliminate_insert): Robustify.
34218 2017-02-28  Richard Biener  <rguenther@suse.de>
34220         PR middle-end/79731
34221         * fold-const.c (decode_field_reference): Reject out-of-bound
34222         accesses.
34224 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
34226         * config/i386/i386.c: Include intl.h.
34227         (ix86_option_override_internal): Use cond ? G_("...") : G_("...")
34228         instead of just cond ? "..." : "...".
34229         * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Likewise.
34230         * coverage.c (read_counts_file): Likewise.
34231         * omp-offload.c: Include intl.h.
34232         (oacc_loop_fixed_partitions): Use cond ? G_("...") : G_("...") instead
34233         of just cond ? "..." : "...".
34234         * gcov.c (read_count_file): Use cond ? N_("...") : N_("...") instead
34235         of just cond ? "..." : "...".
34237 2017-02-28  Richard Earnshaw  <rearnsha@arm.com>
34239         PR target/79742
34240         * config/arm/parsecpu.awk (gen_data): Set tuning target to 'tune for'
34241         entry, if present.
34242         * config/arm/arm-cpus.in (cortex-m0plus.small-multiply): Correct
34243         'tune for' CPU name.
34244         * config/arm/arm-cpu-data.h: Regenerated.
34246 2017-02-28  Richard Biener  <rguenther@suse.de>
34248         PR tree-optimization/79732
34249         * tree-inline.c (expand_call_inline): Do not shadow var.
34251 2017-02-28  Richard Biener  <rguenther@suse.de>
34253         PR tree-optimization/79723
34254         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Preserve
34255         address-space properly.
34257 2017-02-28  Thomas Schwinge  <thomas@codesourcery.com>
34259         * doc/optinfo.texi (Optimization groups): Fix option used for
34260         OPTGROUP_ALL.
34261         * doc/invoke.texi (-fopt-info): Document "omp".
34262         * dumpfile.h: Sort OPTGROUP_OMP before OPTGROUP_VEC.
34263         (OPTGROUP_ALL): Add OPTGROUP_OMP.
34264         * hsa-gen.c (pass_data_gen_hsail): Use OPTGROUP_OMP.
34265         * ipa-hsa.c (pass_data_ipa_hsa): Likewise.
34266         * omp-simd-clone.c (pass_data_omp_simd_clone): Likewise.
34268         * dumpfile.h (OPTGROUP_OPENMP): Rename to OPTGROUP_OMP.  Adjust
34269         all users.
34270         * dumpfile.c (optgroup_options): Instead of "openmp", associate
34271         OPTGROUP_OMP with "omp".
34273 2017-02-27  Pat Haugen  <pthaugen@us.ibm.com>
34275         PR target/79544
34276         * config/rs6000/rs6000-c.c (struct altivec_builtin_types): Use VSRAD
34277         for arithmetic shift of unsigned V2DI.
34279 2017-02-27  Claudiu Zissulescu  <claziss@synopsys.com>
34281         * config.gcc (arc*-): Clean up, use arc/big.h, arc/elf.h, and
34282         arc/linux.h headers.
34283         * config/arc/arc.h (TARGET_OS_CPP_BUILTINS): Remove.
34284         (LINK_SPEC): Likewise.
34285         (ARC_TLS_EXTRA_START_SPEC): Likewise.
34286         (EXTRA_SPECS): Likewise.
34287         (STARTFILE_SPEC): Likewise.
34288         (ENDFILE_SPEC): Likewise.
34289         (LIB_SPEC): Likewise.
34290         (TARGET_SDATA_DEFAULT): Likewise.
34291         (TARGET_MMEDIUM_CALLS_DEFAULT): Likewise.
34292         (MULTILIB_DEFAULTS): Likewise.
34293         (DWARF2_UNWIND_INFO): Likewise.
34294         * config/arc/big.h: New file.
34295         * config/arc/elf.h: Likewise.
34296         * config/arc/linux.h: Likewise.
34297         * config/arc/t-uClibc: Remove.
34299 2017-02-27  Bin Cheng  <bin.cheng@arm.com>
34301         PR tree-optimization/77536
34302         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): New function.
34303         (tree_transform_and_unroll_loop): Use above function to compute the
34304         estimated niter of unrolled loop and use it when scaling profile.
34305         Also use count info rather than frequency if it's non-zero.
34306         * tree-ssa-loop-manip.h niter_for_unrolled_loop(): New declaration.
34307         * tree-vect-loop.c (scale_profile_for_vect_loop): New function.
34308         (vect_transform_loop): Call above function.
34310 2017-02-27  Richard Biener  <rguenther@suse.de>
34312         PR tree-optimization/45397
34313         * tree-ssa-pre.c (eliminate_insert): Handle BIT_AND_EXPR.
34314         * tree-ssa-sccvn.c (valueized_wider_op): New helper.
34315         (visit_nary_op): Add pattern matching for CSEing sign-changed
34316         or truncated operations with wider ones.
34318 2017-02-27  Richard Biener  <rguenther@suse.de>
34320         PR tree-optimization/79690
34321         * tree-vect-stmts.c (vectorizable_store): Use vector type
34322         built from the DR with address-space.
34324 2017-02-26  Gerald Pfeifer  <gerald@pfeifer.com>
34326         * doc/invoke.texi (Optimize Options): Refine the description
34327         of asan-use-after-return.
34329 2017-02-25  Alan Modra  <amodra@gmail.com>
34331         PR rtl-optimization/79584
34332         * lra-constraints.c (base_to_reg): Reload ad->base, the entire
34333         base, not ad->base_term, the reg within base.  Remove assertion
34334         that ad->base == ad->base_term.  Replace gen_int_mode using
34335         bogus mode with const0_rtx.
34337 2017-02-25  Jakub Jelinek  <jakub@redhat.com>
34339         PR middle-end/79396
34340         * tree-eh.c (operation_could_trap_p, stmt_could_throw_1_p): Handle
34341         FMA_EXPR like tcc_binary or tcc_unary.
34343         * tree-ssa-loop-niter.c (number_of_iterations_exit): Simplify warning.
34345         PR debug/77589
34346         * dwarf2out.c (struct dw_loc_list_struct): Add noted_variable_value
34347         bitfield.
34348         (size_of_loc_descr): Handle DW_OP_GNU_variable_value.
34349         (output_loc_operands): Handle DW_OP_call_ref and
34350         DW_OP_GNU_variable_value.
34351         (struct variable_value_struct): New type.
34352         (struct variable_value_hasher): Likewise.
34353         (variable_value_hash): New variable.
34354         (string_types): Remove.
34355         (copy_loc_descr): New function.
34356         (add_loc_descr_to_each): Clarify comment.  Use copy_loc_descr.
34357         (prepend_loc_descr_to_each): New function.
34358         (add_loc_list): Fix comment typo.  Use prepend_loc_descr_to_each
34359         instead of add_loc_descr_to_each if the first argument is single
34360         location list and the second has multiple.
34361         (resolve_args_picking_1): Handle DW_OP_GNU_variable_value.
34362         (loc_list_from_tree_1): For early_dwarf, emit DW_OP_GNU_variable_value
34363         when looking for variable value which doesn't have other location info.
34364         (loc_list_from_tree): Formatting fix.
34365         (gen_array_type_die): Simplify DW_AT_string_length handling.
34366         (adjust_string_types): Remove.
34367         (gen_subprogram_die): Don't call adjust_string_types nor test/set
34368         string_types.  Call resolve_variable_values.
34369         (prune_unused_types_walk_loc_descr): Handle DW_OP_GNU_variable_value.
34370         (resolve_addr_in_expr): Likewise.  Add A argument.
34371         (copy_deref_exprloc): Remove deref argument.  Adjust for the
34372         original expression being DW_OP_GNU_variable_value with optionally
34373         DW_OP_stack_value after it instead of DW_OP_call4 with DW_OP_deref
34374         optionally after it.
34375         (optimize_string_length): Rework for DW_OP_GNU_variable_value.
34376         (resolve_addr): Adjust optimize_string_length and resolve_addr_in_expr
34377         callers.  Set remove_AT_byte_size if removing DW_AT_string_length.
34378         (variable_value_hasher::hash, variable_value_hasher::equal): New
34379         methods.
34380         (resolve_variable_value_in_expr, resolve_variable_value,
34381         resolve_variable_values, note_variable_value_in_expr,
34382         note_variable_value): New functions.
34383         (dwarf2out_early_finish): Call note_variable_value on all toplevel
34384         DIEs.
34386 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
34388         PR c/79677
34389         * opts.h (handle_generated_option): Add GENERATED_P argument.
34390         * opts-common.c (handle_option): Adjust function comment.
34391         (handle_generated_option): Add GENERATED_P argument, pass it to
34392         handle_option.
34393         (control_warning_option): Pass false to handle_generated_option
34394         GENERATED_P.
34395         * opts.c (maybe_default_option): Pass true to handle_generated_option
34396         GENERATED_P.
34397         * optc-gen.awk: Likewise.
34399 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
34401         * config/sh/sh.md (tstsi_t): If operands[0] is a SUBREG instead of
34402         a REG, look at the REG it is a SUBREG of.
34403         (splitter for cmpeqsi_t): Ditto.
34405 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
34407         * config/pa/pa.c (pa_combine_instructions): Do not share RTL.  Make
34408         the special USEs with the pattern of the insn, not the insn itself.
34410 2017-02-24  Matthew Fortune  <matthew.fortune@imgtec.com>
34412         PR target/79473
34413         * doc/invoke.texi: Document -mload-store-pairs.
34415 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
34416             Sandra Loosemore  <sandra@codesourcery.com>
34418         * config/nios2/nios2.c (nios2_simple_const_p): Returns false if the
34419         argument isn't a CONST_INT.
34420         (nios2_alternate_compare_const): Assert op is a CONST_INT.
34421         (nios2_valid_compare_const_p): Assert op is a CONST_INT.
34422         (nios2_validate_compare): Bypass alternate compare logic if *op2
34423         is not a CONST_INT.
34424         (ldstwm_operation_p): Return false if first_base is not a REG or
34425         if first_offset is not a CONST_INT.
34427 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
34429         * config/cris/cris.md: Use correct operand in a define_peephole2.
34431 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
34433         * config/c6x/c6x.c (predicate_insn): Do not incorrectly share RTL.
34435 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
34437         * config/arc/arc.c (arc_ccfsm_advance): Only take the PATTERN of
34438         this_insn if it is an INSN or JUMP_INSN.
34439         (force_offsettable): Look at base, not at addr.
34440         * config/arc/predicates.md (brcc_nolimm_operator): Don't call INTVAL
34441         on things that aren't necessarily CONST_INTs.
34443 2017-02-24  Uros Bizjak  <ubizjak@gmail.com>
34445         * doc/invoke.texi (x86 Options, -mfpmath=sse): Mention that
34446         -mfpmath=sse is the default also for x86-32 targets with SSE2
34447         instruction set when @option{-ffast-math} is enabled
34449 2017-02-24  Jeff Law  <law@redhat.com>
34451         PR rtl-optimizatoin/79286
34452         * ira.c (update_equiv_regs): Drop may_trap_p exception to
34453         dominance test.
34455 2017-02-24  Richard Biener  <rguenther@suse.de>
34457         PR tree-optimization/79389
34458         * gimple-ssa-split-paths.c (is_feasible_trace): Properly skip
34459         debug insns.
34461 2017-02-24  Aldy Hernandez  <aldyh@redhat.com>
34463         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update
34464         function comment to reflect reality.
34465         (loop_exits_before_overflow): Fix typo in function description.
34467 2017-02-24  Richard Biener  <rguenther@suse.de>
34469         PR tree-optimization/79389
34470         * gimple-ssa-split-paths.c (is_feasible_trace): Verify more
34471         properly that a threading opportunity exists.  Detect conditional
34472         copy/constant propagation opportunities.
34474 2017-02-23  Eric Botcazou  <ebotcazou@adacore.com>
34476         * config/visium/visium.md (type): Add trap.
34477         (b): New mode attribute.
34478         (*btst): Rename into...
34479         (*btst<mode>): ...this and adjust.
34480         (*cbranchsi4_btst_insn): Rename into...
34481         (*cbranch<mode>4_btst_insn): ...this and adjust.
34482         (trap): New define_insn.
34484 2017-02-23  Jakub Jelinek  <jakub@redhat.com>
34486         PR tree-optimization/79389
34487         * ifcvt.c (struct noce_if_info): Add rev_cond field.
34488         (noce_reversed_cond_code): New function.
34489         (noce_emit_store_flag): Use rev_cond if non-NULL instead of
34490         reversed_comparison_code.  Formatting fix.
34491         (noce_try_store_flag): Test rev_cond != NULL in addition to
34492         reversed_comparison_code.
34493         (noce_try_store_flag_constants): Likewise.
34494         (noce_try_store_flag_mask): Likewise.
34495         (noce_try_addcc): Use rev_cond if non-NULL instead of
34496         reversed_comparison_code.
34497         (noce_try_cmove_arith): Likewise.  Formatting fixes.
34498         (noce_try_minmax, noce_try_abs): Clear rev_cond.
34499         (noce_find_if_block): Initialize rev_cond.
34500         (find_cond_trap): Call noce_get_condition with then_bb == trap_bb
34501         instead of false as last argument never attempt to reverse it
34502         afterwards.
34504 2017-02-23  Bin Cheng  <bin.cheng@arm.com>
34506         PR tree-optimization/79663
34507         * tree-predcom.c (combine_chains): Process refs in reverse order
34508         only for ZERO length chains, and add explaining comment.
34510 2017-02-23  Jeff Law  <law@redhat.com>
34512         PR tree-optimization/79578
34513         * tree-ssa-dse.c (clear_bytes_written_by): Use OEP_ADDRESS_OF
34514         in call to operand_equal_p.
34516 2017-01-23  Dominique d'Humieres  <dominiq@lps.ens.fr>
34518         PR target/71017
34519         * config/i386/cpuid.h: Fix another undefined behavior.
34521 2017-02-23  Richard Biener  <rguenther@suse.de>
34523         PR tree-optimization/79683
34524         * tree-vect-stmts.c (vect_analyze_stmt): Do not overwrite
34525         vector types for data-refs.
34527 2017-02-23  Martin Liska  <mliska@suse.cz>
34529         * params.def (PARAM_MIN_NONDEBUG_INSN_UID): Change default to 0.
34531 2017-02-23  Jakub Jelinek  <jakub@redhat.com>
34533         PR middle-end/79665
34534         * internal-fn.c (get_range_pos_neg): Moved to ...
34535         * tree.c (get_range_pos_neg): ... here.  No longer static.
34536         * tree.h (get_range_pos_neg): New prototype.
34537         * expr.c (expand_expr_real_2) <case TRUNC_DIV_EXPR>: If both arguments
34538         are known to be in between 0 and signed maximum inclusive, try to
34539         expand both unsigned and signed divmod and use the cheaper one from
34540         those.
34542 2017-02-22  Jeff Law  <law@redhat.com>
34544         PR tree-optimization/79578
34545         * tree-ssa-dse.c (clear_bytes_written_by): Use operand_equal_p
34546         to compare base operands.
34548 2017-02-22  Segher Boessenkool  <segher@kernel.crashing.org>
34550         PR target/79211
34551         * config/rs6000/rs6000.md (*fsel<SFDF:mode><SFDF2:mode>4): Use
34552         gpc_reg_operand instead of fpr_reg_operand.
34554 2017-02-22  Sameera Deshpande  <sameera.deshpande@imgtec.com>
34556         * config/mips/mips.c (mips_return_in_memory): Force FP
34557         vector types to be returned in memory for o32 ABI.
34559 2017-02-22  Jakub Jelinek  <jakub@redhat.com>
34561         * dwarf2out.c (gen_variable_die): For -gdwarf-5, use DW_TAG_variable
34562         instead of DW_TAG_member for static data member declarations and don't
34563         set no_linkage_name for static inline data members.
34564         (gen_member_die): For -gdwarf-5 don't change DW_TAG_variable
34565         to DW_TAG_member.
34567 2017-02-22  Martin Liska  <mliska@suse.cz>
34569         * doc/invoke.texi: Replace inequality signs with square brackets
34570         for -Wnormalized.
34572 2017-02-22  Matthew Fortune  <matthew.fortune@imgtec.com>
34574         PR target/78660
34575         * lra-constraints.c (simplify_operand_subreg): Handle
34576         WORD_REGISTER_OPERATIONS targets.
34578 2017-02-22  Jakub Jelinek  <jakub@redhat.com>
34580         PR target/70465
34581         * reg-stack.c (emit_swap_insn): Treat (float_extend:?F (mem:?F))
34582         and (const_double:?F) like (mem:?F) for the purpose of fxch %st(1)
34583         elimination by swapping fld*.
34585 2017-02-22  Richard Biener  <rguenther@suse.de>
34587         PR tree-optimization/79673
34588         * tree-ssa-pre.c (compute_avail): Use wide_int_to_tree to
34589         convert the [TARGET_]MEM_REF offset INTEGER_CST, scrapping off
34590         irrelevant address-space qualifiers and avoiding a
34591         ADDR_SPACE_CONVERT_EXPR from fold_convert.
34593 2017-02-22  Richard Biener  <rguenther@suse.de>
34595         PR tree-optimization/79666
34596         * tree-vrp.c (extract_range_from_binary_expr_1): Make sure
34597         to not symbolically negate if that may introduce undefined
34598         overflow.
34600 2017-02-22  Martin Liska  <mliska@suse.cz>
34602         PR lto/79587
34603         * data-streamer-in.c (streamer_read_gcov_count): Remove assert.
34604         * data-streamer-out.c (streamer_write_gcov_count_stream):
34605         Likewise.
34606         * value-prof.c (stream_out_histogram_value): Make assert more
34607         precise based on type of counter.
34609 2017-02-21  Uros Bizjak  <ubizjak@gmail.com>
34611         PR target/79593
34612         * config/i386/i386.md (standard_x87sse_constant_load splitter):
34613         Use nonimmediate_operand instead of memory_operand for operand 1.
34614         (float-extend standard_x87sse_constant_load splitter): Ditto.
34616 2017-02-21  Jeff Law  <law@redhat.com>
34618         PR tree-optimization/79621
34619         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Ignore
34620         blocks with edges to themselves.
34622 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
34624         PR target/79633
34625         * tree-chkp-opt.c (chkp_optimize_string_function_calls): Use
34626         is_gimple_call instead of comparing gimple_code with GIMPLE_CALL.
34627         Use gimple_call_builtin_p.
34629         PR target/79570
34630         * sel-sched.c (moveup_expr_cached): Don't call sel_bb_head
34631         on temporarily removed DEBUG_INSNs.
34633         PR tree-optimization/79649
34634         * tree-loop-distribution.c (classify_partition): Give up on
34635         non-generic address space loads/stores.
34637 2017-02-21  Aldy Hernandez  <aldyh@redhat.com>
34639         * doc/loop.texi (Loop manipulation): Remove nonexistent
34640         tree_ssa_loop_version from the documentation.
34641         * cfgloopmanip.c (loop_version): Document CONDITION_BB argument.
34643 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
34645         PR target/79494
34646         * config/i386/i386.c (ix86_expand_split_stack_prologue): Call
34647         make_reg_eh_region_note_nothrow_nononlocal on call_insn.
34648         * config/rs6000/rs6000.c: Include except.h.
34649         (rs6000_expand_split_stack_prologue): Call
34650         make_reg_eh_region_note_nothrow_nononlocal on the call insn.
34652 2017-02-21  Martin Jambor  <mjambor@suse.cz>
34654         PR lto/79579
34655         * ipa-prop.c (ipa_prop_write_jump_functions): Bail out if no edges
34656         have been analyzed.
34658 2017-02-21  Martin Jambor  <mjambor@suse.cz>
34660         * common.opt (-fipa-cp-alignment): Mark as ignored and preserved
34661         for backward compatibility only.
34662         * doc/invoke.texi (Option Summary): Remove all references to
34663         -fipa-cp-alignment.
34665 2017-02-21  Matthew Fortune  <matthew.fortune@imgtec.com>
34667         PR target/78660
34668         Revert:
34669         2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
34671         * lra-constraints.c (curr_insn_transform): Handle
34672         WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
34674 2017-02-21  Martin Liska  <mliska@suse.cz>
34676         * config/i386/i386.opt: Replace -masm-dialect with -masm.
34678 2017-02-21  Thomas Schwinge  <thomas@codesourcery.com>
34680         PR translation/79638
34681         * config/nvptx/nvptx.c (ENTRY_TEMPLATE): Single out "%ntid.y".
34683 2017-02-21  Eric Botcazou  <ebotcazou@adacore.com>
34685         PR ada/67205
34686         * config/arm/arm.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define.
34687         (arm_function_ok_for_sibcall): Return false for an indirect call by
34688         descriptor if all the argument registers are used.
34689         (arm_relayout_function): Use FUNCTION_ALIGNMENT macro to adjust the
34690         alignment of the function.
34692 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
34694         PR tree-optimization/61441
34695         * simplify-rtx.c (simplify_const_unary_operation): For
34696         -fsignaling-nans and sNaN operand, return NULL_RTX rather than
34697         the sNaN unmodified.
34699 2017-02-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
34701         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
34702         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
34703         instead of SYSTEM_HEADER_DIR.
34705 2017-02-20  Gerald Pfeifer  <gerald@pfeifer.com>
34706             Martin LiÅ¡ka  <mliska@suse.cz>
34708         * doc/invoke.texi (use-after-scope-direct-emission-threshold):
34709         Fix typos and grammar, use active voice, and clarify.
34711 2017-02-20  Marek Polacek  <polacek@redhat.com>
34713         PR middle-end/79537
34714         * gimplify.c (gimplify_expr): Handle unused *&&L;.
34716         PR sanitizer/79558
34717         * ubsan.c (ubsan_type_descriptor): Check if TYPE_MAX_VALUE is null.
34719 2017-02-20  Jakub Jelinek  <jakub@redhat.com>
34721         PR target/79568
34722         * config/i386/i386.c (ix86_expand_builtin): Handle
34723         OPTION_MASK_ISA_AVX512VL and OPTION_MASK_ISA_64BIT in
34724         ix86_builtins_isa[fcode].isa as a requirement of those
34725         flags and any other flag in the bitmask.
34726         (ix86_init_mmx_sse_builtins): Use 0 instead of
34727         ~OPTION_MASK_ISA_64BIT as mask.
34728         * config/i386/i386-builtin.def (__builtin_ia32_rdtsc,
34729         __builtin_ia32_rdtscp, __builtin_ia32_pause, __builtin_ia32_bsrsi,
34730         __builtin_ia32_rdpmc, __builtin_ia32_rolqi, __builtin_ia32_rolhi,
34731         __builtin_ia32_rorqi, __builtin_ia32_rorhi): Likewise.
34733 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
34735         PR target/78012
34736         * lra-constraints.c (split_reg): Check requested split mode
34737         is supported by the register.
34739 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
34741         * lra-constraints.c (simplify_operand_subreg): Remove early
34742         return false.
34744 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
34746         PR target/78660
34747         * lra-constraints.c (curr_insn_transform): Tighten condition
34748         for converting SUBREG reloads from OP_OUT to OP_INOUT.
34750 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
34752         PR target/78660
34753         * lra-constraints.c (curr_insn_transform): Handle
34754         WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
34756 2017-02-19  Uros Bizjak  <ubizjak@gmail.com>
34758         Revert:
34759         2016-05-30  Uros Bizjak  <ubizjak@gmail.com>
34761         * config/i386/sync.md (mfence_nosse): Use "lock orl $0, -4(%esp)".
34763 2017-02-19  Jonathan Wakely  <jwakely@redhat.com>
34765         PR c++/69523
34766         * doc/invoke.texi (C++ Dialect Options) [-Wliteral-suffix]: Update
34767         description.
34769 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
34771         * gimple-pretty-print.c (dump_ternary_rhs): Adjust gimple dump format
34772         for FMA_EXPR.
34774 2017-02-18  Jakub Jelinek  <jakub@redhat.com>
34776         * final.c (last_columnnum, override_columnnum): New variables.
34777         (final_start_function): Set last_columnnum, pass it to begin_prologue
34778         hook and pass 0 to dwarf2out_begin_prologue.
34779         (final_scan_insn): Update override_columnnum.  Pass last_columnnum
34780         to source_line debug hook.
34781         (notice_source_line): Compute last_columnnum and for debug_column_info
34782         return true on column changes.
34783         * debug.h (struct gcc_debug_hooks): Add column argument to
34784         source_line and begin_prologue hooks.
34785         (debug_nothing_int_charstar_int_bool): Remove prototype.
34786         (debug_nothing_int_int_charstar,
34787         debug_nothing_int_int_charstar_int_bool): New prototypes.
34788         (dwarf2out_begin_prologue): Add column argument.
34789         * debug.c (do_nothing_debug_hooks): Adjust source_line and
34790         begin_prologue hooks.
34791         (debug_nothing_int_charstar_int_bool): Remove.
34792         (debug_nothing_int_int_charstar,
34793         debug_nothing_int_int_charstar_int_bool): New functions.
34794         * dwarf2out.c (dwarf2out_begin_prologue): Add column argument, pass it
34795         through to dwarf2out_source_line.
34796         (dwarf2_lineno_debug_hooks): Adjust begin_prologue hook.
34797         (dwarf2out_source_line): Add column argument, emit it if requested.
34798         * sdbout.c (sdbout_source_line, sdbout_begin_prologue): Add column
34799         arguments.
34800         * xcoffout.h (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
34801         * xcoffout.c (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
34802         * vmsdbgout.c (vmsdbgout_begin_prologue): Add column argument, pass it
34803         through to dwarf2out_begin_prologue.
34804         (vmsdbgout_source_line): Add column argument, pass it through to
34805         dwarf2out_source_line.
34806         * dbxout.c (dbxout_begin_prologue): Add column argument, adjust
34807         dbxout_source_line caller.
34808         (dbxout_source_line): Add column argument.
34810         * common.opt (gno-column-info, gcolumn-info): New options.
34811         * dwarf2out.c (dwarf2_lineno_debug_hooks): Formatting fix.
34812         (check_die): Also test for multiple DW_AT_decl_column attributes.
34813         (add_src_coords_attributes, dwarf2out_imported_module_or_decl_1): Add
34814         DW_AT_decl_column if requested.
34815         (gen_subprogram_die): Compare and/or add also DW_AT_decl_column
34816         if requested.
34817         (gen_variable_die): Likewise.
34818         (add_call_src_coords_attributes): Add DW_AT_call_column if requested.
34819         * doc/invoke.texi (-gcolumn-info, -gno-column-info): Document.
34821         PR target/79569
34822         * config/i386/i386.opt (m3dnowa): Replace Undocumented with Report.
34823         * common/config/i386/i386-common.c (OPTION_MASK_ISA_3DNOW_A_SET): Define.
34824         (ix86_handle_option): Handle OPT_m3dnowa.
34825         * doc/invoke.texi (-m3dnowa): Document.
34826         * doc/extend.texi (__builtin_ia32_pmulhuw, __builtin_ia32_pf2iw): Use
34827         -m3dnowa instead of -m3dnow -march=athlon.
34829         PR target/79559
34830         * config/i386/i386.c (ix86_print_operand): Use output_operand_lossage
34831         instead of gcc_assert for K, r and R code checks.  Formatting fixes.
34833 2017-02-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34835         PR target/79261
34836         * config/rs6000/rs6000.c (rs6000_expand_ternop_builtin): Add
34837         support for CODE_FOR_vsx_xxpermdi_v2d[fi]_be.
34838         * config/rs6000/rs6000.md (reload_gpr_from_vsx<mode>): Call
34839         generator for vsx_xxpermdi_<mode>_be.
34840         * config/rs6000/vsx.md (vsx_xxpermdi_<mode>): Remove logic to
34841         force big-endian semantics.
34842         (vsx_xxpermdi_<mode>_be): New define_expand with same
34843         implementation as previous version of vsx_xxpermdi_<mode>.
34845 2017-02-17  Jakub Jelinek  <jakub@redhat.com>
34847         PR tree-optimization/79327
34848         * gimple-ssa-sprintf.c (format_integer): Remove likely_adjust
34849         variable, its initialization and use.
34851 2017-02-17  Julia Koval  <julia.koval@intel.com>
34853         * common/config/i386/i386-common.c (OPTION_MASK_ISA_RDPID_SET): New.
34854         (OPTION_MASK_ISA_PKU_UNSET): New.
34855         (ix86_handle_option): Handle -mrdpid.
34856         * config/i386/cpuid.h (bit_RDPID): New.
34857         * config/i386/driver-i386.c (host_detect_local_cpu):
34858         Detect RDPID feature.
34859         * config/i386/i386-builtin.def (__builtin_ia32_rdpid): New.
34860         * config/i386/i386-c.c (ix86_target_macros_internal):
34861         Handle RDPID flag.
34862         * config/i386/i386.c (ix86_target_string): Add -mrdpid to isa2_opts.
34863         (ix86_valid_target_attribute_inner_p): Add "rdpid".
34864         (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
34865         * config/i386/i386.h (TARGET_RDPID, TARGET_RDPID_P): New.
34866         * config/i386/i386.md (define_insn "rdpid"): New.
34867         * config/i386/i386.opt Add -mrdpid.
34868         * config/i386/immintrin.h (_rdpid_u32): New.
34870 2017-02-17  Vladimir Makarov  <vmakarov@redhat.com>
34872         PR rtl-optimization/79541
34873         * lra-constraints.c (curr_insn_transform): Remove wrong asm insn
34874         instead of transforming it into USE.
34876 2017-02-17  Segher Boessenkool  <segher@kernel.crashing.org>
34878         * config/rs6000/rs6000.md (extendsfdf2): Remove default arguments.
34879         If HONOR_SNANS (SFmode) force the input to a register.
34880         (*extendsfdf2_fpr): Add !HONOR_SNANS (SFmode) condition.
34881         (*extendsfdf2_snan): New pattern, used when using SNaNs; it generates
34882         an frsp or similar insn.
34884 2017-02-17  Martin Liska  <mliska@suse.cz>
34886         PR rtl-optimization/79577
34887         * params.def (selsched-max-sched-times): Increase minimum to 1.
34889 2017-02-17  Martin Liska  <mliska@suse.cz>
34891         PR rtl-optimization/79574
34892         * gcse.c (want_to_gcse_p): Prevent integer overflow.
34894 2017-02-17  Martin Liska  <mliska@suse.cz>
34896         PR tree-optimization/79529
34897         * tree-ssa-loop-unswitch.c (is_maybe_undefined): Use
34898         ssa_defined_default_def_p to handle cases which are implicitly
34899         defined.
34900         * tree-ssa.c (ssa_defined_default_def_p): New function.
34901         (ssa_undefined_value_p): Use ssa_defined_default_def_p to handle cases
34902         which are implicitly defined.
34903         * tree-ssa.h (ssa_defined_default_def_p): Declare.
34905 2017-02-17  Richard Biener  <rguenther@suse.de>
34907         PR middle-end/79576
34908         * params.def (max-ssa-name-query-depth): Limit to 10.
34910 2017-02-17  Richard Biener  <rguenther@suse.de>
34912         PR tree-optimization/79552
34913         * tree-ssa-structalias.c (visit_loadstore): Properly verify
34914         default defs.
34916 2017-02-17  Richard Biener  <rguenther@suse.de>
34918         PR bootstrap/79567
34919         * genmatch.c (output_line_directive): Handle DIR_SEPARATOR_2.
34921 2017-02-17  Marek Polacek  <polacek@redhat.com>
34923         PR middle-end/79536
34924         * fold-const.c (fold_negate_expr_1): Renamed from fold_negate_expr.
34925         (fold_negate_expr): New wrapper.
34927 2017-02-16  Sandra Loosemore  <sandra@codesourcery.com>
34929         * doc/invoke.texi (C++ Dialect Options) [-Wno-non-template-friend]: 
34930         Correct terminology and de-emphasize pre-standard behavior.
34932 2017-02-16  Alan Modra  <amodra@gmail.com>
34934         PR rtl-optimization/79286
34935         * ira.c (def_dominates_uses): New function.
34936         (update_equiv_regs): Don't create an equivalence for insns that
34937         may trap where the register def does not dominate the use.
34939 2017-02-16  Vladimir Makarov  <vmakarov@redhat.com>
34941         PR rtl-optimization/78127
34942         * lra.c (lra): Call lra_eliminate before finish the loop after
34943         lra_constraint.
34945 2017-02-16  Richard Biener  <rguenther@suse.de>
34947         * graphite.h: Do not include isl/isl_val_gmp.h, instead include
34948         isl/isl_val.h.
34949         * graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
34950         (gcc_expression_from_isl_expr_int): Use generic isl_val interface.
34951         * graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
34952         (isl_val_int_from_wi): New function.
34953         (extract_affine_gmp): Rename to ...
34954         (extract_affine_wi): ... this, take a widest_int.
34955         (extract_affine_int): Just wrap extract_affine_wi.
34956         (add_param_constraints): Use isl_val_int_from_wi.
34957         (add_loop_constraints): Likewise, and extract_affine_wi.
34959 2017-02-15  Jeff Law  <law@redhat.com>
34961         PR middle-end/79521
34962         * ira-costs.c (scan_one_insn): Check have_regs_of_mode before calling
34963         ira_init_register_move_cost_if_necessary.
34965 2017-02-15  Martin Sebor  <msebor@redhat.com>
34967         PR middle-end/32003
34968         * doc/invoke.texi (-fdump-final-insns): Replace option accidentally
34969         removed in a prior commit.
34971 2017-02-15  Bin Cheng  <bin.cheng@arm.com>
34973         PR tree-optimization/79347
34974         * tree-vect-loop-manip.c (vect_do_peeling): Maintain profile
34975         counters during peeling.
34977 2017-02-15  Thomas Schwinge  <thomas@codesourcery.com>
34979         * Makefile.in (site.exp): Remove "set ISLVER".
34981 2017-02-15  Jakub Jelinek  <jakub@redhat.com>
34983         PR target/79487
34984         * real.c (real_from_integer): Call real_convert even for decimal.
34986 2017-02-15  Dominik Vogt  <vogt@linux.vnet.ibm.com>
34988         PR target/79421
34989         * config/s390/s390.c: define TARGET_CUSTOM_FUNCTION_DESCRIPTORS.
34991 2017-02-14  Andrew Pinski  <apinski@cavium.com>
34993         * config/aarch64/aarch64-cores.def (thunderx2t99): Move to under 'C"
34994         cores and change the partno/implementer to be correct.
34995         (thunderx2t99p1): New core which replaces thunderx2t99 and still has
34996         the 'B" as the implementer.
34997         * config/aarch64/aarch64-tune.md: Regenerate.
34999 2017-02-14  Carl Love  <cel@us.ibm.com>
35001         * config/rs6000/rs6000.c: Add case statement entry to make the
35002         xvcvuxdsp built-in argument unsigned.
35003         * config/rs6000/vsx.md: Fix the source and return operand types so they
35004         match the instruction definitions from the ISA document.  Fix typo
35005         in the instruction generation for the (define_insn "vsx_xvcvuxdsp"
35006         statement.
35008 2017-02-14  Vladimir Makarov  <vmakarov@redhat.com>
35010         PR target/79282
35011         * lra-int.h (struct lra_operand_data, struct lra_insn_reg): Add
35012         member early_clobber_alts.
35013         * lra-lives.c (reg_early_clobber_p): New.
35014         (process_bb_lives): Use it.
35015         * lra.c (new_insn_reg): New arg early_clobber_alts.  Use it.
35016         (debug_operand_data): Initialize early_clobber_alts.
35017         (setup_operand_alternative): Set up early_clobber_alts.
35018         (collect_non_operand_hard_regs): Ditto.  Pass early clobber
35019         alternatives to new_insn_reg.
35020         (add_regs_to_insn_regno_info): Add arg early_clobber_alts.  Use
35021         it.
35022         (lra_update_insn_regno_info): Pass the new arg.
35024 2017-02-14  Jakub Jelinek  <jakub@redhat.com>
35026         PR middle-end/79505
35027         * omp-offload.c (free_oacc_loop): Release loop->ifns vector.
35028         (new_oacc_loop_raw): Don't clear already cleared fields.
35030         PR target/79481
35031         * config/i386/avx512pfintrin.h (_mm512_prefetch_i32gather_pd,
35032         _mm512_prefetch_i32gather_ps, _mm512_prefetch_i64gather_pd,
35033         _mm512_prefetch_i64gather_ps): New inline functions and macros.
35035 2017-02-14  Uros Bizjak  <ubizjak@gmail.com>
35037         PR target/79495
35038         * config/i386/i386.md (*movxf_internal): Add (o,rC) alternative.
35040 2017-02-14  H.J. Lu  <hongjiu.lu@intel.com>
35042         PR target/79498
35043         * config/i386/i386.c (timode_scalar_chain::convert_insn): Insert
35044         the extra instruction to the right place to store 128-bit constant
35045         when needed.
35047 2017-02-14  Martin Sebor  <msebor@redhat.com>
35049         PR middle-end/79448
35050         * gimple-ssa-sprintf.c (format_directive): Avoid issuing INT_MAX
35051           warning for strings of unknown length.
35053 2017-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
35055         * config.gcc (supported_defaults) [powerpc*-*-*]: Update.
35057 2017-02-14  Jeff Law  <law@redhat.com>
35059         PR target/79404
35060         * ira-costs.c (scan_one_insn): Initialize register move costs
35061         for pseudos seen in USE/CLOBBER insns.
35063         PR tree-optimization/79095
35064         * tree-vrp.c (extract_range_from_binary_expr_1): For EXACT_DIV_EXPR,
35065         if the numerator has the range ~[0,0] make the resultant range ~[0,0].
35066         (extract_range_from_binary_expr): For MINUS_EXPR with no derived range,
35067         if the operands are known to be not equal, then the resulting range
35068         is ~[0,0].
35069         (intersect_ranges): If the new range is ~[0,0] and the old range is
35070         wide, then prefer ~[0,0].
35071         * tree-vrp.c (overflow_comparison_p_1): New function.
35072         (overflow_comparison_p): New function.
35073         * tree-vrp.c (register_edge_assert_for_2): Register additional asserts
35074         if NAME is used in an overflow test.
35075         (vrp_evaluate_conditional_warnv_with_ops): If the ops represent an
35076         overflow check that can be expressed as an equality test, then adjust
35077         ops to be that equality test.
35079 2017-02-14  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35081         * config/s390/s390-builtin-types.def: Remove flags argument.
35082         * config/s390/s390.c (s390_init_builtins): Likewise.
35084 2017-02-14  Martin Liska  <mliska@suse.cz>
35086         * tree-ssa-loop-unswitch.c (hoist_guard): Release get_loop_body
35087         vector.  Fix trailing white spaces.
35089 2017-02-14  James Greenhalgh  <james.greenhalgh@arm.com>
35091         * config/aarch64/aarch64.c (aarch64_simd_container_mode): Handle
35092         HFmode.
35094 2017-02-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
35096         PR rtl-optimization/68664
35097         * config/arm/arm.c (arm_sched_can_speculate_insn):
35098         New function.  Declare prototype.
35099         (TARGET_SCHED_CAN_SPECULATE_INSN): Define.
35101 2017-02-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
35103         PR rtl-optimization/68664
35104         * config/aarch64/aarch64.c (aarch64_sched_can_speculate_insn):
35105         New function.
35106         (TARGET_SCHED_CAN_SPECULATE_INSN): Define.
35108 2017-02-14  Amit Pawar  <amit.pawar@amd.com>
35110         * config/i386/i386.c (znver1_cost): Fix the alignment for function and
35111         max skip bytes for function, loop and jump.
35113 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
35115         * gimple-pretty-print.c (dump_unary_rhs): Adjust dump format for
35116         ABS_EXPR for gimple dump.
35118 2017-02-14  Jakub Jelinek  <jakub@redhat.com>
35120         PR target/79462
35121         * config/sh/sh.c (expand_cbranchdi4): Don't clear operands[4].
35123         PR tree-optimization/79408
35124         * tree-vrp.c (simplify_div_or_mod_using_ranges): Handle also the
35125         case when on TRUNC_MOD_EXPR op0 is INTEGER_CST.
35126         (simplify_stmt_using_ranges): Call simplify_div_or_mod_using_ranges
35127         also if rhs1 is INTEGER_CST.
35129 2017-02-14  Richard Biener  <rguenther@suse.de>
35131         PR middle-end/79432
35132         * tree-into-ssa.c (insert_phi_nodes): When the function can
35133         have abnormal edges rewrite SSA names with broken use-def
35134         dominance out of SSA and register them for PHI insertion.
35136 2017-02-13  Martin Sebor  <msebor@redhat.com>
35138         PR middle-end/79496
35139         * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call): Avoid
35140         clearing info.nowrite flag when snprintf size argument is a range.
35142 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
35144         * cprop.c (cprop_jump): Add missing space in string literal.
35145         * tree-ssa-structalias.c (rewrite_constraints): Likewise.
35146         (get_constraint_for_component_ref): Likewise.
35147         * df-core.c (df_worklist_dataflow_doublequeue): Likewise.
35148         * tree-outof-ssa.c (insert_partition_copy_on_edge): Likewise.
35149         * lra-constraints.c (process_alt_operands): Likewise.
35150         * ipa-inline.c (inline_small_functions): Likewise.
35151         * tree-ssa-sccvn.c (visit_reference_op_store): Likewise.
35152         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
35153         * trans-mem.c (diagnose_tm_1_op): Likewise.
35154         * omp-grid.c (grid_find_single_omp_among_assignments): Likewise.
35155         (grid_parallel_clauses_gridifiable): Likewise.
35157         * config/nvptx/mkoffload.c (process): Add space in between
35158         , and %d.
35160         * config/i386/i386.h (REG_CLASS_NAMES): Add , in between
35161         "MOD4_SSE_REGS" and "ALL_REGS".
35163         * spellcheck.c (test_data): Add , in between "foo" and "food".
35165 2017-02-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
35167         PR target/79449
35168         * config/rs6000/rs6000.c (expand_block_compare): Make sure runtime
35169         boundary crossing check and subsequent code generation agree.
35171 2017-02-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
35173         * config/aarch64/aarch64.c (has_memory_op): Delete.
35174         (aarch64_madd_needs_nop): Use contains_mem_rtx_p instead of
35175         has_memory_op.
35177 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
35179         PR rtl-optimization/79388
35180         PR rtl-optimization/79450
35181         * combine.c (distribute_notes): When removing TEM_INSN for which
35182         corresponding dest has last value recorded, invalidate that last
35183         value.
35185 2017-02-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
35187         * config/arm/arm.c (arm_print_tune_info): Use ASM_COMMENT_START instead
35188         of explicit '@'.  Add missing assembly comment marker on branch costs
35189         printout.
35191 2017-02-13  Nathan Sidwell  <nathan@acm.org>
35193         * gengtype-lex.l (<in_struct>): Add '/'.
35195 2017-02-13  Martin Liska  <mliska@suse.cz>
35197         PR c/79471
35198         * calls.c (expand_call): Replace XALLOCAVEC with XCNEWVEC.
35200 2017-02-13  Richard Biener  <rguenther@suse.de>
35202         * configure.ac (HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS):
35203         Remove.
35204         * configure: Re-generate.
35205         * config.in: Likewise.
35206         * graphite-dependences.c: Simplify as if
35207         HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS was defined.
35208         * graphite-isl-ast-to-gimple.c: Likewise.
35209         * graphite-optimize-isl.c: Likewise.
35210         * graphite-poly.c: Likewise.
35211         * graphite-sese-to-poly.c: Likewise.
35212         * graphite.h: Likewise.
35213         * toplev.c: Include isl/version.h and use isl_version () for
35214         printing the ISL version.
35215         * doc/install.texi: Update ISL requirement.
35217 2017-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
35219         * doc/standards.texi (Standards): Update reference to
35220         Objective-C 2.0.
35222 2017-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
35224         * doc/extend.texi (Named Address Spaces): sourceware.org now
35225         defaults to https.
35226         * doc/install.texi (Binaries): Ditto.
35227         (Specific): Ditto.
35229 2017-02-11  Sandra Loosemore  <sandra@codesourcery.com>
35231         * doc/cpp.texi: Replace "stringify"/"stringification" with C
35232         standard terminology "stringize"/"stringizing" throughout.
35233         * doc/cppinternals.texi: Likewise.
35235 2017-02-11  Sandra Loosemore  <sandra@codesourcery.com>
35237         * doc/extend.texi: Fix some spelling mistakes and typos.
35238         * doc/invoke.texi: Likewise.
35240 2017-02-11  Jan Hubicka  <hubicka@ucw.cz>
35242         PR ipa/79224
35243         * params.def (inline-min-speedup) Change from 10 to 8.
35245 2017-02-11  Jakub Jelinek  <jakub@redhat.com>
35247         * doc/invoke.texi (fopenmp): Bump OpenMP version from 4.0 to
35248         4.5.
35250 2017-02-11  Jan Hubicka  <hubicka@ucw.cz>
35252         PR ipa/79224
35253         * ipa-inline-analysis.c (get_minimal_bb): New function.
35254         (record_modified): Use it.
35255         (remap_edge_change_prob): Handle also ancestor functions.
35257 2017-02-11  Gerald Pfeifer  <gerald@pfeifer.com>
35259         * doc/contrib.texi (Contributors): Remove broken link into
35260         the Mauve CVS repository.
35262 2017-02-11  Jakub Jelinek  <jakub@redhat.com>
35264         PR middle-end/79454
35265         * internal-fn.c (expand_vector_ubsan_overflow): Use piece-wise
35266         result computation whenever lhs doesn't have vector mode, not
35267         just when it has BLKmode.
35269 2017-02-10  Gerald Pfeifer  <gerald@pfeifer.com>
35271         * doc/makefile.texi (profiledbootstrap): Refer to the
35272         installation instructions only in textual form.
35274 2017-02-10  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
35276         PR target/79295
35277         * config/rs6000/altivec.md (bcd<bcd_add_sub>): Fix constraints.
35279 2017-02-10  Gerald Pfeifer  <gerald@pfeifer.com>
35281         * doc/install.texi (Specific): Use https for blackfin.uclinux.org.
35282         (Specific): Update mingw-w64 reference.
35283         (Binaries): Ditto.
35284         (Specific): Remove broken link to Renesas RX processor.
35286 2017-02-10  Richard Biener  <rguenther@suse.de>
35288         * toplev.c (process_options): Do not mention obsolete graphite
35289         options when printing sorry message about missing graphite support.
35290         Mention -floop-nest-optimize.
35292 2017-02-10  Christophe Lyon  <christophe.lyon@linaro.org>
35294         * config/aarch64/arm_neon.h (vtst_p8): Rewrite without asm.
35295         (vtst_p16): Likewise.
35296         (vtstq_p8): Likewise.
35297         (vtstq_p16): Likewise.
35298         (vtst_p64): New.
35299         (vtstq_p64): Likewise.
35300         * config/arm/arm_neon.h (vgetq_lane_p64): New.
35301         (vset_lane_p64): New.
35302         (vsetq_lane_p64): New.
35304 2017-02-10  Jakub Jelinek  <jakub@redhat.com>
35306         PR tree-optimization/79411
35307         * tree-ssa-reassoc.c (is_reassociable_op): Return false if
35308         stmt operands are SSA_NAMEs used in abnormal phis.
35309         (can_reassociate_p): Return false if op is SSA_NAME used in abnormal
35310         phis.
35312 2017-02-09  Jan Hubicka  <hubicka@ucw.cz>
35314         PR ipa/70795
35315         * cgraphunit.c (cgraph_node::add_new_function): Set externally_visible
35316         flag if needed.
35318 2017-02-09  Jan Hubicka  <hubicka@ucw.cz>
35320         * tree-ssa-loop-unswitch.c (hoist_guard): Update profile.
35322 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
35324         * omp-offload.c (oacc_loop_auto_partitions): Use || instead of |
35325         to avoid warning.
35327         PR c/79413
35328         * gimplify.h (is_gimple_sizepos): Only test for INTEGER_CST constants,
35329         not arbitrary TREE_CONSTANT.
35331         PR c/79431
35332         * gimplify.c (gimplify_adjust_omp_clauses): Ignore
35333         "omp declare target link" attribute unless is_global_var.
35334         * omp-offload.c (find_link_var_op): Likewise.
35336 2017-02-09  Nathan Sidwell  <nathan@codesourcery.com>
35337             Chung-Lin Tang  <cltang@codesourcery.com>
35339         * gimplify.c (gimplify_scan_omp_clauses): No special handling for
35340         OMP_CLAUSE_TILE.
35341         (gimplify_adjust_omp_clauses): Don't delete TILE.
35342         (gimplify_omp_for): Deal with TILE.
35343         * internal-fn.c (expand_GOACC_TILE): New function.
35344         * internal-fn.def (GOACC_DIM_POS): Comment may be overly conservative.
35345         (GOACC_TILE): New.
35346         * omp-expand.c (struct oacc_collapse): Add tile and outer fields.
35347         (expand_oacc_collapse_init): Add LOC paramter.  Initialize tile
35348         element fields.
35349         (expand_oacc_collapse_vars): Add INNER parm, adjust for tiling,
35350         avoid DIV for outermost collapse var.
35351         (expand_oacc_for): Insert tile element loop as needed.  Adjust.
35352         Remove out of date comments, fix whitespace.
35353         * omp-general.c (omp_extract_for_data): Deal with tiling.
35354         * omp-general.h (enum oacc_loop_flags): Add OLF_TILE flag,
35355         adjust OLF_DIM_BASE value.
35356         (struct omp_for_data): Add tiling field.
35357         * omp-low.c (scan_sharing_clauses): Allow OMP_CLAUSE_TILE.
35358         (lower_oacc_head_mark): Add OLF_TILE as appropriate.  Ensure 2 levels
35359         for auto loops.  Remove default auto determining, moved to
35360         oacc_loop_fixed_partitions.
35361         * omp-offload.c (struct oacc_loop): Change 'ifns' to vector of call
35362         stmts, add e_mask field.
35363         (oacc_dim_call): New function, abstracted out from oacc_thread_numbers.
35364         (oacc_thread_numbers): Use oacc_dim_call.
35365         (oacc_xform_tile): New.
35366         (new_oacc_loop_raw): Initialize e_mask, adjust for ifns vector.
35367         (finish_oacc_loop): Adjust for ifns vector.
35368         (oacc_loop_discover_walk): Append loop abstraction sites to list,
35369         add case for GOACC_TILE fns.
35370         (oacc_loop_xform_loop): Delete.
35371         (oacc_loop_process): Iterate over call list directly, and add
35372         handling for GOACC_TILE fns.
35373         (oacc_loop_fixed_partitions): Determine default auto, deal with TILE,
35374         dump partitioning.
35375         (oacc_loop_auto_partitions): Add outer_assign parm. Assign all but
35376         vector partitioning to outer loops.  Assign 2 partitions to loops
35377         when available. Add TILE handling.
35378         (oacc_loop_partition): Adjust oacc_loop_auto_partitions call.
35379         (execite_oacc_device_lower): Process GOACC_TILE fns,
35380         ignore unknown specs.
35381         * tree-nested.c (convert_nonlocal_omp_clauses): Allow OMP_CLAUSE_TILE.
35382         * tree.c (omp_clause_num_ops): Adjust TILE ops.
35383         * tree.h (OMP_CLAUSE_TILE_ITERVAR, OMP_CLAUSE_TILE_COUNT): New.
35385 2017-02-09  Gerald Pfeifer  <gerald@pfeifer.com>
35387         * configure.ac (ACX_BUGURL): Update.
35388         * configure: Regenerate.
35390 2017-02-09  Richard Biener  <rguenther@suse.de>
35392         PR tree-optimization/69823
35393         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
35394         Properly enumerate all BBs in the region.  Use auto_vec/auto_bitmap.
35396 2017-02-09  Andrew Burgess  <andrew.burgess@embecosm.com>
35398         * config/arc/arc-c.def: Add __NPS400__ definition.
35399         * config/arc/arc.h (CPP_SPEC): Don't define __NPS400__ here.
35400         (TARGET_NPS400): Define.
35402 2017-02-09  Andrew Burgess  <andrew.burgess@embecosm.com>
35404         * config/arc/arc-arch.h (arc_arch_t): Move unchanged to earlier in
35405         file.
35406         (arc_cpu_t): Change base_architecture field, arch, to a arc_arc_t
35407         pointer, arch_info.
35408         (arc_cpu_types): Fill the arch_info field with a pointer into the
35409         arc_arch_types table.
35410         (arc_selected_cpu): Declare.
35411         * config/arc/arc.c (arc_selected_cpu): Make global.
35412         (arc_selected_arch): Delete.
35413         (arc_base_cpu): Delete.
35414         (arc_override_options): Remove references to deleted variables,
35415         update access to arch information.
35416         (ARC_OPT): Update access to arch information.
35417         (ARC_OPTX): Likewise.
35418         * config/arc/arc.h (arc_base_cpu): Remove declaration.
35419         (TARGET_ARC600): Update access to arch information.
35420         (TARGET_ARC601): Likewise.
35421         (TARGET_ARC700): Likewise.
35422         (TARGET_EM): Likewise.
35423         (TARGET_HS): Likewise.
35424         * config/arc/driver-arc.c (arc_cpu_to_as): Update access to arch
35425         information.
35427 2017-02-08  Pat Haugen  <pthaugen@us.ibm.com>
35429         PR target/78604
35430         * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Invert
35431         condition/operands for integer GE/LE/GEU/LEU operations.
35433 2017-02-08  Segher Boessenkool  <segher@kernel.crashing.org>
35435         PR translation/79397
35436         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Fix spelling
35437         of AltiVec.
35439 2017-02-08  Martin Jambor  <mjambor@suse.cz>
35441         PR ipa/79375
35442         * ipa-prop.c (ipa_alloc_node_params): Make static, return bool
35443         whether allocation happened.
35444         (ipa_initialize_node_params): Do not call ipa_alloc_node_params if
35445         nothing was allocated.
35447 2017-02-08  Jakub Jelinek  <jakub@redhat.com>
35449         PR tree-optimization/79408
35450         * tree-vrp.c (simplify_div_or_mod_using_ranges): If op1 is not
35451         constant, but SSA_NAME with a known integer range, use the minimum
35452         of that range instead of op1 to determine if modulo can be replaced
35453         with its first operand.
35455 2016-02-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
35457         * config/riscv/riscv.c (riscv_build_integer_1): Avoid use of INT16_MAX.
35459 2017-02-08  Richard Biener  <rguenther@suse.de>
35461         PR tree-optimization/71824
35462         * graphite-scop-detection.c (scop_detection::build_scop_breadth):
35463         Check all loops contained in the merged region.
35465 2017-02-07  Andrew Pinski  <apinski@cavium.com>
35467         * config/aarch64/aarch64.md (popcount<mode>2): New pattern.
35469 2017-02-07  Andrew Pinski  <apinski@cavium.com>
35471         * config/aarch64/aarch64-cores.def (thunderx): Disable LSE.
35472         (thunderxt88): Likewise.
35473         (thunderxt81): Disable LSE and change v8.1 to v8.
35474         (thunderxt83): Likewise.
35476 2017-02-07  Jakub Jelinek  <jakub@redhat.com>
35477             Richard Biener  <rguenther@suse.de>
35479         PR middle-end/79399
35480         * ira-int.h (struct target_ira_int): Change x_max_struct_costs_size
35481         type from int to size_t.
35482         * ira-costs.c (struct_costs_size): Change type from int to size_t.
35484 2017-02-07  Jakub Jelinek  <jakub@redhat.com>
35486         PR rtl-optimization/79386
35487         * cprop.c (bypass_conditional_jumps): Initialize
35488         bypass_last_basic_block already before splitting bbs after
35489         unconditional traps...
35490         (bypass_conditional_jumps): ... rather than here.
35492         PR target/79299
35493         * config/i386/sse.md (xtg_mode, gatherq_mode): New mode attrs.
35494         (*avx512f_gathersi<mode>, *avx512f_gathersi<mode>_2,
35495         *avx512f_gatherdi<mode>, *avx512f_gatherdi<mode>_2): Use them,
35496         fix -masm=intel patterns.
35498 2017-02-07  Richard Biener  <rguenther@suse.de>
35500         PR tree-optimization/79256
35501         PR middle-end/79278
35502         * builtins.c (get_object_alignment_2): Use min_align_of_type
35503         to extract alignment for MEM_REFs to honor BIGGEST_FIELD_ALIGNMENT
35504         and ADJUST_FIELD_ALIGN.
35506         * doc/tm.texi.in (ADJUST_FIELD_ALIGN): Adjust to take additional
35507         type parameter.
35508         * doc/tm.texi: Regenerate.
35509         * stor-layout.c (layout_decl): Adjust.
35510         (update_alignment_for_field): Likewise.
35511         (place_field): Likewise.
35512         (min_align_of_type): Likewise.
35513         * config/arc/arc.h (ADJUST_FIELD_ALIGN): Adjust.
35514         * config/epiphany/epiphany.h (ADJUST_FIELD_ALIGN): Likewise.
35515         * config/epiphany/epiphany.c (epiphany_adjust_field_align): Likewise.
35516         * config/frv/frv.h (ADJUST_FIELD_ALIGN): Likewise.
35517         * config/frv/frv.c (frv_adjust_field_align): Likewise.
35518         * config/i386/i386.h (ADJUST_FIELD_ALIGN): Likewise.
35519         * config/i386/i386.c (x86_field_alignment): Likewise.
35520         * config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Likewise.
35521         * config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Likewise.
35522         * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
35523         * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
35524         * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Likewise.
35525         * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p):
35526          Likewise.
35528         Revert
35529         2017-01-30  Richard Biener  <rguenther@suse.de>
35531         PR tree-optimization/79256
35532         * targhooks.c (default_builtin_vector_alignment_reachable): Honor
35533         BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
35534         alignment on TYPE.
35536 2017-02-07  Toma Tabacu  <toma.tabacu@imgtec.com>
35538         * config/mips/mips.c (mips_expand_builtin_insn): Convert the QImode
35539         argument of the pshufh, psllh, psllw, psrah, psraw, psrlh, psrlw
35540         builtins to SImode and emit a zero-extend, if necessary.
35542 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
35544         * docs/invoke.texi (RISC-V Options): Alphabetize.
35546 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
35548         * doc/invoke.texi (RISC-V Options): Use two spaces to separate
35549         options.
35551 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
35553         * config/riscv/riscv.c: New file.
35554         * common/config/riscv/riscv-common.c: Likewise.
35555         * config.gcc: Likewise.
35556         * config/riscv/constraints.md: Likewise.
35557         * config/riscv/elf.h: Likewise.
35558         * config/riscv/generic.md: Likewise.
35559         * config/riscv/linux.h: Likewise.
35560         * config/riscv/multilib-generator: Likewise.
35561         * config/riscv/peephole.md: Likewise.
35562         * config/riscv/pic.md: Likewise.
35563         * config/riscv/predicates.md: Likewise.
35564         * config/riscv/riscv-builtins.c: Likewise.
35565         * config/riscv/riscv-c.c: Likewise.
35566         * config/riscv/riscv-ftypes.def: Likewise.
35567         * config/riscv/riscv-modes.def: Likewise.
35568         * config/riscv/riscv-opts.h: Likewise.
35569         * config/riscv/riscv-protos.h: Likewise.
35570         * config/riscv/riscv.h: Likewise.
35571         * config/riscv/riscv.md: Likewise.
35572         * config/riscv/riscv.opt: Likewise.
35573         * config/riscv/sync.md: Likewise.
35574         * config/riscv/t-elf-multilib: Likewise.
35575         * config/riscv/t-linux: Likewise.
35576         * config/riscv/t-linux-multilib: Likewise.
35577         * config/riscv/t-riscv: Likewise.
35578         * configure.ac: Likewise.
35579         * doc/contrib.texi: Add Kito Cheng, Palmer Dabbelt, and Andrew
35580         Waterman as RISC-V maintainers.
35581         * doc/install.texi: Add RISC-V entries.
35582         * doc/invoke.texi: Add RISC-V options section.
35583         * doc/md.texi: Add RISC-V constraints section.
35584         * configure: Regenerated.
35586 2017-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
35588         PR target/66144
35589         * config/rs6000/vector.md (vcond<mode><mode>): Allow the true and
35590         false values to be constant vectors with all 0 or all 1 bits set.
35591         (vcondu<mode><mode>): Likewise.
35592         * config/rs6000/predicates.md (vector_int_reg_or_same_bit): New
35593         predicate.
35594         (fpmask_comparison_operator): Update comment.
35595         (vecint_comparison_operator): New predicate.
35596         * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Optimize
35597         vector conditionals when the true and false values are constant
35598         vectors with all 0 bits or all 1 bits set.
35600 2017-02-06  Martin Sebor  <msebor@redhat.com>
35602         PR  tree-optimization/79376
35603         * gimple-fold.c (get_range_strlen): Set the minimum length to zero.
35605 2017-02-06  Uros Bizjak  <ubizjak@gmail.com>
35607         * config/i386/sse.md (vector modes -> vec_extract* splitter): Use
35608         explicit subreg RTX with operand 1.  Use VECTOR_MODE_P predicate
35609         to simplify split condition.
35611 2017-02-06  Jakub Jelinek  <jakub@redhat.com>
35613         * omp-expand.c (oxpand_omp_atomic_fetch_op,
35614         expand_omp_atomic_pipeline): Return false if can_atomic_load_p is
35615         false.
35617 2017-02-06  Segher Boessenkool  <segher@kernel.crashing.org>
35619         PR rtl-optimization/68664
35620         * target.def (can_speculate_insn): New hook.
35621         * doc/tm.texi.in (TARGET_SCHED_CAN_SPECULATE_INSN): New hook.
35622         * doc/tm.texi: Regenerate.
35623         * sched-rgn.c (can_schedule_ready_p): Use the new hook.
35624         * config/rs6000/rs6000.c (TARGET_SCHED_CAN_SPECULATE_INSN): New macro.
35625         (rs6000_sched_can_speculate_insn): New function.
35627 2017-02-06  Jakub Jelinek  <jakub@redhat.com>
35629         PR tree-optimization/79284
35630         * tree-vectorizer.h (VECT_SCALAR_BOOLEAN_TYPE_P): Define.
35631         * tree-vect-stmts.c (vect_get_vec_def_for_operand,
35632         vectorizable_mask_load_store, vectorizable_operation,
35633         vect_is_simple_cond, get_same_sized_vectype): Use it instead
35634         of comparing TREE_CODE of a type against BOOLEAN_TYPE.
35635         * tree-vect-patterns.c (check_bool_pattern, search_type_for_mask_1,
35636         vect_recog_bool_pattern, vect_recog_mask_conversion_pattern): Likewise.
35637         * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
35638         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
35639         Remove redundant gimple_code (stmt) == GIMPLE_ASSIGN test after
35640         is_gimple_assign (stmt).  Replace another such test with
35641         is_gimple_assign (stmt).
35643 2017-02-06  Georg-Johann Lay  <avr@gjlay.de>
35645         PR target/78883
35646         * config/avr/avr.c (rtl-iter.h): Include it.
35647         (TARGET_LEGITIMATE_COMBINED_INSN): New hook define...
35648         (avr_legitimate_combined_insn): ...and implementation.
35650 2017-02-06  Dominik Vogt  <vogt@linux.vnet.ibm.com>
35652         * config/s390/predicates.md ("larl_operand"): Use macros from hwint.h.
35653         * config/s390/s390.c (s390_const_operand_ok)
35654         (s390_canonicalize_comparison, s390_extract_part)
35655         (s390_single_part, s390_contiguous_bitmask_nowrap_p)
35656         (s390_contiguous_bitmask_p, s390_rtx_costs)
35657         (legitimize_pic_address): Likewise.
35658         * config/s390/s390.md ("clzdi2", "clztidi2"): Likewise.
35659         * config/s390/vx-builtins.md ("vec_genbytemaskv16qi")
35660         ("vec_permi<mode>", "vfae<mode>", "*vfaes<mode>", "vstrc<mode>")
35661         ("*vstrcs<mode>"): Use UINTVAL() to set unsigned HOST_WIDE_INT.
35662         * config/s390/vector.md ("vec_vfenes<mode>"): Likewise.
35664 2017-02-06  Georg-Johann Lay  <avr@gjlay.de>
35666         * config/avr/avr.md (*addhi3_zero_extend): Add alternative where
35667         REGNO($0) == REGNO($1).
35669 2017-02-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35671         * config/s390/linux.h(SIZE_TYPE): Add comment.
35673 2017-02-06  Julian Brown  <julian@codesourcery.com>
35674             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
35675             Virendra Pathak  <virendra.pathak@broadcom.com>
35677         * config/aarch64/aarch64-cores.def: Change the scheduler
35678         to Thunderx2t99.
35679         * config/aarch64/aarch64.md: Include thunderx2t99.md.
35680         * config/aarch64/thunderx2t99.md: New file.
35682 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
35684         * doc/standards.texi (Go Language): Update link to language
35685         standard.
35687 2017-02-05  Jan Hubicka  <hubicka@ucw.cz>
35689         * tree-eh.c (lower_resx): Sanitize profile.
35690         (cleanup_empty_eh_move_lp): Likewise.
35692 2017-02-05  Jan Hubicka  <hubicka@ucw.cz>
35694         PR tree-ssa/79347
35695         * cfgloopmanip.c (lv_adjust_loop_entry_edge, loop_version): Add
35696         ELSE_PROB.
35697         * cfgloopmanip.h (loop_version): Update prototype.
35698         * modulo-sched.c (sms_schedule): Update call of loop_version.
35699         * tree-if-conv.c(version_loop_for_if_conversion): Likewise.
35700         * tree-parloops.c (gen_parallel_loop): Likewise.
35701         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Likewise.
35702         * tree-ssa-loop-split.c (split_loop): Likewise.
35703         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Likewise.
35704         * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
35706 2017-02-05  Martin Liska  <mliska@suse.cz>
35708         PR bootstrap/78985
35709         * config/s390/s390.c (s390_gimplify_va_arg): Initialize local
35710         variable to NULL.
35711         (print_operand_address): Initialize a struct to zero.
35713 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
35715         * doc/contrib.texi (Contributors): Refer to Hans Boehm's
35716         garbage collector only in textual form.
35718 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
35720         * doc/extend.texi (x86 specific memory model extensions for
35721         transactional memory): Simplify a phrase.
35723 2017-02-05  Eric Botcazou  <ebotcazou@adacore.com>
35725         PR target/79353
35726         * config/sparc/sync.md (atomic_loaddi_1): Replace 'U' constraint with
35727         'r', 'm' constraint with 'T' and !TARGET_ARCH64 with TARGET_ARCH32.
35728         (atomic_storedi_1): Likewise.
35730 2017-02-04  Jakub Jelinek  <jakub@redhat.com>
35732         PR tree-optimization/79338
35733         * tree-parloops.c (gather_scalar_reductions): Don't call
35734         vect_analyze_loop_form for loop->inner before destroying loop's
35735         loop_vinfo.
35737 2017-02-03  Martin Sebor  <msebor@redhat.com>
35739         PR tree-optimization/79327
35740         * gimple-ssa-sprintf.c (tree_digits): Avoid adding the base prefix
35741         when precision has resulted in leading zeros.
35742         (format_integer): Adjust the likely counter to assume an unknown
35743         argument that may be zero is non-zero.
35745 2017-02-03  Jason Merrill  <jason@redhat.com>
35747         PR c++/78689
35748         * tree-inline.c (copy_tree_body_r) [COND_EXPR]: Revert change to
35749         avoid copying non-taken branch.
35751 2017-02-03  Jakub Jelinek  <jakub@redhat.com>
35753         PR tree-optimization/79340
35754         * tree-vect-loop.c (vectorizable_reduction): Release
35755         vec_defs elements after safe_splicing them into other vectors.
35756         Formatting fixes.
35758         PR tree-optimization/79327
35759         * gimple-ssa-sprintf.c (adjust_range_for_overflow): If returning
35760         true, always set *argmin and *argmax to TYPE_{MIN,MAX}_VALUE of
35761         dirtype.
35762         (format_integer): Use wide_int_to_tree instead of build_int_cst
35763         + to_?hwi.  If argmin is NULL, just set argmin and argmax to
35764         TYPE_{MIN,MAX}_VALUE of argtype.  Simplify and fix computation
35765         of shortest and longest sequence.
35767 2017-02-03  Uros Bizjak  <ubizjak@gmail.com>
35769         * config/i386/i386.c (dimode_scalar_chain::convert_reg):
35770         Use pextrd for TARGET_SSE4_1 when creating scalar copy.
35772 2017-02-03  Walter Lee  <walt@tilera.com>
35774         PR target/78862
35775         * config/tilegx/tilegx.md (tilegx_expand_prologue): Add blockage
35776         after initial stackframe link reg save.
35777         * config/tilepro/tilepro.md (tilepro_expand_prologue): Likewise.
35779 2017-02-03  Jakub Jelinek  <jakub@redhat.com>
35781         PR target/79354
35782         * config/rs6000/rs6000.md (movsi_from_sf): Use wb constraint instead of
35783         wu for stxssp alternative.
35785 2017-02-03  Martin Sebor  <msebor@redhat.com>
35787         PR tree-optimization/79352
35788         * gimple-fold.c (get_range_strlen): Add argument.
35789         (get_range_strlen): Change return type to bool.
35790         (get_maxval_strlen): Pass in a dummy argument.
35791         * gimple-fold.h (get_range_strlen): Change return type to bool.
35792         * gimple-ssa-sprintf.c (get_string_length): Set unlikely counter.
35793         * tree.h (array_at_struct_end_p): Add argument.
35794         * tree.c (array_at_struct_end_p): Handle it.
35796 2017-02-03  Martin Liska  <mliska@suse.cz>
35798         PR lto/66295
35799         * multiple_target.c (create_dispatcher_calls): Redirect edge
35800         from a caller of a dispatcher.
35801         (expand_target_clones): Make the clones local.
35802         (ipa_target_clone): Do both target clones and resolvers.
35803         (ipa_dispatcher_calls): Remove the pass.
35804         (pass_dispatcher_calls::gate): Likewise.
35805         (make_pass_dispatcher_calls): Likewise.
35806         * passes.def (pass_target_clone): Put as very first IPA early
35807         pass.
35809 2017-02-03  Martin Liska  <mliska@suse.cz>
35811         * symtab.c (symtab_node::binds_to_current_def_p): Bail out
35812         in case of a function with ifunc attribute.
35814 2017-02-03  Martin Liska  <mliska@suse.cz>
35816         * cgraph.c (cgraph_node::dump): Dump function version info.
35817         * symtab.c (symtab_node::dump_base): Add missing new line.
35819 2017-02-02  Jan Hubicka  <hubicka@ucw.cz>
35821         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): New function.
35822         (ifcombine_ifandif): Use it.
35824 2017-02-03  Martin Liska  <mliska@suse.cz>
35826         * doc/invoke.texi: Document default value for
35827         use-after-scope-direct-emission-threshold.
35829 2017-02-03  Martin Liska  <mliska@suse.cz>
35831         PR tree-optimization/79339
35832         * gimple-ssa-sprintf.c (format_floating_max): Call mpfr_clear.
35833         (format_floating): Likewise.
35835 2017-02-03  Martin Liska  <mliska@suse.cz>
35837         PR ipa/79337
35838         * ipa-prop.c (ipa_node_params_t::insert): Remove current
35839         implementation.
35840         (ipa_node_params_t::remove): Likewise.
35841         * ipa-prop.h (ipa_node_params::ipa_node_params): Make default
35842         initialization from removed ipa_node_params_t::insert.
35843         (ipa_node_params::~ipa_node_params): Move from removed
35844         ipa_node_params_t::release.
35845         * symbol-summary.h (symbol_summary::m_released): New member.
35846         Do not release a summary twice.  Do not allow to call finalizer
35847         for types of a summary that live in GGC memory.
35849 2017-02-02  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
35851         * config/aarch64/aarch64.c (thunderx2t99_tunings): Enable AES and
35852         cmp_branch fusion.
35854 2017-02-02  Martin Sebor  <msebor@redhat.com>
35856         PR middle-end/79275
35857         * gimple-ssa-sprintf.c (get_string_length): Set lower bound to zero.
35858         (format_string): Tighten up the range of output for non-constant
35859         strings and correct the expected range for wide non-constant strings.
35861 2017-02-02  Martin Sebor  <msebor@redhat.com>
35863         * doc/invoke.texi (-maccumulate-args): Fix bad grammar.
35865         PR middle-end/32003
35866         * doc/invoke.texi (-fdump-tree-): Remove pass-specific options from
35867         index.
35868         (-fdump-tree-@var): Add to index and document how to come up
35869         with pass-specific option and dump file names.
35870         (-fdump-passes): Clarify where to look for output.
35872 2017-02-02  Jan Hubicka  <hubicka@ucw.cz>
35874         PR middle-end/77445
35875         * tree-ssa-threadbackward.c (profitable_jump_thread_path): Dump
35876         statistics of the analyzed path; allow threading for speed when
35877         any of BBs along the path are optimized for speed.
35879 2017-02-02  Eric Botcazou  <ebotcazou@adacore.com>
35881         PR middle-end/78468
35882         * emit-rtl.c (init_emit): Add ??? comment for problematic alignment
35883         settings of the virtual registers.
35885         Revert again
35886         2016-08-23  Dominik Vogt  <vogt@linux.vnet.ibm.com>
35888         * explow.c (get_dynamic_stack_size): Take known alignment of stack
35889         pointer + STACK_DYNAMIC_OFFSET into account when calculating the size
35890         needed.
35892 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35894         * config/s390/vx-builtins.md ("vec_ceil", "vec_floor")
35895         ("vec_trunc", "vec_roundc", "vec_round"): Remove expanders.
35897 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35899         * config/s390/s390.md: Add missing comments with the expanded
35900         mnemonics.
35901         * config/s390/vector.md: Likewise.
35902         * config/s390/vx-builtins.md: Likewise.
35904 2017-02-02  Jakub Jelinek  <jakub@redhat.com>
35906         PR target/79197
35907         * config/rs6000/rs6000.md (*fixuns_trunc<mode>di2_fctiduz): Rename to ...
35908         (fixuns_trunc<mode>di2): ... this, remove previous expander.  Put all
35909         conditions on a single line.
35911 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35913         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
35914         __S390_VX__ to __VX__.
35916 2017-02-01  Andrew Pinski  <apinski@cavium.com>
35918         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost): Pass
35919         stmt_info to record_stmt_cost.
35920         (vect_get_known_peeling_cost): Pass stmt_info if known to
35921         record_stmt_cost.
35922         * config/aarch64/aarch64-protos.h (cpu_vector_cost): Split
35923         cpu_vector_cost field into
35924         scalar_int_stmt_cost and scalar_fp_stmt_cost.  Split vec_stmt_cost
35925         field into vec_int_stmt_cost and vec_fp_stmt_cost.
35926         * config/aarch64/aarch64.c (generic_vector_cost): Update for the
35927         splitting of scalar_stmt_cost and vec_stmt_cost.
35928         (thunderx_vector_cost): Likewise.
35929         (cortexa57_vector_cost): LIkewise.
35930         (exynosm1_vector_cost): Likewise.
35931         (xgene1_vector_cost): Likewise.
35932         (thunderx2t99_vector_cost): Improve after the splitting of the two
35933         fields.
35934         (aarch64_builtin_vectorization_cost): Update for the splitting of
35935         scalar_stmt_cost and vec_stmt_cost.
35937 2017-02-01  Torvald Riegel  <triegel@redhat.com>
35938             Richard Henderson  <rth@redhat.com>
35940         * builtins.c (fold_builtin_atomic_always_lock_free): Make "lock-free"
35941         conditional on existance of a fast atomic load.
35942         * optabs-query.c (can_atomic_load_p): New function.
35943         * optabs-query.h (can_atomic_load_p): Declare it.
35944         * optabs.c (expand_atomic_exchange): Always delegate to libatomic if
35945         no fast atomic load is available for the particular size of access.
35946         (expand_atomic_compare_and_swap): Likewise.
35947         (expand_atomic_load): Likewise.
35948         (expand_atomic_store): Likewise.
35949         (expand_atomic_fetch_op): Likewise.
35950         * testsuite/lib/target-supports.exp
35951         (check_effective_target_sync_int_128): Remove x86 because it provides
35952         no fast atomic load.
35953         (check_effective_target_sync_int_128_runtime): Likewise.
35955 2017-02-01  Richard Biener  <rguenther@suse.de>
35957         * graphite.c: Include tree-vectorizer.h for find_loop_location.
35958         (graphite_transform_loops): Provide opt-info for optimized nests.
35959         * tree-parloop.c (parallelize_loops): Provide opt-info for
35960         parallelized loops.
35962 2017-02-01  Richard Biener  <rguenther@suse.de>
35964         PR middle-end/79315
35965         * tree-cfg.c (move_stmt_op): Never set TREE_BLOCK when it
35966         was not set before.
35968 2017-02-01  Richard Biener  <rguenther@suse.de>
35970         PR tree-optimization/71824
35971         * graphite-scop-detection.c (scop_detection::build_scop_breadth):
35972         Verify the loops are valid in the merged SESE region.
35973         (scop_detection::can_represent_loop_1): Check analyzing the
35974         evolution of the number of iterations in the region succeeds.
35976 2017-01-31  Ian Lance Taylor  <iant@golang.org>
35978         * config/i386/i386.c (ix86_expand_split_stack_prologue): Add
35979         REG_ARGS_SIZE note to 32-bit push insns and call insn.
35981 2017-01-31  David Malcolm  <dmalcolm@redhat.com>
35983         PR preprocessor/79210
35984         * input.c (get_substring_ranges_for_loc): Replace line_width
35985         assertion with error-handling.
35987 2017-01-31  Richard Biener  <rguenther@suse.de>
35989         PR tree-optimization/77318
35990         * graphite-sese-to-poly.c (extract_affine): Fix assert.
35991         (create_pw_aff_from_tree): Take loop parameter.
35992         (add_condition_to_pbb): Pass loop of the condition to
35993         create_pw_aff_from_tree.
35995 2017-01-31  Jakub Jelinek  <jakub@redhat.com>
35997         * config/s390/s390.c (s390_asan_shadow_offset): New function.
35998         (TARGET_ASAN_SHADOW_OFFSET): Redefine.
36000 2017-01-31  Michael Meissner  <meissner@linux.vnet.ibm.com>
36002         PR target/78597
36003         PR target/79038
36004         * config/rs6000/rs6000-protos.h (convert_float128_to_int): Delete,
36005         no longer used.
36006         (convert_int_to_float128): Likewise.
36007         * config/rs6000/rs6000.c (convert_float128_to_int): Likewise.
36008         (convert_int_to_float128): Likewise.
36009         * config/rs6000/rs6000.md (UNSPEC_IEEE128_MOVE): Likewise.
36010         (UNSPEC_IEEE128_CONVERT): Likewise.
36011         (floatsi<mode>2, FLOAT128 iterator): Bypass calling
36012         rs6000_expand_float128_convert if we have IEEE 128-bit hardware.
36013         Use local variables for IBM extended format.
36014         (fix_trunc<mode>si2, FLOAT128 iterator): Likewise.
36015         (fix_trunc<mode>si2_fprs): Likewise.
36016         (fixuns_trunc<IEEE128:mode><SDI:mode>2): Likewise.
36017         (floatuns<IEEE128:mode>2, IEEE128 iterator): Likewise.
36018         (fix<uns>_<mode>si2_hw): Rework the IEEE 128-bt hardware support
36019         to know that we can now have integers of all sizes in vector
36020         registers.
36021         (fix<uns>_<mode>di2_hw): Likewise.
36022         (float<uns>_<mode>si2_hw): Likewise.
36023         (fix_<mode>si2_hw): Likewise.
36024         (fixuns_<mode>si2_hw): Likewise.
36025         (float<uns>_<mode>di2_hw): Likewise.
36026         (float_<mode>di2_hw): Likewise.
36027         (float_<mode>si2_hw): Likewise.
36028         (floatuns_<mode>di2_hw): Likewise.
36029         (floatuns_<mode>si2_hw): Likewise.
36030         (xscvqp<su>wz_<mode>): Delete, no longer used.
36031         (xscvqp<su>dz_<mode>): Likewise.
36032         (xscv<su>dqp_<mode>): Likewise.
36033         (ieee128_mfvsrd_64bit): Likewise.
36034         (ieee128_mfvsrd_32bit): Likewise.
36035         (ieee128_mfvsrwz): Likewise.
36036         (ieee128_mtvsrw): Likewise.
36037         (ieee128_mtvsrd_64bit): Likewise.
36038         (ieee128_mtvsrd_32bit): Likewise.
36040 2017-01-31  Martin Liska  <mliska@suse.cz>
36042         PR ipa/79285
36043         * ipa-prop.c (ipa_free_all_node_params): Call release method
36044         instead of ~sumbol_summary to not to trigger double times
36045         dtor of hash_map.
36047 2017-01-31  Aldy Hernandez  <aldyh@redhat.com>
36049         PR tree-optimization/71691
36050         * bitmap.h (class auto_bitmap): New.
36051         * tree-ssa-loop-unswitch.c (tree_may_unswitch_on): Call
36052         is_maybe_undefined instead of ssa_undefined_value_p.
36054 2017-01-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
36056         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
36057         __S390_ARCH_LEVEL__ to __ARCH__.
36059 2017-01-31  Jakub Jelinek  <jakub@redhat.com>
36061         PR tree-optimization/79267
36062         * value-prof.c (gimple_ic): Only drop lhs for noreturn calls
36063         if should_remove_lhs_p is true.
36065 2017-01-30  Alexandre Oliva  <aoliva@redhat.com>
36067         PR debug/63238
36068         * dwarf2out.c (clone_as_declaration): Drop DW_AT_alignment.
36069         (add_alignment_attribute): New.
36070         (base_type_die): Add alignment attribute.
36071         (subrange_type_die): Likewise.
36072         (modified_type_die): Likewise.
36073         (gen_array_type_die): Likewise.
36074         (gen_descr_array_type_die: Likewise.
36075         (gen_enumeration_type_die): Likewise.
36076         (gen_subprogram_die): Likewise.
36077         (gen_variable_die): Likewise.
36078         (gen_field_die): Likewise.
36079         (gen_ptr_to_mbr_type_die): Likewise.
36080         (gen_struct_or_union_type_die): Likewise.
36081         (gen_subroutine_type_die): Likewise.
36082         (gen_typedef_die): Likewise.
36083         (base_type_cmp): Compare alignment attribute.
36085 2017-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
36087         PR target/79170
36088         * config/rs6000/altivec.md (*setb_internal): Rename to setb_signed.
36089         (setb_unsigned) New pattern for setb with CCUNS.
36090         * config/rs6000/rs6000.c (expand_block_compare): Use a different
36091         subfc./subfe sequence to avoid overflow problems.  Generate a
36092         shorter sequence with cmpld/setb for power9.
36093         * config/rs6000/rs6000.md (subf<mode>3_carry_dot2): Add a new pattern
36094         for generating subfc. instruction.
36095         (cmpstrsi): Add TARGET_POPCNTD predicate as the generate sequence
36096         now uses this instruction.
36098 2017-01-30  Ian Lance Taylor  <iant@google.com>
36100         PR debug/79289
36101         * dwarf2out.c (gen_type_die_with_usage): When picking a variant
36102         for FUNCTION_TYPE/METHOD_TYPE, use the first matching one.
36104 2017-01-30  Martin Sebor  <msebor@redhat.com>
36106         * gimple-ssa-sprintf.c (fmtresult::adjust_for_width_or_precision):
36107         Move constant to the right of a relational operator.
36108         (get_mpfr_format_length, format_character, format_string): Ditto.
36109         (should_warn_p, maybe_warn): Same.
36111         * doc/invoke.texi (-Wformat-truncation=1): Fix typo.
36113 2017-01-30  Maxim Ostapenko  <m.ostapenko@samsung.com>
36115         PR lto/79061
36116         * asan.c (get_translation_unit_decl): Remove function.
36117         (asan_add_global): Force has_dynamic_init to zero in LTO mode.
36119 2017-01-30  Martin Liska  <mliska@suse.cz>
36121         PR gcov-profile/79259
36122         * opts.c (common_handle_option): Enable flag_ipa_bit_cp w/
36123         -fprofile-generate.
36125 2017-01-30  Martin Liska  <mliska@suse.cz>
36127         PR bootstrap/78985
36128         * config/aarch64/cortex-a57-fma-steering.c (func_fma_steering::analyze):
36129         Initialize variables with NULL value.
36131 2017-01-30  Richard Earnshaw  <rearnsh@arm.com>
36133         PR target/79260
36134         * config.gcc (arm*-*-*): Add arm/arm-flags.h and arm/arm-isa.h to
36135         tm_p_file.
36136         * arm/arm-protos.h: Don't directly include arm-flags.h and arm-isa.h.
36138 2017-01-30  Richard Biener  <rguenther@suse.de>
36140         PR tree-optimization/79276
36141         * tree-vrp.c (process_assert_insertions): Properly adjust common
36142         when removing a duplicate.
36144 2017-01-30  Richard Biener  <rguenther@suse.de>
36146         PR tree-optimization/79256
36147         * targhooks.c (default_builtin_vector_alignment_reachable): Honor
36148         BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
36149         alignment on TYPE.
36150         * tree.c (build_aligned_type): Set TYPE_USER_ALIGN.
36152 2017-01-30  Dominik Vogt  <vogt@linux.vnet.ibm.com>
36154         PR target/79240
36155         * config/s390/s390.md ("*r<noxa>sbg_<mode>_srl_bitmask")
36156         ("*r<noxa>sbg_<mode>_sll_bitmask")
36157         ("*extzv_<mode>_srl<clobbercc_or_nocc>")
36158         ("*extzv_<mode>_sll<clobbercc_or_nocc>"):
36159         Use contiguous_bitmask_nowrap_operand.
36161 2017-01-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
36163         PR target/79268
36164         * config/rs6000/altivec.h (vec_xl): Revise #define.
36165         (vec_xst): Likewise.
36167 2017-01-27  Uros Bizjak  <ubizjak@gmail.com>
36169         * config/i386/i386.c (print_reg): Use REGNO instead of true_regnum.
36171 2017-01-27  Bernd Schmidt  <bschmidt@redhat.com>
36173         PR rtl-optimization/79194
36174         * cprop.c (one_cprop_pass): Move deletion of code after unconditional
36175         traps before call to bypass_conditional_jumps.
36177 2017-01-27  Vladimir Makarov  <vmakarov@redhat.com>
36179         PR tree-optimization/71374
36180         * lra-constraints.c (check_conflict_input_operands): New.
36181         (match_reload): Use it.
36183 2017-01-27  Vladimir Makarov  <vmakarov@redhat.com>
36185         PR target/79131
36186         * lra-assigns.c (find_hard_regno_for_1): Take endianess for into
36187         account to calculate conflict_set.
36189 2017-01-27  Bin Cheng  <bin.cheng@arm.com>
36191         PR rtl-optimization/78559
36192         * combine.c (try_combine): Discard REG_EQUAL and REG_EQUIV for
36193         other_insn in combine.
36195 2017-01-27  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
36197         * builtin-types.def: Use unsigned_char_type_node for BT_UINT8.  Use
36198         uint16_type_node for BT_UINT16.
36200 2017-01-27  David Malcolm  <dmalcolm@redhat.com>
36202         * doc/sourcebuild.texi (Testsuites): Add "GIMPLE Tests" and
36203         "RTL Tests" to menu.
36204         (GIMPLE Tests): New node.
36205         (RTL Tests): New node.
36207 2017-01-27  Richard Biener  <rguenther@suse.de>
36209         PR tree-optimization/79245
36210         * tree-loop-distribution.c (distribute_loop): Apply cost
36211         modeling also to detected patterns.
36213 2017-01-27  Richard Biener  <rguenther@suse.de>
36215         PR tree-optimization/71433
36216         * tree-vrp.c (register_new_assert_for): Revert earlier changes.
36217         (compare_assert_loc): New function.
36218         (process_assert_insertions): Sort and optimize assert locations
36219         to remove duplicates and push down identical assertions on
36220         edges to their destination block.
36222 2017-01-27  Richard Biener  <rguenther@suse.de>
36224         PR tree-optimization/79244
36225         * tree-vrp.c (remove_range_assertions): Forcefully propagate
36226         out SSA names even if abnormal.
36228 2017-01-27  Jakub Jelinek  <jakub@redhat.com>
36230         * realmpfr.h: Poison MPFR_RND{N,Z,U,D}.
36231         * gimple-ssa-sprintf.c (format_floating_max): Use GMP_RNDN
36232         instead of MPFR_RNDN.
36234 2017-01-27  Richard Earnshaw  <rearnsha@arm.com>
36236         PR target/79239
36237         * arm.c (arm_option_override): Don't call build_target_option_node
36238         until after doing all option overrides.
36239         (arm_valid_target_attribute_tree): Likewise.
36241 2017-01-27  Martin Liska  <mliska@suse.cz>
36243         * doc/invoke.texi (-fprofile-arcs): Document profiling support
36244         for {cd}tors and C++ {cd}tors.
36246 2017-01-27  Dominik Vogt  <vogt@linux.vnet.ibm.com>
36248         * config/s390/s390.md ("*setmem_long_and")
36249         ("*setmem_long_and_31z"): Use zero_extend instead of and.
36251 2017-01-26  Martin Sebor  <msebor@redhat.com>
36253         * gimple-ssa-sprintf.c (format_floating): Simplify the computation
36254         of precision.
36256 2017-01-26  Martin Sebor  <msebor@redhat.com>
36258         * gimple-ssa-sprintf.c (format_floating): Test HAVE_XFmode and
36259         HAVE_DFmode before using XFmode or DFmode.
36260         (parse_directive): Avoid using the z length modifier to avoid
36261         the ISO C++98 does not support the â€˜z’ gnu_printf length modifier.
36263         PR middle-end/78703
36264         * gimple-ssa-sprintf.c (adjust_for_width_or_precision): Change
36265         to accept adjustment as an array.
36266         (get_int_range): New function.
36267         (struct directive): Make width and prec arrays.
36268         (directive::set_width, directive::set_precision): Call get_int_range.
36269         (format_integer, format_floating): Handle width and precision ranges.
36270         (format_string, parse_directive): Same.
36272 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
36274         PR debug/79129
36275         * dwarf2out.c (generate_skeleton_bottom_up): For children with
36276         comdat_type_p set, just clone them, but keep the children in the
36277         original DIE.
36279         PR debug/78835
36280         * dwarf2out.c (prune_unused_types): Mark all functions with DIEs
36281         which have direct callers with -fvar-tracking-assignments enabled
36282         in the current TU.
36283         (resolve_addr): Avoid adding skeleton DIEs for DW_AT_call_origin
36284         inside of type units.
36286 2017-01-26  Martin Sebor  <msebor@redhat.com>
36288         PR middle-end/78703
36289         * gimple-ssa-sprintf.c (struct result_range): Add likely and
36290         unlikely counters.
36291         (struct format_result): Replace number_chars, number_chars_min,
36292         and number_chars_max with a single member of struct result_range.
36293         Remove bounded.
36294         (format_result::operator+=): Adjust.
36295         (struct fmtresult): Remove bounded.  Handle likely and unlikely
36296         counters.
36297         (fmtresult::adjust_for_width_or_precision): New function.
36298         (fmtresult:type_max_digits): New function.
36299         (bytes_remaining): Handle likely and unlikely counters.
36300         (min_bytes_remaining): Remove.
36301         (format_percent): Simplify.
36302         (format_integer, format_floating): Set likely and unlikely counters.
36303         (get_string_length, format_character, format_string): Same.
36304         (format_plain, should_warn_p): New function.
36305         (maybe_warn): Call should_warn_p.  Update diagnostic messages
36306         and handle those for all directives, including plain strings.
36307         (format_directive): Handle likely and unlikely counters.
36308         Remove unnecessary quoting from diagnostics.  Add an informational
36309         note.
36310         (add_bytes): Remove.
36311         (pass_sprintf_length::compute_format_length): Simplify.
36312         (try_substitute_return_value): Handle likely and unlikely counters.
36314 2017-01-26  Carl Love  <cel@us.ibm.com>
36316         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Remove
36317         bogus entries for the P8V_BUILTIN_VEC_VGBBD built-ins
36319 2017-01-26  Vladimir Makarov  <vmakarov@redhat.com>
36321         PR target/79131
36322         * lra-assigns.c (setup_live_pseudos_and_spill_after_risky): Take
36323         endianess for subregs into account.
36324         * lra-constraints.c (lra_constraints): Do risky transformations
36325         always on the first iteration.
36326         * lra-lives.c (check_pseudos_live_through_calls): Add arg
36327         last_call_used_reg_set.
36328         (process_bb_lives): Define and use last_call_used_reg_set.
36329         * lra.c (lra): Always continue after lra_constraints on the first
36330         iteration.
36332 2017-01-26  Kirill Yukhin  <kirill.yukhin@gmail.com>
36334         * gcc.target/i386/avx512bw-kshiftlq-2.c: Use unsigned long long
36335         constant.
36336         * gcc.target/i386/avx512bw-kshiftrq-2.c: Ditto.
36338 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
36340         * config/i386/avx512fintrin.h (_ktest_mask16_u8,
36341         _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): Move to ...
36342         * config/i386/avx512dqintrin.h (_ktest_mask16_u8,
36343         _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): ... here.
36344         * config/i386/i386-builtin.def (__builtin_ia32_ktestchi,
36345         __builtin_ia32_ktestzhi, __builtin_ia32_kaddhi): Use
36346         OPTION_MASK_ISA_AVX512DQ instead of OPTION_MASK_ISA_AVX512F.
36347         * config/i386/sse.md (SWI1248_AVX512BWDQ2): New mode iterator.
36348         (kadd<mode>, ktest<mode>): Use it instead of SWI1248_AVX512BWDQ.
36350 2017-01-26  Marek Polacek  <polacek@redhat.com>
36352         PR c/79199
36353         * fold-const.c (operand_equal_p) [COND_EXPR]: Use OP_SAME_WITH_NULL
36354         for the third operand.
36356 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
36358         PR middle-end/79236
36359         * omp-low.c (struct omp_context): Add simt_stmt field.
36360         (scan_omp_for): Return omp_context *.
36361         (scan_omp_simd): Set simt_stmt on the non-_simt_ SIMD
36362         context to the _simt_ SIMD stmt.
36363         (lower_omp_for): For combined SIMD with sibling _simt_
36364         SIMD, make sure to use the same decls in _looptemp_
36365         clauses as in the sibling.
36367 2017-01-26  David Sherwood  <david.sherwood@arm.com>
36369         PR middle-end/79212
36370         * gimplify.c (omp_notice_variable): Add GOVD_SEEN flag to variables in
36371         all contexts.
36373 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
36375         PR target/70465
36376         * reg-stack.c (emit_swap_insn): Instead of fld a; fld b; fxchg %st(1);
36377         emit fld b; fld a; if possible.
36379         * brig-builtins.def: Update copyright years.
36380         * config/arm/arm_acle_builtins.def: Update copyright years.
36382 2017-01-25  Michael Meissner  <meissner@linux.vnet.ibm.com>
36384         PR target/79179
36385         * config/rs6000/vsx.md (vsx_extract_<mode>_store): Use wY
36386         constraint instead of o for the stxsd instruction.
36388 2017-01-25  Carl Love  <cel@us.ibm.com>
36390         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Fix order
36391         of entries for ALTIVEC_BUILTIN_VEC_PACKS and P8V_BUILTIN_VEC_VGBBD.
36393 2017-01-25  Jonathan Wakely  <jwakely@redhat.com>
36395         * doc/invoke.texi (C++ Dialect Options): Fix typo.
36397 2017-01-25  Richard Biener  <rguenther@suse.de>
36399         PR tree-optimization/69264
36400         * target.def (vector_alignment_reachable): Improve documentation.
36401         * doc/tm.texi: Regenerate.
36402         * targhooks.c (default_builtin_vector_alignment_reachable): Simplify
36403         and add a comment.
36404         * tree-vect-data-refs.c (vect_supportable_dr_alignment): Revert
36405         earlier changes with respect to TYPE_USER_ALIGN.
36406         (vector_alignment_reachable_p): Likewise.  Improve dumping.
36408 2016-01-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
36410         PR target/79145
36411         * config/arm/arm.md (xordi3): Force constant operand into a register
36412         for TARGET_IWMMXT.
36414 2016-01-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
36416         * doc/invoke.texi (-fstore-merging): Correct default optimization
36417         levels at which it is enabled.
36418         (-O): Move -fstore-merging from list to...
36419         (-O2): ... Here.
36421 2017-01-25  Richard Biener  <rguenther@suse.de>
36423         PR debug/78363
36424         * omp-expand.c: Include debug.h.
36425         (expand_omp_taskreg): Make sure to generate early debug before
36426         outlining anything from a function.
36427         (expand_omp_target): Likewise.
36428         (grid_expand_target_grid_body): Likewise.
36430 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
36432         PR lto/79061
36433         * asan.c (get_translation_unit_decl): New function.
36434         (asan_add_global): Extract modules file name from globals
36435         TRANSLATION_UNIT_DECL name.
36437 2017-01-24  Eric Botcazou  <ebotcazou@adacore.com>
36439         PR target/77439
36440         * config/arm/arm.c (arm_function_ok_for_sibcall): Add back restriction
36441         for long calls with APCS frame and VFP.
36443 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
36445         * cfg.c (original_copy_tables_initialized_p): New function.
36446         * cfg.h (original_copy_tables_initialized_p): New decl.
36447         * cfgrtl.c (relink_block_chain): Guard the call to
36448         free_original_copy_tables with a call to
36449         original_copy_tables_initialized_p.
36450         * cgraph.h (symtab_node::native_rtl_p): New decl.
36451         * cgraphunit.c (symtab_node::native_rtl_p): New function.
36452         (symtab_node::needed_p): Don't assert for early assembly output
36453         for __RTL functions.
36454         (cgraph_node::finalize_function): Set "force_output" for __RTL
36455         functions.
36456         (cgraph_node::analyze): Bail out early for __RTL functions.
36457         (analyze_functions): Update assertion to support __RTL functions.
36458         (cgraph_node::expand): Bail out early for __RTL functions.
36459         * final.c (rest_of_clean_state): Don't call delete_tree_ssa for
36460         __RTL functions.
36461         * function.h (struct function): Update comment for field
36462         "pass_startwith".
36463         * gimple-expr.c: Include "tree-pass.h".
36464         (gimple_has_body_p): Return false for __RTL functions.
36465         * Makefile.in (OBJS): Add run-rtl-passes.o.
36466         * pass_manager.h (gcc::pass_manager::get_rest_of_compilation): New
36467         accessor.
36468         (gcc::pass_manager::get_clean_slate): New accessor.
36469         * passes.c: Include "insn-addr.h".
36470         (should_skip_pass_p): Add logging.  Update logic for running
36471         "expand" to be compatible with both __GIMPLE and __RTL.  Guard
36472         property-provider override so it is only done for gimple passes.
36473         Don't skip dfinit.
36474         (skip_pass): New function.
36475         (execute_one_pass): Call skip_pass when skipping passes.
36476         * read-md.c (md_reader::read_char): Support filtering
36477         the input to a subset of line numbers.
36478         (md_reader::md_reader): Initialize fields
36479         m_first_line and m_last_line.
36480         (md_reader::read_file_fragment): New function.
36481         * read-md.h (md_reader::read_file_fragment): New decl.
36482         (md_reader::m_first_line): New field.
36483         (md_reader::m_last_line): New field.
36484         * read-rtl-function.c (function_reader::create_function): Only
36485         create cfun if it doesn't already exist.  Set PROP_rtl on cfun's
36486         curr_properties.  Set DECL_INITIAL to a dummy block.
36487         (read_rtl_function_body_from_file_range): New function.
36488         * read-rtl-function.h (read_rtl_function_body_from_file_range):
36489         New decl.
36490         * run-rtl-passes.c: New file.
36491         * run-rtl-passes.h: New file.
36493 2017-01-24  Jeff Law  <law@redhat.com>
36495         * config/microblaze/microblaze.h (ASM_FORMAT_PRIVATE_NAME): Increase
36496         buffer size.
36498 2017-01-24  Bin Cheng  <bin.cheng@arm.com>
36500         PR tree-optimization/79159
36501         * tree-ssa-loop-niter.c (get_cst_init_from_scev): New function.
36502         (record_nonwrapping_iv): Improve boundary using above function if no
36503         value range information.
36505 2017-01-24  Pekka Jääskeläinen  <pekka@parmance.com>
36506             Martin Jambor  <mjambor@suse.cz>
36508         * brig-builtins.def: New file.
36509         * builtins.def (DEF_HSAIL_BUILTIN): New macro.
36510         (DEF_HSAIL_ATOMIC_BUILTIN): Likewise.
36511         (DEF_HSAIL_SAT_BUILTIN): Likewise.
36512         (DEF_HSAIL_INTR_BUILTIN): Likewise.
36513         (DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN): Likewise.
36514         * builtin-types.def (BT_INT8): New.
36515         (BT_INT16): Likewise.
36516         (BT_UINT8): Likewise.
36517         (BT_UINT16): Likewise.
36518         (BT_FN_ULONG): Likewise.
36519         (BT_FN_UINT_INT): Likewise.
36520         (BT_FN_UINT_ULONG): Likewise.
36521         (BT_FN_UINT_LONG): Likewise.
36522         (BT_FN_UINT_PTR): Likewise.
36523         (BT_FN_ULONG_PTR): Likewise.
36524         (BT_FN_INT8_FLOAT): Likewise.
36525         (BT_FN_INT16_FLOAT): Likewise.
36526         (BT_FN_UINT32_FLOAT): Likewise.
36527         (BT_FN_UINT16_FLOAT): Likewise.
36528         (BT_FN_UINT8_FLOAT): Likewise.
36529         (BT_FN_UINT64_FLOAT): Likewise.
36530         (BT_FN_UINT16_UINT32): Likewise.
36531         (BT_FN_UINT32_UINT16): Likewise.
36532         (BT_FN_UINT16_UINT16_UINT16): Likewise.
36533         (BT_FN_INT_PTR_INT): Likewise.
36534         (BT_FN_UINT_PTR_UINT): Likewise.
36535         (BT_FN_LONG_PTR_LONG): Likewise.
36536         (BT_FN_ULONG_PTR_ULONG): Likewise.
36537         (BT_FN_VOID_UINT64_UINT64): Likewise.
36538         (BT_FN_UINT8_UINT8_UINT8): Likewise.
36539         (BT_FN_INT8_INT8_INT8): Likewise.
36540         (BT_FN_INT16_INT16_INT16): Likewise.
36541         (BT_FN_INT_INT_INT): Likewise.
36542         (BT_FN_UINT_FLOAT_UINT): Likewise.
36543         (BT_FN_FLOAT_UINT_UINT): Likewise.
36544         (BT_FN_ULONG_UINT_UINT): Likewise.
36545         (BT_FN_ULONG_UINT_PTR): Likewise.
36546         (BT_FN_ULONG_ULONG_ULONG): Likewise.
36547         (BT_FN_UINT_UINT_UINT): Likewise.
36548         (BT_FN_VOID_UINT_PTR): Likewise.
36549         (BT_FN_UINT_UINT_PTR: Likewise.
36550         (BT_FN_UINT32_UINT64_PTR): Likewise.
36551         (BT_FN_INT_INT_UINT_UINT): Likewise.
36552         (BT_FN_UINT_UINT_UINT_UINT): Likewise.
36553         (BT_FN_UINT_UINT_UINT_PTR): Likewise.
36554         (BT_FN_UINT_ULONG_ULONG_UINT): Likewise.
36555         (BT_FN_ULONG_ULONG_ULONG_ULONG): Likewise.
36556         (BT_FN_LONG_LONG_UINT_UINT): Likewise.
36557         (BT_FN_ULONG_ULONG_UINT_UINT): Likewise.
36558         (BT_FN_VOID_UINT32_UINT64_PTR): Likewise.
36559         (BT_FN_VOID_UINT32_UINT32_PTR): Likewise.
36560         (BT_FN_UINT_UINT_UINT_UINT_UINT): Likewise.
36561         (BT_FN_UINT_FLOAT_FLOAT_FLOAT_FLOAT): Likewise.
36562         (BT_FN_ULONG_ULONG_ULONG_UINT_UINT): Likewise.
36563         * doc/frontends.texi: List BRIG FE.
36564         * doc/install.texi (Testing): Add BRIG tesring requirements.
36565         * doc/invoke.texi (Overall Options): Mention BRIG.
36566         * doc/standards.texi (Standards): Doucment BRIG HSA version.
36568 2017-01-24  Richard Biener  <rguenther@suse.de>
36570         PR translation/79208
36571         * ipa-devirt.c (odr_types_equivalent_p): Fix typo in diagnostic.
36573 2017-01-24  Martin Jambor  <mjambor@suse.cz>
36575         PR bootstrap/79198
36576         * ipa-prop.c (ipa_free_all_node_params): Call summary destructor.
36577         * ipa-prop.c (ipa_node_params_t::insert): Initialize fields known_csts
36578         and known_contexts.
36580 2017-01-24  Aldy Hernandez  <aldyh@redhat.com>
36582         PR middle-end/79123
36583         * gimple-ssa-warn-alloca.c (alloca_call_type): Make sure
36584         casts from signed to unsigned really don't have a range.
36586 2017-01-24  Markus Trippelsdorf  <markus@trippelsdorf.de>
36588         * gimple-ssa-sprintf.c (format_floating): Change MPFR_RNDx to
36589         GMP_RNDx for compatiblity.
36591 2017-01-24  Martin Liska  <mliska@suse.cz>
36593         PR bootstrap/79132
36594         * tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Insert assert
36595         that would prevent us to call alloca with -1 as argument.
36597 2017-01-24  Jakub Jelinek  <jakub@redhat.com>
36599         * dwarf2out.c (output_compilation_unit_header, output_file_names):
36600         Avoid -Wformat-security warning.
36602 2017-01-23  Andrew Pinski  <apinski@cavium.com>
36604         * config/aarch64/aarch64.c (thunderx2t99_addrcost_table): Improve
36605         cost table.
36607 2017-01-23  Martin Sebor  <msebor@redhat.com>
36609         PR middle-end/78703
36610         * gimple-ssa-sprintf.c (warn_level): New global.
36611         (format_integer): Use it here and throughout the rest of the file.
36612         Use the same switch to compute sign as base.
36613         (maybe_warn): New function.
36614         (format_directive): Factor out warnings into maybe_warn.
36615         Add debugging output.  Use warn_level.
36616         (add_bytes): Use warn_level.
36617         (pass_sprintf_length::compute_format_length): Add debugging output.
36618         (try_substitute_return_value): Same.
36619         (pass_sprintf_length::handle_gimple_call): Set and use warn_level.
36621         PR middle-end/78703
36622         * gimple-ssa-sprintf.c (struct format_result): Remove constant member.
36623         (struct fmtresult, format_integer, format_floating): Adjust.
36624         (fmtresult::fmtresult): Set max correctly in two argument ctor.
36625         (get_string_length, format_string,format_directive): Same.
36626         (pass_sprintf_length::compute_format_length): Same.
36627         (try_substitute_return_value): Simplify slightly.
36629         PR middle-end/78703
36630         * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust formatting.
36631         (fmtresult::operator+=): Outlined.
36632         (struct fmtresult): Add ctors.
36633         (struct conversion_spec): Rename...
36634         (struct directive): ...to this.  Add and remove data members.
36635         (directive::set_width, directive::set_precision): New functions.
36636         (format_percent): Use fmtresult ctor.
36637         (get_width_and_precision): Remove.
36638         (format_integer): Make naming changes.  Avoid computing width and
36639         precision.
36640         (format_floating): Same.  Adjust indentation.
36641         (format_character, format_none): New functions.
36642         (format_string): Moved character handling to format_character.
36643         (format_directive): Remove arguments, change return type.
36644         (parse_directive): New function.
36645         (pass_sprintf_length::compute_format_length): Move directive
36646         parsing to parse_directive.
36648 2017-01-23  Jakub Jelinek  <jakub@redhat.com>
36650         * tree.h (assign_assembler_name_if_neeeded): Rename to ...
36651         (assign_assembler_name_if_needed): ... this.
36652         * tree.c (assign_assembler_name_if_neeeded): Rename to ...
36653         (assign_assembler_name_if_needed): ... this.
36654         (free_lang_data_in_cgraph): Adjust callers.
36655         * cgraphunit.c (cgraph_node::analyze): Likewise.
36656         * omp-expand.c (expand_omp_taskreg, expand_omp_target):
36657         Likewise.
36659 2017-01-23  Richard Biener  <rguenther@suse.de>
36661         PR tree-optimization/79088
36662         PR tree-optimization/79188
36663         * tree-ssa-threadupdate.c (mark_threaded_blocks): Move code
36664         resetting loop bounds after last path deletion.  Reset loop
36665         bounds of the target loop, make code match the comments.
36666         * tree-ssa-threadbackwards.c (pass_early_thread_jumps::execute):
36667         Make sure loops need no fixups.
36669 2017-01-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>
36671         * config/rs6000/rs6000-builtin.def (VSIEDPF): Add scalar insert
36672         exponent support with double type for first argument.
36673         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Changed
36674         type returned by __builtin_vec_extract_sig,
36675         __builtin_vec_extract_sig_sp, and __builtin_vec_extract_sig_dp
36676         functions from "vector int" to "vector unsigned int" or from
36677         "vector long long int" to "vector unsigned long long int".
36678         Changed type returned by __builtin_vec_extract_exp,
36679         __builtin_vec_extract_exp_sp, and __builtin_vec_extract_exp_dp
36680         functions from "vector int" to "vector unsigned int" or from
36681         "vector long long int" to "vector unsigned long long int".
36682         Changed return type of __builtin_vec_test_data_class,
36683         __builtin_vec_test_data_class_sp, and
36684         __builtin_vec_test_data_class_dp from "vector int" to
36685         "vector bool int" or from "vector long long int" to "vector bool
36686         long long int" and changed second argument type from "unsigned
36687         int" to "int".  Added new overloaded function forms "vector float
36688         __builtin_vec_insert_exp (vector float, vector unsigned int)" and
36689         "vector float __builtin_vec_insert_exp_sp (vector float, vector
36690         unsigned int)" and "vector double __builtin_vec_insert_exp (vector
36691         double, vector unsigned long long int)" and "vector double
36692         __builtin_vec_insert_exp_dp (vector double, vector unsigned long
36693         long int)".  Changed return type of
36694         __builtin_scalar_test_data_class and
36695         __builtin_scalar_test_data_class_sp and
36696         __builtin_scalar_test_data_class_dp from "unsigned int" to "bool
36697         int" and changed second argument from "unsigned int" to "int".
36698         Changed type returned by __builtin_scalar_test_neg,
36699         __builtin_scalar_test_neg_sp, and __builtin_scalar_test_neg_dp
36700         from "int" to "bool int".  Added new overloaded function form
36701         "double __builtin_scalar_insert_exp (double, unsigned long long int)".
36702         * config/rs6000/vsx.md (xsiexpdpf): New insn for scalar insert
36703         exponent double-precision with floating point first argument.
36704         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
36705         documentation of scalar_test_data_class, scalar_test_neg,
36706         scalar_extract_sig, scalar_extract_exp, scalar_insert_exp,
36707         vector_extract_exp, vec_extract_sig, vec_insert_exp, and
36708         vec_test_data_class built-in functions to reflect refinements in
36709         their type signatures.
36711 2017-01-23  Andreas Tobler  <andreast@gcc.gnu.org>
36713         * config/aarch64/aarch64.c (aarch64_elf_asm_constructor): Increase
36714         size of buf.
36715         (aarch64_elf_asm_destructor): Likewise.
36717 2017-01-23  Bernd Schmidt  <bschmidt@redhat.com>
36719         PR rtl-optimization/78634
36720         * config/i386/i386.c (ix86_max_noce_ifcvt_seq_cost): New function.
36721         (TARGET_MAX_NOCE_IFCVT_SEQ_COST): Define.
36722         * ifcvt.c (noce_try_cmove): Add missing cost check.
36724         PR rtl-optimization/71724
36725         * combine.c (if_then_else_cond): Look for situations where it is
36726         beneficial to undo the work of one of the recursive calls.
36728 2017-01-23  Bin Cheng  <bin.cheng@arm.com>
36730         PR tree-optimization/70754
36731         * tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
36732         (reassociate_to_the_same_stmt): New parameter INSERT_BEFORE.  Insert
36733         combined stmt before it if not NULL.
36734         (combine_chains): Process refs reversely and compute dominance point
36735         for root ref.
36737 2017-01-23  Martin Liska  <mliska@suse.cz>
36739         PR tree-optimization/79196
36740         * tree-ssa-strlen.c (fold_strstr_to_memcmp): Rename to ...
36741         (fold_strstr_to_strncmp): ... this.  Fold the pattern to strncmp
36742         instead of memcmp.
36743         (strlen_optimize_stmt): Call the renamed function.
36745 2017-01-23  Michael Matz  <matz@suse.de>
36747         PR tree-optimization/78384
36748         * tree-ssa-loop-split.c (patch_loop_exit): Use correct edge.
36750 2017-01-23  Richard Biener  <rguenther@suse.de>
36752         PR tree-optimization/79186
36753         * tree-vrp.c (register_new_assert_for): Make sure we've seen
36754         both incoming edges before moving an assert.
36756 2017-01-23  Martin Jambor  <mjambor@suse.cz>
36758         * ipa-prop.c (load_from_param_1): Removed.
36759         (load_from_unmodified_param): Bits from load_from_param_1 put back
36760         here.
36761         (load_from_param): Removed.
36762         (compute_complex_assign_jump_func): Removed stmt2 and just replaced it
36763         with stmt.  Reverted back to use of load_from_unmodified_param.
36765 2017-01-23  Martin Jambor  <mjambor@suse.cz>
36767         PR ipa/79108
36768         * ipa-prop.h (ipa_param_descriptor): Anotate with with GTY(()).
36769         (ipa_node_params): Annotate with GTY((for_user)).  Make descriptors
36770         field a pointer to garbage collected vector, mark lattices and
36771         ipcp_orig_node with GTY((skip)).
36772         (ipa_get_param_count): Adjust to descriptors being a pointer.
36773         (ipa_get_param): Likewise.
36774         (ipa_get_type): Likewise.
36775         (ipa_get_param_move_cost): Likewise.
36776         (ipa_set_param_used): Likewise.
36777         (ipa_get_controlled_uses): Likewise.
36778         (ipa_set_controlled_uses): Likewise.
36779         (ipa_is_param_used): Likewise.
36780         (ipa_node_params_t): Move into garbage collector.  New methods insert
36781         and remove.
36782         (ipa_node_params_sum): Annotate wth GTY(()).
36783         (ipa_check_create_node_params): Adjust to ipa_node_params_sum being
36784         garbage collected.
36785         (ipa_load_from_parm_agg): Adjust declaration.
36786         * ipa-icf.c (param_used_p): Adjust to descriptors being a pointer.
36787         * ipa-profile.c (ipa_profile): Likewise.
36788         * ipa-prop.c (ipa_get_param_decl_index_1): Likewise.
36789         (ipa_populate_param_decls): Make descriptors parameter garbage
36790         collected.
36791         (ipa_dump_param): Adjust to descriptors being a pointer.
36792         (ipa_alloc_node_params): Likewise.
36793         (ipa_initialize_node_params): Likewise.
36794         (load_from_param_1): Make descriptors parameter garbage collected.
36795         (load_from_unmodified_param): Likewise.
36796         (load_from_param): Likewise.
36797         (ipa_load_from_parm_agg): Likewise.
36798         (ipa_node_params::~ipa_node_params): Removed.
36799         (ipa_free_all_node_params): Remove call to delete operator.
36800         (ipa_node_params_t::insert): New.
36801         (ipa_node_params_t::remove): Likewise.
36802         (ipa_node_params_t::duplicate): Adjust to descriptors being a pointer,
36803         copy known_csts and known_contexts vectors.
36804         (ipa_read_node_info): Adjust to descriptors being a pointer.
36805         (ipcp_modif_dom_walker): Make m_descriptors field garbage
36806         collected.
36807         (ipcp_transform_function): Make descriptors variable garbage
36808         collected.
36810 2017-01-23  Andrew Senkevich  <andrew.senkevich@intel.com>
36812         * config/i386/avx512bwintrin.h: Add k-mask test, kortest intrinsics.
36813         * config/i386/avx512dqintrin.h: Ditto.
36814         * config/i386/avx512fintrin.h: Ditto.
36815         * config/i386/i386.c: Handle new builtins.
36816         * config/i386/i386-builtin.def: Add new builtins.
36817         * config/i386/sse.md (ktest<mode>, kortest<mode>): New.
36818         (UNSPEC_KORTEST, UNSPEC_KTEST): New.
36820 2017-01-23  Jakub Jelinek  <jakub@redhat.com>
36821             Martin Liska  <mliska@suse.cz>
36823         * asan.h: Define ASAN_USE_AFTER_SCOPE_ATTRIBUTE.
36824         * asan.c (asan_expand_poison_ifn): Support stores and use
36825         appropriate ASAN report function.
36826         * internal-fn.c (expand_ASAN_POISON_USE): New function.
36827         * internal-fn.def (ASAN_POISON_USE): Declare.
36828         * tree-into-ssa.c (maybe_add_asan_poison_write): New function.
36829         (maybe_register_def): Create ASAN_POISON_USE when sanitizing.
36830         * tree-ssa-dce.c (eliminate_unnecessary_stmts): Remove
36831         ASAN_POISON calls w/o LHS.
36832         * tree-ssa.c (execute_update_addresses_taken): Create clobber
36833         for ASAN_MARK (UNPOISON, &x, ...) in order to prevent usage of a LHS
36834         from ASAN_MARK (POISON, &x, ...) coming to a PHI node.
36835         * gimplify.c (asan_poison_variables): Add attribute
36836         use_after_scope_memory to variables that really needs to live
36837         in memory.
36838         * tree-ssa.c (is_asan_mark_p): Do not rewrite into SSA when
36839         having the attribute.
36841 2017-01-23  Martin Liska  <mliska@suse.cz>
36843         * asan.c (create_asan_shadow_var): New function.
36844         (asan_expand_poison_ifn): Likewise.
36845         * asan.h (asan_expand_poison_ifn): New declaration.
36846         * internal-fn.c (expand_ASAN_POISON): Likewise.
36847         * internal-fn.def (ASAN_POISON): New builtin.
36848         * sanopt.c (pass_sanopt::execute): Expand
36849         asan_expand_poison_ifn.
36850         * tree-inline.c (copy_decl_for_dup_finish): Make function
36851         external.
36852         * tree-inline.h (copy_decl_for_dup_finish): Likewise.
36853         * tree-ssa.c (is_asan_mark_p): New function.
36854         (execute_update_addresses_taken): Rewrite local variables
36855         (identified just by use-after-scope as addressable) into SSA.
36857 2017-01-22  Gerald Pfeifer  <gerald@pfeifer.com>
36859         * doc/install.texi (Specific): opensource.apple.com uses https
36860         now. Remove trailing slash.
36862 2017-01-22  Gerald Pfeifer  <gerald@pfeifer.com>
36864         * README.Portability: Remove note on an Irix compatibility issue.
36866 2017-01-22  Dimitry Andric <dim@FreeBSD.org>
36868         * gcov.c (INCLUDE_ALGORITHM): Define.
36869         (INCLUDE_VECTOR): Define.
36870         No longer include <vector> and <algorithm> directly.
36872 2017-01-21  Gerald Pfeifer  <gerald@pfeifer.com>
36874         * doc/extend.texi (Thread-Local): Change www.akkadia.org reference
36875         to https.
36876         * doc/invoke.texi (Code Gen Options): Ditto.
36878 2017-01-21  Jan Hubicka  <hubicka@ucw.cz>
36880         PR lto/78407
36881         * cfg.c (update_bb_profile_for_threading): Fix updating of probablity.
36883 2017-01-21  Bernd Schmidt  <bschmidt@redhat.com>
36885         rtl-optimization/79125
36886         * cprop.c (local_cprop_pass): Handle cases where we make an
36887         unconditional trap.
36889 2017-01-20  Segher Boessenkool  <segher@kernel.crashing.org>
36891         PR target/61729
36892         PR target/77850
36893         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
36894         read from, for big endian.
36896 2017-01-20  Jiong Wang  <jiong.wang@arm.com>
36898         * config/aarch64/aarch64-builtins.c (aarch64_init_builtins): Register
36899         register pauth builtins for LP64 only.
36901 2017-01-20  Marek Polacek  <polacek@redhat.com>
36903         PR c/79152
36904         * gimplify.c (should_warn_for_implicit_fallthrough): Handle consecutive
36905         non-case labels.
36907 2017-01-20  Alexander Monakov  <amonakov@ispras.ru>
36909         * omp-expand.c (expand_omp_simd): Clear PROP_gimple_lomp_dev regardless
36910         of safelen status.
36911         * omp-offload.c (pass_omp_device_lower::gate): Use PROP_gimple_lomp_dev.
36912         * passes.c (dump_properties): Handle PROP_gimple_lomp_dev.
36913         * tree-inline.c (expand_call_inline): Propagate PROP_gimple_lomp_dev.
36915 2017-01-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
36917         PR target/71270
36918         * config/arm/arm.c (neon_valid_immediate): Reject vector constants
36919         in big-endian mode when they are not a single duplicated value.
36921 2017-01-20  Richard Biener  <rguenther@suse.de>
36923         * BASE-VER: Bump to 7.0.1.
36925 2017-01-20  Alexander Monakov  <amonakov@ispras.ru>
36927         * omp-low.c (omplow_simd_context): New struct.  Use it...
36928         (lower_rec_simd_input_clauses): ...here and...
36929         (lower_rec_input_clauses): ...here to hold common data.  Adjust all
36930         references to idx, lane, max_vf, is_simt.
36932 2017-01-20  Graham Markall  <graham.markall@embecosm.com>
36934         * config/arc/arc.h (LINK_SPEC): Use arclinux_nps emulation when
36935         mcpu=nps400.
36937 2017-01-20  Martin Jambor  <mjambor@suse.cz>
36939         * hsa.h: Renaed to hsa-common.h.  Adjusted a comment.
36940         * hsa.c: Renaed to hsa-common.c.  Change include of gt-hsa.h to
36941         gt-hsa-common.h.
36942         * Makefile.in (OBJS): Rename hsa.o to hsa-common.o.
36943         (GTFILES): Rename hsa.c to hsa-common.c.
36944         * hsa-brig.c: Change include of hsa.h to hsa-common.h.
36945         * hsa-dump.c: Likewise.
36946         * hsa-gen.c: Likewise.
36947         * hsa-regalloc.c: Likewise.
36948         * ipa-hsa.c: Likewise.
36949         * omp-expand.c: Likewise.
36950         * omp-low.c: Likewise.
36951         * toplev.c: Likewise.
36953 2017-01-20  Marek Polacek  <polacek@redhat.com>
36955         PR c/64279
36956         * doc/invoke.texi: Document -Wduplicated-branches.
36957         * fold-const.c (operand_equal_p): Handle MODIFY_EXPR, INIT_EXPR,
36958         COMPOUND_EXPR, PREDECREMENT_EXPR, PREINCREMENT_EXPR,
36959         POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, CLEANUP_POINT_EXPR, EXPR_STMT,
36960         STATEMENT_LIST, and RETURN_EXPR.  For non-pure non-const functions
36961         return 0 only when not OEP_LEXICOGRAPHIC.
36962         (fold_build_cleanup_point_expr): Use the expression
36963         location when building CLEANUP_POINT_EXPR.
36964         * tree-core.h (enum operand_equal_flag): Add OEP_LEXICOGRAPHIC.
36965         * tree.c (add_expr): Handle error_mark_node.
36967 2017-01-20  Martin Liska  <mliska@suse.cz>
36969         PR lto/69188
36970         * tree-profile.c (init_ic_make_global_vars): Do not call
36971         finalize_decl.
36972         (gimple_init_gcov_profiler): Likewise.
36974 2017-01-20  Martin Liska  <mliska@suse.cz>
36976         PR ipa/71190
36977         * cgraph.h (maybe_create_reference): Remove argument and
36978         update comment.
36979         * cgraphclones.c (cgraph_node::create_virtual_clone): Remove one
36980         argument.
36981         * ipa-cp.c (create_specialized_node): Likewise.
36982         * symtab.c (symtab_node::maybe_create_reference): Handle
36983         VAR_DECLs and ADDR_EXPRs and select ipa_ref_use type.
36985 2017-01-20  Martin Liska  <mliska@suse.cz>
36987         * read-rtl-function.c (function_reader::create_function): Use
36988         build_decl instread of build_decl_stat.
36990 2017-01-20  Andrew Senkevich  <andrew.senkevich@intel.com>
36992         * config/i386/avx512bwintrin.h: Add k-mask registers shift intrinsics.
36993         * config/i386/avx512dqintrin.h: Ditto.
36994         * config/i386/avx512fintrin.h: Ditto.
36995         * config/i386/i386-builtin-types.def: Add new types.
36996         * config/i386/i386.c: Handle new types.
36997         * config/i386/i386-builtin.def (__builtin_ia32_kshiftliqi)
36998         (__builtin_ia32_kshiftlihi, __builtin_ia32_kshiftlisi)
36999         (__builtin_ia32_kshiftlidi, __builtin_ia32_kshiftriqi)
37000         (__builtin_ia32_kshiftrihi, __builtin_ia32_kshiftrisi)
37001         (__builtin_ia32_kshiftridi): New.
37002         * config/i386/sse.md (k<code><mode>): Rename *k<code><mode>.
37004 2017-01-19  Segher Boessenkool  <segher@kernel.crashing.org>
37006         PR target/78875
37007         PR target/79140
37008         * config/rs6000/rs6000.c (TARGET_STACK_PROTECT_GUARD): Unconditionally
37009         define to rs6000_init_stack_protect_guard.
37010         (rs6000_init_stack_protect_guard): New function.
37012 2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
37013             Yunqiang Su  <yunqiang.su@imgtec.com>
37015         * config.gcc (supported_defaults): Add madd4.
37016         (with_madd4): Add validation.
37017         (all_defaults): Add madd4.
37018         * config/mips/mips.opt (mmadd4): New option.
37019         * config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
37020         mmadd4.
37021         (TARGET_CPU_CPP_BUILTINS): Add builtin_define for
37022         __mips_no_madd4.
37023         (ISA_HAS_UNFUSED_MADD4): Gate with mips_madd4.
37024         (ISA_HAS_FUSED_MADD4): Likewise.
37025         * doc/invoke.texi (-mmadd4): Document the new option.
37026         * doc/install.texi (--with-madd4): Document the new option.
37028 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
37030         * config/aarch64/aarch64-builtins.c (enum aarch64_builtins): New
37031         entries for AARCH64_PAUTH_BUILTIN_XPACLRI,
37032         AARCH64_PAUTH_BUILTIN_PACIA1716, AARCH64_PAUTH_BUILTIN_AUTIA1716.
37033         (aarch64_init_pauth_hint_builtins): New.
37034         (aarch64_init_builtins): Call aarch64_init_pauth_hint_builtins.
37035         (aarch64_expand_builtin): Expand new builtins.
37037 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
37039         * reg-notes.def (CFA_TOGGLE_RA_MANGLE): New reg-note.
37040         * combine-stack-adj.c (no_unhandled_cfa): Handle
37041         REG_CFA_TOGGLE_RA_MANGLE.
37042         * dwarf2cfi.c (dwarf2out_frame_debug): Handle REG_CFA_TOGGLE_RA_MANGLE.
37043         * config/aarch64/aarch64.c (aarch64_expand_prologue): Generates DWARF
37044         info for return address signing.
37045         (aarch64_expand_epilogue): Likewise.
37047 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
37049         * config/aarch64/aarch64-opts.h (aarch64_function_type): New enum.
37050         * config/aarch64/aarch64-protos.h
37051         (aarch64_return_address_signing_enabled): New declaration.
37052         * config/aarch64/aarch64.c (aarch64_return_address_signing_enabled):
37053         New function.
37054         (aarch64_expand_prologue): Sign return address before it's pushed onto
37055         stack.
37056         (aarch64_expand_epilogue): Authenticate return address fetched from
37057         stack.
37058         (aarch64_override_options): Sanity check for ILP32 and ISA level.
37059         (aarch64_attributes): New function attributes for "sign-return-address".
37060         * config/aarch64/aarch64.md (UNSPEC_AUTI1716, UNSPEC_AUTISP,
37061         UNSPEC_PACI1716, UNSPEC_PACISP, UNSPEC_XPACLRI): New unspecs.
37062         ("*do_return"): Generate combined instructions according to key index.
37063         ("<pauth_mnem_prefix>sp", "<pauth_mnem_prefix1716", "xpaclri"): New.
37064         * config/aarch64/iterators.md (PAUTH_LR_SP, PAUTH_17_16): New integer
37065         iterators.
37066         (pauth_mnem_prefix, pauth_hint_num_a): New integer attributes.
37067         * config/aarch64/aarch64.opt (msign-return-address=): New.
37068         * doc/extend.texi (AArch64 Function Attributes): Documents
37069         "sign-return-address=".
37070         * doc/invoke.texi (AArch64 Options): Documents "-msign-return-address=".
37072 2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
37074         * doc/invoke.texi: Add missing -mlxc1-sxc1 options to
37075         overall option summary.
37077 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
37079         * config/aarch64/aarch64-arches.def: New entry for "armv8.3-a".
37080         * config/aarch64/aarch64.h (AARCH64_FL_V8_3, AARCH64_FL_FOR_ARCH8_3,
37081         AARCH64_ISA_V8_3, TARGET_ARMV8_3): New.
37082         * doc/invoke.texi (AArch64 Options): Document "armv8.3-a".
37084 2017-01-19  Michael Meissner  <meissner@linux.vnet.ibm.com>
37086         * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Enable
37087         -mpower9-minmax by default for -mcpu=power9.
37088         (ISA_3_MASKS_IEEE): Require -mvsx-small-integer to enable IEEE
37089         128-bit floating point.
37091 2017-01-20  Alan Modra  <amodra@gmail.com>
37093         * config/rs6000/rs6000.md (cmpstrnsi, cmpstrsi): Fail if
37094         optimizing for size.
37096 2017-01-20  Alan Modra  <amodra@gmail.com>
37098         PR target/79144
37099         * config/rs6000/rs6000.c (expand_strn_compare): Get the asm name
37100         for strcmp and strncmp from corresponding builtin decl.
37102 2017-01-19  Uros Bizjak  <ubizjak@gmail.com>
37104         * config.gcc (x86_64-*-rtems*): Use i386/rtemself.h
37105         instead of i386/rtems-64.h.
37106         * config/i386/rtems-64.h: Remove.
37108 2017-01-19  Uros Bizjak  <ubizjak@gmail.com>
37110         PR target/78478
37111         Revert:
37112         2013-11-05  Uros Bizjak  <ubizjak@gmail.com>
37114         * config/i386/rtemself.h (LONG_DOUBLE_TYPE_SIZE): New define.
37116 2017-01-19  Tamar Christina  <tamar.christina@arm.com>
37118         * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup):
37119         Change int to HOST_WIDE_INT.
37120         * config/aarch64/aarch64-protos.h
37121         (aarch64_simd_gen_const_vector_dup): Likewise.
37122         * config/aarch64/aarch64-simd.md: Add copysign<mode>3.
37124 2017-01-19  David Malcolm  <dmalcolm@redhat.com>
37126         * langhooks-def.h (lhd_type_for_size): New decl.
37127         (LANG_HOOKS_TYPE_FOR_SIZE): Define as lhd_type_for_size.
37128         * langhooks.c (lhd_type_for_size): New function, taken from
37129         lto_type_for_size.
37131 2017-01-19  Pat Haugen  <pthaugen@us.ibm.com>
37133         * config/rs6000/power9.md (power9-alu): Remove 'cmp' type and add
37134         define_bypass for CR latency.
37135         (power9-cracked-alu): Update bypass latency and remove power9-branch.
37136         (power9-alu2): Add define_bypass for CR latency.
37137         (power9-cmp): New.
37138         (power9-mul): Update insn latency.
37139         (power9-mul-compare): Update insn latency, bypass latency and remove
37140         power9-branch.
37142 2016-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
37144         * config/aarch64/aarch64-protos.h (aarch64_nopcrelative_literal_loads):
37145         Delete.
37146         * config/aarch64/aarch64.md
37147         (aarch64_reload_movcp<GPF_TF:mode><P:mode>): Delete reference to
37148         aarch64_nopcrelative_literal_loads.
37149         (aarch64_reload_movcp<VALL:mode><P:mode>): Likewise.
37151 2017-01-19  Chenghua Xu  <paul.hua.gm@gmail.com>
37153         * config/mips/mips.h (ISA_HAS_FUSED_MADD4): Enable for
37154         TARGET_LOONGSON_3A.
37155         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_LOONGSON_3A.
37157 2017-01-19  Doug Gilmore  <doug.gilmore@imgtec.com>
37159         PR target/78176
37160         * config.gcc (supported_defaults): Add lxc1-sxc1.
37161         (with_lxc1_sxc1): Add validation.
37162         (all_defaults): Add lxc1-sxc1.
37163         * config/mips/mips.opt (mlxc1-sxc1): New option.
37164         * config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
37165         mlxc1-sxc1.
37166         (TARGET_CPU_CPP_BUILTINS): Add builtin_define for
37167         __mips_no_lxc1_sxc1.
37168         (ISA_HAS_LXC1_SXC1): Gate with mips_lxc1_sxc1.
37169         * doc/invoke.texi (-mlxc1-sxc1): Document the new option.
37170         * doc/install.texi (--with-lxc1-sxc1): Document the new option.
37172 2017-01-19  Richard Biener  <rguenther@suse.de>
37174         PR tree-optimization/72488
37175         * tree-ssa-sccvn.c (run_scc_vn): When we abort the VN make
37176         sure to restore SSA info.
37177         * tree-ssa.c (verify_ssa): Verify SSA info is not shared.
37179 2017-01-19  Richard Earnshaw  <rearnsha@arm.com>
37181         PR rtl-optimization/79121
37182         * expr.c (expand_expr_real_2, case LSHIFT_EXPR): Look at the signedness
37183         of the inner type when shifting an extended value.
37185 2017-01-17  Jan Hubicka  <hubicka@ucw.cz>
37187         PR lto/78407
37188         * symtab.c (symtab_node::equal_address_to): Fix comparing of
37189         interposable aliases.
37191 2017-01-18  Peter Bergner  <bergner@vnet.ibm.com>
37193         PR target/78516
37194         * config/rs6000/spe.md (mov_si<mode>_e500_subreg0): Fix constraints.
37195         Use the evmergelohi instruction.
37196         (mov_si<mode>_e500_subreg4_2_le): Likewise.
37197         (mov_sitf_e500_subreg8_2_be): Likewise.
37198         (mov_sitf_e500_subreg12_2_le): Likewise.
37199         (mov_si<mode>_e500_subreg0_2_le): Fix constraints.
37200         (mov_si<mode>_e500_subreg4_2_be): Likewise.
37201         (mov_sitf_e500_subreg8_2_le): Likewise.
37202         (mov_sitf_e500_subreg12_2_be): Likewise.
37204 2017-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
37206         * config/rs6000/altivec.md (altivec_vbpermq): Change "type"
37207         attribute from vecsimple to vecperm.
37208         (altivec_vbpermq2): Likewise.
37210 2017-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
37212         PR target/79040
37213         * config/rs6000/altivec.h: Fix typo of vec_cntlz to vec_cnttz.
37215 2017-01-18  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
37216         * config/rs6000/rs6000-protos.h (expand_strn_compare): Add arg.
37217         * config/rs6000/rs6000.c (expand_strn_compare): Add ability to expand
37218         strcmp. Fix bug where comparison didn't stop with zero byte. Fix
37219         case where N arg is SIZE_MAX.
37220         * config/rs6000/rs6000.md (cmpstrnsi): Args to expand_strn_compare.
37221         (cmpstrsi): Add pattern.
37223 2017-01-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
37225         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
37226         __builtin_vec_revb builtins.
37227         * config/rs6000/rs6000-builtins.def (P9V_BUILTIN_XXBRQ_V16QI): Add
37228         built-in functions to support generation of the ISA 3.0 XXBR<x>
37229         vector byte reverse instructions.
37230         (P9V_BUILTIN_XXBRQ_V1TI): Likewise.
37231         (P9V_BUILTIN_XXBRD_V2DI): Likewise.
37232         (P9V_BUILTIN_XXBRD_V2DF): Likewise.
37233         (P9V_BUILTIN_XXBGW_V4SI): Likewise.
37234         (P9V_BUILTIN_XXBGW_V4SF): Likewise.
37235         (P9V_BUILTIN_XXBGH_V8HI): Likewise.
37236         (P9V_BUILTIN_VEC_REVB): Likewise.
37237         * config/rs6000/vsx.md (p9_xxbrq_v1ti): New insns/expanders to
37238         generate the ISA 3.0 XXBR<x> vector byte reverse instructions.
37239         (p9_xxbrq_v16qi): Likewise.
37240         (p9_xxbrd_<mode>, VSX_D iterator): Likewise.
37241         (p9_xxbrw_<mode>, VSX_W iterator): Likewise.
37242         (p9_xxbrh_v8hi): Likewise.
37243         * config/rs6000/altivec.h (vec_revb): Define if ISA 3.0.
37244         * doc/extend.texi (RS/6000 Altivec Built-ins): Document the
37245         vec_revb built-in functions.
37247 2017-01-18  Uros Bizjak  <ubizjak@gmail.com>
37249         PR rtl-optimization/78952
37250         * config/i386/i386.md (any_extract): New code iterator.
37251         (*insvqi_2): Use any_extract for source operand.
37252         (*insvqi_3): Use any_shiftrt for source operand.
37254 2017-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
37256         * config/aarch64/aarch64.c (aarch64_sched_adjust_priority)
37257         New function.
37258         (TARGET_SCHED_ADJUST_PRIORITY): Define target hook.
37260 2017-01-18  Matthias Klose  <doko@ubuntu.com>
37262         * doc/install.texi: Allow default for --with-target-bdw-gc-include.
37264 2016-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
37266         * config/rs6000/altivec.h (vec_bperm): Change #define.
37267         * config/rs6000/altivec.md (UNSPEC_VBPERMD): New enum constant.
37268         (altivec_vbpermq2): New define_insn.
37269         (altivec_vbpermd): Likewise.
37270         * config/rs6000/rs6000-builtin.def (VBPERMQ2): New monomorphic
37271         function interface.
37272         (VBPERMD): Likewise.
37273         (VBPERM): New polymorphic function interface.
37274         * config/rs6000/r6000-c.c (altivec_overloaded_builtins_table):
37275         Add entries for P9V_BUILTIN_VEC_VBPERM.
37276         * doc/extend.texi: Add interfaces for vec_bperm.
37278 2017-01-18  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
37280         * config/s390/s390-c.c (s390_expand_overloaded_builtin): Downcase
37281         first letter of error messages.
37282         (s390_resolve_overloaded_builtin): Likewise.
37283         * config/s390/s390.c (s390_expand_builtin): Likewise.
37284         (s390_invalid_arg_for_unprototyped_fn): Likewise.
37285         (s390_valid_target_attribute_inner_p): Likewise.
37286         * config/s390/s390.md ("tabort"): Likewise.
37288 2017-01-18  Toma Tabacu  <toma.tabacu@imgtec.com>
37290         * config/mips/mips.h (ISA_HAS_DIV3): Remove unused macro.
37291         (ISA_AVOID_DIV_HILO): New macro.
37292         (ISA_HAS_DIV): Use new ISA_AVOID_DIV_HILO macro.
37293         (ISA_HAS_DDIV): Likewise.
37295 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
37297         * doc/invoke.texi (fabi-version): Correct number of occurrences.
37299 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
37301         * doc/invoke.texi (fabi-version): Spelling fix.
37303 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
37305         PR c++/70182
37306         * doc/invoke.texi (fabi-version): Mention mangling fix for
37307         operator names.
37309 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
37311         PR c++/77489
37312         * doc/invoke.texi (fabi-version): Document discriminator mangling.
37314 2017-01-17  Segher Boessenkool  <segher@kernel.crashing.org>
37316         PR target/78875
37317         * config/rs6000/rs6000-opts.h (stack_protector_guard): New enum.
37318         * config/rs6000/rs6000.c (rs6000_option_override_internal): Handle
37319         the new options.
37320         * config/rs6000/rs6000.md (stack_protect_set): Handle the new more
37321         flexible settings.
37322         (stack_protect_test): Ditto.
37323         * config/rs6000/rs6000.opt (mstack-protector-guard=,
37324         mstack-protector-guard-reg=, mstack-protector-guard-offset=): New
37325         options.
37326         * doc/invoke.texi (Option Summary) [RS/6000 and PowerPC Options]:
37327         Add -mstack-protector-guard=, -mstack-protector-guard-reg=, and
37328         -mstack-protector-guard-offset=.
37329         (RS/6000 and PowerPC Options): Ditto.
37331 2017-01-17  Uros Bizjak  <ubizjak@gmail.com>
37333         * config/i386/i386.h (MASK_CLASS_P): New define.
37334         * config/i386/i386.c (inline_secondary_memory_needed): Ensure that
37335         there are no registers from different register sets also when
37336         mask registers are used.  Update function comment.
37337         * config/i386/i386.md (*movsi_internal): Split (*k/*krm) alternative
37338         to (*k/*r) and (*k/*km) alternatives.
37340 2017-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
37342         * config/aarch64/aarch64.md (eh_return): Remove pattern and splitter.
37343         * config/aarch64/aarch64.h (AARCH64_EH_STACKADJ_REGNUM): Remove.
37344         (EH_RETURN_HANDLER_RTX): New define.
37345         * config/aarch64/aarch64.c (aarch64_frame_pointer_required):
37346         Force frame pointer in EH return functions.
37347         (aarch64_expand_epilogue): Add barrier for eh_return.
37348         (aarch64_final_eh_return_addr): Remove.
37349         (aarch64_eh_return_handler_rtx): New function.
37350         * config/aarch64/aarch64-protos.h (aarch64_final_eh_return_addr):
37351         Remove.
37352         (aarch64_eh_return_handler_rtx): New prototype.
37354 2017-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
37356         * config/rs6000/altivec.h (vec_rlmi): New #define.
37357         (vec_vrlnm): Likewise.
37358         (vec_rlnm): Likewise.
37359         * config/rs6000/altivec.md (UNSPEC_VRLMI): New UNSPEC enum value.
37360         (UNSPEC_VRLNM): Likewise.
37361         (VIlong): New mode iterator.
37362         (altivec_vrl<VI_char>mi): New define_insn.
37363         (altivec_vrl<VI_char>nm): Likewise.
37364         * config/rs6000/rs6000-builtin.def (VRLWNM): New monomorphic
37365         function entry.
37366         (VRLDNM): Likewise.
37367         (RLNM): New polymorphic function entry.
37368         (VRLWMI): New monomorphic function entry.
37369         (VRLDMI): Likewise.
37370         (RLMI): New polymorphic function entry.
37371         * config/rs6000/r6000-c.c (altivec_overloaded_builtin_table): Add
37372         new entries for P9V_BUILTIN_VEC_RLMI and P9V_BUILTIN_VEC_RLNM.
37373         * doc/extend.texi: Add description of vec_rlmi, vec_rlnm, and
37374         vec_vrlnm.
37376 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
37378         PR debug/78839
37379         * dwarf2out.c (field_byte_offset): Restore the
37380         PCC_BITFIELD_TYPE_MATTERS behavior for INTEGER_CST DECL_FIELD_OFFSET
37381         and DECL_FIELD_BIT_OFFSET.  Use fold_build2 instead of build2 + fold.
37382         (analyze_variants_discr, gen_variant_part): Use fold_build2 instead
37383         of build2 + fold.
37385 2017-01-17  Eric Botcazou  <ebotcazou@adacore.com>
37387         PR ada/67205
37388         * config/aarch64/aarch64.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define
37390 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
37392         PR debug/71669
37393         * dwarf2out.c (add_data_member_location_attribute): For constant
37394         offset bitfield emit for -gdwarf-5 DW_AT_data_bit_offset attribute
37395         instead of DW_AT_data_member_location, DW_AT_bit_offset and
37396         DW_AT_byte_size attributes.
37398 2017-01-17  Eric Botcazou  <ebotcazou@adacore.com>
37400         * config/rs6000/rs6000.c (rs6000_emit_move): Also use a TOC reference
37401         after forcing to constant memory when the code model is medium.
37403 2017-01-17  Julia Koval  <julia.koval@intel.com>
37405         PR target/76731
37406         * config/i386/avx512fintrin.h
37407         (_mm512_i32gather_ps): Change __addr type to void const*.
37408         (_mm512_mask_i32gather_ps): Ditto.
37409         (_mm512_i32gather_pd): Ditto.
37410         (_mm512_mask_i32gather_pd): Ditto.
37411         (_mm512_i64gather_ps): Ditto.
37412         (_mm512_mask_i64gather_ps): Ditto.
37413         (_mm512_i64gather_pd): Ditto.
37414         (_mm512_mask_i64gather_pd): Ditto.
37415         (_mm512_i32gather_epi32): Ditto.
37416         (_mm512_mask_i32gather_epi32): Ditto.
37417         (_mm512_i32gather_epi64): Ditto.
37418         (_mm512_mask_i32gather_epi64): Ditto.
37419         (_mm512_i64gather_epi32): Ditto.
37420         (_mm512_mask_i64gather_epi32): Ditto.
37421         (_mm512_i64gather_epi64): Ditto.
37422         (_mm512_mask_i64gather_epi64): Ditto.
37423         (_mm512_i32scatter_ps): Change __addr type to void*.
37424         (_mm512_mask_i32scatter_ps): Ditto.
37425         (_mm512_i32scatter_pd): Ditto.
37426         (_mm512_mask_i32scatter_pd): Ditto.
37427         (_mm512_i64scatter_ps): Ditto.
37428         (_mm512_mask_i64scatter_ps): Ditto.
37429         (_mm512_i64scatter_pd): Ditto.
37430         (_mm512_mask_i64scatter_pd): Ditto.
37431         (_mm512_i32scatter_epi32): Ditto.
37432         (_mm512_mask_i32scatter_epi32): Ditto.
37433         (_mm512_i32scatter_epi64): Ditto.
37434         (_mm512_mask_i32scatter_epi64): Ditto.
37435         (_mm512_i64scatter_epi32): Ditto.
37436         (_mm512_mask_i64scatter_epi32): Ditto.
37437         (_mm512_i64scatter_epi64): Ditto.
37438         (_mm512_mask_i64scatter_epi64): Ditto.
37439         * config/i386/avx512pfintrin.h
37440         (_mm512_mask_prefetch_i32gather_pd): Change __addr type to void const*.
37441         (_mm512_mask_prefetch_i32gather_ps): Ditto.
37442         (_mm512_mask_prefetch_i64gather_pd): Ditto.
37443         (_mm512_mask_prefetch_i64gather_ps): Ditto.
37444         (_mm512_prefetch_i32scatter_pd): Change __addr type to void*.
37445         (_mm512_prefetch_i32scatter_ps): Ditto.
37446         (_mm512_mask_prefetch_i32scatter_pd): Ditto.
37447         (_mm512_mask_prefetch_i32scatter_ps): Ditto.
37448         (_mm512_prefetch_i64scatter_pd): Ditto.
37449         (_mm512_prefetch_i64scatter_ps): Ditto.
37450         (_mm512_mask_prefetch_i64scatter_pd): Ditto.
37451         (_mm512_mask_prefetch_i64scatter_ps): Ditto.
37452         * config/i386/avx512vlintrin.h
37453         (_mm256_mmask_i32gather_ps): Change __addr type to void const*.
37454         (_mm_mmask_i32gather_ps): Ditto.
37455         (_mm256_mmask_i32gather_pd): Ditto.
37456         (_mm_mmask_i32gather_pd): Ditto.
37457         (_mm256_mmask_i64gather_ps): Ditto.
37458         (_mm_mmask_i64gather_ps): Ditto.
37459         (_mm256_mmask_i64gather_pd): Ditto.
37460         (_mm_mmask_i64gather_pd): Ditto.
37461         (_mm256_mmask_i32gather_epi32): Ditto.
37462         (_mm_mmask_i32gather_epi32): Ditto.
37463         (_mm256_mmask_i32gather_epi64): Ditto.
37464         (_mm_mmask_i32gather_epi64): Ditto.
37465         (_mm256_mmask_i64gather_epi32): Ditto.
37466         (_mm_mmask_i64gather_epi32): Ditto.
37467         (_mm256_mmask_i64gather_epi64): Ditto.
37468         (_mm_mmask_i64gather_epi64): Ditto.
37469         (_mm256_i32scatter_ps): Change __addr type to void*.
37470         (_mm256_mask_i32scatter_ps): Ditto.
37471         (_mm_i32scatter_ps): Ditto.
37472         (_mm_mask_i32scatter_ps): Ditto.
37473         (_mm256_i32scatter_pd): Ditto.
37474         (_mm256_mask_i32scatter_pd): Ditto.
37475         (_mm_i32scatter_pd): Ditto.
37476         (_mm_mask_i32scatter_pd): Ditto.
37477         (_mm256_i64scatter_ps): Ditto.
37478         (_mm256_mask_i64scatter_ps): Ditto.
37479         (_mm_i64scatter_ps): Ditto.
37480         (_mm_mask_i64scatter_ps): Ditto.
37481         (_mm256_i64scatter_pd): Ditto.
37482         (_mm256_mask_i64scatter_pd): Ditto.
37483         (_mm_i64scatter_pd): Ditto.
37484         (_mm_mask_i64scatter_pd): Ditto.
37485         (_mm256_i32scatter_epi32): Ditto.
37486         (_mm256_mask_i32scatter_epi32): Ditto.
37487         (_mm_i32scatter_epi32): Ditto.
37488         (_mm_mask_i32scatter_epi32): Ditto.
37489         (_mm256_i32scatter_epi64): Ditto.
37490         (_mm256_mask_i32scatter_epi64): Ditto.
37491         (_mm_i32scatter_epi64): Ditto.
37492         (_mm_mask_i32scatter_epi64): Ditto.
37493         (_mm256_i64scatter_epi32): Ditto.
37494         (_mm256_mask_i64scatter_epi32): Ditto.
37495         (_mm_i64scatter_epi32): Ditto.
37496         (_mm_mask_i64scatter_epi32): Ditto.
37497         (_mm256_i64scatter_epi64): Ditto.
37498         (_mm256_mask_i64scatter_epi64): Ditto.
37499         (_mm_i64scatter_epi64): Ditto.
37500         (_mm_mask_i64scatter_epi64): Ditto.
37501         * config/i386/i386-builtin-types.def (V16SF_V16SF_PCFLOAT_V16SI_HI_INT)
37502         (V8DF_V8DF_PCDOUBLE_V8SI_QI_INT, V8SF_V8SF_PCFLOAT_V8DI_QI_INT)
37503         (V8DF_V8DF_PCDOUBLE_V8DI_QI_INT, V16SI_V16SI_PCINT_V16SI_HI_INT)
37504         (V8DI_V8DI_PCINT64_V8SI_QI_INT, V8SI_V8SI_PCINT_V8DI_QI_INT)
37505         (V8DI_V8DI_PCINT64_V8DI_QI_INT, V2DF_V2DF_PCDOUBLE_V4SI_QI_INT)
37506         (V4DF_V4DF_PCDOUBLE_V4SI_QI_INT, V2DF_V2DF_PCDOUBLE_V2DI_QI_INT)
37507         (V4DF_V4DF_PCDOUBLE_V4DI_QI_INT, V4SF_V4SF_PCFLOAT_V4SI_QI_INT)
37508         (V8SF_V8SF_PCFLOAT_V8SI_QI_INT, V4SF_V4SF_PCFLOAT_V2DI_QI_INT)
37509         (V4SF_V4SF_PCFLOAT_V4DI_QI_INT, V2DI_V2DI_PCINT64_V4SI_QI_INT)
37510         (V4DI_V4DI_PCINT64_V4SI_QI_INT, V2DI_V2DI_PCINT64_V2DI_QI_INT)
37511         (V4DI_V4DI_PCINT64_V4DI_QI_INT, V4SI_V4SI_PCINT_V4SI_QI_INT)
37512         (V8SI_V8SI_PCINT_V8SI_QI_INT, V4SI_V4SI_PCINT_V2DI_QI_INT)
37513         (V4SI_V4SI_PCINT_V4DI_QI_INT, VOID_PFLOAT_HI_V16SI_V16SF_INT)
37514         (VOID_PFLOAT_QI_V8SI_V8SF_INT, VOID_PFLOAT_QI_V4SI_V4SF_INT)
37515         (VOID_PDOUBLE_QI_V8SI_V8DF_INT, VOID_PDOUBLE_QI_V4SI_V4DF_INT)
37516         (VOID_PDOUBLE_QI_V4SI_V2DF_INT, VOID_PFLOAT_QI_V8DI_V8SF_INT)
37517         (VOID_PFLOAT_QI_V4DI_V4SF_INT, VOID_PFLOAT_QI_V2DI_V4SF_INT)
37518         (VOID_PDOUBLE_QI_V8DI_V8DF_INT, VOID_PDOUBLE_QI_V4DI_V4DF_INT)
37519         (VOID_PDOUBLE_QI_V2DI_V2DF_INT, VOID_PINT_HI_V16SI_V16SI_INT)
37520         (VOID_PINT_QI_V8SI_V8SI_INT, VOID_PINT_QI_V4SI_V4SI_INT)
37521         (VOID_PLONGLONG_QI_V8SI_V8DI_INT, VOID_PLONGLONG_QI_V4SI_V4DI_INT)
37522         (VOID_PLONGLONG_QI_V4SI_V2DI_INT, VOID_PINT_QI_V8DI_V8SI_INT)
37523         (VOID_PINT_QI_V4DI_V4SI_INT, VOID_PINT_QI_V2DI_V4SI_INT)
37524         (VOID_PLONGLONG_QI_V8DI_V8DI_INT, VOID_QI_V8SI_PCINT64_INT_INT)
37525         (VOID_PLONGLONG_QI_V4DI_V4DI_INT, VOID_PLONGLONG_QI_V2DI_V2DI_INT)
37526         (VOID_HI_V16SI_PCINT_INT_INT, VOID_QI_V8DI_PCINT64_INT_INT)
37527         (VOID_QI_V8DI_PCINT_INT_INT): Remove.
37528         (V16SF_V16SF_PCVOID_V16SI_HI_INT,  V8DF_V8DF_PCVOID_V8SI_QI_INT)
37529         (V8SF_V8SF_PCVOID_V8DI_QI_INT, V8DF_V8DF_PCVOID_V8DI_QI_INT)
37530         (V16SI_V16SI_PCVOID_V16SI_HI_INT, V8DI_V8DI_PCVOID_V8SI_QI_INT)
37531         (V8SI_V8SI_PCVOID_V8DI_QI_INT, V8DI_V8DI_PCVOID_V8DI_QI_INT)
37532         (VOID_PVOID_HI_V16SI_V16SF_INT, VOID_PVOID_QI_V8SI_V8DF_INT)
37533         (VOID_PVOID_QI_V8DI_V8SF_INT, VOID_PVOID_QI_V8DI_V8DF_INT)
37534         (VOID_PVOID_HI_V16SI_V16SI_INT, VOID_PVOID_QI_V8SI_V8DI_INT)
37535         (VOID_PVOID_QI_V8DI_V8SI_INT, VOID_PVOID_QI_V8DI_V8DI_INT)
37536         (V2DF_V2DF_PCVOID_V4SI_QI_INT, V4DF_V4DF_PCVOID_V4SI_QI_INT)
37537         (V2DF_V2DF_PCVOID_V2DI_QI_INT, V4DF_V4DF_PCVOID_V4DI_QI_INT
37538         (V4SF_V4SF_PCVOID_V4SI_QI_INT, V8SF_V8SF_PCVOID_V8SI_QI_INT)
37539         (V4SF_V4SF_PCVOID_V2DI_QI_INT, V4SF_V4SF_PCVOID_V4DI_QI_INT)
37540         (V2DI_V2DI_PCVOID_V4SI_QI_INT, V4DI_V4DI_PCVOID_V4SI_QI_INT)
37541         (V2DI_V2DI_PCVOID_V2DI_QI_INT, V4DI_V4DI_PCVOID_V4DI_QI_INT)
37542         (V4SI_V4SI_PCVOID_V4SI_QI_INT, V8SI_V8SI_PCVOID_V8SI_QI_INT)
37543         (V4SI_V4SI_PCVOID_V2DI_QI_INT, V4SI_V4SI_PCVOID_V4DI_QI_INT)
37544         (VOID_PVOID_QI_V8SI_V8SF_INT, VOID_PVOID_QI_V4SI_V4SF_INT)
37545         (VOID_PVOID_QI_V4SI_V4DF_INT, VOID_PVOID_QI_V4SI_V2DF_INT)
37546         (VOID_PVOID_QI_V4DI_V4SF_INT, VOID_PVOID_QI_V2DI_V4SF_INT)
37547         (VOID_PVOID_QI_V4DI_V4DF_INT, VOID_PVOID_QI_V2DI_V2DF_INT)
37548         (VOID_PVOID_QI_V8SI_V8SI_INT, VOID_PVOID_QI_V4SI_V4SI_INT)
37549         (VOID_PVOID_QI_V4SI_V4DI_INT, VOID_PVOID_QI_V4SI_V2DI_INT)
37550         (VOID_PVOID_QI_V4DI_V4SI_INT, VOID_PVOID_QI_V2DI_V4SI_INT)
37551         (VOID_PVOID_QI_V4DI_V4DI_INT, VOID_PVOID_QI_V2DI_V2DI_INT)
37552         (VOID_QI_V8SI_PCVOID_INT_INT, VOID_HI_V16SI_PCVOID_INT_INT)
37553         (VOID_QI_V8DI_PCVOID_INT_INT): Add.
37554         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Adjust builtin
37555         definitions accordingly.
37557 2017-01-17  Kito Cheng  <kito.cheng@gmail.com>
37558             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
37560         PR target/79079
37561         * internal-fn.c (expand_mul_overflow): Use convert_modes instead of
37562         gen_lowpart.
37564 2017-01-17  Vladimir Makarov  <vmakarov@redhat.com>
37566         PR target/79058
37567         * ira-conflicts.c (ira_build_conflicts): Update total conflict
37568         hard regs for inner regno.
37570 2017-01-17  Martin Liska  <mliska@suse.cz>
37572         PR ipa/71207
37573         * ipa-polymorphic-call.c (contains_type_p): Fix wrong
37574         assumption and add comment.
37576 2017-01-17  Nathan Sidwell  <nathan@acm.org>
37578         * ipa-visibility.c (localize_node): New function, broken out of ...
37579         (function_and_variable_visibility): ... here. Call it.
37581 2017-01-17  Jan Hubicka  <hubicka@ucw.cz>
37583         PR middle-end/77445
37584         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges):
37585         correctly set frequency of oudgoing edge.
37586         (duplicate_thread_path): Fix profile updating.
37588 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
37590         PR other/79046
37591         * configure.ac: Add GCC_BASE_VER.
37592         * Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
37593         version from BASE-VER file.
37594         (CFLAGS-gcc.o): Add -DBASEVER=$(BASEVER_s).
37595         (gcc.o): Depend on $(BASEVER).
37596         * common.opt (dumpfullversion): New option.
37597         * gcc.c (driver_handle_option): Handle OPT_dumpfullversion.
37598         * doc/invoke.texi: Document -dumpfullversion.
37599         * doc/install.texi: Document --with-gcc-major-version-only.
37600         * configure: Regenerated.
37602 2017-01-17  Richard Biener  <rguenther@suse.de>
37604         PR tree-optimization/71433
37605         * tree-vrp.c (register_new_assert_for): Merge same asserts
37606         on all incoming edges.
37607         (process_assert_insertions_for): Handle insertions at the
37608         beginning of BBs.
37610 2017-01-17  Gerald Pfeifer  <gerald@pfeifer.com>
37612         * config/i386/cygwin.h (LIBGCJ_SONAME): Remove.
37613         * config/i386/mingw32.h (LIBGCJ_SONAME): Remove.
37615 2017-01-17  Kaz Kojima  <kkojima@gcc.gnu.org>
37617         PR target/78633
37618         * config/sh/sh.md (cmpeqsi_t+1): Call copy_rtx to avoid invalid
37619         RTL sharing.
37621 2017-01-17  Alan Modra  <amodra@gmail.com>
37623         PR target/79066
37624         * config/rs6000/rs6000.md (elf_high, elf_low): Disable when pic.
37625         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Don't allow
37626         symbolic stack limit when pic.
37628 2017-01-16  Martin Sebor  <msebor@redhat.com>
37630         PR tree-optimization/78608
37631         * gimple-ssa-sprintf.c (tree_digits): Avoid negating TYPE_MIN.
37633 2017-01-16  Jeff Law  <law@redhat.com>
37635         Revert:
37636         2016-12-02  Tadek Kijkowski  <tkijkowski@gmail.com>
37637         * Makefile.in (PREPROCESSOR_DEFINES): Add a level of indirection
37638         for several include directories that may be relative to sysroot.
37639         * config/i386/x-mingw32 (gplus_includedir): Define.
37640         (gplus_tool_includedir, gplus_backward_include_dir): Likewise.
37641         (native_system_includedir): Likewise.
37642         * config/i386/mingw32.h (STANDARD_STARTFILE_PREFIX_1): Do not
37643         override if TARGET_SYSTEM_ROOT is defined.
37644         (NATIVE_SYSTEM_HEADER_DIR): Likewise.
37646         PR tree-optimization/79090
37647         PR tree-optimization/33562
37648         PR tree-optimization/61912
37649         PR tree-optimization/77485
37650         * tree-ssa-dse.c (compute_trims): Accept STMT argument.  Dump STMT
37651         and computed trims into the dump file.
37653 2017-01-17  Uros Bizjak  <ubizjak@gmail.com>
37655         * config/i386/i386.h (LIMIT_RELOAD_CLASS): Remove.
37657 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
37659         PR c/79089
37660         * gimplify.c (gimplify_init_constructor): If want_value and
37661         object == lhs, unshare lhs to avoid invalid tree sharing.  Formatting
37662         fix.
37664         PR target/79080
37665         * loop-doloop.c (doloop_modify): Call unshare_all_rtl_in_chain on
37666         sequence.  Formatting fixes.
37667         (doloop_optimize): Formatting fixes.
37669         PR driver/49726
37670         * gcc.c (debug_level_greater_than_spec_func): New function.
37671         (static_spec_functions): Add debug-level-gt spec function.
37672         (ASM_DEBUG_SPEC, cpp_options): Use %:debug-level-gt(0) instead of
37673         !g0.
37674         * config/darwin.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
37675         * config/darwin9.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
37676         * common.opt (g, gcoff, gdwarf, gdwarf-, ggdb, gno-pubnames,
37677         gpubnames, ggnu-pubnames, gno-record-gcc-switches,
37678         grecord-gcc-switches, gno-strict-dwarf, gstrict-dwarf, gstabs,
37679         gstabs+, gtoggle, gvms, gxcoff, gxcoff+): Add Driver flag.
37681 2017-01-16  Uros Bizjak  <ubizjak@gmail.com>
37683         * config/i386/i386.h (HARD_REGNO_CALLER_SAVE_MODE): Apply HImode and
37684         QImode fixups to general and mask registers only.
37686 2017-01-16  Carl Love  <cel@us.ibm.com>
37688         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Add support
37689         for built-in functions
37690         vector signed char vec_nabs (vector signed char)
37691         vector signed short vec_nabs (vector signed short)
37692         vector signed int vec_nabs (vector signed int)
37693         vector signed long long vec_nabs (vector signed long long)
37694         vector float vec_nabs (vector float)
37695         vector double vec_nabs (vector double)
37696         * config/rs6000/rs6000-builtin.def: Add definitions for NABS functions
37697         and NABS overload.
37698         * config/rs6000/altivec.md: New define_expand nabs<mode>2 types
37699         * config/rs6000/altivec.h: New define for vec_nabs built-in function.
37700         * doc/extend.texi: Update the documentation file for the new built-in
37701         functions.
37703 2017-01-16  Martin Sebor  <msebor@redhat.com>
37705         * gimple-ssa-sprintf.c (format_directive): Correct a typo in a warning
37706         message.
37708 2017-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
37710         * config/rs6000/rs6000.c (rtx_is_swappable_p): Change
37711         UNSPEC_VSX__XXSPLTD to require special splat handling.
37713 2017-01-16  David Malcolm  <dmalcolm@redhat.com>
37715         PR bootstrap/78616
37716         * system.h: Poison strndup.
37718 2017-01-16  Alan Modra  <amodra@gmail.com>
37720         PR target/79098
37721         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Don't
37722         use a switch.
37724 2017-01-16  Georg-Johann Lay  <avr@gjlay.de>
37726         * config/avr/avr.h (BRANCH_COST) [reload_completed]: Increase by 4.
37728 2017-01-15  Uros Bizjak  <ubizjak@gmail.com>
37730         * config/i386/i386.c (ix86_legitimate_combined_insn): Do not
37731         call recog here.  Assert that INSN_CODE (insn) is non-negative.
37733 2017-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
37735         PR target/72749
37736         * cfgrtl.c (rtl_split_edge): Also patch jump insns that jump to the
37737         fallthrough.
37738         * haifa-sched.c (dump_insn_stream): Don't crash if there is a label
37739         in the currently scheduled RTL fragment.
37741 2017-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
37743         PR rtl-optimization/78751
37744         * ifcvt.c (find_cond_trap): If we generated a non-existing insn,
37745         give up.
37747 2017-01-14  Jeff Law  <law@redhat.com>
37749         PR tree-optimization/79090
37750         * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject zero length and
37751         variable length stores.
37752         (compute_trims): Delete dead assignment to *trim_tail.
37753         (dse_dom_walker::dse_optimize_stmt): Optimize mem* calls with
37754         zero length.
37756 2017-01-14  Bernd Schmidt  <bschmidt@redhat.com>
37758         PR rtl-optimization/78626
37759         PR rtl-optimization/78727
37760         * cprop.c (one_cprop_pass): Collect unconditional traps in the middle
37761         of a block, and split such blocks after everything else is finished.
37763 2017-01-14  Alan Modra  <amodra@gmail.com>
37765         PR target/72749
37766         * combine.c (recog_for_combine_1): Set INSN_CODE before calling
37767         target legitimate_combined_insn.
37768         * config/rs6000/rs6000.c (TARGET_LEGITIMATE_COMBINED_INSN): Define.
37769         (rs6000_legitimate_combined_insn): New function.
37770         * config/rs6000/rs6000.md (UNSPEC_DOLOOP): Delete, and remove
37771         all uses.
37772         (ctr<mode>_internal3): Rename from *ctr<mode>_internal5.
37773         (ctr<mode>_internal4): Rename from *ctr<mode>_internal6.
37774         (ctr<mode>_internal1, ctr<mode>_internal2): Remove '*' from name.
37776 2017-01-14  Gerald Pfeifer  <gerald@pfeifer.com>
37778         * doc/frontends.texi (G++ and GCC): Remove references to Java.
37780 2017-01-13  Jeff Law  <law@redhat.com>
37782         PR tree-optimization/33562
37783         PR tree-optimization/61912
37784         PR tree-optimization/77485
37785         * tree-ssa-dse.c (delete_dead_call): Accept gsi rather than
37786         a statement.
37787         (delete_dead_assignment): Likewise.
37788         (dse_dom_walker::dse_optimize_stmt): Pass in the gsi rather than
37789         statement to delete_dead_call and delete_dead_assignment.
37791 2017-01-13  David Malcolm  <dmalcolm@redhat.com>
37793         PR c/78304
37794         * substring-locations.c (format_warning_va): Strengthen case 1 so
37795         that both endpoints of the substring must be within the format
37796         range for just the substring to be printed.
37798 2017-01-13  Uros Bizjak  <ubizjak@gmail.com>
37800         * config/i386/i386.opt (msgx): Use ix86_isa_flags2 variable.
37801         * config/i386/i386.c (ix86_target_string): Add missing options
37802         to isa_opts and reorder options by implied ISAs.  Rename isa_opts2 to
37803         isa2_opts, ix86_flag_opts to flag2_opts, ix86_target_other to
37804         flags_other and ix86_target_other to flags2_other.  Display unknown
37805         isa2 options.
37806         (ix86_valid_target_attribute_inner_p): Add missing options and
37807         reorder options by implied ISAs, as in ix86_target_string.
37809 2017-01-13  Richard Sandiford  <richard.sandiford@arm.com>
37811         * hash-table.h (hash_table::too_empty_p): New function.
37812         (hash_table::expand): Use it.
37813         (hash_table::traverse): Likewise.
37814         (hash_table::empty_slot): Use sizeof (value_type) instead of
37815         sizeof (PTR) to convert bytes to elements.  Shrink the table
37816         if the current size is excessive for the current number of
37817         elements.
37819 2017-01-13  Richard Sandiford  <richard.sandiford@arm.com>
37821         * ira-costs.c (record_reg_classes): Break from the inner loop
37822         early once alt_fail is known to be true.  Update outer loop
37823         handling accordingly.
37825 2017-01-13  Jeff Law  <law@redhat.com>
37827         * tree-ssa-dse.c (decrement_count): New function.
37828         (increment_start_addr, maybe_trim_memstar_call): Likewise.
37829         (dse_dom_walker::optimize_stmt): Call maybe_trim_memstar_call directly
37830         when we know the partially dead statement is a mem* function.
37832         PR tree-optimization/61912
37833         PR tree-optimization/77485
37834         * tree-ssa-dse.c: Include expr.h.
37835         (maybe_trim_constructor_store): New function.
37836         (maybe_trim_partially_dead_store): Call maybe_trim_constructor_store.
37838         PR tree-optimization/33562
37839         PR tree-optimization/61912
37840         PR tree-optimization/77485
37841         * doc/invoke.texi: Document new dse-max-object-size param.
37842         * params.def (PARM_DSE_MAX_OBJECT_SIZE): New PARAM.
37843         * tree-ssa-dse.c: Include params.h.
37844         (dse_store_status): New enum.
37845         (initialize_ao_ref_for_dse): New, partially extracted from
37846         dse_optimize_stmt.
37847         (valid_ao_ref_for_dse, normalize_ref): New.
37848         (setup_live_bytes_from_ref, compute_trims): Likewise.
37849         (clear_bytes_written_by, maybe_trim_complex_store): Likewise.
37850         (maybe_trim_partially_dead_store): Likewise.
37851         (maybe_trim_complex_store): Likewise.
37852         (dse_classify_store): Renamed from dse_possibly_dead_store_p.
37853         Track what bytes live from the original store.  Return tri-state
37854         for dead, partially dead or live.
37855         (dse_dom_walker): Add constructor, destructor and new private members.
37856         (delete_dead_call, delete_dead_assignment): New extracted from
37857         dse_optimize_stmt.
37858         (dse_optimize_stmt): Make a member of dse_dom_walker.
37859         Use initialize_ao_ref_for_dse.
37861         PR tree-optimization/33562
37862         PR tree-optimization/61912
37863         PR tree-optimization/77485
37864         * sbitmap.h (bitmap_count_bits): Prototype.
37865         (bitmap_clear_range, bitmap_set_range): Likewise.
37866         * sbitmap.c (bitmap_clear_range): New function.
37867         (bitmap_set_range, sbitmap_popcount, bitmap_count_bits): Likewise.
37869 2017-01-13  Martin Liska  <mliska@suse.cz>
37871         PR ipa/79043
37872         * function.c (set_cfun): Add new argument force.
37873         * function.h (set_cfun): Likewise.
37874         * ipa-inline-transform.c (inline_call): Use the function when
37875         strict alising from is dropped for function we inline to.
37877 2017-01-13  Richard Biener  <rguenther@suse.de>
37879         * tree-pretty-print.c (dump_generic_node): Fix inverted condition
37880         for dumping GIMPLE INTEGER_CSTs.
37882 2017-01-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
37884         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define __STDC_VERSION__
37885         to 201112L since C++17.
37887 2017-01-13  Maxim Ostapenko  <m.ostapenko@samsung.com>
37889         PR sanitizer/78887
37890         * asan.c (asan_needs_odr_indicator_p): Don't emit ODR indicators
37891         if -fsanitize=kernel-address is present.
37893 2017-01-13  Richard Biener  <rguenther@suse.de>
37895         * tree-pretty-print.c (dump_generic_node): Dump INTEGER_CSTs
37896         as _Literal ( type ) number in case usual suffixes do not
37897         preserve all information.
37899 2017-01-13  Richard Biener  <rguenther@suse.de>
37901         PR tree-optimization/77283
37902         * gimple-ssa-split-paths.c: Include gimple-ssa.h, tree-phinodes.h
37903         and ssa-iterators.h.
37904         (is_feasible_trace): Implement a cost model based on joiner
37905         PHI node uses.
37907 2017-01-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
37909         PR target/79004
37910         * config/rs6000/rs6000.md (FP_ISA3): Do not optimize converting
37911         char or short to __float128/_Float128 directly.
37913 2017-01-12  Martin Sebor  <msebor@redhat.com>
37915         to -Wformat-overflow.
37916         * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust.
37917         (min_bytes_remaining): Same.
37918         (get_string_length): Same.
37919         (format_string): Same.
37920         (format_directive): Same.
37921         (add_bytes): Same.
37922         (pass_sprintf_length::handle_gimple_call): Same.
37924 2017-01-12  Jakub Jelinek  <jakub@redhat.com>
37926         * gimple-ssa-sprintf.c (try_substitute_return_value): Remove
37927         info.nowrite calls with no lhs that can't throw.  Return bool
37928         whether gsi_remove has been called or not.
37929         (pass_sprintf_length::handle_gimple_call): Return bool whether
37930         try_substitute_return_value called gsi_remove.  Formatting fix.
37931         (pass_sprintf_length::execute): Don't use gsi_remove if
37932         handle_gimple_call returned true.
37934         PR bootstrap/79069
37935         * cfgrtl.c (rtl_tidy_fallthru_edge): For any_uncondjump_p that can't
37936         be removed due to side-effects, don't remove following barrier nor
37937         turn the successor edge into fallthru edge.
37939 2017-01-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
37941         PR target/79044
37942         * config/rs6000/rs6000.c (insn_is_swappable_p): Mark
37943         element-reversing loads and stores as not swappable.
37945 2017-01-12  Nathan Sidwell  <nathan@acm.org>
37946             Nicolai Stange  <nicstange@gmail.com>
37948         * combine.c (try_combine): Don't ignore result of overlap checking
37949         loop.  Combine overlap & asm check into single loop.
37951 2017-01-12  Richard Biener  <rguenther@suse.de>
37953         * tree-pretty-print.c (dump_generic_node): Provide -gimple
37954         variant for MEM_REF.  Sanitize INTEGER_CST for -gimple.
37956 2017-01-12  Richard Biener  <rguenther@suse.de>
37958         * tree.c (initialize_tree_contains_struct): Make TS_OPTIMIZATION
37959         and TS_TARGET_OPTION directly derive from TS_BASE.
37960         * tree-core.h (tree_optimization_option): Derive from tree_base.
37961         (tree_target_option): Likewise.
37963 2017-01-11  Uros Bizjak  <ubizjak@gmail.com>
37965         * config/i386/i386.c (memory_address_length): Increase len
37966         only when rip_relative_addr_p returns false.
37968 2017-01-11  Julia Koval  <julia.koval@intel.com>
37970         * common/config/i386/i386-common.c (OPTION_MASK_ISA_SGX_UNSET): New.
37971         (OPTION_MASK_ISA_SGX_SET): New.
37972         (ix86_handle_option): Handle OPT_msgx.
37973         * config.gcc: Added sgxintrin.h.
37974         * config/i386/driver-i386.c (host_detect_local_cpu): Detect sgx.
37975         * config/i386/i386-c.c (ix86_target_macros_internal): Define __SGX__.
37976         * config/i386/i386.c (ix86_target_string): Add -msgx.
37977         (PTA_SGX): New.
37978         (ix86_option_override_internal): Handle new options.
37979         (ix86_valid_target_attribute_inner_p): Add sgx.
37980         * config/i386/i386.h (TARGET_SGX, TARGET_SGX_P): New.
37981         * config/i386/i386.opt: Add msgx.
37982         * config/i386/sgxintrin.h: New file.
37983         * config/i386/x86intrin.h: Add sgxintrin.h.
37985 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
37987         PR c++/71537
37988         * fold-const.c (maybe_nonzero_address): Return 1 for function
37989         local objects.
37990         (tree_single_nonzero_warnv_p): Don't handle function local objects
37991         here.
37993         PR c++/72813
37994         * gcc.c (default_compilers): Don't add -o %g.s for -S -save-temps
37995         of c-header.
37997 2017-01-11  David Malcolm  <dmalcolm@redhat.com>
37999         PR driver/78877
38000         * opts.c: Include "spellcheck.h"
38001         (struct string_fragment): New struct.
38002         (struct edit_distance_traits<const string_fragment &>): New
38003         struct.
38004         (get_closest_sanitizer_option): New function.
38005         (parse_sanitizer_options): Offer suggestions for unrecognized arguments.
38007 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
38009         * dwarf2out.c (DWARF_COMPILE_UNIT_HEADER_SIZE): For DWARF5 decrease
38010         by 12.
38011         (DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE): Always
38012         DWARF_COMPILE_UNIT_HEADER_SIZE plus 12.
38013         (DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE): Define.
38014         (calc_base_type_die_sizes): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE
38015         for initial die_offset if dwarf_split_debug_info.
38016         (output_comp_unit): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE for
38017         initial next_die_offset if dwo_id is non-NULL.  Don't emit padding
38018         fields.
38019         (output_skeleton_debug_sections): Formatting fix.  Use
38020         DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE instead of
38021         DWARF_COMPILE_UNIT_HEADER_SIZE.  Don't emit padding.
38023 2017-01-11  Wilco Dijkstra  <wdijkstr@arm.com>
38025         * config/arm/cortex-a53.md: Add bypasses for
38026         cortex_a53_r2f_cvt.
38027         (cortex_a53_r2f): Only use for transfers.
38028         (cortex_a53_f2r): Likewise.
38029         (cortex_a53_r2f_cvt): Add reservation for conversions.
38030         (cortex_a53_f2r_cvt): Likewise.
38032 2017-01-11  Tamar Christina  <tamar.christina@arm.com>
38034         * config/arm/arm_neon.h: Add __artificial__ and gnu_inline
38035         to all inlined functions, change static to extern.
38037 2017-01-11  Christophe Lyon  <christophe.lyon@linaro.org>
38039         PR target/78253
38040         * config/arm/arm.c (legitimize_pic_address): Handle reference to
38041         weak symbol.
38042         (arm_assemble_integer): Likewise.
38044 2017-01-11  Richard Earnshaw  <rearnsha@arm.com>
38046         * config.gcc: Use new awk script to check CPU, FPU and architecture
38047         parameters for --with-... options.
38048         * config/arm/parsecpu.awk: New file
38049         * config/arm/arm-cpus.in: New file.
38050         * config/arm/arm-opts.h: Include arm-cpu.h instead of processing .def
38051         files.
38052         * config/arm/arm.c: Include arm-cpu-data.h instead of processing .def
38053         files.
38054         * config/arm/t-arm: Update dependency rules.
38055         * common/config/arm/arm-common.c: Include arm-cpu-cdata.h instead
38056         of processing .def files.
38057         * config/arm/genopt.sh: Deleted.
38058         * config/arm/gentune.sh: Deleted.
38059         * config/arm/arm-cores.def: Deleted.
38060         * config/arm/arm-arches.def: Deleted.
38061         * config/arm/arm-fpus.def: Deleted.
38062         * config/arm/arm-tune.md: Regenerated.
38063         * config/arm/arm-tables.opt: Regenerated.
38064         * config/arm/arm-cpu.h: New generated file.
38065         * config/arm/arm-cpu-data.h: New generated file.
38066         * config/arm/arm-cpu-cdata.h: New generated file.
38068 2017-01-11  Maxim Ostapenko  <m.ostapenko@samsung.com>
38070         PR lto/79042
38071         * lto-cgraph.c (lto_output_varpool_node): Pack dynamically_initialized
38072         bit.
38073         (input_varpool_node): Unpack dynamically_initialized bit.
38075 2017-01-11  Eric Botcazou  <ebotcazou@adacore.com>
38077         PR rtl-optimization/79032
38078         * lra-constraints.c (simplify_operand_subreg): In the MEM case, test
38079         the alignment of the adjusted memory reference against that of MODE,
38080         instead of the alignment of the original memory reference.
38082 2017-01-11  Martin Jambor  <mjambor@suse.cz>
38084         * hsa.c (hsa_callable_function_p): Revert addition of DECL_ARTIFICIAL
38085         test.
38086         * ipa-hsa.c (process_hsa_functions): Only duplicate non-artificial
38087         decorated functions.
38089 2017-01-11  Richard Biener  <rguenther@suse.de>
38091         * tree-vrp.c (evrp_dom_walker::before_dom_children): Also
38092         set range/nonnull info for PHI results.  Do not set it on
38093         stmts marked for removal.
38095 2017-01-10  Eric Botcazou  <ebotcazou@adacore.com>
38097         * expr.c (store_field): In the bitfield case, fetch the return value
38098         from the registers before applying a single big-endian adjustment.
38099         Always do a final load for a BLKmode value not larger than a word.
38101 2017-01-10  David Malcolm  <dmalcolm@redhat.com>
38103         PR c++/77949
38104         * input.c (selftest::test_accessing_ordinary_linemaps): Verify
38105         that we correctly handle column numbers greater than
38106         LINE_MAP_MAX_COLUMN_NUMBER.
38108 2017-01-10  Martin Sebor  <msebor@redhat.com>
38110         PR middle-end/78245
38111         * gimple-ssa-sprintf.c (get_destination_size): Call
38112         {init,fini}object_sizes.
38113         * tree-object-size.c (addr_object_size): Adjust.
38114         (pass_through_call): Adjust.
38115         (pass_object_sizes::execute): Adjust.
38116         * tree-object-size.h (fini_object_sizes): Declare.
38118 2017-01-10  Martin Sebor  <msebor@redhat.com>
38120         PR tree-optimization/78775
38121         * builtins.c (get_size_range): Move...
38122         * calls.c: ...to here.
38123         (alloc_max_size): Accept zero argument.
38124         (operand_signed_p): Remove.
38125         (maybe_warn_alloc_args_overflow): Call get_size_range.
38126         * calls.h (get_size_range): Declare.
38128 2017-01-10  Joe Seymour  <joe.s@somniumtech.com>
38130         * config/msp430/driver-msp430.c (msp430_mcu_data): Sync with data
38131         from TI's devices.csv file as of September 2016.
38132         * config/msp430/msp430.c (msp430_mcu_data): Likewise.
38134 2017-01-10  Sandra Loosemore  <sandra@codesourcery.com>
38136         * doc/extend.texi: Tweak formatting to fix overfull hbox warnings.
38137         * doc/invoke.texi: Likewise.
38138         * doc/md.texi: Likewise.
38139         * doc/objc.texi: Likewise.
38141 2017-01-10  Joshua Conner  <joshconner@google.com>
38143         * config/arm/fuchsia-elf.h: New file.
38144         * config/fuchsia.h: New file.
38145         * config.gcc (*-*-fuchsia*): Set native_system_header_dir.
38146         (aarch64*-*-fuchsia*, arm*-*-fuchsia*, x86_64-*-fuchsia*): Add to
38147         targets.
38148         * config.host: (aarch64*-*-fuchsia*, arm*-*-fuchsia*): Add to hosts.
38150 2016-01-10  Richard Biener  <rguenther@suse.de>
38152         PR tree-optimization/79034
38153         * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
38154         Propagate out degenerate PHIs in the joiner.
38156 2017-01-10  Martin Liska  <mliska@suse.cz>
38158         * ipa-icf.c (sort_sem_items_by_decl_uid): New function.
38159         (sort_congruence_classes_by_decl_uid): Likewise.
38160         (sort_congruence_class_groups_by_decl_uid): Likewise.
38161         (sem_item_optimizer::merge_classes): Sort class, groups in these
38162         classes and members in the groups by DECL_UID of declarations.
38163         This would make merge operations stable.
38165 2017-01-10  Martin Liska  <mliska@suse.cz>
38167         * ipa-icf.c (sem_item_optimizer::sem_item_optimizer): Remove
38168         usage of m_classes_vec.
38169         (sem_item_optimizer::~sem_item_optimizer):  Likewise.
38170         (sem_item_optimizer::get_group_by_hash): Likewise.
38171         (sem_item_optimizer::subdivide_classes_by_equality): Likewise.
38172         (sem_item_optimizer::subdivide_classes_by_sensitive_refs): Likewise.
38173         (sem_item_optimizer::verify_classes): Likewise.
38174         (sem_item_optimizer::process_cong_reduction): Likewise.
38175         (sem_item_optimizer::dump_cong_classes): Likewise.
38176         (sem_item_optimizer::merge_classes): Likewise.
38177         * ipa-icf.h (congruence_class_hash): Rename from
38178         congruence_class_group_hash.  Remove declaration of m_classes_vec.
38180 2017-01-10  Andrew Senkevich  <andrew.senkevich@intel.com>
38182         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VPOPCNTDQ_SET,
38183         OPTION_MASK_ISA_AVX512VPOPCNTDQ_UNSET): New.
38184         * config.gcc: Add avx512vpopcntdqintrin.h.
38185         * config/i386/avx512vpopcntdqintrin.h: New.
38186         * config/i386/cpuid.h (bit_AVX512VPOPCNTDQ): New.
38187         * config/i386/i386-builtin-types.def: Add new types.
38188         * config/i386/i386-builtin.def (__builtin_ia32_vpopcountd_v16si,
38189         __builtin_ia32_vpopcountd_v16si_mask, __builtin_ia32_vpopcountq_v8di,
38190         __builtin_ia32_vpopcountq_v8di_mask): New.
38191         * config/i386/i386-c.c (ix86_target_macros_internal): Define
38192         __AVX512VPOPCNTDQ__.
38193         * config/i386/i386.c (ix86_target_string): Add -mavx512vpopcntdq.
38194         (PTA_AVX512VPOPCNTDQ): Define.
38195         * config/i386/i386.h (TARGET_AVX512VPOPCNTDQ,
38196         TARGET_AVX512VPOPCNTDQ_P): Define.
38197         * config/i386/i386.opt: Add mavx512vpopcntdq.
38198         * config/i386/immintrin.h: Include avx512vpopcntdqintrin.h.
38199         * config/i386/sse.md (define_insn "vpopcount<mode><mask_name>"): New.
38201 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
38203         PR middle-end/77484
38204         * predict.def (PRED_CALL): Set to 67.
38206 2017-01-09  Eric Botcazou  <ebotcazou@adacore.com>
38208         * expr.c (store_field): In the bitfield case, if the value comes from
38209         a function call and is of an aggregate type returned in registers, do
38210         not modify the field mode; extract the value in all cases if the mode
38211         is BLKmode and the size is not larger than a word.
38213 2017-01-09  Dominique d'Humieres  <dominiq@lps.ens.fr>
38215         PR target/71017
38216         * config/i386/cpuid.h: Fix undefined behavior.
38218 2017-01-04  Jeff Law  <law@redhat.com>
38220         PR tree-optimization/79007
38221         PR tree-optimization/67955
38222         * tree-ssa-alias.c (same_addr_size_stores_p): Only need to be
38223         conservative for pt.null when flag_non_call_exceptions is on.
38225 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
38227         PR translation/79019
38228         PR translation/79020
38229         * params.def (PARAM_INLINE_MIN_SPEEDUP,
38230         PARAM_IPA_CP_SINGLE_CALL_PENALTY,
38231         PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD): Fix typos
38232         in descriptions.
38233         * config/avr/avr.opt (maccumulate-args): Likewise.
38234         * config/msp430/msp430.opt (mwarn-mcu): Likewise.
38235         * common.opt (freport-bug): Likewise.
38236         * cif-code.def (CIF_FINAL_ERROR): Likewise.
38237         * doc/invoke.texi (ipa-cp-single-call-penalty): Likewise.
38238         * config/s390/s390.c (s390_invalid_binary_op): Fix spelling in
38239         translatable string.
38240         * config/i386/i386.c (function_value_32): Likewise.
38241         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Likewise.
38242         * config/msp430/msp430.c (msp430_option_override, msp430_attr):
38243         Likewise.
38244         * config/msp430/driver-msp430.c (msp430_select_hwmult_lib): Likewise.
38245         * common/config/msp430/msp430-common.c (msp430_handle_option):
38246         Likewise.
38247         * symtab.c (symtab_node::verify_base): Likewise.
38248         * opts.c (set_debug_level): Likewise.
38249         * tree.c (verify_type_variant): Likewise.  Fix typo in comment.
38250         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add
38251         missing whitespace to translatable strings.
38252         * config/avr/avr.md (bswapsi2): Fix typo in comment.
38253         * config/sh/superh.h: Likewise.
38254         * config/i386/xopintrin.h: Likewise.
38255         * config/i386/znver1.md: Likewise.
38256         * config/rs6000/rs6000.c (struct rs6000_opt_mask): Likewise.
38257         * ipa-inline-analysis.c (compute_inline_parameters): Likewise.
38258         * double-int.h (struct double_int): Likewise.
38259         * double-int.c (div_and_round_double): Likewise.
38260         * wide-int.cc: Likewise.
38261         * tree-ssa.c (non_rewritable_mem_ref_base): Likewise.
38262         * tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
38263         * cfgcleanup.c (crossjumps_occured): Renamed to ...
38264         (crossjumps_occurred): ... this.
38265         (try_crossjump_bb, try_head_merge_bb, try_optimize_cfg, cleanup_cfg):
38266         Adjust all uses.
38268         PR tree-optimization/78899
38269         * tree-if-conv.c (version_loop_for_if_conversion): Instead of
38270         returning bool return struct loop *, NULL for failure and the new
38271         loop on success.
38272         (versionable_outer_loop_p): Don't version outer loop if it has
38273         dont_vectorized bit set.
38274         (tree_if_conversion): When versioning outer loop, ensure
38275         tree_if_conversion is performed also on the inner loop of the
38276         non-vectorizable outer loop copy.
38277         * tree-vectorizer.c (set_uid_loop_bbs): Formatting fix.  Fold
38278         LOOP_VECTORIZED in inner loop of the scalar outer loop and
38279         prevent vectorization of it.
38280         (vectorize_loops): For outer + inner LOOP_VECTORIZED, ensure
38281         the outer loop vectorization of the non-scalar version is attempted
38282         before vectorization of the inner loop in scalar version.  If
38283         outer LOOP_VECTORIZED guarded loop is not vectorized, prevent
38284         vectorization of its inner loop.
38285         * tree-vect-loop-manip.c (rename_variables_in_bb): If outer_loop
38286         has 2 inner loops, rename also on edges from bb whose single pred
38287         is outer_loop->header.  Fix typo in function comment.
38289 2017-01-09  Martin Sebor  <msebor@redhat.com>
38291         PR bootstrap/79033
38292         * asan.c (asan_emit_stack_protection): Increase local buffer size
38293         to avoid snprintf truncation warning.
38295 2017-01-09  Andrew Pinski  <apinski@cavium.com>
38297         * config/aarch64/aarch64-cores.def: Add thunderx2t99.  Change vulcan
38298         to reference thunderx2t99 for the tuning structure
38299         * config/aarch64/aarch64-cost-tables.h (vulcan_extra_costs):
38300         Rename to ...
38301         (thunderx2t99_extra_costs): This.
38302         * config/aarch64/aarch64-tune.md: Regenerate.
38303         * config/aarch64/aarch64.c (vulcan_addrcost_table): Rename to ...
38304         (vulcan_addrcost_table): This.
38305         (vulcan_regmove_cost): Rename to ...
38306         (thunderx2t99_regmove_cost): This.
38307         (vulcan_vector_cost): Rename to ...
38308         (thunderx2t99_vector_cost): this.
38309         (vulcan_branch_cost): Rename to ...
38310         (thunderx2t99_branch_cost): This.
38311         (vulcan_tunings): Rename to ...
38312         (thunderx2t99_tunings): This and s/vulcan/thunderx2t99 .
38313         * doc/invoke.texi (AARCH64/mtune): Add thunderx2t99.
38315 2017-01-09  Martin Jambor  <mjambor@suse.cz>
38317         PR ipa/78365
38318         PR ipa/78599
38319         * ipa-prop.h (ipa_jump_func): Swap positions of vr_known and m_vr.
38320         * ipa-cp.c (ipa_vr_operation_and_type_effects): New function.
38321         (propagate_vr_accross_jump_function): Use the above function for all
38322         value range computations for pass-through jump functions and type
38323         converasion from explicit value range values.
38324         (ipcp_propagate_stage): Do not attempt to deduce types of formal
38325         parameters from TYPE_ARG_TYPES.
38326         * ipa-prop.c (ipa_write_jump_function): Remove trailing whitespace.
38327         (ipa_write_node_info): Stream type of the actual argument.
38328         (ipa_read_node_info): Likewise. Also remove trailing whitespace.
38330 2017-01-09  Martin Liska  <mliska@suse.cz>
38332         PR pch/78970
38333         * gcc.c (driver_handle_option): Handle OPT_E and set have_E.
38334         (lookup_compiler): Do not show error message with have_E.
38336 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
38338         PR tree-optimization/78938
38339         * tree-vect-stmts.c (vectorizable_condition): For non-masked COND_EXPR
38340         where comp_vectype is VECTOR_BOOLEAN_TYPE_P, use
38341         BIT_{NOT,XOR,AND,IOR}_EXPR on the comparison operands instead of
38342         {EQ,NE,GE,GT,LE,LT}_EXPR directly inside of VEC_COND_EXPR.  Formatting
38343         fixes.
38345 2017-01-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
38347         * tree-ssa-address.c (gen_addr_rtx): Don't handle index if it
38348         is const0_rtx.
38350 2017-01-09  Richard Biener  <rguenther@suse.de>
38352         PR tree-optimization/78997
38353         * tree-vect-slp.c (vect_mask_constant_operand_p): Handle SSA
38354         name condition properly.
38356 2017-01-09  Richard Biener  <rguenther@suse.de>
38358         PR debug/79000
38359         * dwarf2out.c (is_cxx): New overload with context.
38360         (is_naming_typedef_decl): Use it.
38362 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
38364         * invoke.texi (Option Summary): Correct spacing in option lists
38365         and add line breaks to fix over-long lines.
38367 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
38369         PR middle-end/17660
38371         * extend.texi (Common Variable Attributes): Add xref to GCC
38372         Internals manual to explain mode attribute keywords.
38374 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
38376         PR other/16519
38377         * doc/invoke.texi (Option Summary): Move -pthread to Linker Options
38378         and Preprocessor Options.
38379         (Options for Linking): Document -pthread here....
38380         (RS/6000 and PowerPC Options): ...not here.
38381         (Solaris 2 Options): ...or here.
38382         * doc/cppopts.texi: Document -pthread.
38384 2017-01-08  Martin Sebor  <msebor@redhat.com>
38386         PR middle-end/77708
38387         * doc/invoke.texi (Warning Options): Document -Wformat-truncation.
38388         * gimple-ssa-sprintf.c (call_info::reval_used, call_info::warnopt):
38389         New member functions.
38390         (format_directive): Used them.
38391         (add_bytes): Same.
38392         (pass_sprintf_length::handle_gimple_call): Same.
38393         * graphite-sese-to-poly.c (tree_int_to_gmp): Increase buffer size
38394         to avoid truncation for any argument.
38395         (extract_affine_mul): Same.
38396         * tree.c (get_file_function_name): Same.
38398 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
38400         PR middle-end/77484
38401         * predict.def (PRED_INDIR_CALL): Set to 86.
38403 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
38405         PR preprocessor/54124
38406         * doc/cppopts.texi: Reformat -d subtable to list the full name
38407         of the options.  Add cross-reference to the docs for the general
38408         compiler -d options.
38409         * doc/invoke.texi (Developer Options): Add cross-reference to the
38410         preprocessor-specific -d option documentation.
38412 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
38414         PR preprocessor/13498
38415         * doc/cpp.texi (Search Path): Rewrite to remove obsolete and
38416         redudant material, and reflect new command-line options.
38417         (System Headers): Likewise.
38419 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
38421         * doc/cppdiropts.texi: Merge documentation of -I, -iquote,
38422         -isystem, and -idirafter.  Copy-edit.
38423         * doc/cppopts.texi: Copy-edit.  Remove contradiction about
38424         default for -ftrack-macro-expansion.  Delete obsolete and
38425         badly-formatted implementation details about -fdebug-cpp output.
38426         * doc/cppwarnopts.texi: Copy-edit.
38428 2017-01-07  David Malcolm  <dmalcolm@redhat.com>
38430         PR c++/72803
38431         * input.c (selftest::test_accessing_ordinary_linemaps): Verify
38432         that the transition from a max line width >= 1<<10 to narrower
38433         lines works correctly.
38435 2017-01-07  Alexandre Oliva  <aoliva@redhat.com>
38437         * doc/options.texi (PerFunction): New.
38438         * opt-functions.awk (switch_flags): Map both Optimization and
38439         PerFunction to CL_OPTIMIZATION.
38440         * opth-gen.awk: Test for PerFunction flag along with
38441         Optimization.
38442         * optc-save-gen.awk: Likewise.  Introduce var_opt_hash and set
38443         it only when the latter is present.  Skip those that don't in
38444         the hash function generator.
38445         * common.opt (fvar-tracking): Mark as PerFunction instead of
38446         Optimization.
38447         (fvar-tracking-assignments): Likewise.
38448         (fvar-tracking-assignments-toggle): Likewise.
38449         (fvar-tracking-uninit): Likewise.
38451 2017-01-07  Jakub Jelinek  <jakub@redhat.com>
38453         PR translation/79018
38454         * params.def (PARAM_MAX_STORES_TO_MERGE): Add missing space between
38455         the and store.
38457 2017-01-06  Mikael Pettersson  <mikpelinux@gmail.com>
38459         PR target/57583
38460         * config/m68k/m68k.opt (LONG_JUMP_TABLE_OFFSETS): New option.
38461         * config/m68k/linux.h (ASM_RETURN_CASE_JUMP): Handle
38462         TARGET_LONG_JUMP_TABLE_OFFSETS.
38463         * config/m68k/m68kelf.h (ASM_RETURN_CASE_JUMP): Likewise.
38464         * config/m68k/netbsd-elf.h (ASM_RETURN_CASE_JUMP): Likewise.
38465         * config/m68k/m68k.h (CASE_VECTOR_MODE): Likewise.
38466         (ASM_OUTPUT_ADDR_DIFF_ELF): Likewise.
38467         * config/m68k/m68k.md (tablejump expander): Likewise.
38468         (*tablejump_pcrel_hi): Renamed from unnamed insn, reject
38469         TARGET_LONG_JUMP_TABLE_OFFSETS.
38470         (*tablejump_pcrel_si): New insn, handle TARGET_LONG_JUMP_TABLE_OFFSETS.
38471         * doc/invoke.texi (M68K options): Add -mlong-jump-table-offsets.
38473 2017-01-06  Edgar E. Iglesias <edgar.iglesias@xilinx.com>
38474             David Holsgrove <david.holsgrove@xilinx.com>
38476         * common/config/microblaze/microblaze-common.c
38477         (TARGET_EXCEPT_UNWIND_INFO): Remove.
38478         * config/microblaze/microblaze-protos.h (microblaze_eh_return):
38479         New prototype.
38480         * config/microblaze/microblaze.c (microblaze_must_save_register)
38481         (microblaze_expand_epilogue, microblaze_return_addr): Handle
38482         calls_eh_return.
38483         (microblaze_eh_return): New function.
38484         * config/microblaze/microblaze.h (RETURN_ADDR_OFFSET)
38485         (EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM)
38486         (EH_RETURN_STACKADJ_RTX, ASM_PREFERRED_EH_DATA_FORMAT): New macros.
38487         * config/microblaze/microblaze.md (eh_return): New pattern.
38489 2017-01-06  Jakub Jelinek  <jakub@redhat.com>
38491         * system.h (GCC_DIAGNOSTIC_PUSH_IGNORED, GCC_DIAGNOSTIC_POP,
38492         GCC_DIAGNOSTIC_STRINGIFY): Define.
38494         * read-rtl.c (rtx_reader::read_rtx_code): Avoid -Wsign-compare warning.
38496 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
38498         * config/arm/arm.md (<mcrr>): New.
38499         (<mrrc>): New.
38500         * config/arm/arm.c (arm_arch5te): New.
38501         (arm_option_override): Set arm_arch5te.
38502         (arm_coproc_builtin_available): Add support for mcrr, mcrr2, mrrc
38503         and mrrc2.
38504         * config/arm/arm-builtins.c (MCRR_QUALIFIERS): Define to...
38505         (arm_mcrr_qualifiers): ... this. New.
38506         (MRRC_QUALIFIERS): Define to...
38507         (arm_mrrc_qualifiers): ... this. New.
38508         * config/arm/arm_acle.h (__arm_mcrr, __arm_mcrr2, __arm_mrrc,
38509         __arm_mrrc2): New.
38510         * config/arm/arm_acle_builtins.def (mcrr, mcrr2, mrrc, mrrc2): New.
38511         * config/arm/iterators.md (MCRRI, mcrr, MCRR): New.
38512         (MRRCI, mrrc, MRRC): New.
38513         * config/arm/unspecs.md (VUNSPEC_MCRR, VUNSPEC_MCRR2, VUNSPEC_MRRC,
38514         VUNSPEC_MRRC2): New.
38516 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
38518         * config/arm/arm.md (<mcr>): New.
38519         (<mrc>): New.
38520         * config/arm/arm.c (arm_coproc_builtin_available): Add
38521         support for mcr, mrc, mcr2 and mrc2.
38522         * config/arm/arm-builtins.c (MCR_QUALIFIERS): Define to...
38523         (arm_mcr_qualifiers): ... this. New.
38524         (MRC_QUALIFIERS): Define to ...
38525         (arm_mrc_qualifiers): ... this. New.
38526         (MCR_QUALIFIERS): Define to ...
38527         (arm_mcr_qualifiers): ... this. New.
38528         * config/arm/arm_acle.h (__arm_mcr, __arm_mrc, __arm_mcr2,
38529         __arm_mrc2): New.
38530         * config/arm/arm_acle_builtins.def (mcr, mcr2, mrc, mrc2): New.
38531         * config/arm/iterators.md (MCRI, mcr, MCR, MRCI, mrc, MRC): New.
38532         * config/arm/unspecs.md (VUNSPEC_MCR, VUNSPEC_MCR2, VUNSPEC_MRC,
38533         VUNSPEC_MRC2): New.
38535 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
38537         * config/arm/arm.md (*ldc): New.
38538         (*stc): New.
38539         (<ldc>): New.
38540         (<stc>): New.
38541         * config/arm/arm.c (arm_coproc_builtin_available): Add
38542         support for ldc,ldcl,stc,stcl,ldc2,ldc2l,stc2 and stc2l.
38543         (arm_coproc_ldc_stc_legitimate_address): New.
38544         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
38545         'qualifier_const_pointer'.
38546         (LDC_QUALIFIERS): Define to...
38547         (arm_ldc_qualifiers): ... this. New.
38548         (STC_QUALIFIERS): Define to...
38549         (arm_stc_qualifiers): ... this. New.
38550         * config/arm/arm-protos.h
38551         (arm_coproc_ldc_stc_legitimate_address): New.
38552         * config/arm/arm_acle.h (__arm_ldc, __arm_ldcl, __arm_stc,
38553         __arm_stcl, __arm_ldc2, __arm_ldc2l, __arm_stc2, __arm_stc2l): New.
38554         * config/arm/arm_acle_builtins.def (ldc, ldc2, ldcl, ldc2l, stc,
38555         stc2, stcl, stc2l): New.
38556         * config/arm/constraints.md (Uz): New.
38557         * config/arm/iterators.md (LDCI, STCI, ldc, stc, LDC STC): New.
38558         * config/arm/unspecs.md (VUNSPEC_LDC, VUNSPEC_LDC2, VUNSPEC_LDCL,
38559         VUNSPEC_LDC2L, VUNSPEC_STC, VUNSPEC_STC2, VUNSPEC_STCL,
38560         VUNSPEC_STC2L): New.
38562 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
38564         * config/arm/arm.md (<cdp>): New.
38565         * config/arm/arm.c (neon_const_bounds): Rename this ...
38566         (arm_const_bounds): ... this.
38567         (arm_coproc_builtin_available): New.
38568         * config/arm/arm-builtins.c (SIMD_MAX_BUILTIN_ARGS): Increase.
38569         (arm_type_qualifiers): Add 'qualifier_unsigned_immediate'.
38570         (CDP_QUALIFIERS): Define to...
38571         (arm_cdp_qualifiers): ... this. New.
38572         (void_UP): Define.
38573         (arm_expand_builtin_args): Add case for 6 arguments.
38574         * config/arm/arm-protos.h (neon_const_bounds): Rename this ...
38575         (arm_const_bounds): ... this.
38576         (arm_coproc_builtin_available): New.
38577         * config/arm/arm_acle.h (__arm_cdp): New.
38578         (__arm_cdp2): New.
38579         * config/arm/arm_acle_builtins.def (cdp): New.
38580         (cdp2): New.
38581         * config/arm/iterators.md (CDPI,CDP,cdp): New.
38582         * config/arm/neon.md: Rename all 'neon_const_bounds' to
38583         'arm_const_bounds'.
38584         * config/arm/types.md (coproc): New.
38585         * config/arm/unspecs.md (VUNSPEC_CDP, VUNSPEC_CDP2): New.
38586         * doc/extend.texi (ACLE): Add a mention of Coprocessor intrinsics.
38587         * doc/sourcebuild.texi (arm_coproc1_ok, arm_coproc2_ok,
38588         arm_coproc3_ok, arm_coproc4_ok): Document new effective targets.
38590 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
38592         * config/arm/arm-builtins.c (arm_unsigned_binop_qualifiers): New.
38593         (UBINOP_QUALIFIERS): New.
38594         (si_UP): Define.
38595         (acle_builtin_data): New. Change comment.
38596         (arm_builtins): Remove ARM_BUILTIN_CRC32B, ARM_BUILTIN_CRC32H,
38597         ARM_BUILTIN_CRC32W, ARM_BUILTIN_CRC32CB, ARM_BUILTIN_CRC32CH,
38598         ARM_BUILTIN_CRC32CW. Add ARM_BUILTIN_ACLE_BASE and include
38599         arm_acle_builtins.def.
38600         (ARM_BUILTIN_ACLE_PATTERN_START): Define.
38601         (arm_init_acle_builtins): New.
38602         (CRC32_BUILTIN): Remove.
38603         (bdesc_2arg): Remove entries for crc32b, crc32h, crc32w,
38604         crc32cb, crc32ch and crc32cw.
38605         (arm_init_crc32_builtins): Remove.
38606         (arm_init_builtins): Use arm_init_acle_builtins rather
38607         than arm_init_crc32_builtins.
38608         (arm_expand_acle_builtin): New.
38609         (arm_expand_builtin): Use 'arm_expand_acle_builtin'.
38610         * config/arm/arm_acle_builtins.def: New.
38612 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
38614         * config/arm/arm-builtins.c (neon_builtin_datum): Rename to ..
38615         (arm_builtin_datum): ... this.
38616         (arm_init_neon_builtin): Rename to ...
38617         (arm_init_builtin): ... this. Add a new parameters PREFIX
38618         and USE_SIG_IN_NAME.
38619         (arm_init_neon_builtins): Replace 'arm_init_neon_builtin' with
38620         'arm_init_builtin'. Replace type 'neon_builtin_datum' with
38621         'arm_builtin_datum'.
38622         (arm_init_vfp_builtins): Likewise.
38623         (builtin_arg): Rename enum's replacing 'NEON_ARG' with
38624         'ARG_BUILTIN' and add a 'ARG_BUILTIN_NEON_MEMORY.
38625         (arm_expand_neon_args): Rename to ...
38626         (arm_expand_builtin_args): ... this. Rename builtin_arg
38627         enum values and differentiate between ARG_BUILTIN_MEMORY
38628         and ARG_BUILTIN_NEON_MEMORY.
38629         (arm_expand_neon_builtin_1): Rename to ...
38630         (arm_expand_builtin_1): ... this. Rename builtin_arg enum
38631         values, arm_expand_builtin_args and add bool parameter NEON.
38632         (arm_expand_neon_builtin): Use arm_expand_builtin_1.
38633         (arm_expand_vfp_builtin): Likewise.
38634         (NEON_MAX_BUILTIN_ARGS): Remove, it was unused.
38636 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
38638         PR middle-end/77484
38639         * predict.def (PRED_POLYMORPHIC_CALL): Set to 59.
38640         * predict.c (tree_estimate_probability_bb): Reverse direction of
38641         polymorphic call predictor.
38643 2017-01-06  David Malcolm  <dmalcolm@redhat.com>
38645         * passes.c (execute_one_pass): Split out pass-skipping logic into...
38646         (determine_pass_name_match): ...this new function and...
38647         (should_skip_pass_p): ...this new function.
38649 2017-01-06  Nathan Sidwell  <nathan@acm.org>
38651         * ipa-visibility.c (function_and_variable_visibility): Reformat
38652         comments and long lines.  Remove extrneous if.
38653         * symtab.c (symtab_node::make_decl_local): Fix code format.
38654         (symtab_node::set_section_for_node): Fix comment typo.
38656 2017-01-06  Martin Liska  <mliska@suse.cz>
38658         PR bootstrap/79003
38659         * lra-constraints.c: Rename invariant to lra_invariant.
38660         * predict.c (set_even_probabilities): Initialize e to NULL.
38662 2017-01-05  Martin Sebor  <msebor@redhat.com>
38664         PR tree-optimization/78910
38665         * gimple-ssa-sprintf.c (tree_digits): Add an argument.
38666         (format_integer): Correct off-by-one error in the handling
38667         of precision with negative numbers in signed conversions..
38669 2017-01-05  Eric Botcazou  <ebotcazou@adacore.com>
38671         * doc/invoke.texi (C Dialect Options): Adjust -fsso-struct entry.
38673 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
38675         PR tree-optimization/71016
38676         * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Pass cond_stmt to
38677         factor_out_conditional_conversion.  Formatting fix.
38678         (factor_out_conditional_conversion): Add cond_stmt argument.
38679         If arg1 is INTEGER_CST, punt if new_arg0 is not any operand of
38680         cond_stmt and if arg0_def_stmt is not the only stmt in its bb.
38681         Formatting fix.
38683 2017-01-05  David Malcolm  <dmalcolm@redhat.com>
38685         * Makefile.in (OBJS): Add read-md.o, read-rtl.o,
38686         read-rtl-function.o, and selftest-rtl.o.
38687         * config/aarch64/aarch64.c: Include selftest.h and selftest-rtl.h.
38688         (selftest::aarch64_test_loading_full_dump): New function.
38689         (selftest::aarch64_run_selftests): New function.
38690         (TARGET_RUN_TARGET_SELFTESTS): Wire it up to
38691         selftest::aarch64_run_selftests.
38692         * config/i386/i386.c
38693         (selftest::ix86_test_loading_dump_fragment_1): New function.
38694         (selftest::ix86_test_loading_call_insn): New function.
38695         (selftest::ix86_test_loading_full_dump): New function.
38696         (selftest::ix86_test_loading_unspec): New function.
38697         (selftest::ix86_run_selftests): Call the new functions.
38698         * emit-rtl.c (maybe_set_max_label_num): New function.
38699         * emit-rtl.h (maybe_set_max_label_num): New decl.
38700         * function.c (instantiate_decls): Guard call to
38701         instantiate_decls_1 with if (DECL_INITIAL (fndecl)).
38702         * function-tests.c (selftest::verify_three_block_rtl_cfg): Remove
38703         "static".
38704         * gensupport.c (gen_reader::gen_reader): Pass "false"
38705         for new "compact" param of rtx_reader.
38706         * print-rtl.c (rtx_writer::print_rtx_operand): Print "(nil)"
38707         rather than an empty string for NULL strings.
38708         * read-md.c: Potentially include config.h rather than bconfig.h.
38709         Wrap include of errors.h with #ifdef GENERATOR_FILE.
38710         (have_error): New global, copied from errors.c.
38711         (md_reader::read_name): Rename to...
38712         (md_reader::read_name_1): ...this, adding "out_loc" param,
38713         and converting "missing name or number" to returning false, rather
38714         than failing.
38715         (md_reader::read_name): Reimplement in terms of read_name_1.
38716         (md_reader::read_name_or_nil): New function.
38717         (md_reader::read_string): Handle "(nil)" by returning NULL.
38718         (md_reader::md_reader): Add new param "compact".
38719         (md_reader::read_md_files): Wrap with #ifdef GENERATOR_FILE.
38720         (md_reader::read_file): New method.
38721         * read-md.h (md_reader::md_reader): Add new param "compact".
38722         (md_reader::read_file): New method.
38723         (md_reader::is_compact): New accessor.
38724         (md_reader::read_name): Convert return type from void to file_location.
38725         (md_reader::read_name_or_nil): New decl.
38726         (md_reader::read_name_1): New decl.
38727         (md_reader::m_compact): New field.
38728         (noop_reader::noop_reader): Pass "false" for new "compact" param
38729         of rtx_reader.
38730         (rtx_reader::rtx_reader): Add new "compact" param.
38731         (rtx_reader::read_rtx_operand): Make virtual and convert return
38732         type from void to rtx.
38733         (rtx_reader::read_until): New decl.
38734         (rtx_reader::handle_any_trailing_information): New virtual function.
38735         (rtx_reader::postprocess): New virtual function.
38736         (rtx_reader::finalize_string): New virtual function.
38737         (rtx_reader::m_in_call_function_usage): New field.
38738         (rtx_reader::m_reuse_rtx_by_id): New field.
38739         * read-rtl-function.c: New file.
38740         * selftest-rtl.c (selftest::assert_rtx_ptr_eq_at): New function.
38741         * selftest-rtl.h (ASSERT_RTX_PTR_EQ): New macro.
38742         (selftest::verify_three_block_rtl_cfg): New decl.
38743         * read-rtl-function.h: New file.
38744         * read-rtl.c: Potentially include config.h rather than bconfig.h.
38745         For host, include function.h, memmodel.h, and emit-rtl.h.
38746         (one_time_initialization): New function.
38747         (struct compact_insn_name): New struct.
38748         (compact_insn_names): New array.
38749         (find_code): Handle insn codes in compact dumps.
38750         (apply_subst_iterator): Wrap with #ifdef GENERATOR_FILE.
38751         (bind_subst_iter_and_attr): Likewise.
38752         (add_condition_to_string): Likewise.
38753         (add_condition_to_rtx): Likewise.
38754         (apply_attribute_uses): Likewise.
38755         (add_current_iterators): Likewise.
38756         (apply_iterators): Likewise.
38757         (initialize_iterators): Guard usage of apply_subst_iterator with
38758         #ifdef GENERATOR_FILE.
38759         (read_conditions): Wrap with #ifdef GENERATOR_FILE.
38760         (md_reader::read_mapping): Likewise.
38761         (add_define_attr_for_define_subst): Likewise.
38762         (add_define_subst_attr): Likewise.
38763         (read_subst_mapping): Likewise.
38764         (check_code_iterator): Likewise.
38765         (rtx_reader::read_rtx): Likewise.  Move one-time initialization
38766         logic to...
38767         (one_time_initialization): New function.
38768         (rtx_reader::read_until): New method.
38769         (read_flags): New function.
38770         (parse_reg_note_name): New function.
38771         (rtx_reader::read_rtx_code): Initialize "iterator" to NULL.
38772         Handle reuse_rtx ids.
38773         Wrap iterator lookup within #ifdef GENERATOR_FILE.
38774         Add parsing support for RTL dumps, mirroring the special-cases in
38775         print_rtx, by calling read_flags, reading REG_NOTE names, INSN_UID
38776         values, and calling handle_any_trailing_information.
38777         (rtx_reader::read_rtx_operand): Convert return type from void
38778         to rtx, returning return_rtx.  Handle case 'e'.  Call
38779         finalize_string on XSTR and XTMPL fields.
38780         (rtx_reader::read_nested_rtx):  Handle dumps in which trailing
38781          "(nil)" values were omitted.  Call the postprocess vfunc on the
38782         return_rtx.
38783         (rtx_reader::rtx_reader): Add new "compact" param and pass to base
38784         class ctor.  Initialize m_in_call_function_usage.  Call
38785         one_time_initialization.
38786         * rtl-tests.c (selftest::test_uncond_jump): Call
38787         set_new_first_and_last_insn.
38788         * rtl.h (read_rtx): Wrap decl with #ifdef GENERATOR_FILE.
38789         * selftest-rtl.c: New file.
38790         * selftest-rtl.h (class selftest::rtl_dump_test): New class.
38791         (selftest::get_insn_by_uid): New decl.
38792         * selftest-run-tests.c (selftest::run_tests): Call
38793         read_rtl_function_c_tests.
38794         * selftest.h  (selftest::read_rtl_function_c_tests): New decl.
38795         * tree-dfa.c (ssa_default_def): Return NULL_TREE for rtl function
38796         dumps.
38798 2017-01-05  Uros Bizjak  <ubizjak@gmail.com>
38800         * config/i386/i386.md (*testqi_ext_3): No need to handle memory
38801         operands in a special way.  Assert that pos+len <= mode precision.
38803 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
38805         * common.opt (fvect-cost-model): Remove RejectNegative flag, use
38806         3 argument Alias with unlimited for the negative form.
38807         (fno-vect-cost-model): Removed.
38809 2017-01-05  Martin Liska  <mliska@suse.cz>
38811         * hsa-gen.c (gen_hsa_divmod): New function.
38812         (gen_hsa_insn_for_internal_fn_call): Use the function for IFN_DIVMOD.
38814 2017-01-05  Martin Liska  <mliska@suse.cz>
38816         PR pch/78970
38817         * gcc.c (lookup_compiler): Reject '-' filename for a precompiled
38818         header.
38820 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
38822         * config/s390/s390.c (s390_expand_setmem): Unroll the loop for
38823         small constant length operands.
38825 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
38827         * config/s390/s390.c (s390_expand_setmem): Avoid overlapping bytes
38828         between loop iterations.
38830 2017-01-05  Martin Liska  <mliska@suse.cz>
38832         PR sanitizer/78815
38833         * gimplify.c (gimplify_decl_expr): Compare to
38834         asan_poisoned_variables instread of checking flags.
38835         (gimplify_target_expr): Likewise.
38836         (gimplify_expr): Likewise.
38837         (gimplify_function_tree): Conditionally initialize
38838         asan_poisoned_variables.
38840 2017-01-04  Jeff Law  <law@redhat.com>
38842         PR tree-optimizatin/78812
38843         * rtl.h (contains_mem_rtx_p): Prototype.
38844         * ifcvt.c (containts_mem_rtx_p): Move from here to...
38845         * rtlanal.c (contains_mem_rtx_p): Here and remove static linkage.
38846         * gcse.c (prune_expressions): Use contains_mem_rtx_p to discover
38847         and prune MEMs that are not at the toplevel of a SET_SRC rtx.  Look
38848         through ZERO_EXTEND and SIGN_EXTEND when trying to avoid pruning MEMs.
38850 2017-01-04  Alexandre Oliva  <aoliva@redhat.com>
38852         * input.c (assert_char_at_range): Default-initialize actual_range.
38854 2017-01-04  Alexandre Oliva  <aoliva@redhat.com>
38856         * df-scan.c (df_ref_create_structure): Make regno unsigned,
38857         to match the caller.
38859 2017-01-04  Alexandre Oliva  <aoliva@redhat.com>
38861         * cfgexpand.c (expand_gimple_basic_block): Disregard debug
38862         insns after final jump in test to emit dummy move.
38864 2017-01-04  Alexandre Oliva  <aoliva@redhat.com>
38866         * gimple-iterator.h (gsi_one_nondebug_before_end_p): New.
38867         * tree-eh.c (cleanup_empty_eh): Skip more debug stmts.
38869 2017-01-04  Alexandre Oliva  <aoliva@redhat.com>
38871         * multiple_target.c (create_dispatcher_calls): Init e_next.
38872         * tree-ssa-loop-split.c (split_loop): Init border.
38873         * tree-vect-loop.c (vect_determine_vectorization_factor): Init
38874         scalar_type.
38876 2017-01-04  Michael Meissner  <meissner@linux.vnet.ibm.com>
38878         PR target/71977
38879         PR target/70568
38880         PR target/78823
38881         * config/rs6000/predicates.md (sf_subreg_operand): New predicate.
38882         (altivec_register_operand): Do not return true if the operand
38883         contains a SUBREG mixing SImode and SFmode.
38884         (vsx_register_operand): Likewise.
38885         (vsx_reg_sfsubreg_ok): New predicate.
38886         (vfloat_operand): Do not return true if the operand contains a
38887         SUBREG mixing SImode and SFmode.
38888         (vint_operand): Likewise.
38889         (vlogical_operand): Likewise.
38890         (gpc_reg_operand): Likewise.
38891         (int_reg_operand): Likewise.
38892         * config/rs6000/rs6000-protos.h (valid_sf_si_move): Add declaration.
38893         * config/rs6000/rs6000.c (valid_sf_si_move): New function to
38894         determine if a MOVSI or MOVSF operation contains SUBREGs that mix
38895         SImode and SFmode.
38896         (rs6000_emit_move_si_sf_subreg): New helper function.
38897         (rs6000_emit_move): Call rs6000_emit_move_si_sf_subreg to possbily
38898         fixup SUBREGs involving SImode and SFmode.
38899         * config/rs6000/vsx.md (SFBOOL_*): New constants that are operand
38900         numbers for the new peephole2 optimization.
38901         (peephole2 for SFmode unions): New peephole2 to optimize cases in
38902         the GLIBC math library that do AND/IOR/XOR operations on single
38903         precision floating point.
38904         * config/rs6000/rs6000.h (TARGET_NO_SF_SUBREG): New internal
38905         target macros to say whether we need to avoid SUBREGs mixing
38906         SImode and SFmode.
38907         (TARGET_ALLOW_SF_SUBREG): Likewise.
38908         * config/rs6000/rs6000.md (UNSPEC_SF_FROM_SI): New unspecs.
38909         (UNSPEC_SI_FROM_SF): Likewise.
38910         (iorxor): Change spacing.
38911         (and_ior_xor): New iterator for AND, IOR, and XOR.
38912         (movsi_from_sf): New insns for SImode/SFmode SUBREG support.
38913         (movdi_from_sf_zero_ext): Likewise.
38914         (mov<mode>_hardfloat, FMOVE32 iterator): Use register_operand
38915         instead of gpc_reg_operand.  Add SImode/SFmode SUBREG support.
38916         (movsf_from_si): New insn for SImode/SFmode SUBREG support.
38917         (fma<mode>4): Use gpc_reg_operand instead of register_operand.
38918         (fms<mode>4): Likewise.
38919         (fnma<mode>4): Likewise.
38920         (fnms<mode>4): Likewise.
38921         (nfma<mode>4): Likewise.
38922         (nfms<mode>4): Likewise.
38924 2017-01-04  Marek Polacek  <polacek@redhat.com>
38926         PR c++/64767
38927         * doc/invoke.texi: Document -Wpointer-compare.
38929 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
38931         * optc-gen.awk: Emit #error for -W*/-f*/-m* Enum without
38932         RejectNegative.
38934         * dwarf2out.c (output_loc_list): Don't throw away 64K+ location
38935         descriptions for -gdwarf-5 and emit them as uleb128 instead of
38936         2-byte data.
38938 2017-01-04  Kelvin Nilsen  <kelvin@gcc.gnu.org>
38940         PR target/78056
38941         * doc/sourcebuild.texi (PowerPC-specific attributes): Add
38942         documentation of the powerpc_popcntb_ok attribute.
38943         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
38944         code to issue warning messages if a requested CPU configuration is
38945         not supported by the binary (assembler and loader) toolchain.
38946         (spe_init_builtins): Add two assertions to prevent ICE if attempt is
38947         made to define a built-in function that has been disabled.
38948         (paired_init_builtins): Add assertion to prevent ICE if attempt is
38949         made to define a built-in function that has been disabled.
38950         (altivec_init_builtins): Add comment explaining why definition
38951         of the DST built-in functions is not preceded by an assertion
38952         check.  Add assertions to prevent ICE if attempts are made to
38953         define an altivec predicate or an abs* built-in function that has
38954         been disabled.
38955         (htm_init_builtins): Add comment explaining why definition of the
38956         htm built-in functions is not preceded by an assertion check.
38958 2017-01-04  Jeff Law  <law@redhat.com>
38960         PR tree-optimizatin/67955
38961         * tree-ssa-alias.c (same_addr_size_stores_p): Check offsets first.
38962         Allow any SSA_VAR_P as the base objects.  Use integer_zerop.  Verify
38963         the points-to solution does not include pt_null.  Use DECL_PT_UID
38964         unconditionally.
38966 2017-01-04  Uros Bizjak  <ubizjak@gmail.com>
38968         * config/i386/i386.md (HI/SImode test with imm to QImode splitters):
38969         Use gen_int_mode instead of gen_lopwart for const_int operands.
38971 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
38973         PR tree-optimization/71563
38974         * match.pd: Simplify X << Y into X if Y is known to be 0 or
38975         out of range value - has low bits known to be zero.
38977 2017-01-04  Alan Modra  <amodra@gmail.com>
38979         * Makefile.in (aclocal_deps): Update and order as per aclocal.m4.
38980         * configure: Regenerate.
38981         * config.in: Regenerate.
38983 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
38985         PR bootstrap/77569
38986         * input.c (ebcdic_execution_charset::on_error): Don't use strstr for
38987         a substring of the message, but strcmp with the whole message.  Ifdef
38988         ENABLE_NLS, translate the message first using dgettext.
38990 2017-01-03  Jeff Law  <law@redhat.com>
38992         PR tree-optimizatin/78856
38993         * tree-ssa-threadupdate.c: Include tree-vectorizer.h.
38994         (mark_threaded_blocks): Remove code to truncate thread paths that
38995         cross multiple loop headers.  Instead invalidate the cached loop
38996         iteration information and handle case of a thread path walking
38997         into an irreducible region.
38999 2017-01-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
39001         PR target/78900
39002         * config/rs6000/rs6000.c (rs6000_split_signbit): Change some
39003         assertions.  Add support for doing the signbit if the IEEE 128-bit
39004         floating point value is in a GPR.
39005         * config/rs6000/rs6000.md (Fsignbit): Delete.
39006         (signbit<mode>2_dm): Delete using <Fsignbit> and just use "wa".
39007         Update the length attribute if the value is in a GPR.
39008         (signbit<mode>2_dm_<su>ext): Add combiner pattern to eliminate
39009         the sign or zero extension instruction, since the value is always 0/1.
39010         (signbit<mode>2_dm2): Delete using <Fsignbit>.
39012         PR target/78953
39013         * config/rs6000/vsx.md (vsx_extract_<mode>_store_p9): If we are
39014         extracting SImode to a GPR register so that we can generate a
39015         store, limit the vector to be in a traditional Altivec register
39016         for the vextuwrx instruction.
39018 2017-01-03  Ian Lance Taylor  <iant@google.com>
39020         * godump.c (go_format_type): Treat ENUMERAL_TYPE like INTEGER_TYPE.
39022 2017-01-03  Martin Sebor  <msebor@redhat.com>
39024         PR tree-optimization/78696
39025         * gimple-ssa-sprintf.c (format_floating): Correct handling of
39026         precision.  Use MPFR for %f for greater fidelity.  Correct handling
39027         of %g.
39028         (pass_sprintf_length::compute_format_length): Set width and precision
39029         specified by asrerisk to void_node for vararg functions.
39030         (try_substitute_return_value): Adjust dump output.
39032 2017-01-03  David Edelsohn  <dje.gcc@gmail.com>
39034         * doc/invoke.texi (RS6000 options): LRA is enabled by default.
39036 2017-01-03  Eric Botcazou  <ebotcazou@adacore.com>
39038         * doc/invoke.texi (SPARC options): Document -mlra as the default.
39039         * config/sparc/sparc.c (sparc_option_override): Force LRA unless
39040         -mlra/-mno-lra was passed to the compiler.
39042 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
39044         PR rtl-optimization/65618
39045         * emit-rtl.c (try_split): Move initialization of "before" and
39046         "after" to just before the call to emit_insn_after_setloc.
39048 2017-01-03  Gerald Pfeifer  <gerald@pfeifer.com>
39050         * doc/md.texi (Standard Names): Remove reference to Java frontend.
39052 2017-01-03  Pierre-Marie de Rodat  <derodat@adacore.com>
39054         * dwarf2out.c (gen_enumeration_type_die): When
39055         -gno-strict-dwarf, add a DW_AT_encoding attribute.
39057 2017-01-03  Jakub Jelinek  <jakub@redhat.com>
39059         PR tree-optimization/78965
39060         * gimple-ssa-sprintf.c (pass_sprintf_length::compute_format_length):
39061         Change first argument from const call_info & to call_info &.  For %n
39062         set info.nowrite to false.
39064         PR middle-end/78901
39065         * gimple-ssa-sprintf.c (try_substitute_return_value): Don't change
39066         possibly throwing calls.
39068         * genmatch.c (dt_node::gen_kids_1): If generic_exprs include SSA_NAME
39069         and exprs_len || fns_len, emit the code for SSA_NAME next to the exprs
39070         and fns handling, rather than in a separate case SSA_NAME.
39072 2017-01-02  Jeff Law  <law@redhat.com>
39074         * config/darwin-driver.c (darwin_driver_init): Const-correctness
39075         fixes for first_period and second_period variables.
39077 2017-01-02  Uros Bizjak  <ubizjak@gmail.com>
39079         PR target/78967
39080         * config/i386/i386.md (UNSPEC_NOREX_MEM): New unspec.
39081         (*insvqi_1): New insn pattern.
39082         (*insvqi_1_mem_rex64): Ditto.
39083         (*insvqi_2): Ditto.
39084         (*insvqi_3): Rename from *insvqi.
39086         (*extzvqi_mem_rex64): Add UNSPEC_NOREX_MEM tag.
39088 2017-01-02  Gerald Pfeifer  <gerald@pfeifer.com>
39090         * doc/cfg.texi (Edges): Remove reference to Java.
39091         (Maintaining the CFG): Ditto.
39093 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
39095         PR middle-end/77674
39096         * symtab.c (symtab_node::binds_to_current_def_p): Fix handling of
39097         transparent aliases.
39099 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
39101         PR middle-end/77484
39102         * predict.def (PRED_CALL): Update hitrate.
39103         (PRED_INDIR_CALL, PRED_POLYMORPHIC_CALL): New predictors.
39104         * predict.c (tree_estimate_probability_bb): Split CALL predictor
39105         into direct/indirect/polymorphic variants.
39107 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
39109         Update copyright years.
39111         * gcc.c (process_command): Update copyright notice dates.
39112         * gcov-dump.c (print_version): Ditto.
39113         * gcov.c (print_version): Ditto.
39114         * gcov-tool.c (print_version): Ditto.
39115         * gengtype.c (create_file): Ditto.
39116         * doc/cpp.texi: Bump @copying's copyright year.
39117         * doc/cppinternals.texi: Ditto.
39118         * doc/gcc.texi: Ditto.
39119         * doc/gccint.texi: Ditto.
39120         * doc/gcov.texi: Ditto.
39121         * doc/install.texi: Ditto.
39122         * doc/invoke.texi: Ditto.
39124 Copyright (C) 2017 Free Software Foundation, Inc.
39126 Copying and distribution of this file, with or without modification,
39127 are permitted in any medium without royalty provided the copyright
39128 notice and this notice are preserved.