GCOV: add -j argument (human readable format).
[official-gcc.git] / gcc / ChangeLog
blobc396b106f0590b693e01eb018afed03a19dbb611
1 2017-10-31  Martin Liska  <mliska@suse.cz>
3         * doc/gcov.texi: Document new option.
4         * gcov.c (print_usage): Likewise print it.
5         (process_args): Support the argument.
6         (format_count): New function.
7         (format_gcov): Use the function.
9 2017-10-31  Martin Liska  <mliska@suse.cz>
11         * gcov.c (struct name_map): do not use typedef.
12         Define operator== and operator<.
13         (name_search): Remove.
14         (name_sort): Remove.
15         (main): Do not allocate names.
16         (process_file): Add vertical space.
17         (generate_results): Use std::find.
18         (release_structures): Do not release memory.
19         (find_source): Use std::find.
21 2017-10-31  Martin Liska  <mliska@suse.cz>
23         * gcov.c (struct line_info): Remove it's typedef.
24         (line_info::line_info): Add proper ctor.
25         (line_info::has_block): Do not use a typedef.
26         (struct source_info): Do not use typedef.
27         (circuit): Likewise.
28         (get_cycles_count): Likewise.
29         (output_intermediate_file): Iterate via vector iterator.
30         (add_line_counts): Use std::vector methods.
31         (accumulate_line_counts): Likewise.
32         (output_lines): Likewise.
34 2017-10-31  Martin Liska  <mliska@suse.cz>
36         * gcov.c (struct source_info): Remove typedef.
37         (source_info::source_info): Add proper ctor.
38         (accumulate_line_counts): Use struct, not it's typedef.
39         (output_gcov_file): Likewise.
40         (output_lines): Likewise.
41         (main): Do not allocate an array.
42         (output_intermediate_file): Use size of vector container.
43         (process_file): Resize the vector.
44         (generate_results): Do not preallocate, use newly added vector
45         lines.
46         (release_structures): Do not release sources.
47         (find_source): Use vector methods.
48         (add_line_counts): Do not use typedef.
50 2017-10-31  Martin Liska  <mliska@suse.cz>
52         * doc/gcov.texi: Document that.
53         * gcov.c (add_line_counts): Mark lines with a non-executed
54         statement.
55         (output_line_beginning): Handle such lines.
56         (output_lines): Pass new argument.
57         (output_intermediate_file): Print it in intermediate format.
59 2017-10-31  Martin Liska  <mliska@suse.cz>
61         * color-macros.h: New file.
62         * diagnostic-color.c: Factor out color related to macros to
63         color-macros.h.
64         * doc/gcov.texi: Document -k option.
65         * gcov.c (INCLUDE_STRING): Include string.h.
66         (print_usage): Add -k option.
67         (process_args): Parse it.
68         (pad_count_string): New function.
69         (output_line_beginning): Likewise.
70         (DEFAULT_LINE_START): New macro.
71         (output_lines): Support color output.
73 2017-10-31  Martin Liska  <mliska@suse.cz>
75         PR gcov-profile/82633
76         * doc/gcov.texi: Document -fkeep-{static,inline}-functions and
77         their interaction with GCOV infrastructure.
78         * configure.ac: Add -fkeep-{inline,static}-functions to
79         coverage_flags.
80         * configure: Regenerate.
82 2017-10-31  Uros Bizjak  <ubizjak@gmail.com>
84         PR target/82772
85         * config/alpha/sync.md (fetchop_constr) <and>: Change to "rINM".
87 2017-10-31  Segher Boessenkool  <segher@kernel.crashing.org>
89         PR target/82674
90         * config/rs6000/rs6000.md (allocate_stack): Force update interval
91         into a register if it does not fit into an immediate offset field.
93 2017-10-31  Olivier Hainque  <hainque@adacore.com>
95         * gcc/Makefile.in (FLAGS_TO_PASS): Pass libsubdir as well.
97 2017-10-31  Julia Koval  <julia.koval@intel.com>
99         * config.gcc: Add gfniintrin.h.
100         * config/i386/gfniintrin.h: New.
101         * config/i386/i386-builtin-types.def
102         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
103         __builtin_ia32_vgf2p8affineinvqb_v64qi_mask,
104         __builtin_ia32_vgf2p8affineinvqb_v32qi,
105         __builtin_ia32_vgf2p8affineinvqb_v32qi_mask,
106         __builtin_ia32_vgf2p8affineinvqb_v16qi,
107         __builtin_ia32_vgf2p8affineinvqb_v16qi_mask): New builtins.
108         * config/i386/i386-builtin.def (V64QI_FTYPE_V64QI_V64QI_INT_V64QI_UDI,
109         V32QI_FTYPE_V32QI_V32QI_INT_V32QI_USI,
110         V16QI_FTYPE_V16QI_V16QI_INT_V16QI_UHI,
111         V64QI_FTYPE_V64QI_V64QI_INT): New types.
112         * config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
113         * config/i386/immintrin.h: Include gfniintrin.h.
114         * config/i386/sse.md (vgf2p8affineinvqb_*) New pattern.
116 2017-10-30  Eric Botcazou  <ebotcazou@adacore.com>
118         * gcc.c (HAVE_TARGET_EXECUTABLE_SUFFIX): Remove old kludge.
120 2017-10-30  Wilco Dijkstra  <wdijkstr@arm.com>
122         * config/arm/arm.md (ashldi3): Remove shift by 1 expansion.
123         (arm_ashldi3_1bit): Remove pattern.
124         (ashrdi3): Remove shift by 1 expansion.
125         (arm_ashrdi3_1bit): Remove pattern.
126         (lshrdi3): Remove shift by 1 expansion.
127         (arm_lshrdi3_1bit): Remove pattern.
128         * config/arm/arm.c (arm_rtx_costs_internal): Slightly increase
129         cost of ashldi3 by 1.
130         * config/arm/neon.md (ashldi3_neon): Remove shift by 1 expansion.
131         (<shift>di3_neon): Likewise.
133 2017-10-30  Dominik Infuehr  <dominik.infuehr@theobroma-systems.com>
135         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov): Rename
136         both identically named patterns to (*aarch64_simd_mov<VD:mode>)
137         and (*aarch64_simd_mov<VQ:mode>).
138         (*aarch64_simd_mov<VD:mode>): Change type attribute to match
139         pattern alternative.
140         (*aarch64_simd_mov<VQ:mode>): Re-order and change type
141         attributes to match pattern alternative.
143 2017-10-30  Steven Munroe  <munroesj@gcc.gnu.org>
145         * config.gcc (powerpc*-*-*): Add emmintrin.h.
146         * config/rs6000/emmintrin.h: New file.
147         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include emmintrin.h.
149 2017-10-30  Wilco Dijkstra  <wdijkstr@arm.com>
151         * config/arm/vfp.md (movdi_vfp): Merge changes from movdi_vfp_cortexa8.
152         * (movdi_vfp_cortexa8): Remove pattern.
154 2017-10-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
156         * doc/install.texi (Specific, alpha*-*-*): Remove DEC OSF/1
157         etc. reference.
158         (Specific, alpha*-dec-osf5.1): Remove.
159         (Specific, mips-sgi-irix5): Remove.
160         (Specific, mips-sgi-irix6): Remove.
162 2017-10-30  Jakub Jelinek  <jakub@redhat.com>
164         PR middle-end/22141
165         * gimple-ssa-store-merging.c (merged_store_group::apply_stores): Fix
166         arguments to clear_bit_region_be.
168 2017-10-30  Jim Wilson  <wilson@tuliptree.org>
170         * gimplify.c: Include memmodel.h.
172 2017-10-30  Martin Jambor  <mjambor@suse.cz>
174         * omp-grid.c (grid_attempt_target_gridification): Also insert a
175         condition whether loop should be executed at all.
177 2017-10-30  Will Schmidt  <will_schmidt@vnet.ibm.com>
179         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
180         gimple folding of vec_madd() intrinsics.
181         * config/rs6000/altivec.md (mulv8hi3): Rename altivec_vmladduhm to
182         fmav8hi4.  (altivec_vmladduhm): Rename to fmav8hi4.
183         * config/rs6000/rs6000-builtin.def: Rename vmladduhm to fmav8hi4
185 2017-10-30  Richard Biener  <rguenther@suse.de>
187         PR tree-optimization/82762
188         Revert
189         2017-10-23  Richard Biener  <rguenther@suse.de>
191         PR tree-optimization/82129
192         Revert
193         2017-08-01  Richard Biener  <rguenther@suse.de>
195         PR tree-optimization/81181
196         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
197         (compute_antic): ... end of iteration here.
199 2017-10-30  Joseph Myers  <joseph@codesourcery.com>
201         * doc/invoke.texi (C Dialect Options): Document -std=c17,
202         -std=iso9899:2017 and -std=gnu17.
203         * doc/standards.texi (C Language): Document C17 support.
204         * doc/cpp.texi (Overview): Mention -std=c17.
205         (Standard Predefined Macros): Document C11 and C17 values of
206         __STDC_VERSION__.  Do not refer to C99 support as incomplete.
207         * doc/extend.texi (Inline): Do not list individual options for
208         standards newer than C99.
209         * dwarf2out.c (highest_c_language, gen_compile_unit_die): Handle
210         "GNU C17".
211         * config/rl78/rl78.c (rl78_option_override): Handle "GNU C17"
212         language name.
214 2017-10-30  Maxim Ostapenko  <m.ostapenko@samsung.com>
216         * asan.c (asan_finish_file): Align asan globals array by shadow
217         granularity.
219 2017-10-30  Jakub Jelinek  <jakub@redhat.com>
221         PR middle-end/22141
222         * gimple-ssa-store-merging.c: Include rtl.h and expr.h.
223         (struct store_immediate_info): Add bitregion_start and bitregion_end
224         fields.
225         (store_immediate_info::store_immediate_info): Add brs and bre
226         arguments and initialize bitregion_{start,end} from those.
227         (struct merged_store_group): Add bitregion_start, bitregion_end,
228         align_base and mask fields.  Drop unnecessary struct keyword from
229         struct store_immediate_info.  Add do_merge method.
230         (clear_bit_region_be): Use memset instead of loop storing zeros.
231         (merged_store_group::do_merge): New method.
232         (merged_store_group::merge_into): Use do_merge.  Allow gaps in between
233         stores as long as the surrounding bitregions have no gaps.
234         (merged_store_group::merge_overlapping): Use do_merge.
235         (merged_store_group::apply_stores): Test that bitregion_{start,end}
236         is byte aligned, rather than requiring that start and width are
237         byte aligned.  Drop unnecessary struct keyword from
238         struct store_immediate_info.  Allocate and populate also mask array.
239         Make start of the arrays relative to bitregion_start rather than
240         start and size them according to bitregion_{end,start} difference.
241         (struct imm_store_chain_info): Drop unnecessary struct keyword from
242         struct store_immediate_info.
243         (pass_store_merging::gate): Punt if BITS_PER_UNIT or CHAR_BIT is not 8.
244         (pass_store_merging::terminate_all_aliasing_chains): Drop unnecessary
245         struct keyword from struct store_immediate_info.
246         (imm_store_chain_info::coalesce_immediate_stores): Allow gaps in
247         between stores as long as the surrounding bitregions have no gaps.
248         Formatting fixes.
249         (struct split_store): Add orig non-static data member.
250         (split_store::split_store): Initialize orig to false.
251         (find_constituent_stmts): Return store_immediate_info *, non-NULL
252         if there is exactly a single original stmt.  Change stmts argument
253         to pointer from reference, if NULL, don't push anything to it.  Add
254         first argument, use it to optimize skipping over orig stmts that
255         are known to be before bitpos already.  Simplify.
256         (split_group): Return unsigned int count how many stores are or
257         would be needed rather than a bool.  Add allow_unaligned argument.
258         Change split_stores argument from reference to pointer, if NULL,
259         only do a dry run computing how many stores would be produced.
260         Rewritten algorithm to use both alignment and misalign if
261         !allow_unaligned and handle bitfield stores with gaps.
262         (imm_store_chain_info::output_merged_store): Set start_byte_pos
263         from bitregion_start instead of start.  Compute allow_unaligned
264         here, if true, do 2 split_group dry runs to compute which one
265         produces fewer stores and prefer aligned if equal.  Punt if
266         new count is bigger or equal than original before emitting any
267         statements, rather than during that.  Remove no longer needed
268         new_ssa_names tracking.  Replace num_stmts with
269         split_stores.length ().  Use 32-bit stack allocated entries
270         in split_stores auto_vec.  Try to reuse original store lhs/rhs1
271         if possible.  Handle bitfields with gaps.
272         (pass_store_merging::execute): Ignore bitsize == 0 stores.
273         Compute bitregion_{start,end} for the stores and construct
274         store_immediate_info with that.  Formatting fixes.
276 2017-10-30  Uros Bizjak  <ubizjak@gmail.com>
278         PR target/82725
279         * config/i386/i386.c (legitimate_pic_address_disp_p): Allow
280         UNSPEC_DTPOFF and UNSPEC_NTPOFF with SImode immediate offset.
282 2017-10-29  Jim Wilson  <wilson@tuliptree.org>
284         * gimplify.c: Include tm_p.h.
286         * common.opt (gcoff): Re-add as ignored option.
287         (gcoff1, gcoff2, gcoff3): Likewise.
289         * Makefile.in (OBJS): Delete sdbout.o.
290         (GTFILES): Delete $(srcdir)/sdbout.c.
291         * debug.h: Delete sdb_debug_hooks.
292         * final.c: Delete sdbout.h include.
293         (final_scan_insn): Delete SDB_DEBUG check.
294         (rest_of_clean_state): Likewise.
295         * output.h: Delete sdb_begin_function_line.
296         * sdbout.c: Delete.
297         * sdbout.h: Delete.
298         * toplev.c: Delete sdbout.h include.
299         (process_options): Delete SDB_DEBUG check.
300         * tree-core.h (tree_type_common): Delete pointer field of
301         tree_type_symtab.
302         * tree.c (copy_node): Clear TYPE_SYMTAB_DIE instead of
303         TYPE_SYMTAB_POINTER.
304         * tree.h (TYPE_SYMTAB_POINTER): Delete.
305         (TYPE_SYMTAB_IS_POINTER): Delete.
306         (TYPE_SYMTAB_IS_DIE): Renumber.
307         * xcoffout.c: Refer to former sdbout.c file.
308         (xcoffout_begin_prologue): Use past tense for sdbout.c reference.
310         * doc/install.texi (--with-stabs): Delete COFF and ECOFF info.
311         * doc/invoke.texi (SEEALSO): Delete adb and sdb references.
312         (Debugging Options): Delete -gcoff.
313         (-gstabs): Delete SDB reference.
314         (-gcoff): Delete.
315         (-gcoff@var{level}): Delete.
316         * doc/passes.texi (Debugging information output): Delete SDB and
317         sdbout.c references.
318         * doc/tm.texi: Regenerate.
319         * doc/tm.texi.in (DWARF_CIE_DATA_ALIGNMENT): Delete SDB from xref.
320         (SDB and DWARF): Change node name to DWARF and delete SDB and COFF
321         references.
322         (DEBUGGER_AUTO_OFFSET): Delete COFF and SDB references.
323         (PREFERRED_DEBUGGING_TYPE): Delete SDB_DEBUG and -gcoff references.
324         (SDB_DEBUGGING_INFO): Delete.
325         (PUT_SDB_@dots{}, SDB_DELIM, SDB_ALLOW_UNKNOWN_REFERENCES)
326         SDB_ALLOW_FORWARD_REFERENCES, SDB_OUTPUT_SOURCE_LINE): Delete.
327         * target.def (output_source_filename): Delete COFF reference.
329         * common.opt (gcoff): Delete.
330         (gxcoff+): Update Negative chain.
331         * defaults.h: Delete all references to SDB_DEBUGGING_INFO and
332         SDB_DEBUG.
333         * dwarf2out.c (gen_array_type_die): Change SDB to debuggers.
334         * flag-types.h (enum debug_info_type): Delete SDB_DEBUG.
335         * function.c (number_blocks): Delete SDB_DEBUGGING_INFO, SDB_DEBUG,
336         and SDB references.
337         (expand_function_start): Change sdb reference to past tense.
338         (expand_function_end): Change sdb reference to past tense.
339         * gcc.c (cpp_unique_options): Delete gcoff3 reference.
340         * opts.c (debug_type_names): Delete coff entry.
341         (common_handle_option): Delete OPT_gcoff case.
342         * system.h (SDB_DEBUG, SDB_DEBUGGING_INFO): Poison.
344         * config/dbxcoff.h (PREFERRED_DEBUGGING_TYPE): Set to DBX_DEBUG.
345         * config/cris/cris.h: Delete SDB reference in comment.
346         * config/i386/cygming.h: Don't define SDB_DEBUGGING_INFO.
347         (ASM_DECLARE_FUNCTION_NAME): Delete SDB reference from comment.
348         * config/i386/gas.h: Don't define SDB_DEBUGGING_INFO.
349         * config/i386/i386.c (svr4_dbx_register_map): Change SDB references
350         to past tense.
351         (ix86_expand_prologue): Likewise.
352         * config/i386/winnt.c (i386_pe_start_function): Don't check SDB_DEBUG.
353         * config/ia64/ia64.h: Likewise.
354         * config/m68k/m68kelf.h (DBX_REGISTER_NUMBER): Delete SDB reference.
355         * config/mips/mips.h (SUBTARGET_ASM_DEBUGGING_SPEC): Delete gcoff*
356         support.
357         * config/mmix/mmix.h: Likewise.
358         * config/nds32/nds32.c: Likewise.
359         * config/stormy/storym16.h: Likewise.
360         * config/visium/visium.h: Likewise.
361         * config/vx-common.h (SDB_DEBUGGING_INFO): Delete undef.
363 2017-10-28  Sandra Loosemore  <sandra@codesourcery.com>
365         * config/nios2/nios2.h (FRAME_GROWS_DOWNWARD): Define to 1.
366         * config/nios2/nios2.c (nios2_initial_elimination_offset):  Make
367         FRAME_POINTER_REGNUM point at high end of local var area.
369 2017-10-27  Eric Botcazou  <ebotcazou@adacore.com>
371         * bb-reorder.c (find_traces_1_round): Fix off-by-one index.
372         Move comment around.  Do not reset best_edge for a copiable
373         destination if the copy would cause a partition change.
374         (better_edge_p): Remove redundant check.
376 2017-10-27  Uros Bizjak  <ubizjak@gmail.com>
378         * config/i386/i386-protos.h (ix86_fp_compare_mode): Remove prototype.
380 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
382         * builtins.c (CASE_MATHFN_FLOATN): New helper macro to add cases
383         for math functions that have _Float<N> and _Float<N>X variants.
384         (mathfn_built_in_2): Add support for math functions that have
385         _Float<N> and _Float<N>X variants.
386         (DEF_INTERNAL_FLT_FLOATN_FN): New helper macro.
387         (expand_builtin_mathfn_ternary): Add support for fma with
388         _Float<N> and _Float<N>X variants.
389         (expand_builtin): Likewise.
390         (fold_builtin_3): Likewise.
391         * builtins.def (DEF_EXT_LIB_FLOATN_NX_BUILTINS): New macro to
392         create math function _Float<N> and _Float<N>X variants as external
393         library builtins.
394         (BUILT_IN_COPYSIGN _Float<N> and _Float<N>X variants) Use
395         DEF_EXT_LIB_FLOATN_NX_BUILTINS to make built-in functions using
396         the __builtin_ prefix and if not strict ansi, without the prefix.
397         (BUILT_IN_FABS _Float<N> and _Float<N>X variants): Likewise.
398         (BUILT_IN_FMA _Float<N> and _Float<N>X variants): Likewise.
399         (BUILT_IN_FMAX _Float<N> and _Float<N>X variants): Likewise.
400         (BUILT_IN_FMIN _Float<N> and _Float<N>X variants): Likewise.
401         (BUILT_IN_NAN _Float<N> and _Float<N>X variants): Likewise.
402         (BUILT_IN_SQRT _Float<N> and _Float<N>X variants): Likewise.
403         * builtin-types.def (BT_FN_FLOAT16_FLOAT16_FLOAT16_FLOAT16): New
404         function signatures for fma _Float<N> and _Float<N>X variants.
405         (BT_FN_FLOAT32_FLOAT32_FLOAT32_FLOAT32): Likewise.
406         (BT_FN_FLOAT64_FLOAT64_FLOAT64_FLOAT64): Likewise.
407         (BT_FN_FLOAT128_FLOAT128_FLOAT128_FLOAT128): Likewise.
408         (BT_FN_FLOAT32X_FLOAT32X_FLOAT32X_FLOAT32X): Likewise.
409         (BT_FN_FLOAT64X_FLOAT64X_FLOAT64X_FLOAT64X): Likewise.
410         (BT_FN_FLOAT128X_FLOAT128X_FLOAT128X_FLOAT128X): Likewise.
411         * gencfn-macros.c (print_case_cfn): Add support for math functions
412         that have _Float<N> and _Float<N>X variants.
413         (print_define_operator_list): Likewise.
414         (fltfn_suffixes): Likewise.
415         (main): Likewise.
416         * internal-fn.def (DEF_INTERNAL_FLT_FLOATN_FN): New helper macro
417         for math functions that have _Float<N> and _Float<N>X variants.
418         (SQRT): Add support for sqrt, copysign, fmin and fmax _Float<N>
419         and _Float<N>X variants.
420         (COPYSIGN): Likewise.
421         (FMIN): Likewise.
422         (FMAX): Likewise.
423         * fold-const.c (tree_call_nonnegative_warnv_p): Add support for
424         copysign, fma, fmax, fmin, and sqrt _Float<N> and _Float<N>X
425         variants.
426         (integer_valued_read_call_p): Likewise.
427         * fold-const-call.c (fold_const_call_ss): Likewise.
428         (fold_const_call_sss): Add support for copysign, fmin, and fmax
429         _Float<N> and _Float<N>X variants.
430         (fold_const_call_ssss): Add support for fma _Float<N> and
431         _Float<N>X variants.
432         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Add
433         support for copysign and fma _Float<N> and _Float<N>X variants.
434         (backprop::process_builtin_call_use): Likewise.
435         * tree-call-cdce.c (can_test_argument_range); Add support for
436         sqrt _Float<N> and _Float<N>X variants.
437         (edom_only_function): Likewise.
438         (get_no_error_domain): Likewise.
439         * tree-ssa-math-opts.c (internal_fn_reciprocal): Likewise.
440         * tree-ssa-reassoc.c (attempt_builtin_copysign): Add support for
441         copysign _Float<N> and _Float<N>X variants.
442         * config/rs6000/rs6000-builtin.def (SQRTF128): Delete, this is now
443         handled by machine independent code.
444         (FMAF128): Likewise.
445         * doc/cpp.texi (Common Predefined Macros): Document defining
446         __FP_FAST_FMAF<N> and __FP_FAST_FMAF<N>X if the backend supports
447         fma _Float<N> and _Float<N>X variants.
449 2017-10-27  Uros Bizjak  <ubizjak@gmail.com>
451         PR target/82692
452         * config/i386/i386-modes.def (CCFPU): Remove definition.
453         * config/i386/i386.c (put_condition_mode): Remove CCFPU mode handling.
454         (ix86_cc_modes_compatible): Ditto.
455         (ix86_expand_carry_flag_compare): Ditto.
456         (ix86_expand_int_movcc): Ditto.
457         (ix86_expand_int_addcc): Ditto.
458         (ix86_reverse_condition): Ditto.
459         (ix86_unordered_fp_compare): Rename from ix86_fp_compare_mode.
460         Return true/false for unordered/ordered fp comparisons.
461         (ix86_cc_mode): Always return CCFPmode for float mode comparisons.
462         (ix86_prepare_fp_compare_args): Update for rename.
463         (ix86_expand_fp_compare): Update for rename.  Generate unordered
464         compare RTXes wrapped with UNSPEC_NOTRAP unspec.
465         (ix86_expand_sse_compare_and_jump): Ditto.
466         * config/i386/predicates.md (fcmov_comparison_operator):
467         Remove CCFPU mode handling.
468         (ix86_comparison_operator): Ditto.
469         (ix86_carry_flag_operator): Ditto.
470         * config/i386/i386.md (UNSPEC_NOTRAP): New unspec.
471         (*cmpu<mode>_i387): Wrap compare RTX with UNSPEC_NOTRAP unspec.
472         (*cmpu<mode>_cc_i387): Ditto.
473         (FPCMP): Remove mode iterator.
474         (unord): Remove mode attribute.
475         (unord_subst): New define_subst transformation
476         (unord): New define_subst attribute.
477         (unordered): Ditto.
478         (*cmpi<unord><MODEF:mode>): Rewrite using unord_subst transformation.
479         (*cmpi<unord>xf_i387): Ditto.
480         * config/i386/sse.md (<sse>_<unord>comi<round_saeonly_name>): Merge
481         from <sse>_comi<round_saeonly_name> and <sse>_ucomi<round_saeonly_name>
482         using unord_subst transformation.
483         * config/i386/subst.md (SUBST_A): Remove CCFP and CCFPU modes.
484         (round_saeonly): Also handle CCFP mode.
485         * reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_NOTRAP unspec.
486         Remove UNSPEC_SAHF unspec handling.
488 2017-10-27  Jan Hubicka  <hubicka@ucw.cz>
490         * x86-tune.def (X86_TUNE_INTER_UNIT_MOVES_TO_VEC): Disable for Zen.
492 2017-10-27  Jeff Law  <law@redhat.com>
494         * gimple-ssa-sprintf.c: Include domwalk.h.
495         (class sprintf_dom_walker): New class, derived from dom_walker.
496         (sprintf_dom_walker::before_dom_children): New function.
497         (struct call_info): Moved into sprintf_dom_walker class
498         (compute_formath_length, handle_gimple_call): Likewise.
499         (sprintf_length::execute): Call the dominator walker rather
500         than walking the statements.
502         * tree-vrp.c (check_all_array_refs): Do not use wi->info to smuggle
503         gimple statement locations.
504         (check_array_bounds): Corresponding changes.  Get the statement's
505         location directly from wi->stmt.
507 2017-10-27  Palmer Dabbelt  <palmer@dabbelt.com>
509         PR target/82717
510         * doc/invoke.texi (RISC-V) <-mabi>: Correct and improve.
512 2017-10-27  Jan Hubicka  <hubicka@ucw.cz>
514         * config/i386/x86-tune.def (X86_TUNE_PARTIAL_REG_DEPENDENCY,
515         X86_TUNE_MOVX): Disable for Haswell and newer CPUs.
517 2017-10-27  Jakub Jelinek  <jakub@redhat.com>
519         PR target/82703
520         * config/i386/i386-protos.h (maybe_get_pool_constant): Removed.
521         * config/i386/i386.c (maybe_get_pool_constant): Removed.
522         (ix86_split_to_parts): Use avoid_constant_pool_reference instead of
523         maybe_get_pool_constant.
524         * config/i386/predicates.md (zero_extended_scalar_load_operand):
525         Likewise.
527 2017-10-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
529         * doc/install.texi (Specific, i?86-*-solaris2.10): Simplify gas
530         2.26 caveat.  Update gas and gld versions.
531         (Specific, *-*-solaris2*): Update binutils version.  Remove caveat
532         reference.
534 2017-10-27  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
536         * cgraph.h (set_malloc_flag): Declare.
537         * cgraph.c (set_malloc_flag_1): New function.
538         (set_malloc_flag): Likewise.
539         * ipa-fnsummary.h (ipa_call_summary): Add new field is_return_callee.
540         * ipa-fnsummary.c (ipa_call_summary::reset): Set is_return_callee to
541         false.
542         (read_ipa_call_summary): Add support for reading is_return_callee.
543         (write_ipa_call_summary): Stream is_return_callee.
544         * ipa-inline.c (ipa_inline): Remove call to ipa_free_fn_summary.
545         * ipa-pure-const.c: Add headers ssa.h, alloc-pool.h, symbol-summary.h,
546         ipa-prop.h, ipa-fnsummary.h.
547         (pure_const_names): Change to static.
548         (malloc_state_e): Define.
549         (malloc_state_names): Define.
550         (funct_state_d): Add field malloc_state.
551         (varying_state): Set malloc_state to STATE_MALLOC_BOTTOM.
552         (check_retval_uses): New function.
553         (malloc_candidate_p): Likewise.
554         (analyze_function): Add support for malloc attribute.
555         (pure_const_write_summary): Stream malloc_state.
556         (pure_const_read_summary): Add support for reading malloc_state.
557         (dump_malloc_lattice): New function.
558         (propagate_malloc): New function.
559         (warn_function_malloc): New function.
560         (ipa_pure_const::execute): Call propagate_malloc and
561         ipa_free_fn_summary.
562         (pass_local_pure_const::execute): Add support for malloc attribute.
563         * ssa-iterators.h (RETURN_FROM_IMM_USE_STMT): New macro.
564         * doc/invoke.texi: Document Wsuggest-attribute=malloc.
566 2017-10-27  Martin Liska  <mliska@suse.cz>
568         PR gcov-profile/82457
569         * doc/invoke.texi: Document that one needs a non-strict ISO mode
570         for fork-like functions to be properly instrumented.
572 2017-10-27  Richard Biener  <rguenther@suse.de>
574         PR middle-end/81659
575         * tree-eh.c (pass_lower_eh_dispatch::execute): Free dominator
576         info when we redirected EH.
578 2017-10-26  Michael Collison  <michael.collison@arm.com>
580         * config/aarch64/aarch64.md(<optab>_trunc><vf><GPI:mode>2):
581         New pattern.
582         (<optab>_trunchf<GPI:mode>2: New pattern.
583         (<optab>_trunc<vgp><GPI:mode>2: New pattern.
584         * config/aarch64/iterators.md (wv): New mode attribute.
585         (vf, VF): New mode attributes.
586         (vgp, VGP): New mode attributes.
587         (s): Update attribute with SImode and DImode prefixes.
589 2017-10-26  Sandra Loosemore  <sandra@codesourcery.com>
591         * config/nios2/constraints.md ("S"): Match r0rel_constant_p too.
592         * config/nios2/nios2-protos.h (r0rel_constant_p): Declare.
593         * config/nios2/nios2.c: (nios2_r0rel_sec_regex): New.
594         (nios2_option_overide): Initialize it.  Don't allow R0-relative
595         addressing with PIC.
596         (nios2_rtx_costs): Handle r0rel_constant_p like gprel_constant_p.
597         (nios2_symbolic_constant_p): Likewise.
598         (nios2_legitimate_address_p): Likewise.
599         (nios2_r0rel_section_name_p): New.
600         (nios2_symbol_ref_in_r0rel_data_p): New.
601         (nios2_emit_move_sequence): Handle r0rel_constant_p.
602         (r0rel_constant_p): New.
603         (nios2_print_operand_address): Handle r0rel_constant_p.
604         (nios2_cdx_narrow_form_p): Likewise.
605         * config/nios2/nios2.opt (mr0rel-sec=): New option.
606         * doc/invoke.texi (Option Summary): Add -mr0rel-sec.
607         (Nios II Options): Document -mr0rel-sec.
609 2017-10-26  Sandra Loosemore  <sandra@codesourcery.com>
611         * config/nios2/nios2.c: Include xregex.h.
612         (nios2_gprel_sec_regex): New.
613         (nios2_option_overide): Initialize it.  Don't allow GP-relative
614         addressing with PIC.
615         (nios2_small_section_name_p): Check for regex match.
616         * config/nios2/nios2.opt (mgprel-sec=): New option.
617         * doc/invoke.texi (Option Summary): Add -mgprel-sec.
618         (Nios II Options): Document -mgprel-sec.
620 2017-10-26  Jim Wilson  <wilson@tuliptree.org>
622         * doc/invoke.texi (-fdebug-prefix-map): Expand documentation.
624 2017-10-26  Tom de Vries  <tom@codesourcery.com>
626         PR tree-optimization/82707
627         * gimple.c (gimple_copy): Fix unsharing of
628         GIMPLE_OMP_{SINGLE,TARGET,TEAMS}.
630 2017-10-26  Olga Makhotina  <olga.makhotina@intel.com>
632         * config/i386/avx512fintrin.h (_mm512_cmpeq_pd_mask,
633         _mm512_cmple_pd_mask, _mm512_cmplt_pd_mask,
634         _mm512_cmpneq_pd_mask, _mm512_cmpnle_pd_mask,
635         _mm512_cmpnlt_pd_mask, _mm512_cmpord_pd_mask,
636         _mm512_cmpunord_pd_mask, _mm512_mask_cmpeq_pd_mask,
637         _mm512_mask_cmple_pd_mask, _mm512_mask_cmplt_pd_mask,
638         _mm512_mask_cmpneq_pd_mask, _mm512_mask_cmpnle_pd_mask,
639         _mm512_mask_cmpnlt_pd_mask, _mm512_mask_cmpord_pd_mask,
640         _mm512_mask_cmpunord_pd_mask, _mm512_cmpeq_ps_mask,
641         _mm512_cmple_ps_mask, _mm512_cmplt_ps_mask,
642         _mm512_cmpneq_ps_mask, _mm512_cmpnle_ps_mask,
643         _mm512_cmpnlt_ps_mask, _mm512_cmpord_ps_mask,
644         _mm512_cmpunord_ps_mask, _mm512_mask_cmpeq_ps_mask,
645         _mm512_mask_cmple_ps_mask, _mm512_mask_cmplt_ps_mask,
646         _mm512_mask_cmpneq_ps_mask, _mm512_mask_cmpnle_ps_mask,
647         _mm512_mask_cmpnlt_ps_mask, _mm512_mask_cmpord_ps_mask,
648         _mm512_mask_cmpunord_ps_mask): New intrinsics.
650 2017-10-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
652         * config/rs6000/aix.h (TARGET_IEEEQUAD_DEFAULT): Set long double
653         default to IBM.
654         * config/rs6000/darwin.h (TARGET_IEEEQUAD_DEFAULT): Likewise.
655         * config/rs6000/rs6000.opt (-mabi=ieeelongdouble): Move the
656         warning to rs6000.c.  Remove the Undocumented flag, since it has
657         been documented.
658         (-mabi=ibmlongdouble): Likewise.
659         * config/rs6000/rs6000.c (TARGET_IEEEQUAD_DEFAULT): If it is not
660         already set, set the default format for long double.
661         (rs6000_debug_reg_global): Print whether long double is IBM or
662         IEEE.
663         (rs6000_option_override_internal): Rework setting long double
664         format.  Only warn if the user is changing the long double default
665         and they did not use -Wno-psabi.
666         * doc/invoke.texi (PowerPC options): Update the documentation for
667         -mabi=ieeelongdouble and -mabi=ibmlongdouble.
669 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
670             Alan Hayward  <alan.hayward@arm.com>
671             David Sherwood  <david.sherwood@arm.com>
673         * rtl.h (wider_subreg_mode): New function.
674         * ira.h (ira_sort_regnos_for_alter_reg): Take a machine_mode *
675         rather than an unsigned int *.
676         * ira-color.c (regno_max_ref_width): Replace with...
677         (regno_max_ref_mode): ...this new variable.
678         (coalesced_pseudo_reg_slot_compare): Update accordingly.
679         Use wider_subreg_mode.
680         (ira_sort_regnos_for_alter_reg): Likewise.  Take a machine_mode *
681         rather than an unsigned int *.
682         * lra-constraints.c (uses_hard_regs_p): Use wider_subreg_mode.
683         (process_alt_operands): Likewise.
684         (invariant_p): Likewise.
685         * lra-spills.c (assign_mem_slot): Likewise.
686         (add_pseudo_to_slot): Likewise.
687         * lra.c (collect_non_operand_hard_regs): Likewise.
688         (add_regs_to_insn_regno_info): Likewise.
689         * reload1.c (regno_max_ref_width): Replace with...
690         (regno_max_ref_mode): ...this new variable.
691         (reload): Update accordingly.  Update call to
692         ira_sort_regnos_for_alter_reg.
693         (alter_reg): Update to use regno_max_ref_mode.  Call wider_subreg_mode.
694         (init_eliminable_invariants): Update to use regno_max_ref_mode.
695         (scan_paradoxical_subregs): Likewise.
697 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
699         * config/aarch64/aarch64.h (EXIT_IGNORE_STACK): Set if alloca is used.
700         (aarch64_frame): Add emit_frame_chain boolean.
701         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
702         Move eh_return case to aarch64_layout_frame.
703         (aarch64_layout_frame): Initialize emit_frame_chain.
704         (aarch64_expand_prologue): Use emit_frame_chain.
706 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
708         * config/aarch64/aarch64.c (aarch64_layout_frame):
709         Ensure LR is always stored at the bottom of the callee-saves.
710         Remove rarely used frame layout which saves callee-saves at top of
711         frame, so the store of LR can be used as a valid probe in all cases.
713 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
715         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
716         Improve unaligned TImode/TFmode base/offset split.
718 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
719             Alan Hayward  <alan.hayward@arm.com>
720             David Sherwood  <david.sherwood@arm.com>
722         * caller-save.c (mark_referenced_regs):  Use read_modify_subreg_p.
723         * combine.c (find_single_use_1): Likewise.
724         (expand_field_assignment): Likewise.
725         (move_deaths): Likewise.
726         * lra-constraints.c (simplify_operand_subreg): Likewise.
727         (curr_insn_transform): Likewise.
728         * lra.c (collect_non_operand_hard_regs): Likewise.
729         (add_regs_to_insn_regno_info): Likewise.
730         * rtlanal.c (reg_referenced_p): Likewise.
731         (covers_regno_no_parallel_p): Likewise.
733 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
735         * wide-int-print.cc (print_hex): Loop based on extract_uhwi.
736         Don't print any bits outside the precision of the value.
737         * wide-int.cc (test_printing): Add some new tests.
739 2017-10-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
741         * configure.ac (gcc_cv_as_ix86_xbrace_comment): Check if assembler
742         supports -xbrace_comment option.
743         * configure: Regenerate.
744         * config.in: Regenerate.
745         * config/i386/sol2.h (ASM_XBRACE_COMMENT_SPEC): Define.
746         (ASM_CPU_SPEC): Use it.
748 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
750         * target.def (static_rtx_alignment): New hook.
751         * targhooks.h (default_static_rtx_alignment): Declare.
752         * targhooks.c (default_static_rtx_alignment): New function.
753         * doc/tm.texi.in (TARGET_STATIC_RTX_ALIGNMENT): New hook.
754         * doc/tm.texi: Regenerate.
755         * varasm.c (force_const_mem): Use targetm.static_rtx_alignment
756         instead of targetm.constant_alignment.  Remove call to
757         set_mem_attributes.
758         * config/cris/cris.c (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
759         (cris_preferred_mininum_alignment): New function, split out from...
760         (cris_constant_alignment): ...here.
761         (cris_static_rtx_alignment): New function.
762         * config/i386/i386.c (ix86_static_rtx_alignment): New function,
763         split out from...
764         (ix86_constant_alignment): ...here.
765         (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
766         * config/mmix/mmix.c (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
767         (mmix_static_rtx_alignment): New function.
768         * config/spu/spu.c (spu_static_rtx_alignment): New function.
769         (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
771 2017-10-26  Tamar Christina  <tamar.christina@arm.com>
773         PR target/81800
774         * config/aarch64/aarch64.md (lrint<GPF:mode><GPI:mode>2):
775         Add flag_trapping_math and flag_fp_int_builtin_inexact.
777 2017-10-25  Palmer Dabbelt  <palmer@dabbelt.com>
779         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Define.
780         * config/riscv/pic.md (local_pic_load): Rename to local_pic_load_s,
781         mark as a sign-extending load.
782         (local_pic_load_u): Define.
784 2017-10-25  Eric Botcazou  <ebotcazou@adacore.com>
786         PR middle-end/82062
787         * fold-const.c (operand_equal_for_comparison_p): Also return true
788         if ARG0 is a simple variant of ARG1 with narrower precision.
789         (fold_ternary_loc): Always pass unstripped operands to the predicate.
791 2017-10-25  Jan Hubicka  <hubicka@ucw.cz>
793         * i386.c (ix86_builtin_vectorization_cost): Compute scatter/gather
794         cost correctly.
795         * i386.h (processor_costs): Add gather_static, gather_per_elt,
796         scatter_static, scatter_per_elt.
797         * x86-tune-costs.h: Add new cost entries.
799 2017-10-25  Richard Biener  <rguenther@suse.de>
801         * tree-ssa-sccvn.h (vn_eliminate): Declare.
802         * tree-ssa-pre.c (class eliminate_dom_walker, eliminate,
803         class pass_fre): Move to ...
804         * tree-ssa-sccvn.c (class eliminate_dom_walker, vn_eliminate,
805         class pass_fre): ... here and adjust for statistics.
807 2017-10-25  Jakub Jelinek  <jakub@redhat.com>
809         PR libstdc++/81706
810         * attribs.c (attribute_value_equal): Use omp_declare_simd_clauses_equal
811         for comparison of OMP_CLAUSEs regardless of flag_openmp{,_simd}.
812         (duplicate_one_attribute, copy_attributes_to_builtin): New functions.
813         * attribs.h (duplicate_one_attribute, copy_attributes_to_builtin): New
814         declarations.
816 2017-10-25  Richard Biener  <rguenther@suse.de>
818         * tree-ssa-pre.c (need_eh_cleanup, need_ab_cleanup, el_to_remove,
819         el_to_fixup, el_todo, el_avail, el_avail_stack, eliminate_avail,
820         eliminate_push_avail, eliminate_insert): Move inside...
821         (class eliminate_dom_walker): ... this class in preparation
822         of move.
823         (fini_eliminate): Remove by merging with ...
824         (eliminate): ... this function.  Adjust for class changes.
825         (pass_pre::execute): Remove fini_eliminate call.
826         (pass_fre::execute): Likewise.
828 2017-10-24  Jakub Jelinek  <jakub@redhat.com>
830         PR target/82460
831         * config/i386/sse.md (UNSPEC_VPERMI2, UNSPEC_VPERMI2_MASK): Remove.
832         (VPERMI2, VPERMI2I): New mode iterators.
833         (<avx512>_vpermi2var<mode>3_maskz): Remove 3 define_expand patterns.
834         (<avx512>_vpermi2var<mode>3<sd_maskz_name>): Remove 3 define_insn
835         patterns.
836         (<avx512>_vpermi2var<mode>3_mask): New define_expand using VPERMI2
837         mode iterator.  Remove 3 old define_insn patterns.
838         (*<avx512>_vpermi2var<mode>3_mask): 2 new define_insn patterns.
839         (<avx512>_vpermt2var<mode>3_maskz): Adjust 1 define_expand to use
840         VPERMI2 mode iterator, remove the other two expanders.
841         (<avx512>_vpermt2var<mode>3<sd_maskz_name>): Adjust 1 define_insn
842         to use VPERMI2 mode iterator, add another alternative for vpermi2*
843         instructions, remove the other two patterns.
844         (<avx512>_vpermt2var<mode>3_mask): Adjust 1 define_insn to use VPERMI2
845         mode iterator, remove the other two patterns.
846         * config/i386/i386.c (ix86_expand_vec_perm_vpermi2): Renamed to ...
847         (ix86_expand_vec_perm_vpermt2): ... this.  Swap mask and op0
848         arguments, use gen_*vpermt2* expanders instead of gen_*vpermi2*
849         and adjust argument order accordingly.
850         (ix86_expand_vec_perm): Adjust caller.
851         (expand_vec_perm_1): Likewise.
852         (expand_vec_perm_vpermi2_vpshub2): Rename to ...
853         (expand_vec_perm_vpermt2_vpshub2): ... this.
854         (ix86_expand_vec_perm_const_1): Adjust caller.
855         (ix86_vectorize_vec_perm_const_ok): Adjust comments.
857         PR target/82370
858         * config/i386/sse.md (VIMAX_AVX2): Remove V4TImode.
859         (VIMAX_AVX2_AVX512BW, VIMAX_AVX512VL): New mode iterators.
860         (vec_shl_<mode>): Remove unused expander.
861         (avx512bw_<shift_insn><mode>3): New define_insn.
862         (<sse2_avx2>_ashl<mode>3, <sse2_avx2>_lshr<mode>3): Replaced by ...
863         (<sse2_avx2>_<shift_insn><mode>3): ... this.  New define_insn.
865 2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>
867         PR c++/82466
868         * doc/invoke.texi ([Wbuiltin-declaration-mismatch]): Extend
869         description.
871 2017-10-24  Wilco Dijkstra  <wdijkstr@arm.com>
873         PR rtl-optimization/82396
874         * gcc/haifa-sched.c (ready_sort_real): Remove qsort workaround.
875         (autopref_multipass_init): Simplify initialization.
876         (autopref_rank_data): Simplify sort order.
877         * gcc/sched-int.h (autopref_multipass_data_): Remove
878         multi_mem_insn_p, min_offset and max_offset.
880 2017-10-24  Wilco Dijkstra  <wdijkstr@arm.com>
882         PR middle-end/60580
883         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
884         Check special value of flag_omit_frame_pointer.
885         (aarch64_can_eliminate): Likewise.
886         (aarch64_override_options_after_change_1): Simplify handling of
887         -fomit-frame-pointer and -fomit-leaf-frame-pointer.
889 2017-10-24  Richard Biener  <rguenther@suse.de>
891         PR tree-optimization/82697
892         * tree-ssa-phiopt.c (cond_store_replacement): Use alias-set
893         zero for conditional load and unconditional store.
895 2017-10-24  H.J. Lu  <hongjiu.lu@intel.com>
897         * doc/install.texi: Document bootstrap-cet.
899 2017-10-24  H.J. Lu  <hongjiu.lu@intel.com>
901         PR target/82659
902         * config/i386/i386.c (rest_of_insert_endbranch): Don't insert
903         ENDBR instruction at function entrance if function is only
904         called directly.
906 2017-10-24  Jakub Jelinek  <jakub@redhat.com>
908         PR target/82628
909         * config/i386/i386.md (addcarry<mode>, subborrow<mode>): Change
910         patterns to better describe from which operation the CF is computed.
911         (addcarry<mode>_0, subborrow<mode>_0): New patterns.
912         * config/i386/i386.c (ix86_expand_builtin) <case handlecarry>: Pass
913         one LTU with [DT]Imode and another one with [SD]Imode.  If arg0
914         is 0, use _0 suffixed expanders instead of emitting a comparison
915         before it.
917 2017-10-06  Sergey Shalnov  <Sergey.Shalnov@intel.com>
919         * config/i386/i386.md(*movsf_internal, *movdf_internal):
920         Avoid 512-bit AVX modes for TARGET_PREFER_AVX256.
922 2017-10-24  Eric Botcazou  <ebotcazou@adacore.com>
924         PR middle-end/82569
925         * tree-outof-ssa.h (always_initialized_rtx_for_ssa_name_p): Delete.
926         * expr.c (expand_expr_real_1) <expand_decl_rtl>: Revert latest change.
927         * loop-iv.c (iv_get_reaching_def): Likewise.
928         * cfgexpand.c (expand_one_ssa_partition): Initialize the RTX if the
929         variable is promoted and the partition contains undefined values.
931 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
933         * config/nios2/nios2.c (nios2_rtx_costs): Make costs better
934         reflect reality.
935         (nios2_address_cost): Define.
936         (nios2_legitimize_address): Recognize (exp + constant) directly.
937         (TARGET_ADDRESS_COST): Define.
939 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
941         * config/nios2/nios2-protos.h (nios2_large_constant_p): Declare.
942         (nios2_symbolic_memory_operand_p): Declare.
943         (nios2_split_large_constant): Declare.
944         (nios2_split_symbolic_memory_operand): Declare.
945         * config/nios2/nios2.c: Adjust includes.
946         (nios2_symbolic_constant_allowed): New.
947         (nios2_symbolic_constant_p): New.
948         (nios2_plus_symbolic_constant_p): New.
949         (nios2_valid_addr_expr_p): Recognize addresses involving
950         symbolic constants.
951         (nios2_legitimate_address_p): Likewise, also LO_SUM.
952         (nios2_symbolic_memory_operand_p): New.
953         (nios2_large_constant_p): New.
954         (nios2_split_large_constant): New.
955         (nios2_split_plus_large_constant): New.
956         (nios2_split_symbolic_memory_operand): New.
957         (nios2_legitimize_address): Code refactoring.  Handle addresses
958         involving symbolic constants.
959         (nios2_emit_move_sequence): Likewise.
960         (nios2_print_operand): Improve error output.
961         (nios2_print_operand_address): Handle LO_SUM.
962         (nios2_cdx_narrow_form_p): Likewise.
963         * config/nios2/nios2.md (movqi_internal): Add splitter for memory
964         operands involving symbolic constants.
965         (movhi_internal, movsi_internal): Likewise.
966         (zero_extendhisi2, zero_extendqi<mode>2): Likewise.
967         (extendhisi2, extendqi<mode>2): Likewise.
969 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
971         * tree-pass.h (PROP_rtl_split_insns): Define.
972         * recog.c (pass_data_split_all_insns): Provide PROP_rtl_split_insns.
974 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
976         * config/nios2/nios2.c (TARGET_LRA_P): Don't override.
978 2017-10-23  Jakub Jelinek  <jakub@redhat.com>
980         PR debug/82630
981         * target.def (const_not_ok_for_debug_p): Default to
982         default_const_not_ok_for_debug_p instead of hook_bool_rtx_false.
983         * targhooks.h (default_const_not_ok_for_debug_p): New declaration.
984         * targhooks.c (default_const_not_ok_for_debug_p): New function.
985         * dwarf2out.c (const_ok_for_output_1): Only reject UNSPECs for
986         which targetm.const_not_ok_for_debug_p returned true.
987         * config/arm/arm.c (arm_const_not_ok_for_debug_p): Return true
988         for UNSPECs.
989         * config/powerpcspe/powerpcspe.c (rs6000_const_not_ok_for_debug_p):
990         Likewise.
991         * config/rs6000/rs6000.c (rs6000_const_not_ok_for_debug_p): Likewise.
992         * config/i386/i386.c (ix86_delegitimize_address_1): Don't delegitimize
993         UNSPEC_GOTOFF with addend into addend - _GLOBAL_OFFSET_TABLE_ + symbol
994         if !base_term_p.
995         (ix86_const_not_ok_for_debug_p): New function.
996         (i386_asm_output_addr_const_extra): Handle UNSPEC_GOTOFF.
997         (TARGET_CONST_NOT_OK_FOR_DEBUG_P): Redefine.
999 2017-10-23  David Malcolm  <dmalcolm@redhat.com>
1001         PR bootstrap/82610
1002         * system.h: Conditionally include "unique-ptr.h" if
1003         INCLUDE_UNIQUE_PTR is defined.
1004         * unique-ptr-tests.cc: Remove include of "unique-ptr.h" in favor
1005         of defining INCLUDE_UNIQUE_PTR before including "system.h".
1007 2017-10-23  Sebastian Perta  <sebastian.perta@renesas.com>
1009         * config/rl78/rl78.md: New define_expand "subdi3".
1011 2017-10-23  H.J. Lu  <hongjiu.lu@intel.com>
1013         PR target/82673
1014         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Skip
1015         DF_REF_INSN if DF_REF_INSN_INFO is false.
1017 2017-10-23  Jan Hubicka  <hubicka@ucw.cz>
1019         * i386.c (dimode_scalar_chain::compute_convert_gain): Use
1020         xmm_move instead of sse_move.
1021         (sse_store_index): New function.
1022         (ix86_register_move_cost): Be more sensible about mismatch stall;
1023         model AVX moves correctly; make difference between sse->integer and
1024         integer->sse.
1025         (ix86_builtin_vectorization_cost): Model correctly aligned and unaligned
1026         moves; make difference between SSE and AVX.
1027         * i386.h (processor_costs): Remove sse_move; add xmm_move, ymm_move
1028         and zmm_move. Increase size of sse load and store tables;
1029         add unaligned load and store tables; add ssemmx_to_integer.
1030         * x86-tune-costs.h: Update all entries according to real
1031         move latencies from Agner Fog's manual and chip documentation.
1033 2017-10-23  Jakub Jelinek  <jakub@redhat.com>
1035         PR target/82628
1036         * config/i386/predicates.md (x86_64_dwzext_immediate_operand): New.
1037         * config/i386/constraints.md (Wf): New constraint.
1038         * config/i386/i386.md (UNSPEC_SBB): New unspec.
1039         (cmp<dwi>_doubleword): Removed.
1040         (sub<mode>3_carry_ccc, *sub<mode>3_carry_ccc_1): New patterns.
1041         (sub<mode>3_carry_ccgz): Use unspec instead of compare.
1042         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>: Don't
1043         expand with cmp<dwi>_doubleword.  For LTU and GEU use
1044         sub<mode>3_carry_ccc instead of sub<mode>3_carry_ccgz and use CCCmode.
1046         * common.opt (gcolumn-info): Enable by default.
1047         * doc/invoke.texi (gcolumn-info): Document new default.
1049 2017-10-23  Richard Biener  <rguenther@suse.de>
1051         PR tree-optimization/82672
1052         * graphite-isl-ast-to-gimple.c (graphite_copy_stmts_from_block):
1053         Fold the stmt if we propagated into it.
1055 2017-10-23  Richard Biener  <rguenther@suse.de>
1057         * tree-ssa-pre.c (bitmap_remove_from_set): Rename to...
1058         (bitmap_remove_expr_from_set): ... this.  All callers call this
1059         for non-constant values.
1060         (bitmap_set_subtract): Rename to...
1061         (bitmap_set_subtract_expressions): ... this.  Adjust and
1062         optimize.
1063         (bitmap_set_contains_value): Remove superfluous check.
1064         (bitmap_set_replace_value): Inline into single caller ...
1065         (bitmap_value_replace_in_set): ... here and simplify.
1066         (dependent_clean): Merge into ...
1067         (clean): ... this using an overload.  Adjust.
1068         (prune_clobbered_mems): Adjust.
1069         (compute_antic_aux): Likewise.
1070         (compute_partial_antic_aux): Likewise.
1072 2017-10-23  Richard Biener  <rguenther@suse.de>
1074         PR tree-optimization/82129
1075         Revert
1076         2017-08-01  Richard Biener  <rguenther@suse.de>
1078         PR tree-optimization/81181
1079         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
1080         (compute_antic): ... end of iteration here.
1082 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
1084         * target.def (starting_frame_offset): New hook.
1085         * doc/tm.texi (STARTING_FRAME_OFFSET): Remove in favor of...
1086         (TARGET_STARTING_FRAME_OFFSET): ...this new hook.
1087         * doc/tm.texi.in: Regenerate.
1088         * hooks.h (hook_hwi_void_0): Declare.
1089         * hooks.c (hook_hwi_void_0): New function.
1090         * doc/rtl.texi: Refer to TARGET_STARTING_FRAME_OFFSET instead of
1091         STARTING_FRAME_OFFSET.
1092         * builtins.c (expand_builtin_setjmp_receiver): Likewise.
1093         * reload1.c (reload): Likewise.
1094         * cfgexpand.c (expand_used_vars): Use targetm.starting_frame_offset
1095         instead of STARTING_FRAME_OFFSET.
1096         * function.c (try_fit_stack_local): Likewise.
1097         (assign_stack_local_1): Likewise
1098         (instantiate_virtual_regs): Likewise.
1099         * rtlanal.c (rtx_addr_can_trap_p_1): Likewise.
1100         * config/avr/avr.md (nonlocal_goto_receiver): Likewise.
1101         * config/aarch64/aarch64.h (STARTING_FRAME_OFFSET): Delete.
1102         * config/alpha/alpha.h (STARTING_FRAME_OFFSET): Likewise.
1103         * config/arc/arc.h (STARTING_FRAME_OFFSET): Likewise.
1104         * config/arm/arm.h (STARTING_FRAME_OFFSET): Likewise.
1105         * config/bfin/bfin.h (STARTING_FRAME_OFFSET): Likewise.
1106         * config/c6x/c6x.h (STARTING_FRAME_OFFSET): Likewise.
1107         * config/cr16/cr16.h (STARTING_FRAME_OFFSET): Likewise.
1108         * config/cris/cris.h (STARTING_FRAME_OFFSET): Likewise.
1109         * config/fr30/fr30.h (STARTING_FRAME_OFFSET): Likewise.
1110         * config/frv/frv.h (STARTING_FRAME_OFFSET): Likewise.
1111         * config/ft32/ft32.h (STARTING_FRAME_OFFSET): Likewise.
1112         * config/h8300/h8300.h (STARTING_FRAME_OFFSET): Likewise.
1113         * config/i386/i386.h (STARTING_FRAME_OFFSET): Likewise.
1114         * config/ia64/ia64.h (STARTING_FRAME_OFFSET): Likewise.
1115         * config/m32c/m32c.h (STARTING_FRAME_OFFSET): Likewise.
1116         * config/m68k/m68k.h (STARTING_FRAME_OFFSET): Likewise.
1117         * config/mcore/mcore.h (STARTING_FRAME_OFFSET): Likewise.
1118         * config/mn10300/mn10300.h (STARTING_FRAME_OFFSET): Likewise.
1119         * config/moxie/moxie.h (STARTING_FRAME_OFFSET): Likewise.
1120         * config/msp430/msp430.h (STARTING_FRAME_OFFSET): Likewise.
1121         * config/nds32/nds32.h (STARTING_FRAME_OFFSET): Likewise.
1122         * config/nios2/nios2.h (STARTING_FRAME_OFFSET): Likewise.
1123         * config/nvptx/nvptx.h (STARTING_FRAME_OFFSET): Likewise.
1124         * config/pdp11/pdp11.h (STARTING_FRAME_OFFSET): Likewise.
1125         * config/riscv/riscv.h (STARTING_FRAME_OFFSET): Likewise.
1126         * config/rl78/rl78.h (STARTING_FRAME_OFFSET): Likewise.
1127         * config/rx/rx.h (STARTING_FRAME_OFFSET): Likewise.
1128         * config/s390/s390.h (STARTING_FRAME_OFFSET): Likewise.
1129         * config/sh/sh.h (STARTING_FRAME_OFFSET): Likewise.
1130         * config/sparc/sparc.c (sparc_compute_frame_size): Likewise.
1131         * config/sparc/sparc.h (STARTING_FRAME_OFFSET): Likewise.
1132         * config/spu/spu.h (STARTING_FRAME_OFFSET): Likewise.
1133         * config/stormy16/stormy16.h (STARTING_FRAME_OFFSET): Likewise.
1134         * config/tilegx/tilegx.h (STARTING_FRAME_OFFSET): Likewise.
1135         * config/tilepro/tilepro.h (STARTING_FRAME_OFFSET): Likewise.
1136         * config/v850/v850.h (STARTING_FRAME_OFFSET): Likewise.
1137         * config/visium/visium.h (STARTING_FRAME_OFFSET): Likewise.
1138         * config/avr/avr.h (STARTING_FRAME_OFFSET): Likewise.
1139         * config/avr/avr-protos.h (avr_starting_frame_offset): Likewise.
1140         * config/avr/avr.c (avr_starting_frame_offset): Make static and
1141         return a HOST_WIDE_INT.
1142         (avr_builtin_setjmp_frame_value): Use it instead of
1143         STARTING_FRAME_OFFSET.
1144         (TARGET_STARTING_FRAME_OFFSET): Redefine.
1145         * config/epiphany/epiphany.h (STARTING_FRAME_OFFSET): Delete.
1146         * config/epiphany/epiphany.c (epiphany_starting_frame_offset):
1147         New function.
1148         (TARGET_STARTING_FRAME_OFFSET): Redefine.
1149         * config/iq2000/iq2000.h (STARTING_FRAME_OFFSET): Delete.
1150         * config/iq2000/iq2000.c (iq2000_starting_frame_offset): New function.
1151         (TARGET_CONSTANT_ALIGNMENT): Redefine.
1152         * config/lm32/lm32.h (STARTING_FRAME_OFFSET): Delete.
1153         * config/lm32/lm32.c (lm32_starting_frame_offset): New function.
1154         (TARGET_STARTING_FRAME_OFFSET): Redefine.
1155         * config/m32r/m32r.h (STARTING_FRAME_OFFSET): Delete.
1156         * config/m32r/m32r.c (m32r_starting_frame_offset): New function.
1157         (TARGET_STARTING_FRAME_OFFSET): Redefine.
1158         * config/microblaze/microblaze.h (STARTING_FRAME_OFFSET): Delete.
1159         * config/microblaze/microblaze.c (microblaze_starting_frame_offset):
1160         New function.
1161         (TARGET_STARTING_FRAME_OFFSET): Redefine.
1162         * config/mips/mips.h (STARTING_FRAME_OFFSET): Delete.
1163         * config/mips/mips.c (mips_compute_frame_info): Refer to
1164         TARGET_STARTING_FRAME_OFFSET instead of STARTING_FRAME_OFFSET.
1165         (mips_starting_frame_offset): New function.
1166         (TARGET_STARTING_FRAME_OFFSET): Redefine.
1167         * config/mmix/mmix.h (STARTING_FRAME_OFFSET): Delete.
1168         * config/mmix/mmix-protos.h (mmix_starting_frame_offset): Delete.
1169         * config/mmix/mmix.c (mmix_starting_frame_offset): Make static
1170         and return a HOST_WIDE_INT.
1171         (TARGET_STARTING_FRAME_OFFSET): Redefine.
1172         (mmix_initial_elimination_offset): Refer to
1173         TARGET_STARTING_FRAME_OFFSET instead of STARTING_FRAME_OFFSET.
1174         * config/pa/pa.h (STARTING_FRAME_OFFSET): Delete.
1175         * config/pa/pa.c (pa_starting_frame_offset): New function.
1176         (pa_compute_frame_size): Use it instead of STARTING_FRAME_OFFSET.
1177         (pa_expand_prologue): Likewise.
1178         (TARGET_STARTING_FRAME_OFFSET): Redefine.
1179         * config/powerpcspe/aix.h (STARTING_FRAME_OFFSET): Split out
1180         !FRAME_GROWS_DOWNWARD handling to...
1181         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
1182         * config/powerpcspe/darwin.h (STARTING_FRAME_OFFSET): Split out
1183         !FRAME_GROWS_DOWNWARD handling to...
1184         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
1185         * config/powerpcspe/powerpcspe.h (STARTING_FRAME_OFFSET): Split out
1186         !FRAME_GROWS_DOWNWARD handling to...
1187         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
1188         * config/powerpcspe/powerpcspe.c (TARGET_STARTING_FRAME_OFFSET):
1189         Redefine.
1190         (rs6000_starting_frame_offset): New function.
1191         * config/rs6000/aix.h (STARTING_FRAME_OFFSET): Split out
1192         !FRAME_GROWS_DOWNWARD handling to...
1193         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
1194         * config/rs6000/darwin.h (STARTING_FRAME_OFFSET): Split out
1195         !FRAME_GROWS_DOWNWARD handling to...
1196         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
1197         * config/rs6000/rs6000.h (STARTING_FRAME_OFFSET): Split out
1198         !FRAME_GROWS_DOWNWARD handling to...
1199         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
1200         * config/rs6000/rs6000.c (TARGET_STARTING_FRAME_OFFSET): Refine.
1201         (rs6000_starting_frame_offset): New function.
1202         * config/vax/elf.h (STARTING_FRAME_OFFSET): Delete.
1203         * config/vax/vax.h (STARTING_FRAME_OFFSET): Delete.
1204         * config/vax/vax.c (vax_starting_frame_offset): New function.
1205         (vax_expand_prologue): Use it instead of STARTING_FRAME_OFFSET.
1206         (TARGET_STARTING_FRAME_OFFSET): Redefine.
1207         * config/xtensa/xtensa.h (STARTING_FRAME_OFFSET): Delete.
1208         * config/xtensa/xtensa.c (xtensa_starting_frame_offset): New function.
1209         (TARGET_STARTING_FRAME_OFFSET): Redefine.
1210         * system.h (STARTING_FRAME_OFFSET): Poison.
1212 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
1214         * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
1215         SCALAR_TYPE_MODE instead of TYPE_MODE.
1217 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
1218             Alan Hayward  <alan.hayward@arm.com>
1219             David Sherwood  <david.sherwood@arm.com>
1221         * dwarf2out.c (loc_list_from_tree_1): Use SCALAR_INT_TYPE_MODE
1223 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
1224             Alan Hayward  <alan.hayward@arm.com>
1225             David Sherwood  <david.sherwood@arm.com>
1227         * expmed.c (expand_shift_1): Use scalar_mode for scalar_mode.
1229 2017-10-23  Richard Biener  <rguenther@suse.de>
1231         PR tree-optimization/82129
1232         * tree-ssa-pre.c (bitmap_set_and): Remove.
1233         (compute_antic_aux): Compute ANTIC_OUT intersection in a way
1234         canonicalizing expressions in the set to those with lowest
1235         ID rather than taking that from the first edge.
1237 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
1239         * combine.c (rtx_equal_for_field_assignment_p): Use
1240         byte_lowpart_offset.
1242 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
1243             Alan Hayward  <alan.hayward@arm.com>
1244             David Sherwood  <david.sherwood@arm.com>
1246         * internal-fn.c (expand_direct_optab_fn): Don't assign directly
1247         to a SUBREG_PROMOTED_VAR.
1249 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
1250             Alan Hayward  <alan.hayward@arm.com>
1251             David Sherwood  <david.sherwood@arm.com>
1253         * cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_PRECISION.
1254         (expand_debug_source_expr): Likewise.
1255         * combine.c (combine_simplify_rtx): Likewise.
1256         * cse.c (fold_rtx): Likewise.
1257         * optabs.c (expand_float): Likewise.
1258         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
1259         (simplify_binary_operation_1): Likewise.
1261 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
1262             Alan Hayward  <alan.hayward@arm.com>
1263             David Sherwood  <david.sherwood@arm.com>
1265         * combine.c (simplify_comparison): Use HWI_COMPUTABLE_MODE_P.
1266         (record_promoted_value): Likewise.
1267         * expr.c (expand_expr_real_2): Likewise.
1268         * ree.c (update_reg_equal_equiv_notes): Likewise.
1269         (combine_set_extension): Likewise.
1270         * rtlanal.c (low_bitmask_len): Likewise.
1271         * simplify-rtx.c (neg_const_int): Likewise.
1272         (simplify_binary_operation_1): Likewise.
1274 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
1275             Alan Hayward  <alan.hayward@arm.com>
1276             David Sherwood  <david.sherwood@arm.com>
1278         * lra-spills.c (assign_mem_slot): Use subreg_size_lowpart_offset.
1279         * regcprop.c (maybe_mode_change): Likewise.
1280         * reload1.c (alter_reg): Likewise.
1282 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
1284         * inchash.h (inchash::hash::add_wide_int): New function.
1285         * lto-streamer-out.c (hash_tree): Use it.
1287 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
1289         * inchash.h (inchash::hash::add_wide_int): Rename to...
1290         (inchash::hash::add_hwi): ...this.
1291         * ipa-devirt.c (hash_odr_vtable): Update accordingly.
1292         (polymorphic_call_target_hasher::hash): Likewise.
1293         * ipa-icf.c (sem_function::get_hash, sem_function::init): Likewise.
1294         (sem_item::add_expr, sem_item::add_type, sem_variable::get_hash)
1295         (sem_item_optimizer::update_hash_by_addr_refs): Likewise.
1296         * lto-streamer-out.c (hash_tree): Likewise.
1297         * optc-save-gen.awk: Likewise.
1298         * tree.c (add_expr): Likewise.
1300 2017-10-22  Uros Bizjak  <ubizjak@gmail.com>
1302         PR target/52451
1303         * config/i386/i386.c (ix86_fp_compare_mode): Return CCFPmode
1304         for ordered inequality comparisons even with TARGET_IEEE_FP.
1306 2017-10-22  Uros Bizjak  <ubizjak@gmail.com>
1308         PR target/82628
1309         * config/i386/i386.md (cmp<dwi>_doubleword): New pattern.
1310         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>:
1311         Expand with cmp<dwi>_doubleword.
1313 2017-10-21  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
1315         * extend.texi: Add x86 specific to 'nocf_check' attribute.
1316         List CET intrinsics.
1317         * invoke.texi: Add -mcet, -mibt, -mshstk options.  Add x86
1318         specific to -fcf-protection option.
1320 2017-10-21  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
1322         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET): New.
1323         (OPTION_MASK_ISA_SHSTK_SET): Likewise.
1324         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
1325         (OPTION_MASK_ISA_SHSTK_UNSET): Likewise.
1326         (ix86_handle_option): Add -mibt, -mshstk, -mcet handling.
1327         * config.gcc (extra_headers): Add cetintrin.h for x86 targets.
1328         (extra_objs): Add cet.o for Linux/x86 targets.
1329         (tmake_file): Add i386/t-cet for Linux/x86 targets.
1330         * config/i386/cet.c: New file.
1331         * config/i386/cetintrin.h: Likewise.
1332         * config/i386/t-cet: Likewise.
1333         * config/i386/cpuid.h (bit_SHSTK): New.
1334         (bit_IBT): Likewise.
1335         * config/i386/driver-i386.c (host_detect_local_cpu): Detect and
1336         pass IBT and SHSTK bits.
1337         * config/i386/i386-builtin-types.def
1338         (VOID_FTYPE_UNSIGNED_PVOID): New.
1339         (VOID_FTYPE_UINT64_PVOID): Likewise.
1340         * config/i386/i386-builtin.def: Add CET intrinsics.
1341         * config/i386/i386-c.c (ix86_target_macros_internal): Add
1342         OPTION_MASK_ISA_IBT, OPTION_MASK_ISA_SHSTK handling.
1343         * config/i386/i386-passes.def: Add pass_insert_endbranch pass.
1344         * config/i386/i386-protos.h (make_pass_insert_endbranch): New
1345         prototype.
1346         * config/i386/i386.c (rest_of_insert_endbranch): New.
1347         (pass_data_insert_endbranch): Likewise.
1348         (pass_insert_endbranch): Likewise.
1349         (make_pass_insert_endbranch): Likewise.
1350         (ix86_notrack_prefixed_insn_p): Likewise.
1351         (ix86_target_string): Add -mibt, -mshstk flags.
1352         (ix86_option_override_internal): Add flag_cf_protection
1353         processing.
1354         (ix86_valid_target_attribute_inner_p): Set OPT_mibt, OPT_mshstk.
1355         (ix86_print_operand): Add 'notrack' prefix output.
1356         (ix86_init_mmx_sse_builtins): Add CET intrinsics.
1357         (ix86_expand_builtin): Expand CET intrinsics.
1358         (x86_output_mi_thunk): Add 'endbranch' instruction.
1359         * config/i386/i386.h (TARGET_IBT): New.
1360         (TARGET_IBT_P): Likewise.
1361         (TARGET_SHSTK): Likewise.
1362         (TARGET_SHSTK_P): Likewise.
1363         * config/i386/i386.md (unspecv): Add UNSPECV_NOP_RDSSP,
1364         UNSPECV_INCSSP, UNSPECV_SAVEPREVSSP, UNSPECV_RSTORSSP,
1365         UNSPECV_WRSS, UNSPECV_WRUSS, UNSPECV_SETSSBSY, UNSPECV_CLRSSBSY.
1366         (builtin_setjmp_setup): New pattern.
1367         (builtin_longjmp): Likewise.
1368         (rdssp<mode>): Likewise.
1369         (incssp<mode>): Likewise.
1370         (saveprevssp): Likewise.
1371         (rstorssp): Likewise.
1372         (wrss<mode>): Likewise.
1373         (wruss<mode>): Likewise.
1374         (setssbsy): Likewise.
1375         (clrssbsy): Likewise.
1376         (nop_endbr): Likewise.
1377         * config/i386/i386.opt: Add -mcet, -mibt, -mshstk and -mcet-switch
1378         options.
1379         * config/i386/immintrin.h: Include <cetintrin.h>.
1380         * config/i386/linux-common.h
1381         (file_end_indicate_exec_stack_and_cet): New prototype.
1382         (TARGET_ASM_FILE_END): New.
1384 2017-10-20  Jan Hubicka  <hubicka@ucw.cz>
1386         * i386.c (ix86_builtin_vectorization_cost): Use existing rtx_cost
1387         latencies instead of having separate table; make difference between
1388         integer and float costs.
1389         * i386.h (processor_costs): Remove scalar_stmt_cost,
1390         scalar_load_cost, scalar_store_cost, vec_stmt_cost, vec_to_scalar_cost,
1391         scalar_to_vec_cost, vec_align_load_cost, vec_unalign_load_cost,
1392         vec_store_cost.
1393         * x86-tune-costs.h: Remove entries which has been removed in
1394         procesor_costs from all tables; make cond_taken_branch_cost
1395         and cond_not_taken_branch_cost COST_N_INSNS based.
1397 2017-10-20  Jan Hubicka  <hubicka@ucw.cz>
1399         * x86-tune-costs.h (intel_cost, generic_cost): Fix move costs.
1401 2017-10-20  Jakub Jelinek  <jakub@redhat.com>
1403         * config/i386/i386.md (isa): Remove fma_avx512f.
1404         * config/i386/sse.md (<avx512>_fmadd_<mode>_mask<round_name>,
1405         <avx512>_fmadd_<mode>_mask3<round_name>,
1406         <avx512>_fmsub_<mode>_mask<round_name>,
1407         <avx512>_fmsub_<mode>_mask3<round_name>,
1408         <avx512>_fnmadd_<mode>_mask<round_name>,
1409         <avx512>_fnmadd_<mode>_mask3<round_name>,
1410         <avx512>_fnmsub_<mode>_mask<round_name>,
1411         <avx512>_fnmsub_<mode>_mask3<round_name>,
1412         <avx512>_fmaddsub_<mode>_mask<round_name>,
1413         <avx512>_fmaddsub_<mode>_mask3<round_name>,
1414         <avx512>_fmsubadd_<mode>_mask<round_name>,
1415         <avx512>_fmsubadd_<mode>_mask3<round_name>): Remove isa attribute.
1416         (*vec_widen_umult_even_v16si<mask_name>,
1417         *vec_widen_smult_even_v16si<mask_name>): Likewise.
1418         (<mask_codefor>avx512bw_dbpsadbw<mode><mask_name>): Likewise.
1420 2017-10-20  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
1422         * extend.texi: Add 'nocf_check' documentation.
1423         * gimple.texi: Add second parameter to
1424         gimple_build_call_from_tree.
1425         * invoke.texi: Add -fcf-protection documentation.
1426         * rtl.texi: Add REG_CALL_NOTRACK documenation.
1428 2017-10-20  Richard Biener  <rguenther@suse.de>
1430         PR tree-optimization/82473
1431         * tree-vect-loop.c (vectorizable_reduction): Properly get at
1432         the largest input type.
1434 2017-10-20  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
1436         * c-attribs.c (handle_nocf_check_attribute): New function.
1437         (c_common_attribute_table): Add 'nocf_check' handling.
1438         * gimple-parser.c: Add second argument NULL to
1439         gimple_build_call_from_tree.
1440         * attrib.c (comp_type_attributes): Check nocf_check attribute.
1441         * cfgexpand.c (expand_call_stmt): Set REG_CALL_NOCF_CHECK for
1442         call insn.
1443         * combine.c (distribute_notes): Add REG_CALL_NOCF_CHECK handling.
1444         * common.opt: Add fcf-protection flag.
1445         * emit-rtl.c (try_split): Add REG_CALL_NOCF_CHECK handling.
1446         * flag-types.h: Add enum cf_protection_level.
1447         * gimple.c (gimple_build_call_from_tree): Add second parameter.
1448         Add 'nocf_check' attribute propagation to gimple call.
1449         * gimple.h (gf_mask): Add GF_CALL_NOCF_CHECK.
1450         (gimple_build_call_from_tree): Update prototype.
1451         (gimple_call_nocf_check_p): New function.
1452         (gimple_call_set_nocf_check): Likewise.
1453         * gimplify.c: Add second argument to gimple_build_call_from_tree.
1454         * ipa-icf.c: Add nocf_check attribute in statement hash.
1455         * recog.c (peep2_attempt): Add REG_CALL_NOCF_CHECK handling.
1456         * reg-notes.def: Add REG_NOTE (CALL_NOCF_CHECK).
1457         * toplev.c (process_options): Add flag_cf_protection handling.
1459 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
1461         * x86-tune-costs.h (core_cost): Fix div, move and sqrt latencies.
1463 2017-10-20  Richard Biener  <rguenther@suse.de>
1465         PR tree-optimization/82603
1466         * tree-if-conv.c (predicate_mem_writes): Make sure to only
1467         remove false predicated stores.
1469 2017-10-20  Richard Biener  <rguenther@suse.de>
1471         * graphite-isl-ast-to-gimple.c
1472         (translate_isl_ast_to_gimple::graphite_copy_stmts_from_block):
1473         Remove return value and simplify, dump copied stmt after lhs
1474         adjustment.
1475         (translate_isl_ast_to_gimple::translate_isl_ast_node_user):
1476         Reduce dump verbosity.
1477         (gsi_insert_earliest): Likewise.
1478         (translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences): Adjust.
1479         * graphite.c (print_global_statistics): Adjust dumping.
1480         (print_graphite_scop_statistics): Likewise.
1481         (print_graphite_statistics): Do not dump loops here.
1482         (graphite_transform_loops): But here.
1484 2017-10-20  Nicolas Roche  <roche@adacore.com>
1486         * configure.ac (ACX_PROG_GNAT): Append "libgnat" to include search dir.
1487         * configure: Regenerate.
1489 2017-10-20  Jakub Jelinek  <jakub@redhat.com>
1491         PR target/82158
1492         * tree-cfg.c (pass_warn_function_return::execute): In noreturn
1493         functions when optimizing replace GIMPLE_RETURN stmts with
1494         calls to __builtin_unreachable ().
1496         PR sanitizer/82595
1497         * config/gnu-user.h (LIBTSAN_EARLY_SPEC): Add libtsan_preinit.o
1498         for -fsanitize=thread link of executables.
1499         (LIBLSAN_EARLY_SPEC): Add liblsan_preinit.o for -fsanitize=leak
1500         link of executables.
1502         PR target/82370
1503         * config/i386/sse.md (VI248_AVX2, VI248_AVX512BW, VI248_AVX512BW_2):
1504         New mode iterators.
1505         (<shift_insn><mode>3<mask_name>): Change the last of the 3
1506         define_insns for logical vector shifts to use VI248_AVX512BW
1507         iterator instead of VI48_AVX512, remove <mask_mode512bit_condition>
1508         condition, useless isa and prefix attributes.  Change the first
1509         2 of these define_insns to ...
1510         (<mask_codefor><shift_insn><mode>3<mask_name>): ... this, new
1511         define_insn for avx512vl.
1512         (<shift_insn><mode>3): ... and this, new define_insn without
1513         masking for non-avx512vl.
1515         PR target/82370
1516         * config/i386/sse.md (*andnot<mode>3,
1517         <mask_codefor><code><mode>3<mask_name>, *<code><mode>3): Split
1518         (=v,v,vm) alternative into (=x,x,xm) and (=v,v,vm), for 128-bit
1519         and 256-bit vectors, the (=x,x,xm) alternative and when mask is
1520         not applied use empty suffix even for TARGET_AVX512VL.
1521         * config/i386/subst.md (mask_prefix3, mask_prefix4): When mask
1522         is applied, supply evex,evex or evex,evex,evex instead of just
1523         evex.
1525 2017-10-20  Julia Koval  <julia.koval@intel.com>
1527         * common/config/i386/i386-common.c (OPTION_MASK_ISA_GFNI_SET,
1528         (OPTION_MASK_ISA_GFNI_UNSET): New.
1529         (ix86_handle_option): Handle OPT_mgfni.
1530         * config/i386/cpuid.h (bit_GFNI): New.
1531         * config/i386/driver-i386.c (host_detect_local_cpu): Detect gfni.
1532         * config/i386/i386-c.c (ix86_target_macros_internal): Define __GFNI__.
1533         * config/i386/i386.c (ix86_target_string): Add -mgfni.
1534         (ix86_valid_target_attribute_inner_p): Add OPT_mgfni.
1535         * config/i386/i386.h (TARGET_GFNI, TARGET_GFNI_P): New.
1536         * config/i386/i386.opt: Add mgfni.
1538 2017-10-20  Orlando Arias  <oarias@knights.ucf.edu>
1540         * config/msp430/msp430.c (msp430_option_override): Disable
1541         -fdelete-null-pointer-checks.
1542         * doc/invoke.text (-fdelete-null-pointer-checks): Document that.
1544 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
1546         * x86-tune-costs.h (generic_cost, core_cost): Correct costs
1547         of x87 and SSE instructions.
1549 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
1551         * asan.c (create_cond_insert_point): Do not update edge count.
1552         * auto-profile.c (afdo_propagate_edge): Update for edge count removal.
1553         (afdo_propagate_circuit): Likewise.
1554         (afdo_calculate_branch_prob): Likewise.
1555         (afdo_annotate_cfg): Likewise.
1556         * basic-block.h (struct edge_def): Remove count.
1557         (edge_def::count): New accessor.
1558         * bb-reorder.c (rotate_loop): Update.
1559         (find_traces_1_round): Update.
1560         (connect_traces): Update.
1561         (sanitize_hot_paths): Update.
1562         * cfg.c (unchecked_make_edge): Update.
1563         (make_single_succ_edge): Update.
1564         (check_bb_profile): Update.
1565         (dump_edge_info): Update.
1566         (update_bb_profile_for_threading): Update.
1567         (scale_bbs_frequencies_int): Update.
1568         (scale_bbs_frequencies_gcov_type): Update.
1569         (scale_bbs_frequencies_profile_count): Update.
1570         (scale_bbs_frequencies): Update.
1571         * cfganal.c (connect_infinite_loops_to_exit): Update.
1572         * cfgbuild.c (compute_outgoing_frequencies): Update.
1573         (find_many_sub_basic_blocks): Update.
1574         * cfgcleanup.c (try_forward_edges): Update.
1575         (try_crossjump_to_edge): Update
1576         * cfgexpand.c (expand_gimple_cond): Update
1577         (expand_gimple_tailcall): Update
1578         (construct_exit_block): Update
1579         * cfghooks.c (verify_flow_info): Update
1580         (redirect_edge_succ_nodup): Update
1581         (split_edge): Update
1582         (make_forwarder_block): Update
1583         (duplicate_block): Update
1584         (account_profile_record): Update
1585         * cfgloop.c (find_subloop_latch_edge_by_profile): Update.
1586         * cfgloopanal.c (expected_loop_iterations_unbounded): Update.
1587         * cfgloopmanip.c (scale_loop_profile): Update.
1588         (loopify): Update.
1589         (lv_adjust_loop_entry_edge): Update.
1590         * cfgrtl.c (try_redirect_by_replacing_jump): Update.
1591         (force_nonfallthru_and_redirect): Update.
1592         (purge_dead_edges): Update.
1593         (rtl_flow_call_edges_add): Update.
1594         * cgraphunit.c (init_lowered_empty_function): Update.
1595         (cgraph_node::expand_thunk): Update.
1596         * gimple-pretty-print.c (dump_probability): Update.
1597         (dump_edge_probability): Update.
1598         * gimple-ssa-isolate-paths.c (isolate_path): Update.
1599         * haifa-sched.c (sched_create_recovery_edges): Update.
1600         * hsa-gen.c (convert_switch_statements): Update.
1601         * ifcvt.c (dead_or_predicable): Update.
1602         * ipa-inline-transform.c (inline_transform): Update.
1603         * ipa-split.c (split_function): Update.
1604         * ipa-utils.c (ipa_merge_profiles): Update.
1605         * loop-doloop.c (add_test): Update.
1606         * loop-unroll.c (unroll_loop_runtime_iterations): Update.
1607         * lto-streamer-in.c (input_cfg): Update.
1608         (input_function): Update.
1609         * lto-streamer-out.c (output_cfg): Update.
1610         * modulo-sched.c (sms_schedule): Update.
1611         * postreload-gcse.c (eliminate_partially_redundant_load): Update.
1612         * predict.c (maybe_hot_edge_p): Update.
1613         (unlikely_executed_edge_p): Update.
1614         (probably_never_executed_edge_p): Update.
1615         (dump_prediction): Update.
1616         (drop_profile): Update.
1617         (propagate_unlikely_bbs_forward): Update.
1618         (determine_unlikely_bbs): Update.
1619         (force_edge_cold): Update.
1620         * profile.c (compute_branch_probabilities): Update.
1621         * reg-stack.c (better_edge): Update.
1622         * shrink-wrap.c (handle_simple_exit): Update.
1623         * tracer.c (better_p): Update.
1624         * trans-mem.c (expand_transaction): Update.
1625         (split_bb_make_tm_edge): Update.
1626         * tree-call-cdce.c: Update.
1627         * tree-cfg.c (gimple_find_sub_bbs): Update.
1628         (gimple_split_edge): Update.
1629         (gimple_duplicate_sese_region): Update.
1630         (gimple_duplicate_sese_tail): Update.
1631         (gimple_flow_call_edges_add): Update.
1632         (insert_cond_bb): Update.
1633         (execute_fixup_cfg): Update.
1634         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update.
1635         * tree-complex.c (expand_complex_div_wide): Update.
1636         * tree-eh.c (lower_resx): Update.
1637         (unsplit_eh): Update.
1638         (cleanup_empty_eh_move_lp): Update.
1639         * tree-inline.c (copy_edges_for_bb): Update.
1640         (freqs_to_counts): Update.
1641         (copy_cfg_body): Update.
1642         * tree-ssa-dce.c (remove_dead_stmt): Update.
1643         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
1644         * tree-ssa-loop-im.c (execute_sm_if_changed): Update.
1645         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
1646         (unloop_loops): Update.
1647         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
1648         * tree-ssa-loop-split.c (connect_loops): Update.
1649         (split_loop): Update.
1650         * tree-ssa-loop-unswitch.c (hoist_guard): Update.
1651         * tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
1652         * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
1653         * tree-ssa-reassoc.c (branch_fixup): Update.
1654         * tree-ssa-tail-merge.c (replace_block_by): Update.
1655         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
1656         (compute_path_counts): Update.
1657         (update_profile): Update.
1658         (recompute_probabilities): Update.
1659         (update_joiner_offpath_counts): Update.
1660         (estimated_freqs_path): Update.
1661         (freqs_to_counts_path): Update.
1662         (clear_counts_path): Update.
1663         (ssa_fix_duplicate_block_edges): Update.
1664         (duplicate_thread_path): Update.
1665         * tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
1666         (case_bit_test_cmp): Update.
1667         (collect_switch_conv_info): Update.
1668         (gen_inbound_check): Update.
1669         (do_jump_if_equal): Update.
1670         (emit_cmp_and_jump_insns): Update.
1671         * tree-tailcall.c (decrease_profile): Update.
1672         (eliminate_tail_call): Update.
1673         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
1674         (vect_do_peeling): Update.
1675         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
1676         * ubsan.c (ubsan_expand_null_ifn): Update.
1677         (ubsan_expand_ptr_ifn): Update.
1678         * value-prof.c (gimple_divmod_fixed_value): Update.
1679         (gimple_mod_pow2): Update.
1680         (gimple_mod_subtract): Update.
1681         (gimple_ic): Update.
1682         (gimple_stringop_fixed_value): Update.
1684 2017-10-19  Uros Bizjak  <ubizjak@gmail.com>
1686         PR target/82618
1687         * config/i386/i386.md (sub to cmp): New peephole2 pattern.
1689 2017-10-19  Alexander Monakov  <amonakov@ispras.ru>
1691         PR rtl-optimization/82395
1692         * ira-color.c (allocno_priority_compare_func): Fix comparison step
1693         based on non_spilled_static_chain_regno_p.
1695 2017-10-19  Uros Bizjak  <ubizjak@gmail.com>
1697         * config/i386/i386.c (output_387_binary_op): Rewrite SSE part.
1698         (ix86_emit_mode_set): Rewrite insn mnemonic construction.
1699         (ix86_prepare_fp_compare_args): Redefine is_sse as bool.
1701 2017-10-19  Martin Sebor  <msebor@redhat.com>
1703         PR tree-optimization/82596
1704         * tree.c (array_at_struct_end_p): Handle STRING_CST.
1706 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
1708         * asan.c (handle_builtin_alloca): Deal with all alloca variants.
1709         (get_mem_refs_of_builtin_call): Likewise.
1710         * builtins.c (expand_builtin_apply): Adjust call to
1711         allocate_dynamic_stack_space.
1712         (expand_builtin_alloca): For __builtin_alloca_with_align_and_max, pass
1713         the third argument to allocate_dynamic_stack_space, otherwise -1.
1714         (expand_builtin): Deal with all alloca variants.
1715         (is_inexpensive_builtin): Likewise.
1716         * builtins.def (BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX): New.
1717         * calls.c (special_function_p): Deal with all alloca variants.
1718         (initialize_argument_information): Adjust call to
1719         allocate_dynamic_stack_space.
1720         (expand_call): Likewise.
1721         * cfgexpand.c (expand_call_stmt): Deal with all alloca variants.
1722         * doc/extend.texi (Built-ins): Add __builtin_alloca_with_align_and_max
1723         * explow.c (allocate_dynamic_stack_space): Add MAX_SIZE parameter and
1724         use it for the stack usage computation.
1725         * explow.h (allocate_dynamic_stack_space): Adjust prototype.
1726         * function.c (gimplify_parameters): Call build_alloca_call_expr.
1727         * gimple-ssa-warn-alloca.c (alloca_call_type): Simplify control flow.
1728         Take into account 3rd argument of __builtin_alloca_with_align_and_max.
1729         (in_loop_p): Remove first argument and useless check.
1730         (pass_walloca::execute): Remove useless test and adjust call to above.
1731         * gimple.c (gimple_build_call_from_tree): Deal with all alloc variants
1732         * gimplify.c (gimplify_vla_decl): Call build_alloca_call_expr.
1733         (gimplify_call_expr): Deal with all alloca variants.
1734         * hsa-gen.c (gen_hsa_alloca): Likewise.
1735         (gen_hsa_insns_for_call): Likewise.
1736         * ipa-pure-const.c (special_builtin_state): Likewise.
1737         * tree-chkp.c (chkp_build_returned_bound): Likewise.
1738         * tree-object-size.c (alloc_object_size): Likewise.
1739         * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Likewise.
1740         (call_may_clobber_ref_p_1): Likewise.
1741         * tree-ssa-ccp.c (evaluate_stmt): Likewise.
1742         (ccp_fold_stmt): Likewise.
1743         (optimize_stack_restore): Likewise.
1744         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1745         (mark_all_reaching_defs_necessary_1): Likewise.
1746         (propagate_necessity): Likewise.
1747         (eliminate_unnecessary_stmts): Likewise.
1748         * tree.c (build_common_builtin_nodes): Build
1749         BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX.
1750         (build_alloca_call_expr): New function.
1751         * tree.h (ALLOCA_FUNCTION_CODE_P): New macro.
1752         (CASE_BUILT_IN_ALLOCA): Likewise.
1753         (build_alloca_call_expr): Declare.
1754         * varasm.c (incorporeal_function_p): Deal with all alloca variants.
1756 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
1758         PR debug/82509
1759         * dwarf2out.c (new_die_raw): New static inline function.
1760         (new_die): Use it to create the DIE.
1761         (add_AT_external_die_ref): Likewise.
1762         (clone_die): Likewise.
1763         (clone_as_declaration): Likewise.
1764         (dwarf2out_vms_debug_main_pointer): Likewise.
1765         (base_type_die): Likewise.  Remove early return for corner cases.
1766         Do not call add_pubtype on the DIE here.
1767         (is_base_type): Remove ERROR_MARK and return 0 for VOID_TYPE.
1768         (modified_type_die): Adjust the lookup for reverse order DIEs.  Skip
1769         typedefs for base types with DW_AT_endianity.  Make sure a DIE with
1770         native order exists for base types, attach the DIE manually and call
1771         add_pubtype on it.  Do not equate a reverse order DIE to the type.
1773 2017-10-19  Richard Earnshaw  <rearnsha@arm.com>
1775         * config/arm/arm.c (align_ok_ldrd_strd): New function.
1776         (mem_ok_for_ldrd_strd): New parameter align.  Extract the alignment of
1777         the mem into it.
1778         (gen_operands_ldrd_strd): Validate the alignment of the accesses.
1780 2017-10-19  Jakub Jelinek  <jakub@redhat.com>
1782         * flag-types.h (enum sanitize_code): Add SANITIZE_BUILTIN.  Or
1783         SANITIZE_BUILTIN into SANITIZE_UNDEFINED.
1784         * sanitizer.def (BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN,
1785         BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN_ABORT): New builtins.
1786         * opts.c (sanitizer_opts): Add builtin.
1787         * ubsan.c (instrument_builtin): New function.
1788         (pass_ubsan::execute): Call it.
1789         (pass_ubsan::gate): Enable even for SANITIZE_BUILTIN.
1790         * doc/invoke.texi: Document -fsanitize=builtin.
1792         * ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch
1793         builtins, store max (log2 (align), 0) into uchar field instead of
1794         align into uptr field.
1795         (ubsan_expand_objsize_ifn): Use _v1 suffixed type mismatch builtins,
1796         store uchar 0 field instead of uptr 0 field.
1797         (instrument_nonnull_return): Use _v1 suffixed nonnull return builtin,
1798         instead of passing one address of struct with 2 locations pass
1799         two addresses of structs with 1 location each.
1800         * sanitizer.def (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH,
1801         BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_ABORT,
1802         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN,
1803         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_ABORT): Removed.
1804         (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1,
1805         BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1_ABORT,
1806         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1,
1807         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1_ABORT): New builtins.
1809 2017-10-19  Martin Liska  <mliska@suse.cz>
1811         PR driver/81829
1812         * file-find.c (remove_prefix): Remove.
1813         * file-find.h (remove_prefix): Likewise.
1814         * gcc-ar.c: Remove smartness of lookup.
1816 2017-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
1818         * config/rs6000/rs6000.md (*call_indirect_aix<mode>,
1819         *call_value_indirect_aix<mode>, *call_indirect_elfv2<mode>,
1820         *call_value_indirect_elfv2<mode>): Add correct mode to the unspec.
1822 2017-10-19  Jakub Jelinek  <jakub@redhat.com>
1824         PR target/82580
1825         * config/i386/i386.md (setcc + movzbl to xor + setcc): New peephole2.
1826         (setcc + and to xor + setcc): New peephole2.
1828 2017-10-19  Tom de Vries  <tom@codesourcery.com>
1830         * doc/sourcebuild.texi (Test Directives, Variants of
1831         dg-require-support): Add dg-require-stack-size.
1833 2017-10-19  Martin Liska  <mliska@suse.cz>
1835         PR sanitizer/82517
1836         * gimplify.c (gimplify_decl_expr): Do not instrument variables
1837         that have a large alignment.
1838         (gimplify_target_expr): Likewise.
1840 2017-10-18  Segher Boessenkool  <segher@kernel.crashing.org>
1842         PR rtl-optimization/82602
1843         * ira.c (rtx_moveable_p): Return false for volatile asm.
1845 2017-10-18  Uros Bizjak  <ubizjak@gmail.com>
1847         PR target/82580
1848         * config/i386/i386-modes.def (CCGZ): New CC mode.
1849         * config/i386/i386.md (sub<mode>3_carry_ccgz): New insn pattern.
1850         * config/i386/predicates.md (ix86_comparison_operator):
1851         Handle CCGZmode.
1852         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>:
1853         Emulate LE, LEU, GT, GTU, LT, LTU, GE and GEU double-word comparisons
1854         with double-word subtraction.
1855         (put_condition_code): Handle CCGZmode.
1857 2017-10-18  Aldy Hernandez  <aldyh@redhat.com>
1859         * wide-int.cc (debug (const wide_int &)): New.
1860         (debug (const wide_int *)): New.
1861         (debug (const widest_int &)): New.
1862         (debug (const widest_int *)): New.
1864 2017-10-18  Vladimir Makarov  <vmakarov@redhat.com>
1866         PR middle-end/82556
1867         * lra-constraints.c (curr_insn_transform): Use non-input operand
1868         instead of output one for matched reload.
1870 2017-10-18  Bin Cheng  <bin.cheng@arm.com>
1872         * tree-loop-distribution.c (INCLUDE_ALGORITHM): New header file.
1873         (tree-ssa-loop-ivopts.h): New header file.
1874         (struct builtin_info): New fields.
1875         (classify_builtin_1): Compute and record base and offset parts for
1876         memset builtin partition by calling strip_offset.
1877         (offset_cmp, fuse_memset_builtins): New functions.
1878         (finalize_partitions): Fuse adjacent memset partitions by calling
1879         above function.
1880         * tree-ssa-loop-ivopts.c (strip_offset): Delete static declaration.
1881         Expose the interface.
1882         * tree-ssa-loop-ivopts.h (strip_offset): New declaration.
1884 2017-10-18  Bin Cheng  <bin.cheng@arm.com>
1886         PR tree-optimization/82574
1887         * tree-loop-distribution.c (find_single_drs): New parameter.  Check
1888         that data reference must be executed exactly once per iteration
1889         against the outermost loop in nest.
1890         (classify_partition): Update call to above function.
1892 2017-10-18  Richard Biener  <rguenther@suse.de>
1894         PR tree-optimization/82591
1895         * graphite.c (graphite_transform_loops): Move code gen message
1896         printing ...
1897         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
1898         Here.  Handle scop_to_isl_ast failing.
1899         (scop_to_isl_ast): Limit the number of ISL operations.
1901 2017-10-18  Richard Biener  <rguenther@suse.de>
1903         * graphite-isl-ast-to-gimple.c
1904         (translate_isl_ast_to_gimple::set_rename): Simplify.
1905         (translate_isl_ast_to_gimple::set_rename_for_each_def): Inline...
1906         (graphite_copy_stmts_from_block): ... here.
1907         (copy_bb_and_scalar_dependences): Simplify.
1908         (add_parameters_to_ivs_params): Canonicalize.
1909         (generate_entry_out_of_ssa_copies): Simplify.
1910         * graphite-sese-to-poly.c (extract_affine_name): Simplify
1911         by passing in ISL dimension.
1912         (parameter_index_in_region_1): Rename to ...
1913         (parameter_index_in_region): ... this.
1914         (extract_affine): Adjust assert, pass down parameter index.
1915         (add_param_constraints): Use range-info when available.
1916         (build_scop_context): Adjust.
1917         * sese.c (new_sese_info): Adjust.
1918         (free_sese_info): Likewise.
1919         * sese.h (bb_map_t, rename_map_t, phi_rename, init_back_edge_pair_t):
1920         Remove unused typedefs.
1921         (struct sese_info_t): Simplify rename_map, remove incomplete_phis.
1923 2017-10-18  Martin Liska  <mliska@suse.cz>
1925         * combine.c (simplify_compare_const): Add gcc_fallthrough.
1927 2017-10-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
1929         * config/s390/s390.c (s390_bb_fallthru_entry_likely): New function.
1930         (s390_sched_init): Do not reset s390_sched_state if we entered the
1931         current basic block via a fallthru edge and all others are unlikely.
1933 2017-10-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
1935         * config/s390/s390.c (NUM_SIDES): New variable.
1936         (LONGRUNNING_THRESHOLD): New variable.
1937         (LATENCY_FACTOR): New variable.
1938         (s390_sched_score): Decrease score for long-running instructions on
1939         wrong side.
1940         (s390_sched_variable_issue): Perform bookkeeping for long-running
1941         instructions.
1943 2017-10-18  Richard Biener  <rguenther@suse.de>
1945         * graphite-isl-ast-to-gimple.c (gcc_expression_from_isl_ast_expr_id):
1946         Simplify with removal of the parameter rename map.
1947         (set_rename): Likewise.
1948         (should_copy_to_new_region): Likewise.
1949         (graphite_copy_stmts_from_block): Likewise.
1950         (copy_bb_and_scalar_dependences): Remove initialization of
1951         unused copied_bb_map.
1952         (copy_def): Remove.
1953         (copy_internal_parameters): Likewise.
1954         (graphite_regenerate_ast_isl): Do not call copy_internal_parameters.
1955         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
1956         Use INTEGRAL_TYPE_P.
1957         (parameter_index_in_region_1): Rename to ...
1958         (assign_parameter_index_in_region): ... this.  Assert we have
1959         a parameter we handle.
1960         (scan_tree_for_params): Adjust.
1961         * sese.h (parameter_rename_map_t): Remove.
1962         (struct sese_info_t): Remove unused parameter_rename_map and
1963         copied_bb_map members.
1964         * sese.c (new_sese_info): Adjust.
1965         (free_sese_info): Likewise.
1967 2017-10-18  Martin Liska  <mliska@suse.cz>
1969         PR sanitizer/82545
1970         * asan.c (asan_expand_poison_ifn): Do not put gimple stmt
1971         on an abnormal edge.
1973 2017-10-18  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1975         * doc/invoke.texi (ffunction-sections and fdata-sections):
1976         Update.
1978 2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>
1980         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Bail out only if
1981         the use statement can throw internally.
1983 2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>
1985         * config/visium/visium.c (visium_select_cc_mode): Return CCmode for
1986         any RTX present on the RHS of a SET.
1987         * compare-elim.c (try_eliminate_compare): Restore comment.
1989 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
1991         * langhooks.h (struct lang_hooks): Document that tree_size langhook
1992         may be also called on tcc_type nodes.
1993         * langhooks.c (lhd_tree_size): Likewise.
1995 2017-10-17  David Malcolm  <dmalcolm@redhat.com>
1997         * gimple-ssa-sprintf.c (fmtwarn): Update for changed signature of
1998         format_warning_at_substring.
1999         (maybe_warn): Convert source_range * param to a location_t.  Pass
2000         UNKNOWN_LOCATION rather than NULL to fmtwarn.
2001         (format_directive): Remove code to extract source_ranges and
2002         source_range * in favor of just a location_t.
2003         (parse_directive): Pass UNKNOWN_LOCATION rather than NULL to
2004         fmtwarn.
2005         * substring-locations.c (format_warning_va): Convert
2006         source_range * param to a location_t.
2007         (format_warning_at_substring): Likewise.
2008         * substring-locations.h (format_warning_va): Likewise.
2009         (format_warning_at_substring): Likewise.
2011 2017-10-17  Jan Hubicka  <hubicka@ucw.cz>
2013         * target.h (enum vect_cost_for_stmt): Add vec_gather_load and
2014         vec_scatter_store
2015         * tree-vect-stmts.c (record_stmt_cost): Make difference between normal
2016         and scatter/gather ops.
2018         * aarch64/aarch64.c (aarch64_builtin_vectorization_cost): Add
2019         vec_gather_load and vec_scatter_store.
2020         * arm/arm.c (arm_builtin_vectorization_cost): Likewise.
2021         * powerpcspe/powerpcspe.c (rs6000_builtin_vectorization_cost): Likewise.
2022         * rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Likewise.
2023         * s390/s390.c (s390_builtin_vectorization_cost): Likewise.
2024         * spu/spu.c (spu_builtin_vectorization_cost): Likewise.
2025         * i386/i386.c (x86_builtin_vectorization_cost): Likewise.
2027 2017-10-17  Uros Bizjak  <ubizjak@gmail.com>
2029         * reg-stack.c (compare_for_stack_reg): Add bool argument.
2030         Detect FTST instruction and handle its register pops.  Only pop
2031         second operand if can_pop_second_op is true.
2032         (subst_stack_regs_pat) <case COMPARE>: Detect FCOMI instruction to
2033         set can_pop_second_op to false in the compare_for_stack_reg call.
2035         * config/i386/i386.md (*cmpi<FPCMP:unord><MODEF:mode>): Only call
2036         output_fp_compare for stack register operands.
2037         * config/i386/i386.c (output_fp_compare): Do not output SSE compare
2038         instructions here.  Do not emit stack register pops here.  Assert
2039         that FCOMPP pops next to top stack register.  Rewrite function.
2041 2017-10-17  Nathan Sidwell  <nathan@acm.org>
2043         PR middle-end/82577
2044         * alias.c (compare_base_decls): Check HAS_DECL_ASSEMBLER_NAME_P,
2045         use DECL_ASSEMBLER_NAME_RAW.
2047         PR middle-end/82546
2048         * tree.c (tree_code_size): Reformat.  Punt to lang hook for unknown
2049         TYPE nodes.
2051 2017-10-17  Qing Zhao <qing.zhao@oracle.com>
2052             Wilco Dijkstra <wilco.dijkstra@arm.com>
2054         * builtins.c (expand_builtin_update_setjmp_buf): Add a
2055         converstion to Pmode from the buf_addr.
2057 2017-10-17  Richard Biener  <rguenther@suse.de>
2059         * graphite-dependences.c (scop_get_reads_and_writes): Change
2060         output parameters to references.
2062 2017-10-17  Jackson Woodruff  <jackson.woodruff@arm.com>
2064         PR 71026/tree-optimization
2065         * fold-const.c (distribute_real_division): Removed.
2066         (fold_binary_loc): Remove calls to distribute_real_divison.
2068 2017-10-17  Richard Biener  <rguenther@suse.de>
2070         * graphite-scop-detection.c
2071         (scop_detection::stmt_has_simple_data_refs_p): Always use
2072         the full nest as region.
2073         (try_generate_gimple_bb): Likewise.
2074         * sese.c (scalar_evolution_in_region): Simplify now that
2075         SCEV can handle instantiation in regions.
2076         * tree-scalar-evolution.c (instantiate_scev_name): Also instantiate
2077         in the non-loop part of a function if requested.
2079 2017-10-17  Richard Biener  <rguenther@suse.de>
2081         PR tree-optimization/82563
2082         * graphite-isl-ast-to-gimple.c (generate_entry_out_of_ssa_copies):
2083         New function.
2084         (graphite_regenerate_ast_isl): Call it.
2085         * graphite-scop-detection.c (build_scops): Remove entry edge split.
2087 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
2089         PR tree-optimization/82549
2090         * fold-const.c (optimize_bit_field_compare, fold_truth_andor_1):
2091         Formatting fixes.  Instead of calling make_bit_field_ref with negative
2092         bitpos return 0.
2094 2017-10-17  Olga Makhotina  <olga.makhotina@intel.com>
2096         * config/i386/avx512dqintrin.h (_mm_mask_reduce_sd,
2097         _mm_maskz_reduce_sd, _mm_mask_reduce_ss,=20
2098         _mm_maskz_reduce_ss): New.
2099         * config/i386/i386-builtin.def (__builtin_ia32_reducesd_mask,
2100         __builtin_ia32_reducess_mask): Ditto..
2101         (__builtin_ia32_reducesd, __builtin_ia32_reducess): Remove.
2102         * config/i386/sse.md (reduces<mode>): Renamed to ...
2103         (reduces<mode><mask_scalar_name>): ... this.
2104         (vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0|%0, %1, %2, %3}):
2105         Changed to ...
2106         (vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0<mask_scalar_operand4>|
2107         %0<mask_scalar_operand4>, %1, %2, %3}): ... this.
2109 2017-10-16  David Malcolm  <dmalcolm@redhat.com>
2111         * Makefile.in (OBJS): Add unique-ptr-tests.o.
2112         * selftest-run-tests.c (selftest::run_tests): Call
2113         selftest::unique_ptr_tests_cc_tests.
2114         * selftest.h (selftest::unique_ptr_tests_cc_tests): New decl.
2115         * unique-ptr-tests.cc: New file.
2117 2017-10-16  Vladimir Makarov  <vmakarov@redhat.com>
2119         PR sanitizer/82353
2120         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
2121         locations.
2122         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
2123         (make_hard_regno_born, make_hard_regno_dead): Update
2124         bb_killed_pseudos and bb_gen_pseudos for fixed regs.
2126 2017-10-16  Jeff Law  <law@redhat.com>
2128         * tree-ssa-dse.c (live_bytes_read): Fix thinko.
2130 2017-10-16  Jan Hubicka  <hubicka@ucw.cz>
2132         * x86-tune-costs.h (znver1_cost): Fix move cost tables.
2134 2017-10-16  Olivier Hainque  <hainque@adacore.com>
2136         * gcc/config.gcc (powerpc*-*-*spe*): Pick 8548 as the default
2137         with_cpu if we were configured for an e500v2 target cpu name.
2139 2017-10-16  Thomas Preud'homme  <thomas.preudhomme@arm.com>
2141         * config/arm/arm-cpus.in (cortex-m33): Add nodsp option.
2142         * doc/invoke.texi: Document +nodsp as a valid extension for
2143         -mcpu=cortex-m33.
2145 2017-10-16  Martin Liska  <mliska@suse.cz>
2147         * sbitmap.c (bitmap_bit_in_range_p_checking): New function.
2148         (test_set_range): Likewise.
2149         (test_range_functions): Rename to ...
2150         (test_bit_in_range): ... this.
2151         (sbitmap_c_tests): Add new test.
2153 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
2155         * config/aarch64/arm_neon.h (vdot_u32, vdotq_u32, vdot_s32, vdotq_s32):
2156         New.
2157         (vdot_lane_u32, vdot_laneq_u32, vdotq_lane_u32, vdotq_laneq_u32): New.
2158         (vdot_lane_s32, vdot_laneq_s32, vdotq_lane_s32, vdotq_laneq_s32): New.
2160 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
2162         * config/aarch64/aarch64-builtins.c
2163         (aarch64_types_quadopu_lane_qualifiers): New.
2164         (TYPES_QUADOPU_LANE): New.
2165         * config/aarch64/aarch64-simd.md (aarch64_<sur>dot<vsi2qi>): New.
2166         (<sur>dot_prod<vsi2qi>, aarch64_<sur>dot_lane<vsi2qi>): New.
2167         (aarch64_<sur>dot_laneq<vsi2qi>): New.
2168         * config/aarch64/aarch64-simd-builtins.def (sdot, udot): New.
2169         (sdot_lane, udot_lane, sdot_laneq, udot_laneq): New.
2170         * config/aarch64/iterators.md (sur): Add UNSPEC_SDOT, UNSPEC_UDOT.
2171         (Vdottype, DOTPROD): New.
2172         (sur): Add SDOT and UDOT.
2174 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
2176         * config/aarch64/aarch64.h (AARCH64_FL_DOTPROD): New.
2177         (AARCH64_ISA_DOTPROD, TARGET_DOTPROD): New.
2178         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
2179         Add TARGET_DOTPROD.
2180         * config/aarch64/aarch64-option-extensions.def (dotprod): New.
2181         * config/aarch64/aarch64-cores.def (cortex-a55, cortex-a75):
2182         Enable TARGET_DOTPROD.
2183         (cortex-a75.cortex-a55): Likewise.
2184         * doc/invoke.texi (aarch64-feature-modifiers): Document dotprod.
2186 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
2188         * config/arm/arm-builtins.c (arm_unsigned_uternop_qualifiers): New.
2189         (UTERNOP_QUALIFIERS, arm_umac_lane_qualifiers, UMAC_LANE_QUALIFIERS):
2190         New.
2191         * config/arm/arm_neon_builtins.def (sdot, udot, sdot_lane, udot_lane):
2192         New.
2193         * config/arm/iterators.md (DOTPROD, VSI2QI, vsi2qi): New.
2194         (UNSPEC_DOT_S, UNSPEC_DOT_U, opsuffix): New.
2195         * config/arm/neon.md (neon_<sup>dot<vsi2qi>): New.
2196         (neon_<sup>dot_lane<vsi2qi>, <sup>dot_prod<vsi2qi>): New.
2197         * config/arm/types.md (neon_dot, neon_dot_q): New.
2198         * config/arm/unspecs.md (sup): Add UNSPEC_DOT_S, UNSPEC_DOT_U.
2200 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
2202         * config/arm/arm.h (TARGET_DOTPROD): New.
2203         * config/arm/arm.c (arm_arch_dotprod): New.
2204         (arm_option_reconfigure_globals): Add arm_arch_dotprod.
2205         * config/arm/arm-c.c (__ARM_FEATURE_DOTPROD): New.
2206         * config/arm/arm-cpus.in (armv8.2-a): Enabled +dotprod.
2207         (feature dotprod, group dotprod, ALL_SIMD_INTERNAL): New.
2208         (ALL_FPU_INTERNAL): Use ALL_SIMD_INTERNAL.
2209         * config/arm/t-multilib (v8_2_a_simd_variants): Add dotprod.
2210         * doc/invoke.texi (armv8.2-a): Document dotprod
2212 2017-10-14  Jan Hubicka  <hubicka@ucw.cz>
2214         * i386.c (ix86_vec_cost): New function.
2215         (ix86_rtx_costs): Handle vector operations better.
2216         * i386.h (struct processor_costs): Add sse_op, fmasd, fmass.
2217         * x86-tune-costs.h: Add new costs to all tables.
2219 2017-10-14  Jan Hubicka  <hubicka@ucw.cz>
2221         * i386.c (ix86_rtx_costs): Make difference between x87 and SSE
2222         operations.
2223         * i386.h (struct processor_costs): Add addss, mulss, mulsd, divss,
2224         divsd, sqrtss and sqrtsd
2225         * x86-tune-costs.h: Add new entries to all costs.
2226         (znver1_cost): Fix to match real instruction latencies.
2228 2017-10-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2229             Michael Collison <michael.collison@arm.com>
2231         * compare-elim.c: Include emit-rtl.h.
2232         (can_merge_compare_into_arith): New function.
2233         (try_validate_parallel): Likewise.
2234         (try_merge_compare): Likewise.
2235         (try_eliminate_compare): Call the above when no previous clobber
2236         is available.
2237         (execute_compare_elim_after_reload): Add DF_UD_CHAIN and DF_DU_CHAIN
2238         dataflow problems.
2240 2017-10-14  Jakub Jelinek  <jakub@redhat.com>
2242         PR middle-end/62263
2243         PR middle-end/82498
2244         * tree-ssa-phiopt.c (value_replacement): Comment fix.  Handle
2245         up to 2 preparation statements for ASSIGN in MIDDLE_BB.
2247         PR middle-end/62263
2248         PR middle-end/82498
2249         * tree-ssa-forwprop.c (simplify_rotate): Allow def_arg1[N]
2250         to be any operand_equal_p operands.  For & (B - 1) require
2251         B to be power of 2.  Recognize
2252         (X << (Y & (B - 1))) | (X >> ((-Y) & (B - 1))) and similar patterns.
2254 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
2256         PR bootstrap/82553
2257         * optabs.c (expand_memory_blockage): Fix call of
2258         targetm.have_memory_blockage.
2260 2017-10-14  Jakub Jelinek  <jakub@redhat.com>
2262         PR bootstrap/82548
2263         * config.gcc (*-*-solaris2*, i[34567]86-*-cygwin*,
2264         x86_64-*-cygwin*, i[34567]86-*-mingw* | x86_64-*-mingw*): Append
2265         objects to extra_objs instead of overwriting it.
2267 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
2269         * config/i386/sync.md (FILD_ATOMIC/FIST_ATOMIC FP load peephole2):
2270         Use any_fp_register_operand as operand[3] predicate.  Simplify
2271         equality test for operands[2] and operands[4] memory location.
2272         (LDX_ATOMIC/STX_ATOMIC FP load peephole2): Ditto.
2273         (FILD_ATOMIC/FIST_ATOMIC FP load peephole2 with mem blockage): New.
2274         (LDX_ATOMIC/LDX_ATOMIC FP load peephole2 with mem blockage): Ditto.
2275         (FILD_ATOMIC/FIST_ATOMIC FP store peephole2): Use
2276         any_fp_register_operand as operand[1] predicate.  Simplify
2277         equality test for operands[0] and operands[3] memory location.
2278         (LDX_ATOMIC/STX_ATOMIC FP store peephole2): Ditto.
2279         (FILD_ATOMIC/FIST_ATOMIC FP store peephole2 with mem blockage): New.
2280         (LDX_ATOMIC/LDX_ATOMIC FP storepeephole2 with mem blockage): Ditto.
2282 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
2284         * target-insns.def: Add memory_blockage.
2285         * optabs.c (expand_memory_blockage): New function.
2286         (expand_asm_memory_barrier): Rename ...
2287         (expand_asm_memory_blockage): ... to this.
2288         (expand_mem_thread_fence): Call expand_memory_blockage
2289         instead of expand_asm_memory_barrier.
2290         (expand_mem_singnal_fence): Ditto.
2291         (expand_atomic_load): Ditto.
2292         (expand_atomic_store): Ditto.
2293         * doc/md.texi (Standard Pattern Names For Generation):
2294         Document memory_blockage instruction pattern.
2296 2017-10-13  Sebastian Perta  <sebastian.perta@renesas.com>
2298         * config/rl78/rl78.c (rl78_emit_libcall): New function.
2299         * config/rl78/rl78-protos.h (rl78_emit_libcall): New function.
2300         * config/rl78/rl78.md: New define_expand "adddi3".
2302 2017-10-13  Jan Hubicka  <hubicka@ucw.cz>
2304         * cfghooks.c (verify_flow_info): Disable check that all probabilities
2305         are set correctly.
2307 2017-10-13  Jeff Law  <law@redhat.com>
2309         * tree-ssa-reassoc.c (reassociate_bb): Clarify code slighly.
2311 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
2313         PR target/82274
2314         * internal-fn.c (expand_mul_overflow): If both operands have
2315         the same highpart of -1 or 0 and the topmost bit of lowpart
2316         is different, overflow is if res <= 0 rather than res < 0.
2318 2017-10-13  Pat Haugen  <pthaugen@us.ibm.com>
2320         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Remove
2321         TARGET_P9_VECTOR code for unaligned_load case.
2323 2017-10-13  Jan Hubicka  <hubicka@ucw.cz>
2325         * cfghooks.c (verify_flow_info): Check that edge probabilities are set.
2327 2017-10-13  Nathan Sidwell  <nathan@acm.org>
2329         * tree-core.h (tree_contains_struct): Make bool.
2330         * tree.c (tree_contains_struct): Likewise.
2331         * tree.h (MARK_TS_BASE): Remove do ... while (0) idiom.
2332         (MARK_TS_TYPED, MARK_TS_COMMON, MARK_TS_TYPE_COMMON,
2333         MARK_TS_TYPE_WITH_LANG_SPECIFIC, MARK_TS_DECL_MINIMAL,
2334         MARK_TS_DECL_COMMON, MARK_TS_DECL_WRTL, MARK_TS_DECL_WITH_VIS,
2335         MARK_TS_DECL_NON_COMMON): Likewise, use comma operator.
2337 2017-10-13  Richard Biener  <rguenther@suse.de>
2339         * graphite-isl-ast-to-gimple.c
2340         (translate_isl_ast_to_gimple::get_rename_from_scev): Remove unused
2341         parameters and dominance check.
2342         (translate_isl_ast_to_gimple::graphite_copy_stmts_from_block): Adjust.
2343         (translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences): Likewise.
2344         (translate_isl_ast_to_gimple::graphite_regenerate_ast_isl):
2345         Do not update SSA form here or do intermediate IL verification.
2346         * graphite.c: Include tree-ssa.h and tree-into-ssa.h.
2347         (graphite_initialize): Remove check on the number of loops in
2348         the function and inline into graphite_transform_loops.
2349         (graphite_finalize): Inline into graphite_transform_loops.
2350         (graphite_transform_loops): Perform SSA update and IL verification
2351         here.
2352         * params.def (PARAM_GRAPHITE_MIN_LOOPS_PER_FUNCTION): Remove.
2354 2017-10-13  Richard Biener  <rguenther@suse.de>
2356         * graphite-isl-ast-to-gimple.c (max_mode_int_precision,
2357         graphite_expression_type_precision): Avoid global constructor
2358         by moving ...
2359         (translate_isl_ast_to_gimple::translate_isl_ast_to_gimple): Here.
2360         (translate_isl_ast_to_gimple::graphite_expr_type): Add type member.
2361         (translate_isl_ast_to_gimple::translate_isl_ast_node_for): Use it.
2362         (translate_isl_ast_to_gimple::build_iv_mapping): Likewise.
2363         (translate_isl_ast_to_gimple::graphite_create_new_guard): Likewise.
2364         * graphite-sese-to-poly.c (build_original_schedule): Return nothing.
2366 2017-10-13  H.J. Lu  <hongjiu.lu@intel.com>
2368         PR target/82499
2369         * config/i386/i386.h (ix86_red_zone_size): New.
2370         * config/i386/i386.md (push peephole2s): Replace
2371         "!ix86_using_red_zone ()" with "ix86_red_zone_size == 0".
2373 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
2374             Alan Hayward  <alan.hayward@arm.com>
2375             David Sherwood  <david.sherwood@arm.com>
2377         * combine.c (can_change_dest_mode): Reject changes in
2378         REGMODE_NATURAL_SIZE.
2380 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
2381             Alan Hayward  <alan.hayward@arm.com>
2382             David Sherwood  <david.sherwood@arm.com>
2384         * cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_BITSIZE.
2385         (expand_debug_source_expr): Likewise.
2386         * combine.c (combine_simplify_rtx): Likewise.
2387         * cse.c (fold_rtx): Likewise.
2388         * fwprop.c (canonicalize_address): Likewise.
2389         * targhooks.c (default_shift_truncation_mask): Likewise.
2391 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
2392             Alan Hayward  <alan.hayward@arm.com>
2393             David Sherwood  <david.sherwood@arm.com>
2395         * optabs.c (add_equal_note): Use GET_MODE_UNIT_SIZE.
2396         (widened_mode): Likewise.
2397         (expand_unop): Likewise.
2398         * ree.c (transform_ifelse): Likewise.
2399         (merge_def_and_ext): Likewise.
2400         (combine_reaching_defs): Likewise.
2401         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
2403 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
2404             Alan Hayward  <alan.hayward@arm.com>
2405             David Sherwood  <david.sherwood@arm.com>
2407         * caller-save.c (replace_reg_with_saved_mem): Use byte_lowpart_offset.
2408         * combine.c (gen_lowpart_for_combine): Likewise.
2409         * dwarf2out.c (rtl_for_decl_location): Likewise.
2410         * final.c (alter_subreg): Likewise.
2411         * rtlhooks.c (gen_lowpart_general): Likewise.
2412         (gen_lowpart_if_possible): Likewise.
2414 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
2415             Alan Hayward  <alan.hayward@arm.com>
2416             David Sherwood  <david.sherwood@arm.com>
2418         * calls.c (expand_call): Use subreg_lowpart_offset.
2419         * cse.c (cse_insn): Likewise.
2420         * regcprop.c (copy_value): Likewise.
2421         (copyprop_hardreg_forward_1): Likewise.
2423 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
2425         PR target/82524
2426         * config/i386/i386.md (addqi_ext_1, andqi_ext_1,
2427         *andqi_ext_1_cc, *<code>qi_ext_1, *xorqi_ext_1_cc): Change
2428         =Q constraints to +Q and into insn condition add check
2429         that operands[0] and operands[1] are equal.
2430         (*addqi_ext_2, *andqi_ext_2, *<code>qi_ext_2): Change
2431         =Q constraints to +Q and into insn condition add check
2432         that operands[0] is equal to either operands[1] or operands[2].
2434         PR target/82498
2435         * fold-const.c (fold_binary_loc) <bit_rotate>: Code cleanups,
2436         instead of handling MINUS_EXPR twice (once for each argument),
2437         canonicalize operand order and handle just once, use rtype where
2438         possible.  Handle (A << B) | (A >> (-B & (Z - 1))).
2440         PR target/82498
2441         * config/i386/ia32intrin.h (__rold, __rord, __rolq, __rorq): Allow
2442         any values of __C while still being pattern recognizable as a simple
2443         rotate instruction.
2445 2017-10-13  Richard Biener  <rguenther@suse.de>
2447         PR tree-optimization/82451
2448         Revert
2449         2017-10-02  Richard Biener  <rguenther@suse.de>
2451         PR tree-optimization/82355
2452         * graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
2453         a mapping for the enclosing loop but avoid generating one for
2454         the loop tree root.
2455         (copy_bb_and_scalar_dependences): Remove premature codegen
2456         error on PHIs in blocks duplicated into multiple places.
2457         * graphite-scop-detection.c
2458         (scop_detection::stmt_has_simple_data_refs_p): For a loop not
2459         in the region use it as loop and nest to analyze the DR in.
2460         (try_generate_gimple_bb): Likewise.
2461         * graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
2462         (add_loop_constraints): For blocks in a loop not in the region
2463         create a dimension with a single iteration.
2464         * sese.h (gbb_loop_at_index): Remove assert.
2466         * cfgloop.c (loop_preheader_edge): For the loop tree root
2467         return the single successor of the entry block.
2468         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
2469         Reset the SCEV hashtable and niters.
2470         * graphite-scop-detection.c
2471         (scop_detection::graphite_can_represent_scev): Add SCOP parameter,
2472         assert that we only have POLYNOMIAL_CHREC that vary in loops
2473         contained in the region.
2474         (scop_detection::graphite_can_represent_expr): Adjust.
2475         (scop_detection::stmt_has_simple_data_refs_p): For loops
2476         not in the region set loop to NULL.  The nest is now the
2477         entry edge to the region.
2478         (try_generate_gimple_bb): Likewise.
2479         * sese.c (scalar_evolution_in_region): Adjust for
2480         instantiate_scev change.
2481         * tree-data-ref.h (graphite_find_data_references_in_stmt):
2482         Make nest parameter the edge into the region.
2483         (create_data_ref): Likewise.
2484         * tree-data-ref.c (dr_analyze_indices): Make nest parameter an
2485         entry edge into a region and adjust instantiate_scev calls.
2486         (create_data_ref): Likewise.
2487         (graphite_find_data_references_in_stmt): Likewise.
2488         (find_data_references_in_stmt): Pass the loop preheader edge
2489         from the nest argument.
2490         * tree-scalar-evolution.h (instantiate_scev): Make instantiate_below
2491         parameter the edge into the region.
2492         (instantiate_parameters): Use the loop preheader edge as entry.
2493         * tree-scalar-evolution.c (analyze_scalar_evolution): Handle
2494         NULL loop.
2495         (get_instantiated_value_entry): Make instantiate_below parameter
2496         the edge into the region.
2497         (instantiate_scev_name): Likewise.  Adjust dominance checks,
2498         when we cannot use loop-based instantiation instantiate by
2499         walking use-def chains.
2500         (instantiate_scev_poly): Adjust.
2501         (instantiate_scev_binary): Likewise.
2502         (instantiate_scev_convert): Likewise.
2503         (instantiate_scev_not): Likewise.
2504         (instantiate_array_ref): Remove.
2505         (instantiate_scev_3): Likewise.
2506         (instantiate_scev_2): Likewise.
2507         (instantiate_scev_1): Likewise.
2508         (instantiate_scev_r): Do not blindly handle N-operand trees.
2509         Do not instantiate array-refs.  Handle all constants and invariants.
2510         (instantiate_scev): Make instantiate_below parameter
2511         the edge into the region.
2512         (resolve_mixers): Use the loop preheader edge for the region
2513         parameter to instantiate_scev_r.
2514         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Adjust.
2516 2017-10-13  Richard Biener  <rguenther@suse.de>
2518         PR tree-optimization/82525
2519         * graphite-isl-ast-to-gimple.c
2520         (translate_isl_ast_to_gimple::widest_int_from_isl_expr_int): Split
2521         out from ...
2522         (translate_isl_ast_to_gimple::gcc_expression_from_isl_expr_int): Here.
2523         Fail code generation when we cannot represent the isl integer.
2524         (binary_op_to_tree): Elide modulo operations that are no-ops
2525         in the type we code generate.  Remove now superfluous code
2526         generation errors.
2528 2017-10-13  Richard Biener  <rguenther@suse.de>
2530         * graphite-scop-detection.c (loop_ivs_can_be_represented): Remove.
2531         (scop_detection::harmful_loop_in_region): Remove premature
2532         IV type restriction.
2533         (scop_detection::graphite_can_represent_scev): We can handle
2534         pointer IVs just fine.
2536 2017-10-13  Alan Modra  <amodra@gmail.com>
2538         * doc/extend.texi (Extended Asm <Clobbers>): Rename to
2539         "Clobbers and Scratch Registers".  Add paragraph on
2540         alternative to clobbers for scratch registers and OpenBLAS
2541         example.
2543 2017-10-13  Alan Modra  <amodra@gmail.com>
2545         * doc/extend.texi (Clobbers): Correct vax example.  Delete old
2546         example of a memory input for a string of known length.  Move
2547         commentary out of table.  Add a number of new examples
2548         covering array memory inputs.
2550 2017-10-12  Martin Liska  <mliska@suse.cz>
2552         PR tree-optimization/82493
2553         * sbitmap.c (bitmap_bit_in_range_p): Fix the implementation.
2554         (test_range_functions): New function.
2555         (sbitmap_c_tests): Likewise.
2556         * selftest-run-tests.c (selftest::run_tests): Run new tests.
2557         * selftest.h (sbitmap_c_tests): New function.
2559         * tree-ssa-dse.c (live_bytes_read): Fix thinko.
2561 2017-10-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
2563         * config/rs6000/amo.h: Fix spacing issue.
2565 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
2567         PR target/82498
2568         * config/i386/i386.md (*ashl<mode>3_mask_1,
2569         *<shift_insn><mode>3_mask_1, *<rotate_insn><mode>3_mask_1,
2570         *<btsc><mode>_mask_1, *btr<mode>_mask_1): New define_insn_and_split
2571         patterns.
2573 2017-10-12  Jan Hubicka  <hubicka@ucw.cz>
2575         * profile-count.h (safe_scale_64bit): Fix GCC4.x path.
2576         (profile_probability): Set max_probability
2577         to (uint32_t) 1 << (n_bits - 2) and update accessors to avoid overlfows
2578         in temporaries.
2579         * profile-count.c (profile_probability::differs_from_p): Do not
2580         rely on max_probaiblity == 10000
2582 2017-10-12  Jeff Law  <law@redhat.com>
2584         * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject ao_refs with
2585         negative offsets.
2587 2017-10-12  Martin Sebor  <msebor@redhat.com>
2589         PR other/82301
2590         PR c/82435
2591         * cgraphunit.c (maybe_diag_incompatible_alias): New function.
2592         (handle_alias_pairs): Call it.
2593         * common.opt (-Wattribute-alias): New option.
2594         * doc/extend.texi (ifunc attribute): Discuss C++ specifics.
2595         * doc/invoke.texi (-Wattribute-alias): Document.
2597 2017-10-12  Vladimir Makarov  <vmakarov@redhat.com>
2599         Revert
2600         2017-10-11  Vladimir Makarov  <vmakarov@redhat.com>
2601         PR sanitizer/82353
2602         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
2603         locations.
2604         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
2605         (make_hard_regno_born, make_hard_regno_dead): Update
2606         bb_killed_pseudos and bb_gen_pseudos.
2608 2017-10-12  Jan Hubicka  <hubicka@ucw.cz>
2610         * config/i386/x86-tune-sched.c (ix86_adjust_cost): Fix Zen support.
2612 2017-10-12  Uros Bizjak  <ubizjak@gmail.com>
2614         * config/alpha/alpha.c (alpha_split_conditional_move):
2615         Use std::swap instead of manually swapping.
2616         (alpha_stdarg_optimize_hook): Ditto.
2617         (alpha_canonicalize_comparison): Ditto.
2619 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
2621         * tree-loop-distribution.c (struct builtin_info): New struct.
2622         (struct partition): Refactor fields into struct builtin_info.
2623         (partition_free): Free struct builtin_info.
2624         (build_size_arg_loc, build_addr_arg_loc): Delete.
2625         (generate_memset_builtin, generate_memcpy_builtin): Get memory range
2626         information from struct builtin_info.
2627         (find_single_drs): New function refactored from classify_partition.
2628         Also moved builtin validity checks to this function.
2629         (compute_access_range, alloc_builtin): New functions.
2630         (classify_builtin_st, classify_builtin_ldst): New functions.
2631         (classify_partition): Refactor code into functions find_single_drs,
2632         classify_builtin_st and classify_builtin_ldst.
2633         (distribute_loop): Don't do runtime alias check when distributing
2634         loop nest.
2635         (find_seed_stmts_for_distribution): New function.
2636         (pass_loop_distribution::execute): Refactor code finding seed
2637         stmts into above function.  Support distribution for the innermost
2638         two-level loop nest.  Adjust dump information.
2640 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
2642         * tree-loop-distribution.c: Adjust the general comment.
2643         (NUM_PARTITION_THRESHOLD): New macro.
2644         (ssa_name_has_uses_outside_loop_p): Support loop nest distribution.
2645         (classify_partition): Skip builtin pattern of loop nest's inner loop.
2646         (merge_dep_scc_partitions): New parameter ignore_alias_p and use it
2647         in call to build_partition_graph.
2648         (finalize_partitions): New parameter.  Make loop distribution more
2649         conservative by fusing more partitions.
2650         (distribute_loop): Don't do runtime alias check in case of loop nest
2651         distribution.
2652         (find_seed_stmts_for_distribution): New function.
2653         (prepare_perfect_loop_nest): New function.
2654         (pass_loop_distribution::execute): Refactor code finding seed stmts
2655         and loop nest into above functions.  Support loop nest distribution.
2656         Adjust dump information accordingly.
2658 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
2660         * tree-loop-distribution.c (break_alias_scc_partitions): Add comment
2661         and set PTYPE_SEQUENTIAL for merged partition.
2663 2017-10-12  Richard Biener  <rguenther@suse.de>
2665         PR tree-optimization/69728
2666         Revert
2667         2017-09-19  Richard Biener  <rguenther@suse.de>
2669         PR tree-optimization/69728
2670         * graphite-sese-to-poly.c (schedule_error): New global.
2671         (add_loop_schedule): Handle empty domain by failing the
2672         schedule.
2673         (build_original_schedule): Handle schedule_error.
2675         * graphite-sese-to-poly.c (add_loop_schedule): Handle empty
2676         domain by returning an unchanged schedule.
2678 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
2680         * genrecog.c (validate_pattern): For VEC_SELECT verify that
2681         CONST_INT selectors are 0 to GET_MODE_NUNITS (imode) - 1.
2683 2017-10-12  Aldy Hernandez  <aldyh@redhat.com>
2685         * Makefile.in (TAGS): Merge all the *.def files into one pattern.
2686         Handle params.def.
2688 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
2690         PR c++/82159
2691         * expr.c (store_field): Don't optimize away bitsize == 0 store
2692         from CALL_EXPR with addressable return type.
2694 2017-10-11  Segher Boessenkool  <segher@kernel.crashing.org>
2696         * config/rs6000/rs6000.h (TARGET_ISEL64): Delete.
2697         * config/rs6000/rs6000.md (sel): Delete mode attribute.
2698         (mov<mode>cc, isel_signed_<mode>, isel_unsigned_<mode>,
2699         *isel_reversed_signed_<mode>, *isel_reversed_unsigned_<mode>): Use
2700         TARGET_ISEL instead of TARGET_ISEL<sel>.
2702 2017-10-11  David Edelsohn  <dje.gcc@gmail.com>
2704         * config/rs6000/rs6000.c
2705         (rs6000_xcoff_asm_output_aligned_decl_common): Test for NULL decl.
2707 2017-10-11  Segher Boessenkool  <segher@kernel.crashing.org>
2709         * config/rs6000/predicates.md (zero_constant, all_ones_constant):
2710         Move up in file.
2711         (reg_or_cint_operand): Fix comment.
2712         (reg_or_zero_operand): New predicate.
2713         * config/rs6000/rs6000-protos.h (output_isel): Delete.
2714         * config/rs6000/rs6000.c (output_isel): Delete.
2715         * config/rs6000/rs6000.md (isel_signed_<mode>): Use reg_or_zero_operand
2716         instead of reg_or_cint_operand.  Output instruction directly (not via
2717         output_isel).
2718         (isel_unsigned_<mode>): Ditto.
2719         (*isel_reversed_signed_<mode>): Use reg_or_zero_operand instead of
2720         gpc_reg_operand.  Add an instruction alternative for this.  Output
2721         instruction directly.
2722         (*isel_reversed_unsigned_<mode>): Ditto.
2724 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
2726         * config/i386/i386.c (ix86_canonicalize_comparison): New function.
2727         (TARGET_CANONICALIZE_COMPARISON): Define.
2729 2017-10-11  Qing Zhao  <qing.zhao@oracle.com>
2731         PR target/81422
2732         * config/aarch64/aarch64.c (aarch64_load_symref_appropriately):
2733         Check whether the dest is REG before adding REG_EQUIV note.
2735 2017-10-11  Vladimir Makarov  <vmakarov@redhat.com>
2737         PR sanitizer/82353
2738         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
2739         locations.
2740         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
2741         (make_hard_regno_born, make_hard_regno_dead): Update
2742         bb_killed_pseudos and bb_gen_pseudos.
2744 2017-10-11  Nathan Sidwell  <nathan@acm.org>
2746         * incpath.h (enum incpath_kind): Name enum, prefix values.
2747         (add_path, add_cpp_dir_path, get_added_cpp_dirs): Use incpath_kind.
2748         * incpath.c (heads, tails): Use INC_MAX.
2749         (add_env_var_paths, add_standard_paths): Use incpath_kind.
2750         (merge_include_chains, split_quote_chain,
2751         register_include_chains): Update incpath_kind names.
2752         (add_cpp_dir_path, add_path, get_added_cpp_dirs): Use incpath_kind.
2753         * config/darwin-c.c (add_system_framework_path): Update incpath_kind
2754         names.
2755         (add_framework_path, darwin_register_objc_includes): Likewise.
2756         * config/vms/vms-c.c (vms_c_register_includes): Likewise.
2758 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
2760         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
2761         Do not use float_operator operator predicate.
2762         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2763         * config/i386/predicates.md (float_operator): Remove predicate.
2765 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
2767         * config/i386/i386.md (*jcc<mode>_0_i387): Remove insn pattern.
2768         (*jccxf_i387): Ditto.
2769         (*jcc<mode>_i387): Ditto.
2770         (*jccu<mode>_i387): Ditto.
2771         (*jcc<X87MODEF:mode>_<SWI24:mode>_i387): Ditto.
2772         (*jcc_*_i387 splitters): Remove.
2773         * config/i386/i386-protos.h (ix86_split_fp_branch): Remove prototype.
2774         * config/i386/i386.c (ix86_split_fp_branch): Remove.
2775         * config/i386/predicates.md (ix86_swapped_fp_comparison_operator):
2776         Remove predicate.
2778 2017-10-11  Jan Hubicka  <hubicka@ucw.cz>
2780         * profile-count.h (slow_safe_scale_64bit): New function.
2781         (safe_scale_64bit): New inline.
2782         (profile_count::max_safe_multiplier): Remove; use safe_scale_64bit.
2783         * profile-count.c: Include wide-int.h
2784         (slow_safe_scale_64bit): New.
2786 2017-10-11  Nathan Sidwell  <nathan@acm.org>
2788         * tree.h (DECL_ASSEMBLER_NAME_SET_P): Don't check
2789         HAS_DECL_ASSEMBLER_NAME_P.
2790         * gimple-expr.c (gimple_decl_printable_name: Check
2791         HAS_DECL_ASSEMBLER_NAME_P too.
2792         * ipa-utils.h (type_in_anonymous_namespace_p): Check
2793         DECL_ASSEMBLER_NAME_SET_P of TYPE_NAME.
2794         (odr_type_p): No need to assert TYPE_NAME is a TYPE_DECL.
2795         * passes.c (rest_of_decl_compilation): Check
2796         HAS_DECL_ASSEMBLER_NAME_P too.
2797         * recog.c (verify_changes): Likewise.
2798         * tree-pretty-print.c (dump_decl_name): Likewise.
2799         * tree-ssa-structalias.c (alias_get_name): Likewise.  Reimplement.
2801         * tree.h (DECL_ASSEMBLER_NAME_RAW): New.
2802         (SET_DECL_ASSEMBLER_NAME): Use it.
2803         (DECL_ASSEMBLER_NAME_SET_P): Likewise.
2804         (COPY_DECL_ASSEMBLER_NAME): Likewise.
2805         * tree.c (decl_assembler_name): Use DECL_ASSEMBLER_NAME_RAW.
2807 2017-10-11  Jan Hubicka  <hubicka@ucw.cz>
2809         * config.gcc (i386, x86_64): Add extra objects.
2810         * config/i386/i386-protos.h (ix86_rip_relative_addr_p): Declare.
2811         (ix86_min_insn_size): Declare.
2812         (ix86_issue_rate): Declare.
2813         (ix86_adjust_cost): Declare.
2814         (ia32_multipass_dfa_lookahead): Declare.
2815         (ix86_macro_fusion_p): Declare.
2816         (ix86_macro_fusion_pair_p): Declare.
2817         (ix86_bd_has_dispatch): Declare.
2818         (ix86_bd_do_dispatch): Declare.
2819         (ix86_core2i7_init_hooks): Declare.
2820         (ix86_atom_sched_reorder): Declare.
2821         * config/i386/i386.c Move all CPU cost tables to x86-tune-costs.h.
2822         (COSTS_N_BYTES): Move to x86-tune-costs.h.
2823         (DUMMY_STRINGOP_ALGS):Move to x86-tune-costs.h.
2824         (rip_relative_addr_p): Rename to ...
2825         (ix86_rip_relative_addr_p): ... this one; export.
2826         (memory_address_length): Update.
2827         (ix86_issue_rate): Move to x86-tune-sched.c.
2828         (ix86_flags_dependent): Move to x86-tune-sched.c.
2829         (ix86_agi_dependent): Move to x86-tune-sched.c.
2830         (exact_dependency_1): Move to x86-tune-sched.c.
2831         (exact_store_load_dependency): Move to x86-tune-sched.c.
2832         (ix86_adjust_cost): Move to x86-tune-sched.c.
2833         (ia32_multipass_dfa_lookahead): Move to x86-tune-sched.c.
2834         (ix86_macro_fusion_p): Move to x86-tune-sched.c.
2835         (ix86_macro_fusion_pair_p): Move to x86-tune-sched.c.
2836         (do_reorder_for_imul): Move to x86-tune-sched-atom.c.
2837         (swap_top_of_ready_list): Move to x86-tune-sched-atom.c.
2838         (ix86_sched_reorder): Move to x86-tune-sched-atom.c.
2839         (core2i7_first_cycle_multipass_init): Move to x86-tune-sched-core.c.
2840         (core2i7_dfa_post_advance_cycle): Move to x86-tune-sched-core.c.
2841         (min_insn_size): Rename to ...
2842         (ix86_min_insn_size): ... this one; export.
2843         (core2i7_first_cycle_multipass_begin): Move to x86-tune-sched-core.c.
2844         (core2i7_first_cycle_multipass_issue): Move to x86-tune-sched-core.c.
2845         (core2i7_first_cycle_multipass_backtrack): Move to
2846         x86-tune-sched-core.c.
2847         (core2i7_first_cycle_multipass_end): Move to x86-tune-sched-core.c.
2848         (core2i7_first_cycle_multipass_fini): Move to x86-tune-sched-core.c.
2849         (ix86_sched_init_global): Break up logic to ix86_core2i7_init_hooks.
2850         (ix86_avoid_jump_mispredicts): Update.
2851         (TARGET_SCHED_DISPATCH): Move to ix86-tune-sched-bd.c.
2852         (TARGET_SCHED_DISPATCH_DO): Move to ix86-tune-sched-bd.c.
2853         (TARGET_SCHED_REORDER): Move to ix86-tune-sched-bd.c.
2854         (DISPATCH_WINDOW_SIZE): Move to ix86-tune-sched-bd.c.
2855         (MAX_DISPATCH_WINDOWS): Move to ix86-tune-sched-bd.c.
2856         (MAX_INSN): Move to ix86-tune-sched-bd.c.
2857         (MAX_IMM): Move to ix86-tune-sched-bd.c.
2858         (MAX_IMM_SIZE): Move to ix86-tune-sched-bd.c.
2859         (MAX_IMM_32): Move to ix86-tune-sched-bd.c.
2860         (MAX_IMM_64): Move to ix86-tune-sched-bd.c.
2861         (MAX_LOAD): Move to ix86-tune-sched-bd.c.
2862         (MAX_STORE): Move to ix86-tune-sched-bd.c.
2863         (BIG): Move to ix86-tune-sched-bd.c.
2864         (enum dispatch_group): Move to ix86-tune-sched-bd.c.
2865         (enum insn_path): Move to ix86-tune-sched-bd.c.
2866         (get_mem_group): Move to ix86-tune-sched-bd.c.
2867         (is_cmp): Move to ix86-tune-sched-bd.c.
2868         (dispatch_violation): Move to ix86-tune-sched-bd.c.
2869         (is_branch): Move to ix86-tune-sched-bd.c.
2870         (is_prefetch): Move to ix86-tune-sched-bd.c.
2871         (init_window): Move to ix86-tune-sched-bd.c.
2872         (allocate_window): Move to ix86-tune-sched-bd.c.
2873         (init_dispatch_sched): Move to ix86-tune-sched-bd.c.
2874         (is_end_basic_block): Move to ix86-tune-sched-bd.c.
2875         (process_end_window): Move to ix86-tune-sched-bd.c.
2876         (allocate_next_window): Move to ix86-tune-sched-bd.c.
2877         (find_constant): Move to ix86-tune-sched-bd.c.
2878         (get_num_immediates): Move to ix86-tune-sched-bd.c.
2879         (has_immediate): Move to ix86-tune-sched-bd.c.
2880         (get_insn_path): Move to ix86-tune-sched-bd.c.
2881         (get_insn_group): Move to ix86-tune-sched-bd.c.
2882         (count_num_restricted): Move to ix86-tune-sched-bd.c.
2883         (fits_dispatch_window): Move to ix86-tune-sched-bd.c.
2884         (add_insn_window): Move to ix86-tune-sched-bd.c.
2885         (add_to_dispatch_window): Move to ix86-tune-sched-bd.c.
2886         (debug_dispatch_window_file): Move to ix86-tune-sched-bd.c.
2887         (debug_dispatch_window): Move to ix86-tune-sched-bd.c.
2888         (debug_insn_dispatch_info_file): Move to ix86-tune-sched-bd.c.
2889         (debug_ready_dispatch): Move to ix86-tune-sched-bd.c.
2890         (do_dispatch): Move to ix86-tune-sched-bd.c.
2891         (has_dispatch): Move to ix86-tune-sched-bd.c.
2892         * config/i386/t-i386: Add new object files.
2893         * config/i386/x86-tune-costs.h: New file.
2894         * config/i386/x86-tune-sched-atom.c: New file.
2895         * config/i386/x86-tune-sched-bd.c: New file.
2896         * config/i386/x86-tune-sched-core.c: New file.
2897         * config/i386/x86-tune-sched.c: New file.
2899 2017-10-11  Liu Hao  <lh_mouse@126.com>
2901         * pretty-print.c [_WIN32] (colorize_init): Remove.  Use
2902         the generic version below instead.
2903         (should_colorize): Recognize Windows consoles as terminals
2904         for MinGW targets.
2905         * pretty-print.c [__MINGW32__] (write_all): New function.
2906         [__MINGW32__] (find_esc_head): Likewise.
2907         [__MINGW32__] (find_esc_terminator): Likewise.
2908         [__MINGW32__] (eat_esc_sequence): Likewise.
2909         [__MINGW32__] (mingw_ansi_fputs): New function that handles
2910         ANSI escape codes.
2911         (pp_write_text_to_stream): Use mingw_ansi_fputs instead of fputs
2912         for MinGW targets.
2914 2017-10-11  Richard Biener  <rguenther@suse.de>
2916         * tree-ssa-loop-niter.c (infer_loop_bounds_from_pointer_arith):
2917         Properly call analyze_scalar_evolution with the loop of the stmt.
2919 2017-10-11  Richard Biener  <rguenther@suse.de>
2921         * tree.def (POLYNOMIAL_CHREC): Remove CHREC_VARIABLE tree operand.
2922         * tree-core.h (tree_base): Add chrec_var union member.
2923         * tree.h (CHREC_VAR): Remove.
2924         (CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): Adjust.
2925         * tree-chrec.h (build_polynomial_chrec): Adjust.
2926         * tree-chrec.c (reset_evolution_in_loop): Use build_polynomial_chrec.
2927         * tree-pretty-print.c (dump_generic_node): Use CHREC_VARIABLE.
2929 2017-10-11  Marc Glisse  <marc.glisse@inria.fr>
2931         * fold-const.c (fold_binary_loc) [X +- Y CMP X]: Move ...
2932         * match.pd: ... here.
2933         ((T) X == (T) Y): Relax condition.
2935 2017-10-11  Bin Cheng  <bin.cheng@arm.com>
2937         PR tree-optimization/82472
2938         * tree-loop-distribution.c (sort_partitions_by_post_order): Refine
2939         comment.
2940         (break_alias_scc_partitions): Update postorder number.
2942 2017-10-11  Martin Liska  <mliska@suse.cz>
2944         PR sanitizer/82490
2945         * opts.c (parse_no_sanitize_attribute): Do not use error_value
2946         variable.
2947         * opts.h (parse_no_sanitize_attribute): Remove last argument.
2949 2017-10-11  Martin Liska  <mliska@suse.cz>
2951         * print-rtl.c (print_insn): Move declaration of idbuf
2952         to same scope as name.
2954 2017-10-11  Martin Liska  <mliska@suse.cz>
2956         Revert r253637:
2958         PR sanitizer/82484
2959         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
2960         volatile arguments.
2962 2017-10-11  Martin Liska  <mliska@suse.cz>
2964         PR sanitizer/82484
2965         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
2966         volatile arguments.
2968 2017-10-11  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2970         * config.gcc (default_gnu_indirect_function): Default to yes for
2971         arm*-*-linux* with glibc.
2973 2017-10-11  Richard Biener  <rguenther@suse.de>
2975         * tree-scalar-evolution.c (get_scalar_evolution): Handle
2976         default-defs and types we do not want to analyze.
2977         (interpret_loop_phi): Replace unreachable code with an assert.
2978         (compute_scalar_evolution_in_loop): Remove and inline ...
2979         (analyze_scalar_evolution_1): ... here, replacing condition with
2980         what makes the intent clearer.  Remove handling of cases
2981         get_scalar_evolution now handles.
2983 2017-10-10  Jim Wilson  <wilson@tuliptree.org>
2985         PR rtl-optimization/81434
2986         * haifa-sched.c (prune_ready_list): Init min_cost_group to 0.  Update
2987         comment for main loop.  In sched_group_found if, also add checks for
2988         pass and min_cost_group.
2990 2017-10-10  Segher Boessenkool  <segher@kernel.crashing.org>
2992         * config/rs6000/rs6000.c (TARGET_INSN_COST): New.
2993         (rs6000_insn_cost): New function.
2994         * config/rs6000/rs6000.md (cost): New attribute.
2996 2017-10-10  Jakub Jelinek  <jakub@redhat.com>
2997             H.J. Lu  <hongjiu.lu@intel.com>
2999         PR target/79565
3000         PR target/82483
3001         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Add
3002         OPTION_MASK_ISA_MMX for __builtin_ia32_maskmovq,
3003         __builtin_ia32_vec_ext_v4hi and __builtin_ia32_vec_set_v4hi.
3004         (ix86_expand_builtin): Treat OPTION_MASK_ISA_MMX similarly
3005         to OPTION_MASK_ISA_AVX512VL - builtins that have both
3006         OPTION_MASK_ISA_MMX and some other bit set require both
3007         mmx and the ISAs without the mmx bit.
3008         * config/i386/i386-builtin.def (__builtin_ia32_cvtps2pi,
3009         __builtin_ia32_cvttps2pi, __builtin_ia32_cvtpi2ps,
3010         __builtin_ia32_pavgb, __builtin_ia32_pavgw, __builtin_ia32_pmulhuw,
3011         __builtin_ia32_pmaxub, __builtin_ia32_pmaxsw, __builtin_ia32_pminub,
3012         __builtin_ia32_pminsw, __builtin_ia32_psadbw, __builtin_ia32_pmovmskb,
3013         __builtin_ia32_pshufw, __builtin_ia32_cvtpd2pi,
3014         __builtin_ia32_cvttpd2pi, __builtin_ia32_cvtpi2pd,
3015         __builtin_ia32_pmuludq, __builtin_ia32_pabsb, __builtin_ia32_pabsw,
3016         __builtin_ia32_pabsd, __builtin_ia32_phaddw, __builtin_ia32_phaddd,
3017         __builtin_ia32_phaddsw, __builtin_ia32_phsubw, __builtin_ia32_phsubd,
3018         __builtin_ia32_phsubsw, __builtin_ia32_pmaddubsw,
3019         __builtin_ia32_pmulhrsw, __builtin_ia32_pshufb, __builtin_ia32_psignb,
3020         __builtin_ia32_psignw, __builtin_ia32_psignd, __builtin_ia32_movntq,
3021         __builtin_ia32_paddq, __builtin_ia32_psubq, __builtin_ia32_palignr):
3022         Add OPTION_MASK_ISA_MMX.
3024 2017-10-10  Andreas Tobler  <andreast@gcc.gnu.org>
3026         * config.gcc (armv7*-*-freebsd*): New target.
3027         (armv6*-*-freebsd*): Remove obsolete TARGET_FREEBSD_ARMv6 define.
3029 2017-10-10  Jan Hubicka  <hubicka@ucw.cz>
3031         * x86-tune.def (X86_TUNE_AVOID_FALSE_DEP_FOR_BMI,
3032         X86_TUNE_ADJUST_UNROLL, X86_TUNE_ONE_IF_CONV_INSN): Move to right
3033         spot in the file.
3035 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
3037         * wide-int.h (wide_int_ref_storage): Make host_dependent_precision
3038         a template parameter.
3039         (WIDE_INT_REF_FOR): Update accordingly.
3040         * tree.h (wi::int_traits <const_tree>): Delete.
3041         (wi::tree_to_widest_ref, wi::tree_to_offset_ref): New typedefs.
3042         (wi::to_widest, wi::to_offset): Use them.  Expand commentary.
3043         (wi::tree_to_wide_ref): New typedef.
3044         (wi::to_wide): New function.
3045         * calls.c (get_size_range): Use wi::to_wide when operating on
3046         trees as wide_ints.
3047         * cgraph.c (cgraph_node::create_thunk): Likewise.
3048         * config/i386/i386.c (ix86_data_alignment): Likewise.
3049         (ix86_local_alignment): Likewise.
3050         * dbxout.c (stabstr_O): Likewise.
3051         * dwarf2out.c (add_scalar_info, gen_enumeration_type_die): Likewise.
3052         * expr.c (const_vector_from_tree): Likewise.
3053         * fold-const-call.c (host_size_t_cst_p, fold_const_call_1): Likewise.
3054         * fold-const.c (may_negate_without_overflow_p, negate_expr_p)
3055         (fold_negate_expr_1, int_const_binop_1, const_binop)
3056         (fold_convert_const_int_from_real, optimize_bit_field_compare)
3057         (all_ones_mask_p, sign_bit_p, unextend, extract_muldiv_1)
3058         (fold_div_compare, fold_single_bit_test, fold_plusminus_mult_expr)
3059         (pointer_may_wrap_p, expr_not_equal_to, fold_binary_loc)
3060         (fold_ternary_loc, multiple_of_p, fold_negate_const, fold_abs_const)
3061         (fold_not_const, round_up_loc): Likewise.
3062         * gimple-fold.c (gimple_fold_indirect_ref): Likewise.
3063         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Likewise.
3064         (alloca_call_type): Likewise.
3065         * gimple.c (preprocess_case_label_vec_for_gimple): Likewise.
3066         * godump.c (go_output_typedef): Likewise.
3067         * graphite-sese-to-poly.c (tree_int_to_gmp): Likewise.
3068         * internal-fn.c (get_min_precision): Likewise.
3069         * ipa-cp.c (ipcp_store_vr_results): Likewise.
3070         * ipa-polymorphic-call.c
3071         (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Likewise.
3072         * ipa-prop.c (ipa_print_node_jump_functions_for_edge): Likewise.
3073         (ipa_modify_call_arguments): Likewise.
3074         * match.pd: Likewise.
3075         * omp-low.c (scan_omp_1_op, lower_omp_ordered_clauses): Likewise.
3076         * print-tree.c (print_node_brief, print_node): Likewise.
3077         * stmt.c (expand_case): Likewise.
3078         * stor-layout.c (layout_type): Likewise.
3079         * tree-affine.c (tree_to_aff_combination): Likewise.
3080         * tree-cfg.c (group_case_labels_stmt): Likewise.
3081         * tree-data-ref.c (dr_analyze_indices): Likewise.
3082         (prune_runtime_alias_test_list): Likewise.
3083         * tree-dump.c (dequeue_and_dump): Likewise.
3084         * tree-inline.c (remap_gimple_op_r, copy_tree_body_r): Likewise.
3085         * tree-predcom.c (is_inv_store_elimination_chain): Likewise.
3086         * tree-pretty-print.c (dump_generic_node): Likewise.
3087         * tree-scalar-evolution.c (iv_can_overflow_p): Likewise.
3088         (simple_iv_with_niters): Likewise.
3089         * tree-ssa-address.c (addr_for_mem_ref): Likewise.
3090         * tree-ssa-ccp.c (ccp_finalize, evaluate_stmt): Likewise.
3091         * tree-ssa-loop-ivopts.c (constant_multiple_of): Likewise.
3092         * tree-ssa-loop-niter.c (split_to_var_and_offset)
3093         (refine_value_range_using_guard, number_of_iterations_ne_max)
3094         (number_of_iterations_lt_to_ne, number_of_iterations_lt)
3095         (get_cst_init_from_scev, record_nonwrapping_iv)
3096         (scev_var_range_cant_overflow): Likewise.
3097         * tree-ssa-phiopt.c (minmax_replacement): Likewise.
3098         * tree-ssa-pre.c (compute_avail): Likewise.
3099         * tree-ssa-sccvn.c (vn_reference_fold_indirect): Likewise.
3100         (vn_reference_maybe_forwprop_address, valueized_wider_op): Likewise.
3101         * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Likewise.
3102         * tree-ssa-uninit.c (is_pred_expr_subset_of): Likewise.
3103         * tree-ssanames.c (set_nonzero_bits, get_nonzero_bits): Likewise.
3104         * tree-switch-conversion.c (collect_switch_conv_info, array_value_type)
3105         (dump_case_nodes, try_switch_expansion): Likewise.
3106         * tree-vect-loop-manip.c (vect_gen_vector_loop_niters): Likewise.
3107         (vect_do_peeling): Likewise.
3108         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
3109         * tree-vect-stmts.c (vectorizable_load): Likewise.
3110         * tree-vrp.c (compare_values_warnv, vrp_int_const_binop): Likewise.
3111         (zero_nonzero_bits_from_vr, ranges_from_anti_range): Likewise.
3112         (extract_range_from_binary_expr_1, adjust_range_with_scev): Likewise.
3113         (overflow_comparison_p_1, register_edge_assert_for_2): Likewise.
3114         (is_masked_range_test, find_switch_asserts, maybe_set_nonzero_bits)
3115         (vrp_evaluate_conditional_warnv_with_ops, intersect_ranges): Likewise.
3116         (range_fits_type_p, two_valued_val_range_p, vrp_finalize): Likewise.
3117         (evrp_dom_walker::before_dom_children): Likewise.
3118         * tree.c (cache_integer_cst, real_value_from_int_cst, integer_zerop)
3119         (integer_all_onesp, integer_pow2p, integer_nonzerop, tree_log2)
3120         (tree_floor_log2, tree_ctz, mem_ref_offset, tree_int_cst_sign_bit)
3121         (tree_int_cst_sgn, get_unwidened, int_fits_type_p): Likewise.
3122         (get_type_static_bounds, num_ending_zeros, drop_tree_overflow)
3123         (get_range_pos_neg): Likewise.
3124         * ubsan.c (ubsan_expand_ptr_ifn): Likewise.
3125         * config/darwin.c (darwin_mergeable_constant_section): Likewise.
3126         * config/aarch64/aarch64.c (aapcs_vfp_sub_candidate): Likewise.
3127         * config/arm/arm.c (aapcs_vfp_sub_candidate): Likewise.
3128         * config/avr/avr.c (avr_fold_builtin): Likewise.
3129         * config/bfin/bfin.c (bfin_local_alignment): Likewise.
3130         * config/msp430/msp430.c (msp430_attr): Likewise.
3131         * config/nds32/nds32.c (nds32_insert_attributes): Likewise.
3132         * config/powerpcspe/powerpcspe-c.c
3133         (altivec_resolve_overloaded_builtin): Likewise.
3134         * config/powerpcspe/powerpcspe.c (rs6000_aggregate_candidate)
3135         (rs6000_expand_ternop_builtin): Likewise.
3136         * config/rs6000/rs6000-c.c
3137         (altivec_resolve_overloaded_builtin): Likewise.
3138         * config/rs6000/rs6000.c (rs6000_aggregate_candidate): Likewise.
3139         (rs6000_expand_ternop_builtin): Likewise.
3140         * config/s390/s390.c (s390_handle_hotpatch_attribute): Likewise.
3142 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
3144         * tree-vect-loop-manip.c (rename_variables_in_bb): Rename PHI nodes
3145         when copying loop nest with only one inner loop.
3147 2017-10-10  Richard Biener  <rguenther@suse.de>
3149         * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Avoid compacting
3150         blocks if SCEV is active.
3151         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Remove
3152         dead code.
3153         (analyze_scalar_evolution): Handle cached evolutions the obvious way.
3154         (scev_initialize): Assert we are not yet initialized.
3156 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
3158         * tree-loop-distribution.c (generate_loops_for_partition): Remove
3159         inner loop's exit stmt by making it always exit the loop, otherwise
3160         we would generate an infinite empty loop.
3162 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
3164         * tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg): Skip
3165         renaming variables in new preheader if it's deleted.
3167 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
3169         * tree-loop-distribution.c (struct partition): Remove unused field
3170         loops of the structure.
3171         (partition_alloc, partition_free): Ditto.
3172         (build_rdg_partition_for_vertex): Ditto.
3174 2017-10-09  Jeff Law  <law@redhat.com>
3176         * targhooks.c (default_stack_clash_protection_final_dynamic_probe): Fix
3177         return type to match prototype and documentation.
3179 2010-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
3181         * config/rs6000/rs6000.c (processor_costs): Move to ...
3182         * config/rs6000/rs6000.h: ... here.
3183         (rs6000_cost): Declare.
3185 2017-10-09  Eric Botcazou  <ebotcazou@adacore.com>
3187         * except.c (setjmp_fn): New global variable.
3188         (init_eh): Initialize it if DONT_USE_BUILTIN_SETJMP is defined.
3189         (sjlj_emit_function_enter): Call it instead of BUILTIN_SETJMP
3190         if DONT_USE_BUILTIN_SETJMP is defined.
3192 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
3194         * target.def (insn_cost): New hook.
3195         * doc/tm.texi.in (TARGET_INSN_COST): New hook.
3196         * doc/tm.texi: Regenerate.
3197         * rtlanal.c (insn_cost): Use the new hook.
3199 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
3201         * combine.c (combine_validate_cost): Compute the new insn_cost,
3202         not just pattern_cost.
3203         (try_combine): Adjust comment.
3205 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
3207         * cfgrtl.c (rtl_account_profile_record): Replace insn_rtx_cost with
3208         insn_cost.
3209         * combine.c (uid_insn_cost): Adjust comment.
3210         (combine_validate_cost): Adjust comment.  Use pattern_cost instead
3211         of insn_rtx_cost
3212         (combine_instructions): Use insn_cost instead of insn_rtx_cost.
3213         * dse.c (find_shift_sequence): Ditto.
3214         * ifcvt.c (cheap_bb_rtx_cost_p): Ditto.
3215         (bb_valid_for_noce_process_p): Use pattern_cost.
3216         * rtl.h (insn_rtx_cost): Delete.
3217         (pattern_cost): New prototype.
3218         (insn_cost): New prototype.
3219         * rtlanal.c (insn_rtx_cost): Rename to...
3220         (pattern_cost): ... this.
3221         (insn_cost): New.
3223 2017-10-09  Uros Bizjak  <ubizjak@gmail.com>
3225         * config/i386/i386.md (*jcc_2): Remove insn pattern.
3226         (*jcc<mode>_0_r_i387): Ditto.
3227         (*jccxf_r_i387): Ditto.
3228         (*jcc<mode>_r_i387): Ditto.
3229         (*jccu<mode>_r_i387): Ditto.
3230         (*jcc<X87MODEF:mode>_<SWI24:mode>_r_i387): Ditto.
3231         (*jcc): Rename from *jcc_1.
3233 2017-10-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
3235         * config/rs6000/rs6000-p8swap.c (rs6000_analyze_swaps): Process
3236         deferred rescans after the lvx/stvx recombination pre-pass.
3238 2017-10-09  Michael Meissner  <meissner@linux.vnet.ibm.com>
3240         * config/rs6000/amo.h: New include file to provide ISA 3.0 atomic
3241         memory operation instruction support.
3242         * config.gcc (powerpc*-*-*): Include amo.h as an extra header.
3243         (rs6000-ibm-aix[789]*): Likewise.
3244         * doc/extend.texi (PowerPC Atomic Memory Operation Functions):
3245         Document new functions.
3247 2017-10-09  Richard Biener  <rguenther@suse.de>
3249         PR tree-optimization/82397
3250         * tree-data-ref.c (data_ref_compare_tree): Make sure to return
3251         equality only for semantically equal trees.
3253 2017-10-09  Richard Biener  <rguenther@suse.de>
3255         PR tree-optimization/82449
3256         * sese.c (scev_analyzable_p): Check whether the SCEV is linear.
3257         * tree-chrec.h (evolution_function_is_constant_p): Adjust to
3258         allow constant addresses.
3259         * tree-chrec.c (scev_is_linear_expression): Constant evolutions
3260         are linear.
3262 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
3264         * config/s390/s390-builtins.def (vec_nabs, vec_vfi): Fix builtin
3265         flags.
3267 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
3269         PR target/82463
3270         * config/s390/vecintrin.h (vec_madd, vec_msub): Fix macro
3271         definitions.
3273 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
3275         PR target/82465
3276         * config/s390/s390-builtins.def (vec_sqrt): Fix builtin flags.
3278 2017-10-09  Jakub Jelinek  <jakub@redhat.com>
3280         PR target/82464
3281         * config/s390/s390-builtins.def (s390_vec_xor_flt_a,
3282         s390_vec_xor_flt_b, s390_vec_xor_flt_c): New.
3284 2017-10-09  Richard Sandiford  <richard.sandiford@linaro.org>
3286         * wide-int.h (WI_BINARY_OPERATOR_RESULT): New macro.
3287         (WI_BINARY_PREDICATE_RESULT): Likewise.
3288         (wi::binary_traits::operator_result): New type.
3289         (wi::binary_traits::predicate_result): Likewise.
3290         (generic_wide_int::operator~, unary generic_wide_int::operator-)
3291         (generic_wide_int::operator==, generic_wide_int::operator!=)
3292         (generic_wide_int::operator&, generic_wide_int::and_not)
3293         (generic_wide_int::operator|, generic_wide_int::or_not)
3294         (generic_wide_int::operator^, generic_wide_int::operator+
3295         (binary generic_wide_int::operator-, generic_wide_int::operator*):
3296         Delete.
3297         (operator~, unary operator-, operator==, operator!=, operator&)
3298         (operator|, operator^, operator+, binary operator-, operator*): New
3299         functions.
3300         * expr.c (get_inner_reference): Use wi::bit_and_not.
3301         * fold-const.c (fold_binary_loc): Likewise.
3302         * ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise.
3303         * tree-ssa-ccp.c (get_value_from_alignment): Likewise.
3304         (bit_value_binop): Likewise.
3305         * tree-ssa-math-opts.c (find_bswap_or_nop_load): Likewise.
3306         * tree-vrp.c (zero_nonzero_bits_from_vr): Likewise.
3307         (extract_range_from_binary_expr_1): Likewise.
3308         (masked_increment): Likewise.
3309         (simplify_bit_ops_using_ranges): Likewise.
3311 2017-10-09  Martin Jambor  <mjambor@suse.cz>
3313         PR hsa/82416
3314         * hsa-common.h (hsa_op_with_type): New method extend_int_to_32bit.
3315         * hsa-gen.c (hsa_extend_inttype_to_32bit): New function.
3316         (hsa_type_for_scalar_tree_type): Use it.  Always force min32int for
3317         COMPLEX types.
3318         (hsa_fixup_mov_insn_type): New function.
3319         (hsa_op_with_type::get_in_type): Use it.
3320         (hsa_build_append_simple_mov): Likewise.  Allow sub-32bit
3321         immediates in an assert.
3322         (hsa_op_with_type::extend_int_to_32bit): New method.
3323         (gen_hsa_insns_for_bitfield): Fixup instruction and intermediary
3324         types.  Convert to dest type if necessary.
3325         (gen_hsa_insns_for_bitfield_load): Fixup load type if necessary.
3326         (reg_for_gimple_ssa): Pass false as min32int to
3327         hsa_type_for_scalar_tree_type.
3328         (gen_hsa_addr): Fixup type when creating addresable temporary.
3329         (gen_hsa_cmp_insn_from_gimple): Extend operands if necessary.
3330         (gen_hsa_unary_operation): Extend operands and convert to dest type if
3331         necessary.  Call hsa_fixup_mov_insn_type.
3332         (gen_hsa_binary_operation): Changed operand types to hsa_op_with_type,
3333         extend operands and convert to dest type if necessary.
3334         (gen_hsa_insns_for_operation_assignment): Extend operands and convert
3335         to dest type if necessary.
3336         (set_output_in_type): Call hsa_fixup_mov_insn_type.  Just ude dest
3337         if conversion nt necessary and size matches.
3338         (gen_hsa_insns_for_load): Call hsa_fixup_mov_insn_type, convert
3339         to dest type if necessary.
3340         (gen_hsa_insns_for_store): Call hsa_fixup_mov_insn_type.
3341         (gen_hsa_insns_for_switch_stmt): Likewise. Also extend operands if
3342         necessary.
3343         (gen_hsa_clrsb): Likewise.
3344         (gen_hsa_ffs): Likewise.
3345         (gen_hsa_divmod): Extend operands and convert to dest type if
3346         necessary.
3347         (gen_hsa_atomic_for_builtin): Change type of op to hsa_op_with_type.
3349 2017-10-08  Segher Boessenkool  <segher@kernel.crashing.org>
3351         * config/rs6000/rs6000.md (conditional branch): Clean up formatting.
3352         Remove empty default arguments.  Use a brace block as output
3353         statement.
3354         (conditional return): Ditto.
3355         (jump): Ditto.
3356         (indirect_jump): Ditto.  Use b%T0 instead of bctr/blr.
3357         (tablejump, tablejumpsi, tablejumpdi, *tablejump<mode>_internal1):
3358         Ditto.
3359         (group_ending_nop): Ditto.
3360         (doloop_end): Ditto.
3361         (ctr<mode>, ctr<mode>_internal1, ctr<mode>_internal2): Ditto.
3362         (splitters for those): Ditto.
3364 2017-10-08  Segher Boessenkool  <segher@kernel.crashing.org>
3366         * config/rs6000/rs6000-string.c (expand_strncmp_align_check): Invert
3367         a conditional jump (and the compare for it) so that pc_rtx is the
3368         last operand.
3369         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Adjust
3370         for the deleted and renamed ctr<mode>_internal[234] patterns.
3371         * config/rs6000/rs6000.md: Delete second conditional branch pattern.
3372         Delete second conditional return pattern.
3373         (ctr<mode>_internal2): Delete this second bdnz pattern.
3374         (ctr<mode>_internal3): Rename to ctr<mode>_internal2.
3375         (ctr<mode>_internal4): Delete this second bdz pattern.
3377 2017-10-08  Eric Botcazou  <ebotcazou@adacore.com>
3379         * tree-outof-ssa.h (ssaexpand): Add partitions_for_undefined_values.
3380         (always_initialized_rtx_for_ssa_name_p): New predicate.
3381         * tree-outof-ssa.c (remove_ssa_form): Initialize new field of SA.
3382         (finish_out_of_ssa): Free new field of SA.
3383         * tree-ssa-coalesce.h (get_undefined_value_partitions): Declare.
3384         * tree-ssa-coalesce.c: Include tree-ssa.h.
3385         (get_parm_default_def_partitions): Remove extern keyword.
3386         (get_undefined_value_partitions): New function.
3387         * expr.c (expand_expr_real_1) <expand_decl_rtl>: For a SSA_NAME, do
3388         not set SUBREG_PROMOTED_VAR_P on the sub-register if it may contain
3389         uninitialized bits.
3390         * loop-iv.c (iv_get_reaching_def): Disqualify all subregs.
3392 2017-10-08  Eric Botcazou  <ebotcazou@adacore.com>
3394         * builtins.def (BUILT_IN_SETJMP): Revert latest change.
3396 2017-10-08  Jan Hubicka  <hubicka@ucw.cz>
3398         * config/i386/i386.c (ix86_expand_set_or_movmem): Disable 512bit loops
3399         for targets that preffer 128bit.
3401 2017-10-08  Jan Hubicka  <hubicka@ucw.cz>
3403         * config/i386/i386.c (has_dispatch): Disable for Ryzen.
3405 2017-10-08  Olivier Hainque  <hainque@adacore.com>
3407         * config/arm/arm.c (arm_set_return_address): Use MEM_VOLATILE_P
3408         on the target mem instead of RTX_FRAME_RELATED_P on the insn to
3409         prevent DSE.
3410         (thumb_set_return_address): Likewise.
3412 2017-10-08  Olivier Hainque  <hainque@adacore.com>
3414         * common/config/arm/arm-common.c (arm_except_unwind_info):
3415         Handle DWARF2_UNWIND_INFO.
3417 2017-10-07  Michael Collison <michael.collison@arm.com>
3419         * config/aarch64/aarch64.md (*aarch64_reg_<optab>_minus<mode>3):
3420         New pattern.
3422 2017-10-07  Eric Botcazou  <ebotcazou@adacore.com>
3424         * builtins.def (BUILT_IN_SETJMP): Declare as library builtin instead
3425         of GCC builtin if DONT_USE_BUILTIN_SETJMP is defined.
3426         * except.c (sjlj_emit_function_enter): If DONT_USE_BUILTIN_SETJMP is
3427         defined, force the creation of a new block for a dispatch label.
3429 2017-10-07  Jan Hubicka  <hubicka@ucw.cz>
3431         * invoke.texi (Wsuggest-attribute=cold): Document.
3432         * common.opt (Wsuggest-attribute=cold): New
3433         * ipa-pure-const.c (warn_function_cold): New function.
3434         * predict.c (compute_function_frequency): Use it.
3435         * predict.h (warn_function_cold): Declare.
3437 2017-10-06  Jan Hubicka  <hubicka@ucw.cz>
3439         * tree-switch-conversion.c (do_jump_if_equal, emit_cmp_and_jump_insns):
3440         Update profile.
3442 2017-10-06  Martin Liska  <mliska@suse.cz>
3444         * sanopt.c (struct sanopt_tree_triplet_hash): Remove inline
3445         keyword for member functions.
3446         (struct sanopt_tree_couple): New struct.
3447         (struct sanopt_tree_couple_hash): New function.
3448         (struct sanopt_ctx): Add new hash_map.
3449         (has_dominating_ubsan_ptr_check): New function.
3450         (record_ubsan_ptr_check_stmt): Likewise.
3451         (maybe_optimize_ubsan_ptr_ifn): Likewise.
3452         (sanopt_optimize_walker): Handle IFN_UBSAN_PTR.
3453         (pass_sanopt::execute): Handle also SANITIZE_POINTER_OVERFLOW.
3455 2017-10-06  Sudakshina Das  <sudi.das@arm.com>
3457         PR target/82440
3458         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Only call
3459         aarch64_simd_valid_immediate on CONST_VECTORs.
3460         (aarch64_reg_or_bic_imm): Likewise.
3462 2017-10-06  Wilco Dijkstra  <wdijkstr@arm.com>
3464         PR rtl-optimization/82396
3465         * haifa-sched.c (ready_sort_real): Disable qsort checking.
3467 2017-10-06  Sebastian Pop  <sebpop@gmail.com>
3469         * graphite-dependences.c (scop_get_reads): Move code to...
3470         (scop_get_must_writes): Move code to...
3471         (scop_get_may_writes): Move code to...
3472         (scop_get_reads_and_writes): ... here.
3473         (scop_get_dependences): Call scop_get_reads_and_writes.
3475 2017-10-06  Jakub Jelinek  <jakub@redhat.com>
3477         PR tree-optimization/82434
3478         * fold-const.h (can_native_encode_type_p,
3479         can_native_encode_string_p): Remove.
3480         * fold-const.c (native_encode_int): Formatting fixes.  If ptr is NULL,
3481         don't encode anything, just return what would be otherwise returned.
3482         (native_encode_fixed, native_encode_complex, native_encode_vector):
3483         Likewise.
3484         (native_encode_string): Likewise.  Inline by hand
3485         can_native_encode_string_p.
3486         (can_native_encode_type_p): Remove.
3487         (can_native_encode_string_p): Remove.
3488         * tree-vect-stmts.c (vectorizable_store): Instead of testing just
3489         STRING_CSTs using can_native_encode_string_p, test all
3490         CONSTANT_CLASS_P values using native_encode_expr with NULL ptr.
3491         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Remove last
3492         argument from native_encode_expr.
3493         (rhs_valid_for_store_merging_p): Use native_encode_expr with NULL ptr.
3494         (pass_store_merging::execute): Don't unnecessarily look for 3 stmts,
3495         but just 2.
3497 2017-10-06  Richard Biener  <rguenther@suse.de>
3499         PR tree-optimization/82397
3500         * tree-vect-data-refs.c (dr_group_sort_cmp): Do not use
3501         operand_equal_p but rely on data_ref_compare_tree for detecting
3502         equalities.
3503         (vect_analyze_data_ref_accesses): Use data_ref_compare_tree
3504         to match up with dr_group_sort_cmp.
3506 2017-10-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
3508         PR target/82322
3509         * config/s390/s390-builtins.def (s390_vfi): Define new overloaded
3510         builtin.
3511         * config/s390/s390-builtin-types.def: Regenerate.
3513 2017-10-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
3515         PR target/82317
3516         * config/s390/s390-builtin-types.def: Regenerate.
3517         * config/s390/s390-builtins.def (s390_vfmaxdb_4, s390_vfmindb_4):
3518         Change flag from B_VXE to B_VX.
3519         (s390_vec_min_dbl): Remove B_VXE flag.
3521 2017-10-06  Richard Biener  <rguenther@suse.de>
3523         * graphite-isl-ast-to-gimple.c: Include ssa.h and tree-ssa.h.
3524         (translate_isl_ast_to_gimple::translate_pending_phi_nodes,
3525         translate_isl_ast_to_gimple::is_valid_rename,
3526         translate_isl_ast_to_gimple::get_rename,
3527         translate_isl_ast_to_gimple::get_def_bb_for_const,
3528         translate_isl_ast_to_gimple::get_new_name,
3529         translate_isl_ast_to_gimple::collect_all_ssa_names,
3530         translate_isl_ast_to_gimple::copy_loop_phi_args,
3531         translate_isl_ast_to_gimple::collect_all_ssa_names,
3532         translate_isl_ast_to_gimple::copy_loop_phi_args,
3533         translate_isl_ast_to_gimple::copy_loop_phi_nodes,
3534         translate_isl_ast_to_gimple::add_close_phis_to_merge_points,
3535         translate_isl_ast_to_gimple::add_close_phis_to_outer_loops,
3536         translate_isl_ast_to_gimple::copy_loop_close_phi_args,
3537         translate_isl_ast_to_gimple::copy_loop_close_phi_nodes,
3538         translate_isl_ast_to_gimple::copy_cond_phi_args,
3539         translate_isl_ast_to_gimple::copy_cond_phi_nodes,
3540         translate_isl_ast_to_gimple::edge_for_new_close_phis,
3541         translate_isl_ast_to_gimple::add_phi_arg_for_new_expr,
3542         translate_isl_ast_to_gimple::rename_uses,
3543         translate_isl_ast_to_gimple::rename_all_uses): Remove.
3544         (translate_isl_ast_to_gimple::get_rename_from_scev): Simplify.
3545         (set_rename_for_each_def): Likewise.
3546         (graphite_copy_stmts_from_block): Handle debug stmt resetting
3547         here.  Handle rewriting SCEV analyzable uses here.
3548         (copy_bb_and_scalar_dependences): Generate code for PHI
3549         copy-in/outs.
3550         (graphite_regenerate_ast_isl): Adjust.
3551         * graphite-scop-detection.c (trivially_empty_bb_p): Move to sese.[ch].
3552         (add_write, add_read): New functions.
3553         (build_cross_bb_scalars_def): Use it and simplify.
3554         (build_cross_bb_scalars_use): Likewise.
3555         (graphite_find_cross_bb_scalar_vars): Inline into...
3556         (try_generate_gimple_bb): ...here.  Add dependences for PHIs,
3557         simulating out-of-SSA.  Compute liveout and add dependencies.
3558         (build_scops): Force an empty entry block.
3559         * sese.h (sese_info_t::liveout, sese_info_t::debug_liveout): New
3560         members.
3561         (sese_build_liveouts): Declare.
3562         (sese_trivially_empty_bb_p): Likewise.
3563         * sese.c (sese_build_liveouts_bb): Properly handle PHIs,
3564         compute liveout and debug_liveout.
3565         (sese_bad_liveouts_use): Remove.
3566         (sese_reset_debug_liveouts_bb): Likewise.
3567         (sese_reset_debug_liveouts): Rewrite in terms of debug_liveout.
3568         (sese_build_liveouts): Build liveout and debug_liveout and store
3569         it in region.
3570         (new_sese_info): Adjust.
3571         (free_sese_info): Likewise.
3572         (sese_insert_phis_for_liveouts): Reset debug stmts from here,
3573         do not build liveout here.
3574         (move_sese_in_condition): Adjust region entry.
3575         (scev_analyzable_p): Match up with chrec_apply requirements.
3576         (sese_trivially_empty_bb_p): New.
3577         * tree-into-ssa.c (get_reaching_def): Properly support generating
3578         default-defs for incremental rewrite of anonymous names.
3580 2017-10-06  Richard Biener  <rguenther@suse.de>
3582         * graphite-sese-to-poly.c (extract_affine): For casts increasing
3583         precision do not perform modulo reduction.
3585 2017-10-06  Richard Biener  <rguenther@suse.de>
3587         PR tree-optimization/82436
3588         * tree-vect-slp.c (vect_supported_load_permutation_p): More
3589         conservatively choose the vectorization factor when checking
3590         whether we can perform the required load permutation.
3591         (vect_transform_slp_perm_load): Assert when we may not fail.
3593 2017-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
3595         * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Correct error
3596         message for incompatible -msdata=* and -mcall-* options.
3598 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
3600         * config/i386/i386.c (ia32_multipass_dfa_lookahead): Default to issue
3601         rate for post-reload scheduling.
3603 2017-10-05  Tamar Christina  <tamar.christina@arm.com>
3605         * doc/sourcebuild.texi (vect_sizes_16B_8B, vect_sizes_32B_16B): New.
3607 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
3609         * config/i386/i386.c (znver1_cost): Set branch_cost to 3 (instead of 2)
3610         to improve monte carlo in scimark.
3612 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
3614         * config/i386/i386.c (ix86_size_cost, i386_cost, i486_cost,
3615         pentium_cost, lakemont_cost, pentiumpro_cost, geode_cost, k6_cost,
3616         athlon_cost, k8_cost, amdfam10_cost, btver1_cost, btver2_cost,
3617         pentium4_cost, nocona_cost): Set reassociation width to 1.
3618         (bdver1_cost, bdver2_cost, bdver3_cost, bdver4_cost): Set reassociation
3619         width to 2 for fp operations and 1 otherwise.
3620         (znver1_cost): Set scalar reassoc width to 4 and vector to 3 and 6
3621         for int and fp.
3622         (atom_cost): Set reassociation width to 2.
3623         (slm_cost, generic_cost): Set fp reassociation width
3624         to 2 and 1 otherwise.
3625         (intel_cost): Set fp reassociation width to 4 and 1 otherwise.
3626         (core_cost): Set fp reassociation width to 4 and vector to 2.
3627         (ix86_reassociation_width): Rewrite using cost table; special case
3628         plus/minus on Zen; honor X86_TUNE_SSE_SPLIT_REGS
3629         and TARGET_AVX128_OPTIMAL.
3630         * config/i386/i386.h (processor_costs): Add
3631         reassoc_int, reassoc_fp, reassoc_vec_int, reassoc_vec_fp.
3632         (TARGET_VECTOR_PARALLEL_EXECUTION, TARGET_REASSOC_INT_TO_PARALLEL,
3633         TARGET_REASSOC_FP_TO_PARALLEL): Remove.
3634         * x86-tune.def (X86_TUNE_REASSOC_INT_TO_PARALLEL): Remove.
3635         (X86_TUNE_REASSOC_FP_TO_PARALLEL): Remove.
3636         (X86_TUNE_VECTOR_PARALLEL_EXECUTION):  Remove.
3638 2017-10-05  Nathan Sidwell  <nathan@acm.org>
3640         * doc/invoke.texi (Wparentheses): Document C++ MVP behaviour.
3642 2017-10-05  Tamar Christina  <tamar.christina@arm.com>
3644         * config/arm/arm.c (arm_test_fpu_data): New.
3645         (arm_run_selftests): Call arm_test_fpu_data.
3647 2017-10-04  Nathan Sidwell  <nathan@acm.org>
3649         * toplev.c (toplev::main): Remove excess parens on pretty_printer
3650         decl.
3651         * caller-save.c (insert_save): Remove excess parens on TO_SAVE parm.
3653 2017-10-04  Sudakshina Das  <sudi.das@arm.com>
3655         * config/aarch64/aarch64-protos.h (enum simd_immediate_check): New
3656         check type for aarch64_simd_valid_immediate.
3657         (aarch64_output_simd_mov_immediate): Update prototype.
3658         (aarch64_simd_valid_immediate): Update prototype.
3659         * config/aarch64/aarch64-simd.md (orr<mode>3): modified pattern to add
3660         support for ORR-immediate.
3661         (and<mode>3): modified pattern to add support for BIC-immediate.
3662         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Function
3663         now checks for valid immediate for BIC and ORR based on new enum
3664         argument.
3665         (aarch64_output_simd_mov_immediate): Function now used to output
3666         BIC/ORR imm as well based on new enum argument.
3667         * config/aarch64/constraints.md (Do): New vector immediate constraint.
3668         (Db) : Likewise.
3669         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): New predicate.
3670         (aarch64_reg_or_bic_imm): Likewise.
3672 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
3674         * config/s390/vx-builtins.md ("vec_mergeh<mode>")
3675         ("vec_mergel<mode>"): Change mode iterator to V_128_NOSINGLE.
3677 2017-10-04  Wilco Dijkstra  <wdijkstr@arm.com>
3679         Revert r253399:
3681         PR rtl-optimization/82396
3682         * haifa-sched.c (autopref_multipass_init): Simplify
3683         initialization.
3684         (autopref_rank_data): Simplify sort order.
3685         * sched-int.h (autopref_multipass_data_): Remove
3686         multi_mem_insn_p, min_offset and max_offset.
3688 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
3690         * doc/sourcebuild.texi: Document vect_peeling_profitable.
3692 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
3694         * doc/sourcebuild.texi: Document vect_intdouble_cvt and
3695         vect_doubleint_cvt.
3697 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
3699         * doc/sourcebuild.texi: Document vect_long_mult.
3701 2017-10-04  Richard Sandiford  <richard.sandiford@linaro.org>
3703         PR tree-optimization/82413
3704         * fold-const.c (build_range_check): Use widest_int when comparing
3705         the maximum ETYPE value with HIGH.
3707 2017-10-04  Wilco Dijkstra  <wdijkstr@arm.com>
3709         PR rtl-optimization/82396
3710         * haifa-sched.c (autopref_multipass_init): Simplify
3711         initialization.
3712         (autopref_rank_data): Simplify sort order.
3713         * sched-int.h (autopref_multipass_data_): Remove
3714         multi_mem_insn_p, min_offset and max_offset.
3716 2017-10-04  Jakub Jelinek  <jakub@redhat.com>
3718         PR tree-optimization/82381
3719         * tree-ssa-reassoc.c (sort_by_operand_rank): Check for different
3720         oeN->rank first.  Return 1 or -1 if one op is SSA_NAME and the other
3721         is not.
3723         PR tree-optimization/82374
3724         * omp-low.c (create_omp_child_function): Copy DECL_ATTRIBUTES,
3725         DECL_FUNCTION_SPECIFIC_OPTIMIZATION,
3726         DECL_FUNCTION_SPECIFIC_TARGET and DECL_FUNCTION_VERSIONED from
3727         current_function_decl to the new decl.
3729 2017-10-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
3731         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_2_HW): Define new
3732         helper macro for IEEE float128 hardware built-in functions.
3733         (SQRTF128_ODD): Add built-in functions with the round-to-odd
3734         semantics.
3735         (TRUNCF128_ODD): Likewise.
3736         (ADDF128_ODD): Likewise.
3737         (SUBF128_ODD): Likewise.
3738         (MULF128_ODD): Likewise.
3739         (DIVF128_ODD): Likewise.
3740         (FMAF128_ODD): Likewise.
3741         * config/rs6000/rs6000.md (UNSPEC_ROUND_TO_ODD): Rename to
3742         UNSPEC_TRUNC_ROUND_TO_ODD.
3743         (UNSPEC_TRUNC_ROUND_TO_ODD): Likewise.
3744         (UNSPEC_ADD_ROUND_TO_ODD): New unspec codes for the IEEE 128-bit
3745         floating point round to odd instructions.
3746         (UNSPEC_SUB_ROUND_TO_ODD): Likewise.
3747         (UNSPEC_MUL_ROUND_TO_ODD): Likewise.
3748         (UNSPEC_DIV_ROUND_TO_ODD): Likewise.
3749         (UNSPEC_FMA_ROUND_TO_ODD): Likewise.
3750         (UNSPEC_SQRT_ROUND_TO_ODD): Likewise.
3751         (trunc<mode>sf2_hw): Change the truncate with round to odd
3752         expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.
3753         (add<mode>3_odd): Add insns for IEEE 128-bit floating point round
3754         to odd hardware instructions.
3755         (sub<mode>3_odd): Likewise.
3756         (mul<mode>3_odd): Likewise.
3757         (div<mode>3_odd): Likewise.
3758         (sqrt<mode>2_odd): Likewise.
3759         (fma<mode>4_odd): Likewise.
3760         (fms<mode>4_odd): Likewise.
3761         (nfma<mode>4_odd): Likewise.
3762         (nfms<mode>4_odd): Likewise.
3763         (trunc<mode>df2_odd): Change the truncate with round to odd
3764         expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.  Add a generator
3765         function.
3766         * doc/extend.texi (PowerPC built-in functions): Update documentation
3767         for existing IEEE float128-bit built-in functions.  Add built-in
3768         functions that generate the IEEE 128-bit floating point round to
3769         odd instructions.
3771 2017-10-03  Segher Boessenkool  <segher@kernel.crashing.org>
3773         PR rtl-optimization/77729
3774         * simplify-rtx.c (simplify_binary_operation_1): Delete the (X&C1)|C2
3775         to (X&(C1&~C2))|C2 transformations.
3777 2017-10-03  Martin Jambor  <mjambor@suse.cz>
3779         PR tree-optimization/82363
3780         * tree-sra.c (propagate_subaccesses_across_link): In unrecoverable
3781         mismatch, mark lacc written regardless of racc.
3783 2017-10-03  Jakub Jelinek  <jakub@redhat.com>
3785         PR tree-optimization/82381
3786         * tree-ssa-reassoc.c (sort_by_operand_rank): Don't check
3787         stmt_to_insert nor wheather SSA_NAMEs are default defs.
3788         Return 1 or -1 if one of bba and bbb is NULL. If bb_rank is equal,
3789         fallthrough into reassoc_stmt_dominates_stmt_p.
3791         PR target/82386
3792         * combine.c (combine_instructions): Don't combine in unreachable
3793         basic blocks.
3795 2017-08-18  Peter Bergner  <bergner@vnet.ibm.com>
3797         PR target/80210
3798         * config/rs6000/rs6000.c (rs6000_option_override_internal): Rewrite
3799         function to not use the have_cpu variable.  Do not set cpu_index,
3800         rs6000_cpu_index or rs6000_tune_index if we end up using TARGET_DEFAULT
3801         or the default cpu.
3802         (rs6000_valid_attribute_p): Remove duplicate initializations of
3803         old_optimize and func_optimize.
3804         (rs6000_pragma_target_parse): Call rs6000_activate_target_options ().
3805         (rs6000_activate_target_options): Make global.
3806         * config/rs6000/rs6000-protos.h (rs6000_activate_target_options): Add
3807         prototype.
3809 2017-10-02  Jakub Jelinek  <jakub@redhat.com>
3811         * tree-dfa.c (get_ref_base_and_extent): Set *pmax_size to -1
3812         if *poffset + *pmax_size overflows in HOST_WIDE_INT.
3813         Set *poffset to 0 and *psize and *pmax_size to -1 if
3814         *poffset + *psize overflows in HOST_WIDE_INT.
3816         PR tree-optimization/82387
3817         PR tree-optimization/82388
3818         PR tree-optimization/82389
3819         * tree-ssa-dse.c (dse_classify_store): Test byte_tracking_enabled
3820         instead of live_bytes non-NULL.
3822 2017-10-02  Georg-Johann Lay  <avr@gjlay.de>
3824         PR target/41076
3825         * confg/avr/avr.md (*iorhi3.ashift8-ext.zerox): Add "r,r,0"
3826         alternative.
3828 2017-10-02  Richard Biener  <rguenther@suse.de>
3830         * graphite-isl-ast-to-gimple.c (set_codegen_error): With
3831         -fchecking and --param graphite-allow-codegen-errors=0 ICE.
3832         * params.def (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): New param.
3834 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
3836         * tree.h (wi::int_traits <const_tree>::decompose): Assert that the
3837         requested precision matches the type's.
3838         * calls.c (alloc_max_size): Calculate the new candidate size as
3839         a widest_int and use wi::to_widest when comparing it with the
3840         current candidate size.
3841         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Compare with
3842         zero rather than integer_zero_node.
3843         * match.pd: Check for a no-op conversion before using wi::add
3844         rather than after.  Use tree_to_uhwi when summing small shift
3845         counts into an unsigned int.
3847 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
3848             Alan Hayward  <alan.hayward@arm.com>
3849             David Sherwood  <david.sherwood@arm.com>
3851         PR target/71307
3852         * config/aarch64/aarch64.h (POINTER_AND_FP_REGS): New reg class.
3853         (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update accordingly.
3854         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
3855         POINTER_AND_FP_REGS.
3857 2017-10-02  Richard Biener  <rguenther@suse.de>
3859         PR tree-optimization/82355
3860         * graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
3861         a mapping for the enclosing loop but avoid generating one for
3862         the loop tree root.
3863         (copy_bb_and_scalar_dependences): Remove premature codegen
3864         error on PHIs in blocks duplicated into multiple places.
3865         * graphite-scop-detection.c
3866         (scop_detection::stmt_has_simple_data_refs_p): For a loop not
3867         in the region use it as loop and nest to analyze the DR in.
3868         (try_generate_gimple_bb): Likewise.
3869         * graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
3870         (add_loop_constraints): For blocks in a loop not in the region
3871         create a dimension with a single iteration.
3872         * sese.h (gbb_loop_at_index): Remove assert.
3874 2017-10-01  Kevin Buettner  <kevinb@redhat.com>
3876         * omp-expand.c (adjust_context_scope): New function.
3877         (expand_parallel_call): Call adjust_context_scope.
3879 2017-10-01  Jeff Law  <law@redhat.com>
3881         * tree-ssa-dom.c (optimize_stmt): Make this a method within the
3882         dom_opt_dom_walker class with direct access to private members.
3883         Add comments.  Call test_for_singularity.
3884         (dom_opt_dom_walker::before_dom_children): Corresponding changes.
3885         (dom_opt_dom_walker::after_dom_children): Do not lazily initialize
3886         m_dummy_cond anymore.
3887         (class dom_opt_dom_walker): Initialize m_dummy_cond member in the
3888         class ctor.
3889         (pass_dominator:execute): Build the dummy_cond here and pass it
3890         to the dom_opt_dom_walker ctor.
3891         (test_for_singularity): New function.
3893 2017-09-30  Krister Walfridsson  <krister.walfridsson@gmail.com>
3894             Maya Rashish  <coypu@sdf.org>
3896         * config.gcc (*-*-netbsd*): New variable nbsd_tm_file containing
3897         netbsd.h, netbsd-stdint.h, and netbsd-elf.h.
3898         (alpha*-*-netbsd*) Use nbsd_tm_file.
3899         (arm*-*-netbsdelf*) Likewise.
3900         (i[34567]86-*-netbsdelf*) Likewise.
3901         (x86_64-*-netbsd*) Likewise.
3902         (mips*-*-netbsd*) Likewise.
3903         (powerpc-*-netbsd*) Likewise.
3904         (sh*-*-netbsd*) Likewise.
3905         (sparc-*-netbsdelf*) Likewise.
3906         (sparc64-*-netbsd*) Likewise.
3907         (m68k*-*-netbsdelf*) Use nbsd_tm_file and add CHAR_FAST8/SHORT_FAST16
3908         to tm_defines.
3909         (vax-*-netbsdelf*) Likewise.
3910         * config/netbsd-stdint.h (INT_FAST8_TYPE): Check CHAR_FAST8.
3911         (UINT_FAST8_TYPE) Likewise.
3912         (INT_FAST16_TYPE) Check CHAR_FAST16.
3913         (UINT_FAST16_TYPE) Likewise.
3915 2017-09-30  Jakub Jelinek  <jakub@redhat.com>
3917         PR target/82361
3918         * config/i386/i386.md
3919         (TARGET_USE_8BIT_IDIV zext divmodsi4 splitter): New define_split.
3920         (divmodsi4_zext_1, divmodsi4_zext_2, *divmodsi4_zext_1,
3921         *divmodsi4_zext_2): New define_insn_and_split.
3922         (*divmodsi4_noext_zext_1, *divmodsi4_noext_zext_2): New define_insn.
3923         (TARGET_USE_8BIT_IDIV zext udivmodsi4 splitter): New define_split.
3924         (udivmodsi4_zext_1, udivmodsi4_zext_2, *udivmodsi4_zext_1,
3925         *udivmodsi4_zext_2, *udivmodsi4_pow2_zext_1, *udivmodsi4_pow2_zext_2):
3926         New define_insn_and_split.
3927         (*udivmodsi4_noext_zext_1, *udivmodsi4_noext_zext_2): New define_insn.
3928         * config/i386/i386.c (ix86_split_idivmod): Handle operands[0] or
3929         operands[1] having DImode when mode is SImode.
3931         * config/i386/i386.c (ix86_split_idivmod): Use mode instead of
3932         always SImode for DIV and MOD in REG_EQUAL notes.
3934 2017-09-29  Yury Gribov  <tetra2005@gmail.com>
3936         PR middle-end/82319
3937         * match.pd: Fix handling of NaNs in pattern.
3939 2017-09-29  Jeff Law  <law@redhat.com>
3941         * sbitmap.c (bitmap_bit_in_range_p): New function.
3942         * sbitmap.h (bitmap_bit_in_range_p): Prototype.
3943         * tree-ssa-dse.c (live_bytes_read): New function.
3944         (dse_classify_store): Ignore reads of dead bytes.
3946         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Fix
3947         typos and whitespace errors.
3948         * config/i386/predicates.md (address_no_seg_operand): Likewise.
3949         * config/s390/s390.c (s390_emit_prologue): Likewise.
3951 2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>
3953         PR target/81481
3954         * ira-costs.c (scan_one_insn): Don't take into account PIC equiv
3955         with a symbol for LRA.
3957 2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>
3959         PR rtl-optimization/82338
3960         * lra-constraints.c (inherit_in_ebb): Check usage_insns check.
3962 2017-09-29  Alexander Monakov  <amonakov@ispras.ru>
3964         * genmodes.c (calc_wider_mode): Suppress qsort macro.
3965         * system.h [CHECKING_P] (qsort): Redirect to qsort_chk.
3966         (qsort_chk): Declare.
3967         * vec.c [CHECKING_P] (qsort_chk_error): New static function.
3968         (qsort_chk): New function.
3970 2017-09-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
3972         PR tree-optimization/82337
3973         * gimple-ssa-strength-reduction.c (find_phi_def): Don't record a
3974         phi definition if the PHI result appears in an abnormal PHI.
3975         (find_basis_for_base_expr): Don't record a basis if the LHS of the
3976         basis appears in an abnormal PHI.
3978 2017-09-29  Richard Biener  <rguenther@suse.de>
3980         * graphite-isl-ast-to-gimple.c
3981         (translate_isl_ast_to_gimple::set_codegen_error): New function.
3982         (binary_op_to_tree): Use it.
3983         (get_rename_from_scev): Likewise.
3984         (copy_loop_phi_nodes): Likewise.
3985         (copy_bb_and_scalar_dependences): Likewise.
3986         (translate_pending_phi_nodes): Likewise.
3988 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
3990         PR target/82339
3991         * config/i386/i386.md (*movdi_internal peephole2): New -Os peephole
3992         for movabsq $(i32 << shift), r64.
3994 2017-09-28  Uros Bizjak  <ubizjak@gmail.com>
3996         * config/i386/i386.c (ix86_print_operand_address_as): Do not check
3997         index when encoding %esp as %rsp to avoid 0x67 prefix.
3999 2017-09-28  Sergey Shalnov  <Sergey.Shalnov@intel.com>
4001         * config/i386/i386.md (*movsf_internal, *movdf_internal):
4002         Return 256-bit AVX modes for TARGET_PREFER_AVX256.
4004 2017-09-28  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4006         * config/arm/arm.c (arm_option_override): Forbid ARMv8-M Security
4007         Extensions with more than 16 double VFP registers.
4008         (cmse_nonsecure_entry_clear_before_return): Remove second entry of
4009         to_clear_mask and all code related to it.  Replace the remaining
4010         entry by a sbitmap and adapt code accordingly.
4012 2017-09-28  Henry Linjamäki  <henry.linjamaki@parmance.com>
4014         * brig-builtins.def: Change pure attributes to const.
4016 2017-09-28  Joseph Myers  <joseph@codesourcery.com>
4018         * config.gcc (default_gnu_indirect_function): Default to yes for
4019         sparc*-*-linux* with glibc.
4021 2017-09-28  Joseph Myers  <joseph@codesourcery.com>
4023         * config/aarch64/aarch64.c (aarch64_elf_asm_constructor)
4024         (aarch64_elf_asm_destructor): Pass SECTION_NOTYPE to get_section
4025         when creating .init_array and .fini_array sections with priority
4026         specified.
4028 2017-09-27  Christophe Lyon  <christophe.lyon@linaro.org>
4030         PR target/71727
4031         * config/aarch64/aarch64.c
4032         (aarch64_builtin_support_vector_misalignment): Always return false
4033         when misalignment is unknown.
4035 2017-09-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4037         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Revise
4038         this function to return false if the definition used by the swap
4039         instruction is artificial, or if the memory address from which the
4040         constant value is loaded is not represented by a base address held
4041         in a register or if the base address register is a frame or stack
4042         pointer.  Additionally, return false if the base address of the
4043         loaded constant is a SYMBOL_REF but is not considered to be a
4044         constant.
4045         (replace_swapped_load_constant): New function.
4046         (rs6000_analyze_swaps): Add a new pass to replace a swap of a
4047         loaded constant vector with a load of a swapped constant vector.
4049 2017-09-27  Carl Love  <cel@us.ibm.com>
4051         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
4052         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
4053         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
4054         fctiw instruction.
4056 2017-09-27  Alexander Monakov  <amonakov@ispras.ru>
4058         * haifa-sched.c (autopref_rank_for_schedule): Order 'irrelevant' insns
4059         first, always call autopref_rank_data otherwise.
4061 2017-09-27  Richard Biener  <rguenther@suse.de>
4063         * graphite-scop-detection.c (find_scop_parameters): Move
4064         loop bound handling ...
4065         (gather_bbs::before_dom_children): ... here, avoiding the need
4066         to build scop_info->loop_nest.
4067         (record_loop_in_sese): Remove.
4068         * sese.h (sese_info_t::loop_nest): Remove.
4069         * sese.c (new_sese_info): Do not allocate loop_nest.
4070         (free_sese_info): Do not free loop_nest.
4072 2017-09-27  Jakub Jelinek  <jakub@redhat.com>
4074         PR c++/82159
4075         * gimplify.c (gimplify_modify_expr): Don't optimize away zero sized
4076         lhs from calls if the lhs has addressable type.
4078 2017-09-27  Richard Biener  <rguenther@suse.de>
4080         * graphite.h (scop::max_alias_set): New member.
4081         * graphite-scop-detection.c: Remove references to non-existing
4082         --param in comments.
4083         (build_alias_sets): Record the maximum alias set used for drs.
4084         (build_scops): Support zero as unlimited for
4085         --param graphite-max-arrays-per-scop.
4086         * graphite-sese-to-poly.c (add_scalar_version_numbers): Remove
4087         and inline into ...
4088         (build_poly_sr_1): ... here.  Compute alias set based on the
4089         maximum alias set used for drs rather than
4090         PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP
4092 2017-09-27  Richard Biener  <rguenther@suse.de>
4094         * graphite-optimize-isl.c (get_schedule_for_node_st): Allow
4095         --param loop-block-tile-size=0 to disable tiling.
4097 2017-09-27  Richard Biener  <rguenther@suse.de>
4099         * doc/invoke.texi (graphite-max-bbs-per-function): Remove.
4100         (graphite-max-nb-scop-params): Document special value zero.
4101         * domwalk.h (dom_walker::STOP): New symbolical constant.
4102         (dom_walker::dom_walker): Add optional parameter for bb to
4103         RPO mapping.
4104         (dom_walker::~dom_walker): Declare.
4105         (dom_walker::before_dom_children): Document STOP return value.
4106         (dom_walker::m_user_bb_to_rpo): New member.
4107         (dom_walker::m_bb_to_rpo): Likewise.
4108         * domwalk.c (dom_walker::dom_walker): Compute bb to RPO
4109         mapping here if not provided by the user.
4110         (dom_walker::~dom_walker): Free bb to RPO mapping if not
4111         provided by the user.
4112         (dom_walker::STOP): Define.
4113         (dom_walker::walk): Do not compute bb to RPO mapping here.
4114         Support STOP return value from before_dom_children to stop
4115         walking.
4116         * graphite-optimize-isl.c (optimize_isl): If the schedule
4117         is the same still generate code if -fgraphite-identity
4118         or -floop-parallelize-all are given.
4119         * graphite-scop-detection.c: Include cfganal.h.
4120         (gather_bbs::gather_bbs): Get and pass through bb to RPO
4121         mapping.
4122         (gather_bbs::before_dom_children): Return STOP for BBs
4123         not in the region.
4124         (build_scops): Compute bb to RPO mapping and pass it to
4125         the domwalk.  Treat --param graphite-max-nb-scop-params=0
4126         as not limiting the number of params.
4127         * graphite.c (graphite_initialize): Remove limit on the
4128         number of basic-blocks in a function.
4129         * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Remove.
4130         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Adjust to documented
4131         default value of 10.
4133 2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
4135         * config/rs6000/vsx.md (peephole for optimizing move SF to GPR):
4136         Adjust code to eliminate needing to do the shift right 32-bits
4137         operation after XSCVDPSPN.
4139 2017-09-26  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4141         * match.pd ((X / Y) == 0 -> X < Y): New pattern.
4142         ((X / Y) != 0 -> X >= Y): Likewise.
4144 2017-09-26  Carl Love  <cel@us.ibm.com>
4146         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_XL_LEN_R,
4147         P9V_BUILTIN_VEC_XST_LEN_R): Add support for builtins
4148         vector unsigned char vec_xl_len_r (unsigned char *, size_t);
4149         void vec_xst_len_r (vector unsigned char, unsigned char *, size_t);
4150         * config/rs6000/altivec.h (vec_xl_len_r, vec_xst_len_r): Add defines.
4151         * config/rs6000/rs6000-builtin.def (XL_LEN_R, XST_LEN_R): Add
4152         definitions and overloading.
4153         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case
4154         statement for P9V_BUILTIN_XST_LEN_R.
4155         (altivec_init_builtins): Add def_builtin for P9V_BUILTIN_STXVLL.
4156         * config/rs6000/vsx.md (lxvll, stxvll, xl_len_r, xst_len_r): Add
4157         define_expand and define_insn for the instructions and builtins.
4158         * doc/extend.texi: Update the built-in documentation file for the new
4159         built-in functions.
4160         * config/rs6000/altivec.md (altivec_lvsl_reg, altivec_lvsr_reg): Add
4161         define_insn for the instructions
4163 2017-09-26  Krister Walfridsson  <krister.walfridsson@gmail.com>
4165         PR target/39570
4166         * gcc/config/netbsd-protos.h: New file.
4167         * gcc/config/netbsd.c: New file.
4168         * gcc/config/netbsd.h (SUBTARGET_INIT_BUILTINS): Define.
4169         * gcc/config/t-netbsd: New file.
4170         * gcc/config.gcc (tm_p_file): Add netbsd-protos.h.
4171         (tmake_file) Add t-netbsd.
4172         (extra_objs) Add netbsd.o.
4174 2017-09-26  Janus Weil  <janus@gcc.gnu.org>
4176         PR fortran/82143
4177         PR fortran/82324
4178         * doc/sourcebuild.texi: Document fortran_real_10 and fortran_real_16.
4180 2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
4182         * config/rs6000/rs6000.md (extendsi<mode>2): Add a splitter to do
4183         sign extension from a vector register to a GPR by doing a 32-bit
4184         direct move and then an EXTSW.
4185         (extendsi<mode>2 splitter): Likewise.
4186         (movsi_from_sf): Adjust code to eliminate doing a 32-bit shift
4187         right or vector extract after doing XSCVDPSPN.  Use
4188         zero_extendsidi2 instead of p8_mfvsrd_4_disf to move the value to
4189         the GPRs.
4190         (movdi_from_sf_zero_ext): Likewise.
4191         (reload_gpr_from_vsxsf): Likewise.
4192         (p8_mfvsrd_4_disf): Delete, no longer used.
4193         (movsi_from_df): Optimize converting a DFmode to a SFmode, and
4194         then needing to move the SFmode to a GPR to use the XSCVDPSP
4195         instruction instead of FRSP and XSCVDPSPN.
4196         * config/rs6000/vsx.md (vsx_xscvspdp_scalar2): Move insn so that
4197         it is adjacent to the other XSCVSPDP insns.
4198         (vsx_xscvdpsp_scalar): Use "ww" constraint instead of "f" to allow
4199         SFmode to be in traditional Altivec registers.
4200         (vsx_xscvdpspn): Eliminate useless alternative constraint.
4201         (vsx_xscvspdpn): Likewise.
4202         (vsx_xscvspdpn_scalar): Likewise.
4204 2017-09-26  Martin Jambor  <mjambor@suse.cz>
4206         * tree-sra.c (compare_access_positions): Put integral types first,
4207         stabilize sorting of integral types, remove conditions putting
4208         non-full-precision integers last.
4209         (sort_and_splice_var_accesses): Disable scalarization if a
4210         non-integert would be represented by a non-full-precision integer.
4212 2017-09-26  Joseph Myers  <joseph@codesourcery.com>
4214         * config/microblaze/linux.h (TARGET_ASM_FILE_END): Likewise.
4215         * config/pa/pa.h (NEED_INDICATE_EXEC_STACK): Likewise.
4216         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Likewise.
4217         * config/pa/pa.c (pa_hpux_file_end): Rename to pa_file_end.
4218         Define unconditionally, with [ASM_OUTPUT_EXTERNAL_REAL]
4219         conditionals inside the function instead of around it.  Call
4220         file_end_indicate_exec_stack if NEED_INDICATE_EXEC_STACK.
4221         (TARGET_ASM_FILE_END): Define unconditionally to pa_file_end.
4223 2017-09-26  Richard Biener  <rguenther@suse.de>
4225         * graphite-scop-detection.c (scop_detection::build_scop_depth): Rewrite,
4226         fold in ...
4227         (scop_detection::build_scop_breadth): ... this.  Removed.
4228         (scop_detection::loop_is_valid_in_scop): Fold into single caller.
4229         (scop_detection::harmful_stmt_in_bb): Likewise.
4230         (scop_detection::graphite_can_represent_stmt): Likewise.
4231         (scop_detection::loop_body_is_valid_scop): Likewise.  Remove recursion.
4232         (scop_detection::can_represent_loop): Remove recursion, fold in ...
4233         (scop_detection::can_represent_loop_1): ... this.  Removed.
4234         (scop_detection::harmful_loop_in_region): Simplify after inlining
4235         the above and remove more quadraticness.
4236         (build_scops): Adjust.
4237         * tree-data-ref.c (loop_nest_has_data_refs): Remove pointless
4238         quadraticness.
4240 2017-09-26  Jakub Jelinek  <jakub@redhat.com>
4242         PR target/82267
4243         * config/i386/i386.c (ix86_print_operand_address_as): Only test
4244         REGNO (base) == SP_REG if base is a REG.
4246         PR middle-end/35691
4247         * tree-ssa-reassoc.c (update_range_test): Dump r->exp each time
4248         if it is different SSA_NAME.
4249         (optimize_range_tests_cmp_bitwise): New function.
4250         (optimize_range_tests): Call it.
4252 2017-09-26  Richard Biener  <rguenther@suse.de>
4254         PR tree-optimization/82321
4255         * graphite.c (canonicalize_loop_closed_ssa): Properly check
4256         for the def being inside the loop.
4258 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4260         * config/s390/vx-builtins.md ("vmslg"): Add missing operand in
4261         assembler output.
4262         * config/s390/s390-builtins.def: Fix constraint on op4.
4264 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4266         * config/s390/s390.c (s390_expand_vec_compare): Use the new mode
4267         independent expanders.
4268         * config/s390/vector.md ("vec_cmpuneq", "vec_cmpltgt")
4269         ("vec_ordered", "vec_unordered"): New expanders.
4271 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4273         * config/s390/s390.c (s390_preferred_simd_mode): Return V4SFmode
4274         for SFmode.
4276 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4278         * config/s390/vector.md ("vec_unpacks_low_v16qi"): Rename to
4279         vec_unpacks_lo_v16qi.
4280         ("vec_unpacku_low_v16qi"): Rename to vec_unpacku_lo_v16qi.
4282 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4284         * config/s390/vector.md ("vec_unpacks_lo_v4sf")
4285         ("vec_unpacks_hi_v4sf", "vec_unpacks_lo_v2df")
4286         ("vec_unpacks_hi_v2df", "vec_pack_trunc_v2df"): New expanders.
4288 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4290         * config/s390/predicates.md ("const_shift_by_byte_operand"): New
4291         predicate.
4292         * config/s390/vector.md ("*vec_srb<mode>"): Change modes to V_128
4293         and V16QI.
4294         ("*vec_slb<mode>"): New insn pattern.
4295         ("vec_shr_<mode>"): New expander.
4296         * config/s390/vx-builtins.md ("vec_slb<mode>"): Turn into expander
4297         and force the shift count operand to V16QImode.
4298         ("vec_srb<mode>"): Set shift count mode to V16QI.
4300 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4302         * config/s390/vector.md ("vec_widen_umult_lo_<mode>")
4303         ("vec_widen_umult_hi_<mode>", "vec_widen_smult_lo_<mode>")
4304         ("vec_widen_smult_hi_<mode>"): New expander definitions.
4306 2017-09-26  Richard Earnshaw  <rearnsha@arm.com>
4308         PR target/82175
4309         * config/arm/arm.h (DRIVER_SELF_SPECS): Separate sub-rules with commas.
4311 2017-09-26  Richard Biener  <rguenther@suse.de>
4313         PR tree-optimization/82320
4314         * tree-ssa-sccvn.c (set_ssa_val_to): Changing undef to undef
4315         isn't a change.
4317 2017-09-25  Jeff Law  <law@redhat.com>
4319         * config/rs6000/rs6000-protos.h (output_probe_stack_range): Update
4320         prototype for new argument.
4321         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack_1): New function,
4322         mostly extracted from rs6000_emit_allocate_stack.
4323         (rs6000_emit_probe_stack_range_stack_clash): New function.
4324         (rs6000_emit_allocate_stack): Call
4325         rs6000_emit_probe_stack_range_stack_clash as needed.
4326         (rs6000_emit_probe_stack_range): Add additional argument
4327         to call to gen_probe_stack_range{si,di}.
4328         (output_probe_stack_range): New.
4329         (output_probe_stack_range_1): Renamed from output_probe_stack_range.
4330         (output_probe_stack_range_stack_clash): New.
4331         (rs6000_emit_prologue): Emit notes into dump file as requested.
4332         * rs6000.md (allocate_stack): Handle -fstack-clash-protection.
4333         (probe_stack_range<P:mode>): Operand 0 is now early-clobbered.
4334         Add additional operand and pass it to output_probe_stack_range.
4336 2017-09-25  Bin Cheng  <bin.cheng@arm.com>
4338         PR tree-optimization/82163
4339         * tree-ssa-loop-manip.h (verify_loop_closed_ssa): New parameter.
4340         (checking_verify_loop_closed_ssa): New parameter.
4341         * tree-ssa-loop-manip.c (check_loop_closed_ssa_use): Delete.
4342         (check_loop_closed_ssa_stmt): Delete.
4343         (check_loop_closed_ssa_def, check_loop_closed_ssa_bb): New functions.
4344         (verify_loop_closed_ssa): Check loop closed ssa form for LOOP.
4345         (tree_transform_and_unroll_loop): Check loop closed ssa form only for
4346         changed loops.
4348 2017-09-25  Pekka Jaaskelainen <pekka@parmance.com>
4350         * brig-builtins.def: Treat HSAIL barrier builtins as
4351         setjmp/longjump style functions.
4353 2017-09-25  Richard Sandiford  <richard.sandiford@linaro.org>
4355         * target.def (constant_alignment): New hook.
4356         * defaults.h (CONSTANT_ALIGNMENT): Delete.
4357         * doc/tm.texi.in (CONSTANT_ALIGNMENT): Replace with...
4358         (TARGET_CONSTANT_ALIGNMENT): ...this new hook.
4359         * doc/tm.texi: Regenerate.
4360         * targhooks.h (default_constant_alignment): Declare.
4361         (constant_alignment_word_strings): Likewise.
4362         * targhooks.c (default_constant_alignment): New function.
4363         (constant_alignment_word_strings): Likewise.
4364         * builtins.c (get_object_alignment_2): Use targetm.constant_alignment
4365         instead of CONSTANT_ALIGNMENT.
4366         * varasm.c (align_variable, get_variable_align, build_constant_desc)
4367         (force_const_mem): Likewise.
4368         * config/aarch64/aarch64.h (CONSTANT_ALIGNMENT): Delete.
4369         * config/aarch64/aarch64.c (aarch64_constant_alignment): New function.
4370         (aarch64_classify_address): Call it instead of CONSTANT_ALIGNMENT.
4371         (TARGET_CONSTANT_ALIGNMENT): Redefine.
4372         * config/alpha/alpha.h (CONSTANT_ALIGNMENT): Delete commented-out
4373         definition.
4374         * config/arc/arc.h (CONSTANT_ALIGNMENT): Delete.
4375         * config/arc/arc.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
4376         constant_alignment_word_strings.
4377         * config/arm/arm.h (CONSTANT_ALIGNMENT_FACTOR): Delete.
4378         (CONSTANT_ALIGNMENT): Likewise.
4379         * config/arm/arm.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
4380         (arm_constant_alignment): New function.
4381         * config/bfin/bfin.h (CONSTANT_ALIGNMENT): Delete.
4382         * config/bfin/bfin.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
4383         constant_alignment_word_strings.
4384         * config/cr16/cr16.h (CONSTANT_ALIGNMENT): Delete.
4385         * config/cr16/cr16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
4386         constant_alignment_word_strings.
4387         * config/cris/cris.h (CONSTANT_ALIGNMENT): Delete.
4388         * config/cris/cris.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
4389         (cris_constant_alignment): New function.
4390         * config/epiphany/epiphany.h (CONSTANT_ALIGNMENT): Delete.
4391         * config/epiphany/epiphany.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
4392         (epiphany_constant_alignment): New function.
4393         * config/fr30/fr30.h (CONSTANT_ALIGNMENT): Delete.
4394         * config/fr30/fr30.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
4395         constant_alignment_word_strings.
4396         * config/frv/frv.h (CONSTANT_ALIGNMENT): Delete.
4397         * config/frv/frv.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
4398         constant_alignment_word_strings.
4399         * config/ft32/ft32.h (CONSTANT_ALIGNMENT): Delete.
4400         * config/ft32/ft32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
4401         constant_alignment_word_strings.
4402         * config/i386/i386.h (CONSTANT_ALIGNMENT): Delete.
4403         * config/i386/i386-protos.h (ix86_constant_alignment): Delete.
4404         * config/i386/i386.c (ix86_constant_alignment): Make static.
4405         Use the same interface as the target hook.
4406         (TARGET_CONSTANT_ALIGNMENT): Redefine.
4407         * config/ia64/ia64.h (CONSTANT_ALIGNMENT): Delete.
4408         * config/ia64/ia64.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
4409         constant_alignment_word_strings.
4410         * config/iq2000/iq2000.h (CONSTANT_ALIGNMENT): Delete.
4411         * config/iq2000/iq2000.c (iq2000_constant_alignment): New function.
4412         (TARGET_CONSTANT_ALIGNMENT): Redefine.
4413         * config/lm32/lm32.h (CONSTANT_ALIGNMENT): Delete.
4414         * config/lm32/lm32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
4415         constant_alignment_word_strings.
4416         * config/m32r/m32r.h (CONSTANT_ALIGNMENT): Delete.
4417         * config/m32r/m32r.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
4418         constant_alignment_word_strings.
4419         * config/mcore/mcore.h (CONSTANT_ALIGNMENT): Delete.
4420         * config/mcore/mcore.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
4421         constant_alignment_word_strings.
4422         * config/microblaze/microblaze.h (CONSTANT_ALIGNMENT): Delete.
4423         * config/microblaze/microblaze.c (microblaze_constant_alignment):
4424         New function.
4425         (TARGET_CONSTANT_ALIGNMENT): Redefine.
4426         * config/mips/mips.h (CONSTANT_ALIGNMENT): Delete.
4427         * config/mips/mips.c (mips_constant_alignment): New function.
4428         (TARGET_CONSTANT_ALIGNMENT): Redefine.
4429         * config/mmix/mmix.h (CONSTANT_ALIGNMENT): Delete.
4430         * config/mmix/mmix-protos.h (mmix_constant_alignment): Delete.
4431         * config/mmix/mmix.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
4432         (mmix_constant_alignment): Make static.  Use the same interface
4433         as the target hook.
4434         * config/moxie/moxie.h (CONSTANT_ALIGNMENT): Delete.
4435         * config/moxie/moxie.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
4436         constant_alignment_word_strings.
4437         * config/nios2/nios2.h (CONSTANT_ALIGNMENT): Delete.
4438         * config/nios2/nios2.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
4439         constant_alignment_word_strings.
4440         * config/pa/pa.h (CONSTANT_ALIGNMENT): Delete.
4441         * config/pa/pa.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
4442         constant_alignment_word_strings.
4443         * config/powerpcspe/powerpcspe.h (CONSTANT_ALIGNMENT): Delete.
4444         * config/powerpcspe/powerpcspe.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
4445         (rs6000_constant_alignment): New function.
4446         * config/riscv/riscv.h (CONSTANT_ALIGNMENT): Delete.
4447         * config/riscv/riscv.c (riscv_constant_alignment): New function.
4448         (TARGET_CONSTANT_ALIGNMENT): Redefine.
4449         * config/rs6000/rs6000.h (CONSTANT_ALIGNMENT): Delete.
4450         * config/rs6000/rs6000.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
4451         (rs6000_constant_alignment): New function.
4452         * config/s390/s390.h (CONSTANT_ALIGNMENT): Delete.
4453         * config/s390/s390.c (s390_constant_alignment): New function.
4454         (TARGET_CONSTANT_ALIGNMENT): Redefine.
4455         * config/sh/sh.h (CONSTANT_ALIGNMENT): Delete.
4456         * config/sh/sh.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
4457         constant_alignment_word_strings.
4458         * config/sparc/sparc.h (CONSTANT_ALIGNMENT): Delete.
4459         * config/sparc/sparc.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
4460         (sparc_constant_alignment): New function.
4461         * config/spu/spu.h (CONSTANT_ALIGNMENT): Delete.
4462         * config/spu/spu.c (spu_constant_alignment): New function.
4463         (TARGET_CONSTANT_ALIGNMENT): Redefine.
4464         * config/stormy16/stormy16.h (CONSTANT_ALIGNMENT): Delete.
4465         * config/stormy16/stormy16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
4466         constant_alignment_word_strings.
4467         * config/tilegx/tilegx.h (CONSTANT_ALIGNMENT): Delete.
4468         * config/tilegx/tilegx.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
4469         constant_alignment_word_strings.
4470         * config/tilepro/tilepro.h (CONSTANT_ALIGNMENT): Delete.
4471         * config/tilepro/tilepro.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
4472         constant_alignment_word_strings.
4473         * config/visium/visium.h (CONSTANT_ALIGNMENT): Delete.
4474         * config/visium/visium.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
4475         (visium_constant_alignment): New function.
4476         * config/xtensa/xtensa.h (CONSTANT_ALIGNMENT): Delete.
4477         * config/xtensa/xtensa.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
4478         (xtensa_constant_alignment): New function.
4479         * system.h (CONSTANT_ALIGNMENT): Poison.
4481 2017-09-25  Will Schmidt  <will_schmidt@vnet.ibm.com>
4483         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
4484         for early folding of vector stores (ALTIVEC_BUILTIN_ST_*).
4485         (rs6000_builtin_valid_without_lhs): New helper function.
4486         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
4487         Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_ST.
4489 2017-09-25  Richard Sandiford  <richard.sandiford@linaro.org>
4491         * target.h (vec_perm_indices): Use unsigned short rather than
4492         unsigned char.
4493         (auto_vec_perm_indices): Likewise.
4494         * config/aarch64/aarch64.c (aarch64_vectorize_vec_perm_const_ok):
4495         Use unsigned int rather than unsigned char.
4496         * config/arm/arm.c (arm_vectorize_vec_perm_const_ok): Likewise.
4498 2017-09-25  Richard Biener  <rguenther@suse.de>
4500         * cfgloop.h (sort_sibling_loops): Declare.
4501         * cfgloop.c (sort_sibling_loops_cmp): New helper.
4502         (sort_sibling_loops): New function sorting the sibling loop list
4503         in RPO order.
4504         * graphite.c (graphite_transform_loops): Sort sibling loops.
4506 2017-09-25  Richard Sandiford  <richard.sandifird@linaro.org>
4508         * target.def (vec_perm_const_ok): Change sel parameter to
4509         vec_perm_indices.
4510         * optabs-query.c (can_vec_perm_p): Update accordingly.
4511         * doc/tm.texi: Regenerate.
4512         * config/aarch64/aarch64.c (expand_vec_perm_d): Change perm to
4513         auto_vec_perm_indices and remove separate nelt field.
4514         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
4515         (aarch64_evpc_ext, aarch64_evpc_rev, aarch64_evpc_dup)
4516         (aarch64_evpc_tbl, aarch64_expand_vec_perm_const_1)
4517         (aarch64_expand_vec_perm_const): Update accordingly.
4518         (aarch64_vectorize_vec_perm_const_ok): Likewise.  Change sel
4519         to vec_perm_indices.
4520         * config/arm/arm.c (expand_vec_perm_d): Change perm to
4521         auto_vec_perm_indices and remove separate nelt field.
4522         (arm_evpc_neon_vuzp, arm_evpc_neon_vzip, arm_evpc_neon_vrev)
4523         (arm_evpc_neon_vtrn, arm_evpc_neon_vext, arm_evpc_neon_vtbl)
4524         (arm_expand_vec_perm_const_1, arm_expand_vec_perm_const): Update
4525         accordingly.
4526         (arm_vectorize_vec_perm_const_ok): Likewise.  Change sel
4527         to vec_perm_indices.
4528         * config/i386/i386.c (ix86_vectorize_vec_perm_const_ok): Change
4529         sel to vec_perm_indices.
4530         * config/ia64/ia64.c (ia64_vectorize_vec_perm_const_ok): Likewise.
4531         * config/mips/mips.c (mips_vectorize_vec_perm_const_ok): Likewise.
4532         * config/powerpcspe/powerpcspe.c (rs6000_vectorize_vec_perm_const_ok):
4533         Likewise.
4534         * config/rs6000/rs6000.c (rs6000_vectorize_vec_perm_const_ok):
4535         Likewise.
4537 2017-09-25  Pierre-Marie de Rodat  <derodat@adacore.com>
4539         PR debug/82155
4540         * dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl
4541         on the FUNCTION_DECL function context if it has a DIE that is a
4542         declaration.
4544 2017-09-25  Richard Biener  <rguenther@suse.de>
4546         PR tree-optimization/82285
4547         * tree-vect-patterns.c (vect_recog_bool_pattern): Also handle
4548         enumeral types.
4550 2017-09-25  Tom de Vries  <tom@codesourcery.com>
4552         PR target/80035
4553         PR target/81069
4554         * config/nvptx/nvptx.c (nvptx_output_call_insn): Add exit after call to
4555         noreturn function.
4557 2017-09-25  Richard Biener  <rguenther@suse.de>
4559         * graphite-optimize-isl.c (optimize_isl): Fail and dump if
4560         ISL errors other than isl_error_quota happen.  Dump if the
4561         schedule is the same.
4562         * graphite-sese-to-poly.c (build_poly_scop): Fail on ISL
4563         errors instead of aborting inside ISL.
4565 2017-09-25  Iain Sandoe  <iain@codesourcery.com>
4567         PR target/80556
4568         * config/i386/darwin.h (REAL_LIB_SPEC): New; put libSystem ahead
4569         of libgcc_eh for m64.
4570         * config/i386/darwin64.h: Likewise.
4572 2017-09-25  Richard Biener  <rguenther@suse.de>
4574         PR middle-end/82144
4575         * dwarf2out.c (gen_enumeration_type_die): Do not add alignment
4576         attribute for incomplete types nor twice for complete ones.
4578 2017-09-24  Uros Bizjak  <ubizjak@gmail.com>
4580         PR target/82267
4581         * config/i386/i386.c (ix86_print_operand_address_as): Encode
4582         %esp as %rsp to avoid 0x67 prefix if there is no index or base
4583         register.
4585 2017-09-23  Uros Bizjak  <ubizjak@gmail.com>
4587         PR bootstrap/82306
4588         * config/i386/i386.opt (mprefer-avx256): Use
4589         ix86_target_flags variable.
4590         * config/i386/i386.c (ix86_target_string): Move
4591         -mprefer-avx256 to flag2_opts.
4593 2017-09-22  Jakub Jelinek  <jakub@redhat.com>
4595         PR middle-end/35691
4596         * match.pd: Simplify x == -1 & y == -1 into (x & y) == -1
4597         and x != -1 | y != -1 into (x & y) != -1.
4599 2017-09-22  Steve Ellcey  <sellcey@cavium.com>
4601         * config.gcc: Add new case statement to set
4602         default_gnu_indirect_function.  Remove it from x86_64-*-linux*,
4603         i[34567]86-*, powerpc*-*-linux*spe*, powerpc*-*-linux*, s390-*-linux*,
4604         s390x-*-linux* case statements.   Added aarch64 to the list of
4605         supported architectures.
4607 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
4609         PR tree-optimization/82289
4610         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Check
4611         STMT_VINFO_RELEVANT_P.
4613 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
4614             Alan Hayward  <alan.hayward@arm.com>
4615             David Sherwood  <david.sherwood@arm.com>
4617         * tree-vrp.c (extract_range_from_multiplicative_op_1): Assert
4618         for VR_RANGE only; don't allow VR_ANTI_RANGE.
4619         (extract_range_from_binary_expr_1): Don't call
4620         extract_range_from_multiplicative_op_1 if !range_int_cst_p.
4622 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
4623             Alan Hayward  <alan.hayward@arm.com>
4624             David Sherwood  <david.sherwood@arm.com>
4626         * target.def (preferred_vector_alignment): New hook.
4627         * doc/tm.texi.in (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): New
4628         hook.
4629         * doc/tm.texi: Regenerate.
4630         * targhooks.h (default_preferred_vector_alignment): Declare.
4631         * targhooks.c (default_preferred_vector_alignment): New function.
4632         * tree-vectorizer.h (dataref_aux): Add a target_alignment field.
4633         Expand commentary.
4634         (DR_TARGET_ALIGNMENT): New macro.
4635         (aligned_access_p): Update commentary.
4636         (vect_known_alignment_in_bytes): New function.
4637         * tree-vect-data-refs.c (vect_calculate_required_alignment): New
4638         function.
4639         (vect_compute_data_ref_alignment): Set DR_TARGET_ALIGNMENT.
4640         Calculate the misalignment based on the target alignment rather than
4641         the vector size.
4642         (vect_update_misalignment_for_peel): Use DR_TARGET_ALIGMENT
4643         rather than TYPE_ALIGN / BITS_PER_UNIT to update the misalignment.
4644         (vect_enhance_data_refs_alignment): Mask the byte misalignment with
4645         the target alignment, rather than masking the element misalignment
4646         with the number of elements in a vector.  Also use the target
4647         alignment when calculating the maximum number of peels.
4648         (vect_find_same_alignment_drs): Use vect_calculate_required_alignment
4649         instead of TYPE_ALIGN_UNIT.
4650         (vect_duplicate_ssa_name_ptr_info): Remove stmt_info parameter.
4651         Measure DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT.
4652         (vect_create_addr_base_for_vector_ref): Update call accordingly.
4653         (vect_create_data_ref_ptr): Likewise.
4654         (vect_setup_realignment): Realign by ANDing with
4655         -DR_TARGET_MISALIGNMENT.
4656         * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Calculate
4657         the number of peels based on DR_TARGET_ALIGNMENT.
4658         * tree-vect-stmts.c (get_group_load_store_type): Compare the gap
4659         with the guaranteed alignment boundary when deciding whether
4660         overrun is OK.
4661         (vectorizable_mask_load_store): Interpret DR_MISALIGNMENT
4662         relative to DR_TARGET_ALIGNMENT instead of TYPE_ALIGN_UNIT.
4663         (ensure_base_align): Remove stmt_info parameter.  Get the
4664         target base alignment from DR_TARGET_ALIGNMENT.
4665         (vectorizable_store): Update call accordingly.   Interpret
4666         DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT instead of
4667         TYPE_ALIGN_UNIT.
4668         (vectorizable_load): Likewise.
4670 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
4671             Alan Hayward  <alan.hayward@arm.com>
4672             David Sherwood  <david.sherwood@arm.com>
4674         * tree-vectorizer.h (vect_get_scalar_dr_size): New function.
4675         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Use it.
4676         (vect_enhance_data_refs_alignment): Likewise.
4678 2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>
4680         * config/arm/parsecpu.awk (fatal): Note that we've encountered an
4681         error.  Only quit immediately if parsing is complete.
4682         (BEGIN): Initialize fatal_err and parse_done.
4683         (begin fpu, end fpu): Check number of arguments.
4684         (begin arch, end arch): Likewise.
4685         (begin cpu, end cpu): Likewise.
4686         (cname, tune for, tune flags, architecture, fpu, option): Likewise.
4687         (optalias): Likewise.
4689 2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>
4691         * config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
4692         * config/arm/arm-isa.h: Delete.  Move definitions to ...
4693         * arm-cpus.in: ... here.  Use new feature and fgroup values.
4694         * config/arm/arm.c (arm_option_override): Use lower case for feature
4695         bit names.
4696         * config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
4697         (TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
4698         * config/arm/parsecpu.awk (END): Add new command 'isa'.
4699         (isa_pfx): Delete.
4700         (print_isa_bits_for): New function.
4701         (gen_isa): New function.
4702         (gen_comm_data): Use print_isa_bits_for.
4703         (define feature): New keyword.
4704         (define fgroup): New keyword.
4705         * config/arm/t-arm (TM_H): Remove.
4706         (GTM_H): Add arm-isa.h.
4707         (arm-isa.h): Add rule to generate file.
4708         * common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
4709         case for feature bit names.
4711 2017-09-22  Richard Biener  <rguenther@suse.de>
4713         * graphite-isl-ast-to-gimple.c (graphite_verify): Inline into
4714         single caller.
4715         (graphite_regenerate_ast_isl): Do not reset SCEV.  Move debug
4716         print of no dependency loops ...
4717         * graphite.c (graphite_transform_loops): ... here.
4718         (canonicalize_loop_closed_ssa_form): Work from inner to outer
4719         loops.
4720         (same_close_phi_node, remove_duplicate_close_phi,
4721         make_close_phi_nodes_unique, defined_in_loop_p): Fold into ...
4722         (canonicalize_loop_closed_ssa): ... here and simplify.
4723         * graphite-optimize-isl.c: Include tree-vectorizer.h.
4724         (optimize_isl): Use dump_printf_loc to tell when we stopped
4725         optimizing because of an ISL timeout.
4727 2017-09-22  Richard Biener  <rguenther@suse.de>
4729         PR tree-optimization/82291
4730         * tree-if-conv.c (predicate_mem_writes): Make sure to
4731         remove writes in blocks predicated with false.
4733 2017-09-22  Richard Biener  <rguenther@suse.de>
4735         * sese.c: Include cfganal.h.
4736         (if_region_set_false_region): Remove.
4737         (create_if_region_on_edge): Likewise.
4738         (move_sese_in_condition): Re-implement without destroying
4739         dominators.
4741 2017-09-22  Richard Biener  <rguenther@suse.de>
4743         * graphite-isl-ast-to-gimple.c (translate_pending_phi_nodes):
4744         Verify both BBs contain loop PHI nodes before dispatching to
4745         copy_loop_phi_args.
4746         (graphite_regenerate_ast_isl): Do not recompute dominators,
4747         do not verify three times.  Restructure for clarity.
4748         * graphite-scop-detection.c (same_close_phi_node,
4749         remove_duplicate_close_phi, make_close_phi_nodes_unique,
4750         defined_in_loop_p, canonicalize_loop_closed_ssa,
4751         canonicalize_loop_closed_ssa_form): Simplify, remove excess
4752         checking and SSA rewrite, move to ...
4753         * graphite.c: ... here.  Include ssa.h and tree-ssa-loop-manip.h.
4754         (graphite_initialize): Do not pass in ctx, do not reset the
4755         SCEV cache, compute only dominators.
4756         (graphite_transform_loops): Allocate ISL ctx after
4757         graphite_initialize.  Call canonicalize_loop_closed_ssa_form.
4758         Maintain post-dominators only around build_scops.
4759         * sese.c (if_region_set_false_region): Make static.  Free
4760         and recompute dominators.
4761         (move_sese_in_condition): Assert we don't get called with
4762         post-dominators computed.
4763         * sese.h (if_region_set_false_region): Remove.
4765 2017-09-22  Sergey Shalnov  <sergey.shalnov@intel.com>
4767         * config/i386/sse.md ("mov<mode>_internal"): Use <sseinsnmode>
4768         mode attribute for TARGET_AVX512VL.
4770 2017-09-21  Sergey Shalnov  <sergey.shalnov@intel.com>
4772         * config/i386/i386.opt (mprefer-avx256): New option.
4773         * config/i386/i386.c (ix86_target_string): Add -mprefer-avx256
4774         to flag_opts.
4775         (ix86_preferred_simd_mode): Return 256-bit AVX modes
4776         for TARGET_PREFER_AVX256.
4777         * doc/invoke.texi (x86 Options): Document -mprefer-avx256.
4779 2017-09-21  Jeff Law  <law@redhat.com>
4781         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash):
4782         Fix dump output if the only stack space is for pushed registers.
4784 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
4786         * config/spu/spu.c (spu_sched_adjust_cost): Update after renaming
4787         of insn_cost.
4789 2017-09-21  Martin Sebor  <msebor@redhat.com>
4791         PR c/81882
4792         * doc/extend.texi (attribute ifunc): Avoid relying on ill-formed
4793         code (in C++) or code that triggers warnings.
4795 2017-09-21  Eric Botcazou  <ebotcazou@adacore.com>
4797         * stor-layout.c (bit_from_pos): Do not distribute the conversion.
4799 2017-09-21  Segher Boessenkool  <segher@kernel.crashing.org>
4801         * haifa-sched.c: Rename insn_cost to insn_sched_cost.
4802         * sched-rgn.c: Ditto.
4803         * sel-sched-ir.c: Ditto.
4805 2017-09-21  Alexander Monakov  <amonakov@ispras.ru>
4807         * toplev.h (set_random_seed): Adjust return type.
4808         * toplev.c (init_local_tick): Move eager initialization of random_seed
4809         to get_random_seed.  Adjust comment.
4810         (init_random_seed): Inline to get_random_seed, delete.
4811         (get_random_seed): Initialize random_seed lazily.
4812         (set_random_seed): Do not return previous value.
4813         (print_switch_value): Do not call get_random_seed.
4815 2017-09-21  Evgeny Kudryashov  <kudryashov@ispras.ru>
4817         * cgraph.c (delete_function_version): New, broken out from...
4818         (cgraph_node::delete_function_version): ...here.  Rename to
4819         cgraph_node::delete_function_version_by_decl.  Update all uses.
4820         (cgraph_node::remove): Call delete_function_version.
4822 2017-09-21  Jakub Jelinek  <jakub@redhat.com>
4824         PR sanitizer/81715
4825         * tree-inline.c (expand_call_inline): Emit clobber stmts for
4826         VAR_DECLs to which addressable non-volatile parameters are mapped
4827         and for id->retvar after the return value assignment.  Clear
4828         id->retval and id->retbnd after inlining.
4830 2017-09-21  Richard Biener  <rguenther@suse.de>
4832         PR tree-optimization/82276
4833         PR tree-optimization/82244
4834         * tree-vrp.c (build_assert_expr_for): Set
4835         SSA_NAME_OCCURS_IN_ABNORMAL_PHI if the variable we assert on
4836         has it set.
4837         (remove_range_assertions): Revert earlier change.
4839 2017-09-21  Wilco Dijkstra  <wdijkstr@arm.com>
4841         PR target/71951
4842         * config/aarch64/aarch64.h (LIBGCC2_UNWIND_ATTRIBUTE): Define.
4844 2017-09-21  Richard Biener  <rguenther@suse.de>
4846         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
4847         Restore valid IL after code generation errors.
4848         * graphite.c (graphite_transform_loops): Diagnose code
4849         generation issues as MSG_MISSED_OPTIMIZATION and continue
4850         with processing SCOPs.
4852 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
4853             Alan Hayward  <alan.hayward@arm.com>
4854             David Sherwood  <david.sherwood@arm.com>
4856         * calls.c (compute_argument_addresses): Use simplify_gen_binary
4857         rather than choosing between plus_constant and gen_rtx_<CODE>.
4858         * expr.c (emit_push_insn): Likewise.
4859         (expand_expr_real_2): Likewise.
4861 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
4862             Alan Hayward  <alan.hayward@arm.com>
4863             David Sherwood  <david.sherwood@arm.com>
4865         * loop-unroll.c (split_iv): Call copy_rtx on the step.
4867 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
4868             Alan Hayward  <alan.hayward@arm.com>
4869             David Sherwood  <david.sherwood@arm.com>
4871         * tree.c (find_atomic_core_type): Check tree_fits_uhwi_p before
4872         calling tree_to_uhwi.
4874 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
4875             Alan Hayward  <alan.hayward@arm.com>
4876             David Sherwood  <david.sherwood@arm.com>
4878         * tree-ssa-ccp.c (get_value_for_expr): Use a positive test for
4879         INTEGER_CST rather than a negative test for ADDR_EXPR.
4881 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
4882             Alan Hayward  <alan.hayward@arm.com>
4883             David Sherwood  <david.sherwood@arm.com>
4885         * tree-vrp.c (extract_range_from_binary_expr_1): Check
4886         int_cst_rangeN before calling value_range_constant_singleton (&vrN).
4888 2017-09-21  Richard Biener  <rguenther@suse.de>
4890         PR tree-optimization/71351
4891         * graphite-isl-ast-to-gimple.c (translate_isl_ast_to_gimple::
4892         graphite_create_new_loop_guard): Remove, fold remaining parts
4893         into caller ...
4894         (translate_isl_ast_node_for): ... here and simplify.
4896 2017-09-21  Jakub Jelinek  <jakub@redhat.com>
4898         PR target/82260
4899         * config/i386/i386.md (*movqi_internal): Replace (=q,q) alternative
4900         with (=Q,Q), (=R,R) and (=r,r) alternatives, only enable the
4901         latter two for 64-bit, renumber alternatives, for -Os imov (=q,n)
4902         alternative always use QI mode, for -Os imov (=R,R) alternative
4903         always use SI mode, for imov (=Q,Q) or (=r,r) alternatives
4904         ignore -Os.
4906 2017-09-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4907             Jeff Law  <law@redhat.com>
4909         * config/s390/s390.c (MIN_UNROLL_PROBES): Define.
4910         (allocate_stack_space): New function, partially extracted from
4911         s390_emit_prologue.
4912         (s390_emit_prologue): Track offset to most recent stack probe.
4913         Code to allocate space moved into allocate_stack_space.
4914         Dump actions when no stack is allocated.
4915         (s390_prologue_plus_offset): New function.
4916         (s390_emit_stack_probe): Likewise.
4918 2017-09-20  Alexandre Oliva <aoliva@redhat.com>
4920         * common.opt (Wa, Wl, Wp, g, gz=): Add
4921         RejectNegative.
4922         (gno-column-info): Remove.
4923         (gcolumn-info): Drop RejectNegative.
4924         (gno-): New prefix.
4925         (gno-record-gcc-switches): Remove.
4926         (grecord-gcc-switches): Drop RejectNegative.
4927         (gno-split-dwarf): Remove.
4928         (gsplit-dwarf): Drop RejectNegative.
4929         (gno-strict-dwarf): Remove.
4930         (gstrict-dwarf): Drop RejectNegative.
4931         * config/darwin.opt (gfull, gused): Add RejectNegative.
4932         * dwarf2out.c (gen_producer_string): Drop
4933         gno-record-gcc-switches handler.
4934         * optc-gen.awk: Add g to prefixes with negative forms.
4935         * opts-common.c (remapping_prefix_p): New.
4936         (find_opt): Check it.
4937         (generate_canonical_option): Test g prefix.
4938         (option_map): Add -gno- mapping.
4939         (add_misspelling_candidates): Check remapping_prefix_p.
4941 2017-09-20  Jeff Law  <law@redhat.com>
4943         * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Fix
4944         thinko in stack clash protection support.
4946         * explow.c (compute_stack_clash_protection_loop_data): Use
4947         CONST_INT_P instead of explicit test.  Verify object is a
4948         CONST_INT_P before looking at INTVAL.
4949         (anti_adjust_stack_and_probe_stack_clash): Use CONST_INT_P
4950         instead of explicit test.
4952 2017-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
4954         PR target/77687
4955         * config/rs6000/rs6000.md (stack_restore_tie): Store to a scratch
4956         address instead of to r1 and r11.
4958 2017-09-20  Sebastian Peryt  <sebastian.peryt@intel.com>
4960         * config.gcc: Support "knm".
4961         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "knm".
4962         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
4963         PROCESSOR_KNM.
4964         * config/i386/i386.c (m_KNM): Define.
4965         (processor_target_table): Add "knm".
4966         (PTA_KNM): Define.
4967         (ix86_option_override_internal): Add "knm".
4968         (ix86_issue_rate): Add PROCESSOR_KNM.
4969         (ix86_adjust_cost): Ditto.
4970         (ia32_multipass_dfa_lookahead): Ditto.
4971         (get_builtin_code_for_version): Handle PROCESSOR_KNM.
4972         (fold_builtin_cpu): Add M_INTEL_KNM.
4973         * config/i386/i386.h (processor_costs): Define TARGET_KNM.
4974         (processor_type): Add PROCESSOR_KNM.
4975         * config/i386/x86-tune.def: Add m_KNM.
4976         * doc/invoke.texi: Add knm as x86 -march=/-mtune= CPU type.
4978 2017-09-20  Richard Biener  <rguenther@suse.de>
4980         PR tree-optimization/80213
4981         * graphite-scop-detection.c (trivially_empty_bb_p): Labels
4982         are allowed in empty BBs as well.
4983         (canonicalize_loop_closed_ssa): Also look for other complex
4984         edges.
4985         (scop_detection::get_sese): Include the loop-closed PHI block
4986         in loop SESEs.
4987         (scop_detection::merge_sese): Remove code adding extra blocks.
4988         (scop_detection::region_has_one_loop): Adjust for get_sese changes.
4989         (build_scops): Assert the final returned scop is invalid.
4991 2017-09-20  Richard Biener  <rguenther@suse.de>
4993         PR tree-optimization/82264
4994         * tree-ssa-sccvn.c (vn_phi_eq): Use safe_dyn_cast to check
4995         for GIMPLE_CONDs.
4996         (vn_phi_lookup): Likewise.
4997         (vn_phi_insert): Likewise.
4999 2017-09-20  Jakub Jelinek  <jakub@redhat.com>
5001         * dwarf2out.c (tree_add_const_value_attribute): For INTEGER_CST
5002         that fits into uhwi or shwi, add DW_AT_const_value regardless
5003         of early_dwarf without going through RTL, using add_AT_unsigned
5004         or add_AT_int.
5006         * dwarf2out.c (DEBUG_LTO_DWO_INFO_SECTION): Reorder defines.
5007         (DEBUG_LTO_ABBREV_SECTION): Likewise.
5008         (DEBUG_LTO_MACINFO_SECTION): Likewise.
5009         (DEBUG_MACRO_SECTION): Likewise.
5010         (DEBUG_LTO_MACRO_SECTION): Likewise.
5011         (DEBUG_STR_DWO_SECTION): Likewise.
5012         (DEBUG_LTO_STR_DWO_SECTION): Likewise.
5013         (DEBUG_LTO_LINE_SECTION): Drop .dwo suffix from the name.
5014         (DEBUG_LTO_DWO_LINE_SECTION): Define.
5015         (DEBUG_LTO_LINE_STR_SECTION): Define.
5016         (init_sections_and_labels): Initialize debug_line_str_section
5017         variable.  Initialize debug_loc_section for -gdwarf-5 to
5018         DEBUG_LOCLISTS_SECTION.  Formatting fixes.
5020 2017-09-20  Richard Biener  <rguenther@suse.de>
5022         * graphite-sese-to-poly.c (extract_affine): Properly handle
5023         POINTER_PLUS_EXPR, BIT_NOT_EXPR and conversion to signed.
5025 2017-09-20  Richard Biener  <rguenther@suse.de>
5027         PR tree-optimization/81373
5028         * graphite-scop-detection.c (build_cross_bb_scalars_def):
5029         Force SESE live-out defs to be handled even if they are
5030         scev_analyzable_p.
5032 2017-09-19  Jeff Law  <law@redhat.com>
5034         * combine-stack-adj.c (combine_stack_adjustments_for_block): Do
5035         nothing for stack adjustments with REG_STACK_CHECK.
5036         * sched-deps.c (parse_add_or_inc): Reject insns with
5037         REG_STACK_CHECK from dependency breaking.
5038         * config/i386/i386.c (pro_epilogue_adjust_stack): Return insn.
5039         (ix86_adjust_satck_and_probe_stack_clash): Add REG_STACK_NOTEs.
5040         * reg-notes.def (STACK_CHECK): New note.
5042         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): New.
5043         (ix86_expand_prologue): Dump stack clash info as needed.
5044         Call ix86_adjust_stack_and_probe_stack_clash as needed.
5046         * function.c (dump_stack_clash_frame_info): New function.
5047         * function.h (dump_stack_clash_frame_info): Prototype.
5048         (enum stack_clash_probes): New enum.
5050         * config/alpha/alpha.c (alpha_expand_prologue): Also check
5051         flag_stack_clash_protection.
5052         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Likewise.
5053         (arm_expand_prologue, thumb1_expand_prologue): Likewise.
5054         (arm_frame_pointer_required): Likewise.
5055         * config/ia64/ia64.c (ia64_compute_frame_size): Likewise.
5056         (ia64_expand_prologue): Likewise.
5057         * config/mips/mips.c (mips_expand_prologue): Likewise.
5058         * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Likewise.
5059         * config/sparc/sparc.c (sparc_expand_prologue): Likewise.
5060         (sparc_flat_expand_prologue): Likewise.
5061         * config/spu/spu.c (spu_expand_prologue): Likewise.
5063         * explow.c: Include "params.h".
5064         (anti_adjust_stack_and_probe_stack_clash): New function.
5065         (get_stack_check_protect): Likewise.
5066         (compute_stack_clash_protection_loop_data): Likewise.
5067         (emit_stack_clash_protection_loop_start): Likewise.
5068         (emit_stack_clash_protection_loop_end): Likewise.
5069         (allocate_dynamic_stack_space): Use get_stack_check_protect.
5070         Use anti_adjust_stack_and_probe_stack_clash.
5071         * explow.h (compute_stack_clash_protection_loop_data): Prototype.
5072         (emit_stack_clash_protection_loop_start): Likewise.
5073         (emit_stack_clash_protection_loop_end): Likewise.
5074         * rtl.h (get_stack_check_protect): Prototype.
5075         * target.def (stack_clash_protection_final_dynamic_probe): New hook.
5076         * targhooks.c (default_stack_clash_protection_final_dynamic_probe): New.
5077         * targhooks.h (default_stack_clash_protection_final_dynamic_probe):
5078         Prototype.
5079         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE):
5080         Add @hook.
5081         * doc/tm.texi: Rebuilt.
5082         * config/aarch64/aarch64.c (aarch64_expand_prologue): Use
5083         get_stack_check_protect.
5084         * config/alpha/alpha.c (alpha_expand_prologue): Likewise.
5085         * config/arm/arm.c (arm_expand_prologue): Likewise.
5086         (arm_frame_pointer_required): Likewise.
5087         * config/i386/i386.c (ix86_expand_prologue): Likewise.
5088         * config/ia64/ia64.c (ia64_expand_prologue): Likewise.
5089         * config/mips/mips.c (mips_expand_prologue): Likewise.
5090         * config/powerpcspe/powerpcspe.c (rs6000_emit_prologue): Likewise.
5091         * config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise.
5092         * config/sparc/sparc.c (sparc_expand_prologue): Likewise.
5093         (sparc_flat_expand_prologue): Likewise.
5095         * common.opt (-fstack-clash-protection): New option.
5096         * flag-types.h (enum stack_check_type): Note difference between
5097         -fstack-check= and -fstack-clash-protection.
5098         * params.def (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE): New PARAM.
5099         (PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Likewise.
5100         * toplev.c (process_options): Issue warnings/errors for cases
5101         not handled with -fstack-clash-protection.
5102         * doc/invoke.texi (-fstack-clash-protection): Document new option.
5103         (-fstack-check): Note additional problem with -fstack-check=generic.
5104         Note that -fstack-check is primarily for Ada and refer users
5105         to -fstack-clash-protection for stack-clash-protection.
5106         Document new params for stack clash protection.
5108 2017-09-19  Uros Bizjak  <ubizjak@gmail.com>
5110         * config/i386/i386.c (ix86_split_long_move): Do not handle
5111         address used for LEA in a special way.
5113 2017-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
5115         * simplify-rtx.c (simplify_binary_operation_1): Fix typo in comment.
5117 2017-09-19  Martin Sebor  <msebor@redhat.com>
5119         PR c/81854
5120         * cgraphunit.c (handle_alias_pairs): Reject aliases between functions
5121         of incompatible types.
5123 2017-09-19  Will Schmidt  <will_schmidt@vnet.ibm.com>
5125         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
5126         for early folding of vector loads (ALTIVEC_BUILTIN_LVX_*).
5127         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
5128         Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_LD.
5130 2017-09-19  Richard Biener  <rguenther@suse.de>
5132         PR tree-optimization/82244
5133         * tree-vrp.c (remove_range_assertions): Do not propagate
5134         a constant to abnormals but replace the assert with a copy.
5136 2017-09-19  Alexander Monakov  <amonakov@ispras.ru>
5138         PR rtl-optimization/57878
5139         PR rtl-optimization/68988
5140         * lra-assigns.c (reload_pseudo_compare_func): Remove fragmentation
5141         avoidance test involving non_reload_pseudos.  Move frequency test
5142         below the general fragmentation avoidance test.
5144 2017-09-19  Richard Biener  <rguenther@suse.de>
5146         PR tree-optimization/69728
5147         * graphite-sese-to-poly.c (schedule_error): New global.
5148         (add_loop_schedule): Handle empty domain by failing the
5149         schedule.
5150         (build_original_schedule): Handle schedule_error.
5152 2017-09-19  Richard Biener  <rguenther@suse.de>
5154         * graphite-scop-detection.c (scop_detection::can_represent_loop):
5155         Do not iterate to sibling loops but only to siblings of inner
5156         loops.
5158 2017-09-18  Andreas Schwab  <schwab@linux-m68k.org>
5160         PR target/81613
5161         * config/m68k/m68k.md (moveq feeding equality comparison): Check
5162         that the registers are different.
5164 2017-09-18  Uros Bizjak  <ubizjak@gmail.com>
5166         * config/i386/i386.c (fold_builtin_cpu): Add M_AMDFAM17H
5167         to processor_model and "amdfam17h" to arch_names_table.
5168         * doc/extend.texi (__builtin_cpu_is): Document amdfam17h CPU name.
5170 2017-09-18  Jakub Jelinek  <jakub@redhat.com>
5172         PR c/82234
5173         * doc/extend.texi: Add @findex entry for __builtin_shuffle.
5175 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
5176             Alan Hayward  <alan.hayward@arm.com>
5177             David Sherwood  <david.sherwood@arm.com>
5179         * tree-vectorizer.h (vect_slp_analyze_operations): Replace parameters
5180         with a vec_info *.
5181         * tree-vect-loop.c (vect_analyze_loop_operations): Update call
5182         accordingly.
5183         * tree-vect-slp.c (vect_slp_analyze_node_operations): Add vec_info *
5184         parameter.  Set SLP_TREE_NUMBER_OF_VEC_STMTS here rather than in
5185         vect_schedule_slp_instance.
5186         (vect_slp_analyze_operations): Replace parameters with a vec_info *.
5187         Update call to vect_slp_analyze_node_operations.  Simplify return
5188         value.
5189         (vect_slp_analyze_bb_1): Update call accordingly.
5190         (vect_schedule_slp_instance): Remove vectorization_factor parameter.
5191         Don't calculate SLP_TREE_NUMBER_OF_VEC_STMTS here.
5192         (vect_schedule_slp): Update call accordingly.
5194 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
5195             Alan Hayward  <alan.hayward@arm.com>
5196             David Sherwood  <david.sherwood@arm.com>
5198         * tree-vect-data-refs.c (vect_get_smallest_scalar_type): Cope
5199         with types that aren't in fact scalar.
5201 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
5203         * tree-vect-slp.c (vect_record_max_nunits): New function,
5204         split out from...
5205         (vect_build_slp_tree_1): ...here.
5206         (vect_build_slp_tree_2): Call it for phis too.
5208 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
5210         * tree-vect-stmts.c (vectorizable_mask_load_store): Pass mask_vectype
5211         to vect_get_vec_def_for_operand when getting the mask operand.
5213 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
5214             Alan Hayward  <alan.hayward@arm.com>
5215             David Sherwood  <david.sherwood@arm.com>
5217         * tree-vect-loop.c (vectorizable_live_operation): Fix type of
5218         bitstart.
5220 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
5221             Alan Hayward  <alan.hayward@arm.com>
5222             David Sherwood  <david.sherwood@arm.com>
5224         * tree-vect-loop.c (vectorizable_live_operation): Fix element size
5225         calculation for vector booleans.
5227 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
5228             Alan Hayward  <alan.hayward@arm.com>
5229             David Sherwood  <david.sherwood@arm.com>
5231         * tree-vect-stmts.c (can_vectorize_live_stmts): New function,
5232         split out from...
5233         (vect_transform_stmt): ...here.
5234         (vect_analyze_stmt): Use it instead of calling
5235         vectorizable_live_operation directly.
5237 2017-09-18  Cesar Philippidis  <cesar@codesourcery.com>
5239         * omp-offload.c (oacc_xform_loop): Enable SIMD vectorization on
5240         non-SIMT targets in acc vector loops.
5242 2017-09-18  Claudiu Zissulescu  <claziss@synopsys.com>
5244         * configure.ac: Add arc and check if assembler supports gdwarf2.
5245         * configure: Regenerate.
5247 2017-09-18  Richard Biener  <rguenther@suse.de>
5249         PR tree-optimization/82220
5250         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Exclude
5251         epilogue niters from the min_profitable_iters compute.
5253 2017-09-18  Jakub Jelinek  <jakub@redhat.com>
5255         PR target/82145
5256         * config/i386/i386.c (ix86_init_large_pic_reg): Revert 2017-09-01
5257         changes.  Turn CODE_LABEL into NOTE_INSN_DELETED_LABEL immediately.
5258         (ix86_init_pic_reg): Revert 2017-09-01 changes.
5260 2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
5262         PR target/81361
5263         * dwarf2cfi.c (add_cfis_to_fde): Do not generate DW_CFA_set_loc after
5264         switching to a new text section.
5266 2017-09-18  Richard Biener  <rguenther@suse.de>
5268         * graphite-scop-detection.c (scop_detection::stmt_has_simple_data_ref):
5269         Simplify.
5270         (build_alias_set): Reject aliases with no access function.
5272 2017-09-18  Richard Biener  <rguenther@suse.de>
5274         PR tree-optimization/79622
5275         * graphite-scop-detection.c (build_cross_bb_scalars_def): Properly
5276         handle PHIs.
5277         (build_cross_bb_scalars_use): Likewise.
5279 2017-09-18  Pierre-Marie de Rodat  <derodat@adacore.com>
5281         * cgraph.h (cgraph_thunk_info): Fix a typo in a comment.
5283 2017-09-18  Alan Modra  <amodra@gmail.com>
5285         PR target/81996
5286         * gcc/config/rs6000/rs6000.c (rs6000_return_addr): Use
5287         stack_pointer_rtx for count 0.  Update comments.  Break up
5288         large rtl expression.
5290 2017-09-17  Daniel Santos  <daniel.santos@pobox.com>
5292         * config/i386/i386.c (xlogue_layout::STUB_NAME_MAX_LEN):
5293         Increase to 20 bytes.
5294         (xlogue_layout::s_stub_names): Add an additional size-2 diminsion.
5295         (xlogue_layout::get_stub_name): Modify to select the appropairate sse
5296         or avx version of the stub.
5298 2017-09-17  H.J. Lu  <hongjiu.lu@intel.com>
5300         PR target/82166
5301         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Properly
5302         compute the minimum stack alignment.  Also update preferred stack
5303         boundary for leaf functions.
5305 2017-09-16  Richard Sandiford  <richard.sandiford@linaro.org>
5307         PR tree-optimization/82228
5308         * tree-vect-loop.c (vectorizable_live_operation): Move initialization
5309         of ncopies.
5311 2017-09-16  Chung-Ju Wu  <jasonwucj@gmail.com>
5313         * common/config/nds32/nds32-common.c
5314         (nds32_option_optimization_table): Refine formatting.
5315         (nds32_option_optimization_table): Use -fsched-pressure and
5316         -fomit-frame-pointer for specific optimization level.
5318 2017-09-16  Chung-Ju Wu  <jasonwucj@gmail.com>
5320         * config/nds32/nds32.c: Refine formatting and comments.
5321         * config/nds32/nds32.h: Likewise.
5322         * config/nds32/nds32.md: Likewise.
5323         * config/nds32/nds32-cost.c: Likewise.
5324         * config/nds32/nds32-isr.c: Likewise.
5325         * config/nds32/nds32-md-auxiliary.c: Likewise.
5326         * config/nds32/nds32-multiple.md: Likewise.
5327         * config/nds32/nds32-predicates.c: Likewise.
5329 2017-09-15  Andrew Sutton  <andrew.n.sutton@gmail.com>
5330             Jakub Jelinek  <jakub@redhat.com>
5332         Add support for -std=c++2a.
5333         * doc/cpp.texi (__cplusplus): Document value for -std=c++2a
5334         or -std=gnu+2a.
5335         * doc/invoke.texi: Document -std=c++2a and -std=gnu++2a.
5337 2017-09-15  Steve Ellcey  <sellcey@cavium.com>
5339         PR target/82066
5340         * doc/extend.texi (Common Function Attributes): Add 
5341         references to ARM, AArch64, and S/390 specific attributes.
5342         (Function Specific Option Pragmas): Add AArch64 and S/390
5343         to list of back ends that support the target pragma.
5345 2017-09-15  Nathan Sidwell  <nathan@acm.org>
5347         * doc/standards.texi: Fix C++17 description.  Update URLs for
5348         C++11 & 14.
5350 2017-09-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5352         * common.opt (Wcast-align=strict): New warning option.
5353         * doc/invoke.texi: Document -Wcast-align=strict. 
5355 2017-09-15  Pierre-Marie de Rodat  <derodat@adacore.com>
5357         * cgraph.h (cgraph_thunk_info): Add comments.
5358         * cgraph.c (cgraph_node::create_thunk): Adjust comment, make
5359         assert for VIRTUAL_* arguments stricter.
5361 2017-09-15  Jackson Woodruff  <jackson.woodruff@arm.com>
5363         PR tree-optimization/71026
5364         * match.pd: Move RDIV patterns from fold-const.c
5365         * fold-const.c (distribute_real_division): Removed.
5366         (fold_binary_loc): Remove calls to distribute_real_divison.
5368 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
5370         * doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document
5371         c++1z and gnu++1z as deprecated.  Change other references to
5372         -std=c++1z to -std=c++17 and -std=gnu++1z to -std=gnu++17.
5373         Change -Wc++1z-compat to -Wc++17-compat.
5374         * doc/cpp.texi: Document -std=c++17 defines __cplusplus 201703L.
5375         * dwarf2out.c (highest_c_language): Handle C++17.
5376         (gen_compile_unit_die): Likewise.
5378 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
5380         PR rtl-optimization/82192
5381         * combine.c (make_extraction): Don't look through non-paradoxical
5382         SUBREGs or TRUNCATE if pos + len is or might be bigger than
5383         inner's mode.
5385 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
5386             Alan Hayward  <alan.hayward@arm.com>
5387             David Sherwood  <david.sherwood@arm.com>
5389         * target.def (function_arg_offset): New hook.
5390         * targhooks.h (default_function_arg_offset): Declare.
5391         * targhooks.c (default_function_arg_offset): New function.
5392         * function.c (locate_and_pad_parm): Use
5393         targetm.calls.function_arg_offset instead of FUNCTION_ARG_OFFSET.
5394         * doc/tm.texi.in (FUNCTION_ARG_OFFSET): Replace with...
5395         (TARGET_FUNCTION_ARG_OFFSET): ...this.
5396         * doc/tm.texi: Regenerate.
5397         * config/spu/spu.h (FUNCTION_ARG_OFFSET): Delete.
5398         * config/spu/spu.c (spu_function_arg_offset): New function.
5399         (TARGET_FUNCTION_ARG_OFFSET): Redefine.
5400         * system.h (FUNCTION_ARG_OFFSET): Poison.
5402 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
5403             Alan Hayard  <alan.hayward@arm.com>
5404             David Sherwood  <david.sherwood@arm.com>
5406         * target.def (truly_noop_truncation): New hook.
5407         (mode_rep_extended): Refer to TARGET_TRULY_NOOP_TRUNCATION rather
5408         than TRULY_NOOP_TRUNCATION.
5409         * hooks.h (hook_bool_uint_uint_true): Declare.
5410         * hooks.c (hook_bool_uint_uint_true): New function.
5411         * doc/tm.texi.in (TRULY_NOOP_TRUNCATION): Replace with...
5412         (TARGET_TRULY_NOOP_TRUNCATION): ...this.
5413         * doc/tm.texi: Regenerate.
5414         * combine.c (make_extraction): Refer to TARGET_TRULY_NOOP_TRUNCATION
5415         rather than TRULY_NOOP_TRUNCATION in comments.
5416         (simplify_comparison): Likewise.
5417         (record_truncated_value): Likewise.
5418         * expmed.c (extract_bit_field_1): Likewise.
5419         (extract_split_bit_field): Likewise.
5420         * convert.c (convert_to_integer_1): Use targetm.truly_noop_truncation
5421         instead of TRULY_NOOP_TRUNCATION.
5422         * function.c (assign_parm_setup_block): Likewise.
5423         * machmode.h (TRULY_NOOP_TRUNCATION_MODES_P): Likewise.
5424         * rtlhooks.c: Include target.h.
5425         * config/aarch64/aarch64.h (TRULY_NOOP_TRUNCATION): Delete.
5426         * config/alpha/alpha.h (TRULY_NOOP_TRUNCATION): Delete.
5427         * config/arc/arc.h (TRULY_NOOP_TRUNCATION): Delete.
5428         * config/arm/arm.h (TRULY_NOOP_TRUNCATION): Delete.
5429         * config/avr/avr.h (TRULY_NOOP_TRUNCATION): Delete.
5430         * config/bfin/bfin.h (TRULY_NOOP_TRUNCATION): Delete.
5431         * config/c6x/c6x.h (TRULY_NOOP_TRUNCATION): Delete.
5432         * config/cr16/cr16.h (TRULY_NOOP_TRUNCATION): Delete.
5433         * config/cris/cris.h (TRULY_NOOP_TRUNCATION): Delete.
5434         * config/epiphany/epiphany.h (TRULY_NOOP_TRUNCATION): Delete.
5435         * config/fr30/fr30.h (TRULY_NOOP_TRUNCATION): Delete.
5436         * config/frv/frv.h (TRULY_NOOP_TRUNCATION): Delete.
5437         * config/ft32/ft32.h (TRULY_NOOP_TRUNCATION): Delete.
5438         * config/h8300/h8300.h (TRULY_NOOP_TRUNCATION): Delete.
5439         * config/i386/i386.h (TRULY_NOOP_TRUNCATION): Delete.
5440         * config/ia64/ia64.h (TRULY_NOOP_TRUNCATION): Delete.
5441         * config/iq2000/iq2000.h (TRULY_NOOP_TRUNCATION): Delete.
5442         * config/lm32/lm32.h (TRULY_NOOP_TRUNCATION): Delete.
5443         * config/m32c/m32c.h (TRULY_NOOP_TRUNCATION): Delete.
5444         * config/m32r/m32r.h (TRULY_NOOP_TRUNCATION): Delete.
5445         * config/m68k/m68k.h (TRULY_NOOP_TRUNCATION): Delete.
5446         * config/mcore/mcore.h (TRULY_NOOP_TRUNCATION): Delete.
5447         * config/microblaze/microblaze.h (TRULY_NOOP_TRUNCATION): Delete.
5448         * config/mips/mips.h (TRULY_NOOP_TRUNCATION): Delete.
5449         * config/mips/mips.c (mips_truly_noop_truncation): New function.
5450         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
5451         * config/mips/mips.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
5452         rather than TRULY_NOOP_TRUNCATION in comments.
5453         * config/mmix/mmix.h (TRULY_NOOP_TRUNCATION): Delete.
5454         * config/mn10300/mn10300.h (TRULY_NOOP_TRUNCATION): Delete.
5455         * config/moxie/moxie.h (TRULY_NOOP_TRUNCATION): Delete.
5456         * config/msp430/msp430.h (TRULY_NOOP_TRUNCATION): Delete.
5457         * config/nds32/nds32.h (TRULY_NOOP_TRUNCATION): Delete.
5458         * config/nios2/nios2.h (TRULY_NOOP_TRUNCATION): Delete.
5459         * config/nvptx/nvptx.h (TRULY_NOOP_TRUNCATION): Delete.
5460         * config/pa/pa.h (TRULY_NOOP_TRUNCATION): Delete.
5461         * config/pdp11/pdp11.h (TRULY_NOOP_TRUNCATION): Delete.
5462         * config/powerpcspe/powerpcspe.h (TRULY_NOOP_TRUNCATION): Delete.
5463         * config/riscv/riscv.h (TRULY_NOOP_TRUNCATION): Delete.
5464         * config/riscv/riscv.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
5465         rather than TRULY_NOOP_TRUNCATION in comments.
5466         * config/rl78/rl78.h (TRULY_NOOP_TRUNCATION): Delete.
5467         * config/rs6000/rs6000.h (TRULY_NOOP_TRUNCATION): Delete.
5468         * config/rx/rx.h (TRULY_NOOP_TRUNCATION): Delete.
5469         * config/s390/s390.h (TRULY_NOOP_TRUNCATION): Delete.
5470         * config/sh/sh.h (MAYBE_BASE_REGISTER_RTX_P): Remove
5471         TRULY_NOOP_TRUNCATION condition.
5472         (MAYBE_INDEX_REGISTER_RTX_P): Likewise.
5473         (TRULY_NOOP_TRUNCATION): Delete.
5474         * config/sparc/sparc.h (TRULY_NOOP_TRUNCATION): Delete.
5475         * config/spu/spu.h (TRULY_NOOP_TRUNCATION): Delete.
5476         * config/spu/spu.c (spu_truly_noop_truncation): New function.
5477         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
5478         * config/stormy16/stormy16.h (TRULY_NOOP_TRUNCATION): Delete.
5479         * config/tilegx/tilegx.h (TRULY_NOOP_TRUNCATION): Delete.
5480         * config/tilegx/tilegx.c (tilegx_truly_noop_truncation): New fuction.
5481         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
5482         * config/tilegx/tilegx.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
5483         rather than TRULY_NOOP_TRUNCATION in comments.
5484         * config/tilepro/tilepro.h (TRULY_NOOP_TRUNCATION): Delete.
5485         * config/v850/v850.h (TRULY_NOOP_TRUNCATION): Delete.
5486         * config/vax/vax.h (TRULY_NOOP_TRUNCATION): Delete.
5487         * config/visium/visium.h (TRULY_NOOP_TRUNCATION): Delete.
5488         * config/xtensa/xtensa.h (TRULY_NOOP_TRUNCATION): Delete.
5489         * system.h (TRULY_NOOP_TRUNCATION): Poison.
5491 2017-09-15  Christophe Lyon  <christophe.lyon@linaro.org>
5493         PR target/67591
5494         * config/arm/arm.md (*cmp_and): Add enabled_for_depr_it attribute.
5495         (*cmp_ior): Likewise.
5496         (*ior_scc_scc): Add alternative for enabled_for_depr_it attribute.
5497         (*ior_scc_scc_cmp): Likewise.
5498         (*and_scc_scc): Likewise.
5499         (*and_scc_scc_cmp): Likewise.
5501 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
5502             Alan Hayard  <alan.hayward@arm.com>
5503             David Sherwood  <david.sherwood@arm.com>
5505         * target.def (can_change_mode_class): New hook.
5506         (mode_rep_extended): Refer to it instead of CANNOT_CHANGE_MODE_CLASS.
5507         (hard_regno_nregs): Likewise.
5508         * hooks.h (hook_bool_mode_mode_reg_class_t_true): Declare.
5509         * hooks.c (hook_bool_mode_mode_reg_class_t_true): New function.
5510         * doc/tm.texi.in (CANNOT_CHANGE_MODE_CLASS): Replace with...
5511         (TARGET_CAN_CHANGE_MODE_CLASS): ...this.
5512         (LOAD_EXTEND_OP): Update accordingly.
5513         * doc/tm.texi: Regenerate.
5514         * doc/rtl.texi: Refer to TARGET_CAN_CHANGE_MODE_CLASS instead of
5515         CANNOT_CHANGE_MODE_CLASS.
5516         * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): Replace with...
5517         (REG_CAN_CHANGE_MODE_P): ...this new macro.
5518         * combine.c (simplify_set): Update accordingly.
5519         * emit-rtl.c (validate_subreg): Likewise.
5520         * recog.c (general_operand): Likewise.
5521         * regcprop.c (mode_change_ok): Likewise.
5522         * reload1.c (choose_reload_regs): Likewise.
5523         (inherit_piecemeal_p): Likewise.
5524         * rtlanal.c (simplify_subreg_regno): Likewise.
5525         * postreload.c (reload_cse_simplify_set): Use REG_CAN_CHANGE_MODE_P
5526         instead of CANNOT_CHANGE_MODE_CLASS.
5527         (reload_cse_simplify_operands): Likewise.
5528         * reload.c (push_reload): Use targetm.can_change_mode_class
5529         instead of CANNOT_CHANGE_MODE_CLASS.
5530         (push_reload): Likewise.  Also use REG_CAN_CHANGE_MODE_P instead of
5531         REG_CANNOT_CHANGE_MODE_P.
5532         * config/alpha/alpha.h (CANNOT_CHANGE_MODE_CLASS): Delete.
5533         * config/alpha/alpha.c (alpha_can_change_mode_class): New function.
5534         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
5535         * config/arm/arm.h (CANNOT_CHANGE_MODE_CLASS): Delete.
5536         * config/arm/arm.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
5537         (arm_can_change_mode_class): New function.
5538         * config/arm/neon.md: Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
5539         than CANNOT_CHANGE_MODE_CLASS in comments.
5540         * config/i386/i386.h (CANNOT_CHANGE_MODE_CLASS): Delete.
5541         * config/i386/i386-protos.h (ix86_cannot_change_mode_class): Delete.
5542         * config/i386/i386.c (ix86_cannot_change_mode_class): Replace with...
5543         (ix86_can_change_mode_class): ...this new function, inverting the
5544         sense of the return value.
5545         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
5546         * config/ia64/ia64.h (CANNOT_CHANGE_MODE_CLASS): Delete.
5547         * config/ia64/ia64.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
5548         (ia64_can_change_mode_class): New function.
5549         * config/m32c/m32c.h (CANNOT_CHANGE_MODE_CLASS): Delete.
5550         * config/m32c/m32c-protos.h (m32c_cannot_change_mode_class): Delete.
5551         * config/m32c/m32c.c (m32c_cannot_change_mode_class): Replace with...
5552         (m32c_can_change_mode_class): ...this new function, inverting the
5553         sense of the return value.
5554         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
5555         * config/mips/mips.h (CANNOT_CHANGE_MODE_CLASS): Delete.
5556         * config/mips/mips-protos.h (mips_cannot_change_mode_class): Delete.
5557         * config/mips/mips.c (mips_cannot_change_mode_class): Replace with...
5558         (mips_can_change_mode_class): ...this new function, inverting the
5559         sense of the return value.
5560         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
5561         * config/msp430/msp430.h (CANNOT_CHANGE_MODE_CLASS): Delete.
5562         * config/msp430/msp430.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
5563         (msp430_can_change_mode_class): New function.
5564         * config/nvptx/nvptx.h (CANNOT_CHANGE_MODE_CLASS): Delete.
5565         * config/nvptx/nvptx.c (nvptx_can_change_mode_class): New function.
5566         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
5567         * config/pa/pa32-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
5568         * config/pa/pa64-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
5569         * config/pa/pa-protos.h (pa_cannot_change_mode_class): Delete.
5570         * config/pa/pa.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
5571         (pa_cannot_change_mode_class): Replace with...
5572         (pa_can_change_mode_class): ...this new function, inverting the
5573         sense of the return value.
5574         (pa_modes_tieable_p): Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
5575         than CANNOT_CHANGE_MODE_CLASS in comments.
5576         * config/pdp11/pdp11.h (CANNOT_CHANGE_MODE_CLASS): Delete.
5577         * config/pdp11/pdp11-protos.h (pdp11_cannot_change_mode_class): Delete.
5578         * config/pdp11/pdp11.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
5579         (pdp11_cannot_change_mode_class): Replace with...
5580         (pdp11_can_change_mode_class): ...this new function, inverting the
5581         sense of the return value.
5582         * config/powerpcspe/powerpcspe.h (CANNOT_CHANGE_MODE_CLASS): Delete.
5583         * config/powerpcspe/powerpcspe-protos.h
5584         (rs6000_cannot_change_mode_class_ptr): Delete.
5585         * config/powerpcspe/powerpcspe.c
5586         (rs6000_cannot_change_mode_class_ptr): Delete.
5587         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
5588         (rs6000_option_override_internal): Assign to
5589         targetm.can_change_mode_class instead of
5590         rs6000_cannot_change_mode_class_ptr.
5591         (rs6000_cannot_change_mode_class): Replace with...
5592         (rs6000_can_change_mode_class): ...this new function, inverting the
5593         sense of the return value.
5594         (rs6000_debug_cannot_change_mode_class): Replace with...
5595         (rs6000_debug_can_change_mode_class): ...this new function.
5596         * config/riscv/riscv.h (CANNOT_CHANGE_MODE_CLASS): Delete.
5597         * config/riscv/riscv.c (riscv_can_change_mode_class): New function.
5598         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
5599         * config/rs6000/rs6000.h (CANNOT_CHANGE_MODE_CLASS): Delete.
5600         * config/rs6000/rs6000-protos.h (rs6000_cannot_change_mode_class_ptr):
5601         Delete.
5602         * config/rs6000/rs6000.c (rs6000_cannot_change_mode_class_ptr): Delete.
5603         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
5604         (rs6000_option_override_internal): Assign to
5605         targetm.can_change_mode_class instead of
5606         rs6000_cannot_change_mode_class_ptr.
5607         (rs6000_cannot_change_mode_class): Replace with...
5608         (rs6000_can_change_mode_class): ...this new function, inverting the
5609         sense of the return value.
5610         (rs6000_debug_cannot_change_mode_class): Replace with...
5611         (rs6000_debug_can_change_mode_class): ...this new function.
5612         * config/s390/s390.h (CANNOT_CHANGE_MODE_CLASS): Delete.
5613         * config/s390/s390-protos.h (s390_cannot_change_mode_class): Delete.
5614         * config/s390/s390.c (s390_cannot_change_mode_class): Replace with...
5615         (s390_can_change_mode_class): ...this new function, inverting the
5616         sense of the return value.
5617         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
5618         * config/sh/sh.h (CANNOT_CHANGE_MODE_CLASS): Delete.
5619         * config/sh/sh-protos.h (sh_cannot_change_mode_class): Delete.
5620         * config/sh/sh.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
5621         (sh_cannot_change_mode_class): Replace with...
5622         (sh_can_change_mode_class): ...this new function, inverting the
5623         sense of the return value.
5624         * config/sparc/sparc.h (CANNOT_CHANGE_MODE_CLASS): Delete.
5625         * config/sparc/sparc.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
5626         (sparc_can_change_mode_class): New function.
5627         * config/spu/spu.h (CANNOT_CHANGE_MODE_CLASS): Delete.
5628         * config/spu/spu.c (spu_can_change_mode_class): New function.
5629         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
5630         * config/visium/visium.h (CANNOT_CHANGE_MODE_CLASS): Delete.
5631         * config/visium/visium.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
5632         (visium_can_change_mode_class): New function.
5633         * system.h (CANNOT_CHANGE_MODE_CLASS): Poison.
5635 2017-09-15  Richard Biener  <rguenther@suse.de>
5637         PR tree-optimization/82217
5638         * tree-ssa-sccvn.c (visit_phi): Properly handle all VN_TOP
5639         but not undefined case.
5641 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
5643         PR target/82145
5644         * postreload.c (reload_cse_simplify_operands): Skip
5645         NOTE_INSN_DELETED_LABEL similarly to skipping CODE_LABEL.
5647 2017-09-15  Richard Biener  <rguenther@suse.de>
5649         PR tree-optimization/68823
5650         * graphite-scop-detection.c (build_alias_set): If we have a
5651         possible dependence check whether we can handle them by just
5652         looking at the DRs DR_ACCESS_FNs.
5653         (build_scops): If build_alias_set fails, fail the SCOP.
5655 2017-09-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
5657         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_1_HW): New macros
5658         to support float128 built-in functions that require the ISA 3.0
5659         hardware.
5660         (BU_FLOAT128_3_HW): Likewise.
5661         (SQRTF128): Add support for the IEEE 128-bit square root and fma
5662         built-in functions.
5663         (FMAF128): Likewise.
5664         (FMAQ): Likewise.
5665         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
5666         support for built-in functions that need the ISA 3.0 IEEE 128-bit
5667         floating point instructions.
5668         (rs6000_invalid_builtin): Likewise.
5669         (rs6000_builtin_mask_names): Likewise.
5670         * config/rs6000/rs6000.h (MASK_FLOAT128_HW): Likewise.
5671         (RS6000_BTM_FLOAT128_HW): Likewise.
5672         (RS6000_BTM_COMMON): Likewise.
5673         * config/rs6000/rs6000.md (fma<mode>4_hw): Add a generator
5674         function.
5675         * doc/extend.texi (RS/6000 built-in functions): Document the
5676         IEEE 128-bit floating point square root and fused multiply-add
5677         built-in functions.
5679 2017-09-14  Pat Haugen  <pthaugen@us.ibm.com>
5681         * config/rs6000/rs6000.c (rs6000_set_up_by_prologue): Make sure the TOC
5682         reg (r2) isn't in the set of registers defined in the prologue.
5684 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
5685             Alan Hayward  <alan.hayward@arm.com>
5686             David Sherwood  <david.sherwood@arm.com>
5688         * tree-vectorizer.h (_loop_vec_info): Add max_vectorization_factor.
5689         (LOOP_VINFO_MAX_VECT_FACTOR): New macro.
5690         (LOOP_VINFO_ORIG_VECT_FACTOR): Replace with...
5691         (LOOP_VINFO_ORIG_MAX_VECT_FACTOR): ...this new macro.
5692         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Update
5693         accordingly.
5694         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
5695         max_vectorization_factor.
5696         (vect_analyze_loop_2): Set LOOP_VINFO_MAX_VECT_FACTOR.
5698 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
5699             Alan Hayward  <alan.hayward@arm.com>
5700             David Sherwood  <david.sherwood@arm.com>
5702         * tree-vectorizer.h (vect_min_worthwhile_factor): Delete.
5703         (vect_worthwhile_without_simd_p): Declare.
5704         * tree-vect-loop.c (vect_worthwhile_without_simd_p): New function.
5705         (vectorizable_reduction): Use it.
5706         * tree-vect-stmts.c (vectorizable_shift): Likewise.
5707         (vectorizable_operation): Likewise.
5709 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
5710             Alan Hayward  <alan.hayward@arm.com>
5711             David Sherwood  <david.sherwood@arm.com>
5713         * tree-vectorizer.h (vect_get_num_copies): New function.
5714         * tree-vect-data-refs.c (vect_get_data_access_cost): Use it.
5715         * tree-vect-loop.c (vectorizable_reduction): Likewise.
5716         (vectorizable_induction): Likewise.
5717         (vectorizable_live_operation): Likewise.
5718         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
5719         (vectorizable_bswap): Likewise.
5720         (vectorizable_call): Likewise.
5721         (vectorizable_conversion): Likewise.
5722         (vectorizable_assignment): Likewise.
5723         (vectorizable_shift): Likewise.
5724         (vectorizable_operation): Likewise.
5725         (vectorizable_store): Likewise.
5726         (vectorizable_load): Likewise.
5727         (vectorizable_condition): Likewise.
5728         (vectorizable_comparison): Likewise.
5729         (vect_analyze_stmt): Pass the slp node to vectorizable_live_operation.
5731 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
5732             Alan Hayward  <alan.hayward@arm.com>
5733             David Sherwood  <david.sherwood@arm.com>
5735         * tree-vect-loop.c (vectorizable_induction): Use gimple_build instead
5736         of vect_init_vector.
5738 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
5739             Alan Hayward  <alan.hayward@arm.com>
5740             David Sherwood  <david.sherwood@arm.com>
5742         * gimple-fold.h (gimple_build_vector_from_val): Declare, and provide
5743         an inline wrapper that provides a location.
5744         (gimple_build_vector): Likewise.
5745         * gimple-fold.c (gimple_build_vector_from_val): New function.
5746         (gimple_build_vector): Likewise.
5747         * tree-vect-loop.c (get_initial_def_for_reduction): Use the new
5748         functions to build the initial value.  Always return a gimple value.
5749         (get_initial_defs_for_reduction): Likewise.  Only compute
5750         neutral_vec once.
5751         (vect_create_epilog_for_reduction): Don't call force_gimple_operand or
5752         vect_init_vector on the results from get_initial_def(s)_for_reduction.
5753         (vectorizable_induction): Use gimple_build_vector rather than
5754         vect_init_vector.
5756 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
5757             Alan Hayward  <alan.hayward@arm.com>
5758             David Sherwood  <david.sherwood@arm.com>
5760         * target.h (vec_perm_indices): New typedef.
5761         (auto_vec_perm_indices): Likewise.
5762         * optabs-query.h: Include target.h
5763         (can_vec_perm_p): Take a vec_perm_indices *.
5764         * optabs-query.c (can_vec_perm_p): Likewise.
5765         (can_mult_highpart_p): Update accordingly.  Use auto_vec_perm_indices.
5766         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
5767         * tree-vect-generic.c (lower_vec_perm): Likewise.
5768         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
5769         (vect_grouped_load_supported): Likewise.
5770         (vect_shift_permute_load_chain): Likewise.
5771         (vect_permute_store_chain): Use auto_vec_perm_indices.
5772         (vect_permute_load_chain): Likewise.
5773         * fold-const.c (fold_vec_perm): Take vec_perm_indices.
5774         (fold_ternary_loc): Update accordingly.  Use auto_vec_perm_indices.
5775         Update uses of can_vec_perm_p.
5776         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Replace the
5777         mode with a number of elements.  Take a vec_perm_indices *.
5778         (vect_create_epilog_for_reduction): Update accordingly.
5779         Use auto_vec_perm_indices.
5780         (have_whole_vector_shift): Likewise.  Update call to can_vec_perm_p.
5781         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
5782         (vect_transform_slp_perm_load): Likewise.
5783         (vect_schedule_slp_instance): Use auto_vec_perm_indices.
5784         * tree-vectorizer.h (vect_gen_perm_mask_any): Take a vec_perm_indices.
5785         (vect_gen_perm_mask_checked): Likewise.
5786         * tree-vect-stmts.c (vect_gen_perm_mask_any): Take a vec_perm_indices.
5787         (vect_gen_perm_mask_checked): Likewise.
5788         (vectorizable_mask_load_store): Use auto_vec_perm_indices.
5789         (vectorizable_store): Likewise.
5790         (vectorizable_load): Likewise.
5791         (perm_mask_for_reverse): Likewise.  Update call to can_vec_perm_p.
5792         (vectorizable_bswap): Likewise.
5794 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
5795             Alan Hayward  <alan.hayward@arm.com>
5796             David Sherwood  <david.sherwood@arm.com>
5798         * tree.h (build_vector): Take a vec<tree> instead of a tree *.
5799         * tree.c (build_vector): Likewise.
5800         (build_vector_from_ctor): Update accordingly.
5801         (build_vector_from_val): Likewise.
5802         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
5803         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
5804         * tree-vect-generic.c (add_rshift): Likewise.
5805         (expand_vector_divmod): Likewise.
5806         (optimize_vector_constructor): Likewise.
5807         * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
5808         (vect_transform_slp_perm_load): Likewise.
5809         (vect_schedule_slp_instance): Likewise.
5810         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
5811         (vectorizable_call): Likewise.
5812         (vect_gen_perm_mask_any): Likewise.  Add elements in order.
5813         * expmed.c (make_tree): Likewise.
5814         * fold-const.c (fold_negate_expr_1): Use auto_vec<tree> when building
5815         a vector passed to build_vector.
5816         (fold_convert_const): Likewise.
5817         (exact_inverse): Likewise.
5818         (fold_ternary_loc): Likewise.
5819         (fold_relational_const): Likewise.
5820         (const_binop): Likewise.  Use VECTOR_CST_ELT directly when operating
5821         on VECTOR_CSTs, rather than going through vec_cst_ctor_to_array.
5822         (const_unop): Likewise.  Store the reduction accumulator in a
5823         variable rather than an array.
5824         (vec_cst_ctor_to_array): Take the number of elements as a parameter.
5825         (fold_vec_perm): Update calls accordingly.  Use auto_vec<tree> for
5826         the new vector, rather than constructing it after the input arrays.
5827         (native_interpret_vector): Use auto_vec<tree> when building
5828         a vector passed to build_vector.  Add elements in order.
5829         * tree-vect-loop.c (get_initial_defs_for_reduction): Use
5830         auto_vec<tree> when building a vector passed to build_vector.
5831         (vect_create_epilog_for_reduction): Likewise.
5832         (vectorizable_induction): Likewise.
5833         (get_initial_def_for_reduction): Likewise.  Fix indentation of
5834         case statements.
5835         * config/sparc/sparc.c (sparc_handle_vis_mul8x16): Change n_elts
5836         to a vec<tree> *.
5837         (sparc_fold_builtin): Use auto_vec<tree> when building a vector
5838         passed to build_vector.
5840 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
5841             Alan Hayward  <alan.hayward@arm.com>
5842             David Sherwood  <david.sherwood@arm.com>
5844         * tree-core.h (tree_base::u): Add an "nelts" field.
5845         (tree_vector): Use VECTOR_CST_NELTS as the length.
5846         * tree.c (tree_size): Likewise.
5847         (make_vector): Initialize VECTOR_CST_NELTS.
5848         * tree.h (VECTOR_CST_NELTS): Use the u.nelts field.
5849         * cfgexpand.c (expand_debug_expr): Use VECTOR_CST_NELTS instead of
5850         TYPE_VECTOR_SUBPARTS.
5851         * expr.c (const_vector_mask_from_tree): Consistently use "units"
5852         as the number of units, setting it from VECTOR_CST_NELTS.
5853         (const_vector_from_tree): Likewise.
5854         * fold-const.c (negate_expr_p): Use VECTOR_CST_NELTS instead of
5855         TYPE_VECTOR_SUBPARTS for the number of elements in a VECTOR_CST.
5856         (fold_negate_expr_1): Likewise.
5857         (fold_convert_const): Likewise.
5858         (const_binop): Likewise.  Differentiate the number of output and
5859         input elements.
5860         (const_unop): Likewise.
5861         (fold_ternary_loc): Use VECTOR_CST_NELTS for the number of elements
5862         in a VECTOR_CST, asserting that it is the same as TYPE_VECTOR_SUBPARTS
5863         in cases that did the opposite.
5865 2017-09-14  Richard Biener  <rguenther@suse.de>
5867         * tree-ssa-sccvn.c (visit_phi): Merge undefined values similar
5868         to VN_TOP.
5870 2017-09-14  Eric Botcazou  <ebotcazou@adacore.com>
5872         * dwarf2out.c (dwarf2out_source_line): Remove superfluous test.
5874 2017-09-14  Jakub Jelinek  <jakub@redhat.com>
5876         PR target/81325
5877         * cfgbuild.c (find_bb_boundaries): Ignore debug insns in decisions
5878         if and where to split a bb, except for splitting before debug insn
5879         sequences followed by non-label real insn.  Delete debug insns
5880         in between basic blocks.
5882         * combine.c (make_compound_operation_int): Formatting fixes.
5884         * config/alpha/elf.h (LINK_EH_SPEC): Add -static-pie support.
5885         * config/alpha/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
5886         * config/netbsd.h (LINK_EH_SPEC): Likewise.
5887         * config/sol2.h (LINK_EH_SPEC): Likewise.
5888         * config/arm/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
5889         * config/s390/linux.h (LINK_SPEC): Likewise.
5890         * config/freebsd.h (LINK_EH_SPEC): Likewise.
5891         * config/openbsd.h (LINK_EH_SPEC): Likewise.
5892         * config/lm32/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
5893         * config/aarch64/aarch64-linux.h (LINUX_TARGET_LINK_SPEC): Likewise.
5894         * config/powerpcspe/sysv4.h (LINK_EH_SPEC): Likewise.
5895         * config/bfin/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
5896         * config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Fix a typo.
5897         * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Formatting fix.
5899 2017-09-13  Jakub Jelinek  <jakub@redhat.com>
5901         * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Add -static-pie
5902         support.
5903         (ENDFILE_LINUX_SPEC): Likewise.
5904         (LINK_EH_SPEC): Likewise.
5905         * config/rs6000/linux64.h (LINK_SHLIB_SPEC): Likewise.
5906         (LINK_OS_LINUX_SPEC32): Likewise.
5907         (LINK_OS_LINUX_SPEC64): Likewise.
5908         * config/rs6000/linux.h (LINK_SHLIB_SPEC): Likewise.
5909         (LINK_OS_LINUX_SPEC): Likewise.
5911 2017-09-13  Martin Liska  <mliska@suse.cz>
5913         PR middle-end/82154
5914         * stmt.c (expand_sjlj_dispatch_table): Use CASE_LOW when
5915         CASE_HIGH is NULL_TREE.
5917 2017-09-13  Richard Sandiford  <richard.sandiford@linaro.org>
5918             Alan Hayward  <alan.hayward@arm.com>
5919             David Sherwood  <david.sherwood@arm.com>
5921         * target.def (secondary_memory_needed): New hook.
5922         (secondary_reload): Refer to TARGET_SECONDARY_MEMORY_NEEDED
5923         instead of SECONDARY_MEMORY_NEEDED.
5924         (secondary_memory_needed_mode): Likewise.
5925         * hooks.h (hook_bool_mode_reg_class_t_reg_class_t_false): Declare.
5926         * hooks.c (hook_bool_mode_reg_class_t_reg_class_t_false): New function.
5927         * doc/tm.texi.in (SECONDARY_MEMORY_NEEDED): Replace with...
5928         (TARGET_SECONDARY_MEMORY_NEEDED): ...this.
5929         (SECONDARY_MEMORY_NEEDED_RTX): Update reference accordingly.
5930         * doc/tm.texi: Regenerate.
5931         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED): Delete.
5932         * config/alpha/alpha.c (alpha_secondary_memory_needed): New function.
5933         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
5934         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED): Delete.
5935         * config/i386/i386-protos.h (ix86_secondary_memory_needed): Delete.
5936         * config/i386/i386.c (inline_secondary_memory_needed): Put the
5937         mode argument first and change the reg_class arguments to reg_class_t.
5938         (ix86_secondary_memory_needed): Likewise.  Remove the strict parameter.
5939         Make static.  Update the call to inline_secondary_memory_needed.
5940         (ix86_register_move_cost): Update the call to
5941         inline_secondary_memory_needed.
5942         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
5943         * config/ia64/ia64.h (SECONDARY_MEMORY_NEEDED): Delete commented-out
5944         definition.
5945         * config/ia64/ia64.c (spill_xfmode_rfmode_operand): Refer to
5946         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
5947         in comment.
5948         * config/mips/mips.h (SECONDARY_MEMORY_NEEDED): Delete.
5949         * config/mips/mips-protos.h (mips_secondary_memory_needed): Delete.
5950         * config/mips/mips.c (mips_secondary_memory_needed): Make static
5951         and match hook interface.  Add comment from mips.h.
5952         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
5953         * config/mmix/mmix.md (truncdfsf2): Refer to
5954         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
5955         in comment.
5956         * config/pa/pa-64.h (SECONDARY_MEMORY_NEEDED): Rename to...
5957         (PA_SECONDARY_MEMORY_NEEDED): ...this, and put the mode argument first.
5958         * config/pa/pa.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
5959         (pa_secondary_memory_needed): New function.
5960         * config/pdp11/pdp11.h (SECONDARY_MEMORY_NEEDED): Delete.
5961         * config/pdp11/pdp11-protos.h (pdp11_secondary_memory_needed): Delete.
5962         * config/pdp11/pdp11.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
5963         (pdp11_secondary_memory_needed): Make static and match hook interface.
5964         * config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED): Delete.
5965         * config/powerpcspe/powerpcspe-protos.h
5966         (rs6000_secondary_memory_needed_ptr): Delete.
5967         * config/powerpcspe/powerpcspe.c (rs6000_secondary_memory_needed_ptr):
5968         Delete.
5969         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
5970         (rs6000_option_override_internal): Assign to
5971         targetm.secondary_memory_needed rather than
5972         rs6000_secondary_memory_needed_ptr.
5973         (rs6000_secondary_memory_needed): Match hook interface.
5974         (rs6000_debug_secondary_memory_needed): Likewise.
5975         * config/riscv/riscv.h (SECONDARY_MEMORY_NEEDED): Delete.
5976         * config/riscv/riscv.c (riscv_secondary_memory_needed): New function.
5977         (riscv_register_move_cost): Use it instead of SECONDARY_MEMORY_NEEDED.
5978         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
5979         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED): Delete.
5980         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_ptr):
5981         Delete.
5982         * config/rs6000/rs6000.c (rs6000_secondary_memory_needed_ptr): Delete.
5983         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
5984         (rs6000_option_override_internal): Assign to
5985         targetm.secondary_memory_needed rather than
5986         rs6000_secondary_memory_needed_ptr.
5987         (rs6000_secondary_memory_needed): Match hook interface.
5988         (rs6000_debug_secondary_memory_needed): Likewise.
5989         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED): Delete.
5990         * config/s390/s390.c (s390_secondary_memory_needed): New function.
5991         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
5992         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED): Delete.
5993         * config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
5994         (sparc_secondary_memory_needed): New function.
5995         * lra-constraints.c (check_and_process_move): Refer to
5996         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
5997         in comment.
5998         (curr_insn_transform): Likewise.
5999         (process_alt_operands): Use targetm.secondary_memory_needed
6000         instead of TARGET_SECONDARY_MEMORY_NEEDED.
6001         (check_secondary_memory_needed_p): Likewise.
6002         (choose_split_class): Likewise.
6003         * reload.c: Unconditionally include code that was previously
6004         conditional on SECONDARY_MEMORY_NEEDED.
6005         (push_secondary_reload): Use targetm.secondary_memory_needed
6006         instead of TARGET_SECONDARY_MEMORY_NEEDED.
6007         (push_reload): Likewise.
6008         * reload1.c: Unconditionally include code that was previously
6009         conditional on SECONDARY_MEMORY_NEEDED.
6010         (choose_reload_regs): Use targetm.secondary_memory_needed
6011         instead of TARGET_SECONDARY_MEMORY_NEEDED.
6012         (gen_reload): Likewise.
6013         * system.h (SECONDARY_MEMORY_NEEDED): Poison.
6015 2017-09-13  Richard Sandiford  <richard.sandiford@linaro.org>
6016             Alan Hayward  <alan.hayward@arm.com>
6017             David Sherwood  <david.sherwood@arm.com>
6019         * target.def (secondary_memory_needed_mode): New hook:
6020         * targhooks.c (default_secondary_memory_needed_mode): Declare.
6021         * targhooks.h (default_secondary_memory_needed_mode): New function.
6022         * doc/tm.texi.in (SECONDARY_MEMORY_NEEDED_MODE): Replace with...
6023         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): ...this.
6024         * doc/tm.texi: Regenerate.
6025         * lra-constraints.c (check_and_process_move): Use
6026         targetm.secondary_memory_needed_mode instead of
6027         TARGET_SECONDARY_MEMORY_NEEDED_MODE.
6028         (curr_insn_transform): Likewise.
6029         * reload.c (get_secondary_mem): Likewise.
6030         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
6031         * config/alpha/alpha.c (alpha_secondary_memory_needed_mode): New
6032         function.
6033         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
6034         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
6035         * config/i386/i386.c (ix86_secondary_memory_needed_mode): New function.
6036         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
6037         * config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED_MODE):
6038         Delete.
6039         * config/powerpcspe/powerpcspe-protos.h
6040         (rs6000_secondary_memory_needed_mode): Delete.
6041         * config/powerpcspe/powerpcspe.c
6042         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
6043         (rs6000_secondary_memory_needed_mode): Make static.
6044         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
6045         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_mode):
6046         Delete.
6047         * config/rs6000/rs6000.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
6048         Redefine.
6049         (rs6000_secondary_memory_needed_mode): Make static.
6050         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
6051         * config/s390/s390.c (s390_secondary_memory_needed_mode): New function.
6052         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
6053         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
6054         * config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
6055         Redefine.
6056         (sparc_secondary_memory_needed_mode): New function.
6057         * system.h (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Poison.
6059 2017-09-13  Jackson Woodruff  <jackson.woodruff@arm.com>
6061         * config/aarch64/constraints.md (Umq): New constraint.
6062         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>):
6063         Change to use Umq.
6064         (mov<mode>): Update condition.
6066 2017-09-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6068         * gimple-ssa-store-merging.c (sort_by_bitpos): Compare store order
6069         when bitposition is the same.
6071 2017-09-13  Richard Biener  <rguenther@suse.de>
6073         * dwarf2out.c (output_die_symbol): Remove.
6074         (output_die): Do not output a DIEs symbol.
6076 2017-09-13  Richard Biener  <rguenther@suse.de>
6078         PR middle-end/82128
6079         * gimple-fold.c (gimple_fold_call): Update SSA name in-place to
6080         default-def to avoid breaking iterator update with the weird
6081         interaction with cgraph_update_edges_for_call_stmt_node.
6083 2017-09-13  Richard Biener  <rguenther@suse.de>
6085         * tree-cfg.c (verify_gimple_assign_binary): Add verification
6086         for WIDEN_SUM_EXPR, VEC_WIDEN_MULT_{HI,LO,EVEN,ODD}_EXPR,
6087         VEC_PACK_{TRUNC,SAT,FIX_TRUNC}_EXPR.
6088         (verify_gimple_assign_ternary): Add verification for DOT_PROD_EXPR.
6090 2017-09-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
6092         * config/aarch64/aarch64.c (aarch64_override_options_after_change_1):
6093         Disable pc relative literal load irrespective of
6094         TARGET_FIX_ERR_A53_84341 for default.
6096 2017-09-12  Eric Botcazou  <ebotcazou@adacore.com>
6098         * config/sparc/sparc.c (output_return): Output the source location of
6099         the insn in the delay slot, if any.
6100         (output_sibcall): Likewise.
6102 2017-09-12  H.J. Lu  <hongjiu.lu@intel.com>
6104         PR driver/81498
6105         * common.opt (-static-pie): New alias.
6106         (shared): Negate static-pie.
6107         (-no-pie): Update help text.
6108         (-pie): Likewise.
6109         (static-pie): New option.
6110         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Add
6111         -static-pie support.
6112         (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
6113         (LINK_EH_SPEC): Likewise.
6114         (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
6115         * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
6116         * config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
6117         * gcc.c (LINK_COMMAND_SPEC): Likewise.
6118         (init_gcc_specs): Likewise.
6119         (init_spec): Likewise.
6120         (display_help): Update help message for -pie.
6121         * doc/invoke.texi: Update -pie, -no-pie and -static.  Document
6122         -static-pie.
6124 2017-09-12  Wilco Dijkstra  <wdijkstr@arm.com>
6126         * config/aarch64/aarch64.md (movsi_aarch64): Remove all '*'.
6127         (movdi_aarch64): Likewise.
6128         (movti_aarch64): Likewise.
6130 2017-09-12 Simon Wright <simon@pushface.org>
6132         PR target/80204
6133         * config/darwin-driver.c (darwin_find_version_from_kernel): Eliminate
6134         calculation of the minor version, always output as 0.
6136 2017-09-12  Jakub Jelinek  <jakub@redhat.com>
6138         PR target/82112
6139         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
6140         ALTIVEC_BUILTIN_VEC_LD if arg1 has array type call default_conversion
6141         on it early, rather than manual conversion late.  For
6142         ALTIVEC_BUILTIN_VEC_ST if arg2 has array type call default_conversion
6143         instead of performing manual conversion.
6145 2017-09-12  Carl Love  <cel@us.ibm.com>
6147         * config/rs6000/altivec.md (vec_widen_umult_even_v4si,
6148         vec_widen_smult_even_v4si): Add define expands for vmuleuw, vmulesw,
6149         vmulouw, vmulosw.
6150         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
6151         VMULOSW): Add definitions.
6152         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
6153         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
6154         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
6155         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
6156         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
6158 2017-09-12  James Greenhalgh  <james.greenhalgh@arm.com>
6160         * config/aarch64/aarch64.md (movdi_aarch64): Set load/store
6161         types correctly.
6162         (movti_aarch64): Likewise.
6163         (movdf_aarch64): Likewise.
6164         (movtf_aarch64): Likewise.
6165         (load_pairdi): Likewise.
6166         (store_pairdi): Likewise.
6167         (load_pairdf): Likewise.
6168         (store_pairdf): Likewise.
6169         (loadwb_pair<GPI:mode>_<P:mode>): Likewise.
6170         (storewb_pair<GPI:mode>_<P:mode>): Likewise.
6171         (ldr_got_small_<mode>): Likewise.
6172         (ldr_got_small_28k_<mode>): Likewise.
6173         (ldr_got_tiny): Likewise.
6174         * config/aarch64/iterators.md (ldst_sz): New.
6175         (ldpstp_sz): Likewise.
6176         * config/aarch64/thunderx.md (thunderx_storepair): Split store_8
6177         to store_16.
6178         (thunderx_load): Split load_8 to load_16.
6179         * config/aarch64/thunderx2t99.md (thunderx2t99_loadpair): Split
6180         load_8 to load_16.
6181         (thunderx2t99_storepair_basic): Split store_8 to store_16.
6182         * config/arm/xgene1.md (xgene1_load_pair): Split load_8 to load_16.
6183         (xgene1_store_pair): Split store_8 to store_16.
6184         * config/aarch64/falkor.md (falkor_ld_3_ld): Split load_8 to load_16.
6185         (falkor_st_0_st_sd): Split store_8 to store_16.
6187 2017-09-12  James Greenhalgh  <james.greenhalgh@arm.com>
6189         * config/arm/types.md (type): Rename load1/2/3/4 to load_4/8/12/16
6190         and store1/2/3/4 to store_4/8/12/16.
6191         * config/aarch64/aarch64.md: Update for rename.
6192         * config/arm/arm.md: Likewise.: Likewise.
6193         * config/arm/arm.c: Likewise.
6194         * config/arm/thumb1.md: Likewise.
6195         * config/arm/thumb2.md: Likewise.
6196         * config/arm/vfp.md: Likewise.
6197         * config/arm/arm-generic.md: Likewise.
6198         * config/arm/arm1020e.md: Likewise.
6199         * config/arm/arm1026ejs.md: Likewise.
6200         * config/arm/arm1136jfs.md: Likewise.
6201         * config/arm/arm926ejs.md: Likewise.
6202         * config/arm/cortex-a15.md: Likewise.
6203         * config/arm/cortex-a17.md: Likewise.
6204         * config/arm/cortex-a5.md: Likewise.
6205         * config/arm/cortex-a53.md: Likewise.
6206         * config/arm/cortex-a57.md: Likewise.
6207         * config/arm/cortex-a7.md: Likewise.
6208         * config/arm/cortex-a8.md: Likewise.
6209         * config/arm/cortex-a9.md: Likewise.
6210         * config/arm/cortex-m4.md: Likewise.
6211         * config/arm/cortex-m7.md: Likewise.
6212         * config/arm/cortex-r4.md: Likewise.
6213         * config/arm/exynos-m1.md: Likewise.
6214         * config/arm/fa526.md: Likewise.
6215         * config/arm/fa606te.md: Likewise.
6216         * config/arm/fa626te.md: Likewise.
6217         * config/arm/fa726te.md: Likewise.
6218         * config/arm/fmp626.md: Likewise.
6219         * config/arm/iwmmxt.md: Likewise.
6220         * config/arm/ldmstm.md: Likewise.
6221         * config/arm/marvell-pj4.md: Likewise.
6222         * config/arm/xgene1.md: Likewise.
6223         * config/aarch64/thunderx.md: Likewise.
6224         * config/aarch64/thunderx2t99.md: Likewise.
6225         * config/aarch64/falkor.md: Likewise.
6227 2017-09-12  Martin Liska  <mliska@suse.cz>
6229         * attribs.c (private_lookup_attribute): New function.
6230         * attribs.h (private_lookup_attribute): Declared here.
6231         (lookup_attribute): Called from this place.
6233 2017-09-12  Richard Biener  <rguenther@suse.de>
6235         PR tree-optimization/82157
6236         * tree-ssa-pre.c (remove_dead_inserted_code): Do not remove
6237         stmts with side-effects.
6239 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
6240             Alan Hayward  <alan.hayward@arm.com>
6241             David Sherwood <david.sherwood@arm.com>
6243         * target.def (hard_regno_nregs): New hook.
6244         (class_max_nregs): Refer to it instead of HARD_REGNO_NREGS.
6245         * targhooks.h (default_hard_regno_nregs): Declare.
6246         * targhooks.c (default_hard_regno_nregs): New function.
6247         * doc/tm.texi.in (HARD_REGNO_NREGS): Replace with...
6248         (TARGET_HARD_REGNO_NREGS): ...this hook.
6249         (HARD_REGNO_NREGS_HAS_PADDING): Update accordingly.
6250         (CLASS_MAX_NREGS): Likewise.
6251         * doc/tm.texi: Regenerate.
6252         * reginfo.c (init_reg_modes_target): Use targetm.hard_regno_nregs
6253         instead of HARD_REGNO_NREGS.
6254         * rtl.h (REG_NREGS): Refer to TARGET_HARD_REGNO_NREGS rather than
6255         HARD_REGNO_NREGS in the comment.
6256         * config/aarch64/aarch64.h (HARD_REGNO_NREGS): Delete.
6257         * config/aarch64/aarch64-protos.h (aarch64_hard_regno_nregs): Delete.
6258         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs): Make static.
6259         Return an unsigned int.
6260         (TARGET_HARD_REGNO_NREGS): Redefine.
6261         * config/alpha/alpha.h (HARD_REGNO_NREGS): Delete.
6262         * config/arc/arc.h (HARD_REGNO_NREGS): Delete.
6263         * config/arc/arc.c (TARGET_HARD_REGNO_NREGS): Redefine.
6264         (arc_hard_regno_nregs): New function.
6265         * config/arm/arm.h (HARD_REGNO_NREGS): Delete.
6266         * config/arm/arm.c (TARGET_HARD_REGNO_NREGS): Redefine.
6267         (arm_hard_regno_nregs): New function.
6268         * config/avr/avr.h (HARD_REGNO_NREGS): Delete.
6269         * config/bfin/bfin.h (HARD_REGNO_NREGS): Delete.
6270         * config/bfin/bfin.c (bfin_hard_regno_nregs): New function.
6271         (TARGET_HARD_REGNO_NREGS): Redefine.
6272         * config/c6x/c6x.h (HARD_REGNO_NREGS): Delete.
6273         * config/cr16/cr16.h (LONG_REG_P): Use targetm.hard_regno_nregs.
6274         (HARD_REGNO_NREGS): Delete.
6275         * config/cr16/cr16.c (TARGET_HARD_REGNO_NREGS): Redefine.
6276         (cr16_hard_regno_nregs): New function.
6277         (cr16_memory_move_cost): Use it instead of HARD_REGNO_NREGS.
6278         * config/cris/cris.h (HARD_REGNO_NREGS): Delete.
6279         * config/cris/cris.c (TARGET_HARD_REGNO_NREGS): Redefine.
6280         (cris_hard_regno_nregs): New function.
6281         * config/epiphany/epiphany.h (HARD_REGNO_NREGS): Delete.
6282         * config/fr30/fr30.h (HARD_REGNO_NREGS): Delete.
6283         (CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
6284         * config/frv/frv.h (HARD_REGNO_NREGS): Delete.
6285         (CLASS_MAX_NREGS): Remove outdated copy of documentation.
6286         * config/frv/frv-protos.h (frv_hard_regno_nregs): Delete.
6287         * config/frv/frv.c (TARGET_HARD_REGNO_NREGS): Redefine.
6288         (frv_hard_regno_nregs): Make static.  Take and return an
6289         unsigned int.
6290         (frv_class_max_nregs): Remove outdated copy of documentation.
6291         * config/ft32/ft32.h (HARD_REGNO_NREGS): Delete.
6292         * config/h8300/h8300.h (HARD_REGNO_NREGS): Delete.
6293         * config/h8300/h8300-protos.h (h8300_hard_regno_nregs): Delete.
6294         * config/h8300/h8300.c (h8300_hard_regno_nregs): Delete.
6295         * config/i386/i386.h (HARD_REGNO_NREGS): Delete.
6296         * config/i386/i386.c (ix86_hard_regno_nregs): New function.
6297         (TARGET_HARD_REGNO_NREGS): Redefine.
6298         * config/ia64/ia64.h (HARD_REGNO_NREGS): Delete.
6299         (CLASS_MAX_NREGS): Update comment.
6300         * config/ia64/ia64.c (TARGET_HARD_REGNO_NREGS): Redefine.
6301         (ia64_hard_regno_nregs): New function.
6302         * config/iq2000/iq2000.h (HARD_REGNO_NREGS): Delete.
6303         * config/lm32/lm32.h (HARD_REGNO_NREGS): Delete.
6304         * config/m32c/m32c.h (HARD_REGNO_NREGS): Delete.
6305         * config/m32c/m32c-protos.h (m32c_hard_regno_nregs): Delete.
6306         * config/m32c/m32c.c (m32c_hard_regno_nregs_1): Take and return
6307         an unsigned int.
6308         (m32c_hard_regno_nregs): Likewise.  Make static.
6309         (TARGET_HARD_REGNO_NREGS): Redefine.
6310         * config/m32r/m32r.h (HARD_REGNO_NREGS): Delete.
6311         * config/m68k/m68k.h (HARD_REGNO_NREGS): Delete.
6312         * config/m68k/m68k.c (TARGET_HARD_REGNO_NREGS): Redefine.
6313         (m68k_hard_regno_nregs): New function.
6314         * config/mcore/mcore.h (HARD_REGNO_NREGS): Delete.
6315         * config/microblaze/microblaze.h (HARD_REGNO_NREGS): Delete.
6316         * config/mips/mips.h (HARD_REGNO_NREGS): Delete.
6317         * config/mips/mips-protos.h (mips_hard_regno_nregs): Delete.
6318         * config/mips/mips.c (mips_hard_regno_nregs): Make static.
6319         Take and return an unsigned int.
6320         (TARGET_HARD_REGNO_NREGS): Redefine.
6321         * config/mmix/mmix.h (HARD_REGNO_NREGS): Delete.
6322         (CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
6323         * config/mn10300/mn10300.h (HARD_REGNO_NREGS): Delete.
6324         * config/moxie/moxie.h (HARD_REGNO_NREGS): Delete.
6325         * config/msp430/msp430.h (HARD_REGNO_NREGS): Delete.
6326         * config/msp430/msp430-protos.h (msp430_hard_regno_nregs): Delete.
6327         * config/msp430/msp430.c (TARGET_HARD_REGNO_NREGS): Redefine.
6328         (msp430_hard_regno_nregs): Make static.  Take and return an
6329         unsigned int.
6330         * config/nds32/nds32.h (HARD_REGNO_NREGS): Delete.
6331         * config/nds32/nds32-protos.h (nds32_hard_regno_nregs): Delete.
6332         * config/nds32/nds32.c (nds32_hard_regno_nregs): Delete.
6333         (nds32_hard_regno_mode_ok): Use targetm.hard_regno_nregs.
6334         * config/nios2/nios2.h (HARD_REGNO_NREGS): Delete.
6335         * config/nvptx/nvptx.h (HARD_REGNO_NREGS): Delete.
6336         * config/nvptx/nvptx.c (nvptx_hard_regno_nregs): New function.
6337         (TARGET_HARD_REGNO_NREGS): Redefine.
6338         * config/pa/pa32-regs.h (HARD_REGNO_NREGS): Rename to...
6339         (PA_HARD_REGNO_NREGS): ...this.
6340         * config/pa/pa64-regs.h (HARD_REGNO_NREGS): Rename to...
6341         (PA_HARD_REGNO_NREGS): ...this.
6342         * config/pa/pa.c (TARGET_HARD_REGNO_NREGS): Redefine.
6343         (pa_hard_regno_nregs): New function.
6344         * config/pdp11/pdp11.h (HARD_REGNO_NREGS): Delete.
6345         * config/pdp11/pdp11.c (TARGET_HARD_REGNO_NREGS): Redefine.
6346         (pdp11_hard_regno_nregs): New function.
6347         * config/powerpcspe/powerpcspe.h (HARD_REGNO_NREGS): Delete.
6348         * config/powerpcspe/powerpcspe.c (TARGET_HARD_REGNO_NREGS): Redefine.
6349         (rs6000_hard_regno_nregs_hook): New function.
6350         * config/riscv/riscv.h (HARD_REGNO_NREGS): Delete.
6351         * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): Delete.
6352         * config/riscv/riscv.c (riscv_hard_regno_nregs): Make static.
6353         Take and return an unsigned int.  Move earlier in file.
6354         (TARGET_HARD_REGNO_NREGS): Redefine.
6355         * config/rl78/rl78.h (HARD_REGNO_NREGS): Delete.
6356         * config/rl78/rl78-protos.h (rl78_hard_regno_nregs): Delete.
6357         * config/rl78/rl78.c (TARGET_HARD_REGNO_NREGS): Reefine.
6358         (rl78_hard_regno_nregs): Make static.  Take and return an
6359         unsigned int.
6360         * config/rs6000/rs6000.h (HARD_REGNO_NREGS): Delete.
6361         * config/rs6000/rs6000.c (TARGET_HARD_REGNO_NREGS): Redefine.
6362         (rs6000_hard_regno_nregs_hook): New function.
6363         * config/rx/rx.h (HARD_REGNO_NREGS): Delete.
6364         * config/rx/rx.c (rx_hard_regno_nregs): New function.
6365         (TARGET_HARD_REGNO_NREGS): Redefine.
6366         * config/s390/s390.h (HARD_REGNO_NREGS): Delete.
6367         * config/s390/s390.c (REGNO_PAIR_OK): Use s390_hard_regno_nregs
6368         instead of HARD_REGNO_NREGS.
6369         (s390_hard_regno_nregs): New function.
6370         (s390_hard_regno_mode_ok): Add comment from s390.h.
6371         (TARGET_HARD_REGNO_NREGS): Redefine.
6372         * config/sh/sh.h (HARD_REGNO_NREGS): Delete.
6373         * config/sh/sh.c (TARGET_HARD_REGNO_NREGS): Redefine.
6374         (sh_hard_regno_nregs): New function.
6375         (sh_pass_in_reg_p): Use it.
6376         * config/sparc/sparc.h (HARD_REGNO_NREGS): Delete.
6377         * config/sparc/sparc.c (TARGET_HARD_REGNO_NREGS): Redefine.
6378         (sparc_hard_regno_nregs): New function.
6379         * config/spu/spu.h (HARD_REGNO_NREGS): Delete.
6380         * config/spu/spu.c (spu_hard_regno_nregs): New function.
6381         (spu_function_arg_advance): Use it, supplying a valid register number.
6382         (TARGET_HARD_REGNO_NREGS): Redefine.
6383         * config/stormy16/stormy16.h (HARD_REGNO_NREGS): Delete.
6384         * config/tilegx/tilegx.h (HARD_REGNO_NREGS): Delete.
6385         * config/tilepro/tilepro.h (HARD_REGNO_NREGS): Delete.
6386         * config/v850/v850.h (HARD_REGNO_NREGS): Delete.
6387         * config/vax/vax.h (HARD_REGNO_NREGS): Delete.
6388         * config/visium/visium.h (HARD_REGNO_NREGS): Delete.
6389         (CLASS_MAX_NREGS): Remove copy of old documentation.
6390         * config/visium/visium.c (TARGET_HARD_REGNO_NREGS): Redefine.
6391         (visium_hard_regno_nregs): New function.
6392         (visium_hard_regno_mode_ok): Use it instead of HARD_REGNO_NREGS.
6393         * config/xtensa/xtensa.h (HARD_REGNO_NREGS): Delete.
6394         * config/xtensa/xtensa.c (TARGET_HARD_REGNO_NREGS): Redefine.
6395         xtensa_hard_regno_nregs): New function.
6396         * system.h (HARD_REGNO_NREGS): Poison.
6398 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
6400         * config/arm/arm.h (THUMB_SECONDARY_INPUT_RELOAD_CLASS): Use
6401         hard_regno_nregs instead of HARD_REGNO_NREGS.
6402         (THUMB_SECONDARY_OUTPUT_RELOAD_CLASS): Likewise.
6403         * config/c6x/c6x.c (c6x_expand_prologue): Likewise.
6404         (c6x_expand_epilogue): Likewise.
6405         * config/frv/frv.c (frv_alloc_temp_reg): Likewise.
6406         (frv_read_iacc_argument): Likewise.
6407         * config/sh/sh.c: Include regs.h.
6408         (sh_print_operand): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
6409         (regs_used): Likewise.
6410         (output_stack_adjust): Likewise.
6411         * config/xtensa/xtensa.c (xtensa_copy_incoming_a7): Likewise.
6412         * expmed.c: Include regs.h.
6413         (store_bit_field_1): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
6414         * ree.c: Include regs.h.
6415         (combine_reaching_defs): Use hard_regno_nregs instead of
6416         HARD_REGNO_NREGS.
6417         (add_removable_extension): Likewise.
6419 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
6421         * regs.h (hard_regno_nregs): Turn into a function.
6422         (end_hard_regno): Update accordingly.
6423         * caller-save.c (setup_save_areas): Likewise.
6424         (save_call_clobbered_regs): Likewise.
6425         (replace_reg_with_saved_mem): Likewise.
6426         (insert_restore): Likewise.
6427         (insert_save): Likewise.
6428         * combine.c (can_change_dest_mode): Likewise.
6429         (move_deaths): Likewise.
6430         (distribute_notes): Likewise.
6431         * config/mips/mips.c (mips_hard_regno_call_part_clobbered): Likewise.
6432         * config/powerpcspe/powerpcspe.c (rs6000_cannot_change_mode_class)
6433         (rs6000_split_multireg_move): Likewise.
6434         (rs6000_register_move_cost): Likewise.
6435         (rs6000_memory_move_cost): Likewise.
6436         * config/rs6000/rs6000.c (rs6000_cannot_change_mode_class): Likewise.
6437         (rs6000_split_multireg_move): Likewise.
6438         (rs6000_register_move_cost): Likewise.
6439         (rs6000_memory_move_cost): Likewise.
6440         * cselib.c (cselib_reset_table): Likewise.
6441         (cselib_lookup_1): Likewise.
6442         * emit-rtl.c (set_mode_and_regno): Likewise.
6443         * function.c (aggregate_value_p): Likewise.
6444         * ira-color.c (setup_profitable_hard_regs): Likewise.
6445         (check_hard_reg_p): Likewise.
6446         (calculate_saved_nregs): Likewise.
6447         (assign_hard_reg): Likewise.
6448         (improve_allocation): Likewise.
6449         (calculate_spill_cost): Likewise.
6450         * ira-emit.c (modify_move_list): Likewise.
6451         * ira-int.h (ira_hard_reg_set_intersection_p): Likewise.
6452         (ira_hard_reg_in_set_p): Likewise.
6453         * ira.c (setup_reg_mode_hard_regset): Likewise.
6454         (clarify_prohibited_class_mode_regs): Likewise.
6455         (check_allocation): Likewise.
6456         * lra-assigns.c (find_hard_regno_for_1): Likewise.
6457         (lra_setup_reg_renumber): Likewise.
6458         (setup_try_hard_regno_pseudos): Likewise.
6459         (spill_for): Likewise.
6460         (assign_hard_regno): Likewise.
6461         (setup_live_pseudos_and_spill_after_risky_transforms): Likewise.
6462         * lra-constraints.c (in_class_p): Likewise.
6463         (lra_constraint_offset): Likewise.
6464         (simplify_operand_subreg): Likewise.
6465         (lra_constraints): Likewise.
6466         (split_reg): Likewise.
6467         (split_if_necessary): Likewise.
6468         (invariant_p): Likewise.
6469         (inherit_in_ebb): Likewise.
6470         * lra-lives.c (process_bb_lives): Likewise.
6471         * lra-remat.c (reg_overlap_for_remat_p): Likewise.
6472         (get_hard_regs): Likewise.
6473         (do_remat): Likewise.
6474         * lra-spills.c (assign_spill_hard_regs): Likewise.
6475         * mode-switching.c (create_pre_exit): Likewise.
6476         * postreload.c (reload_combine_recognize_pattern): Likewise.
6477         * recog.c (peep2_find_free_register): Likewise.
6478         * regcprop.c (kill_value_regno): Likewise.
6479         (set_value_regno): Likewise.
6480         (copy_value): Likewise.
6481         (maybe_mode_change): Likewise.
6482         (find_oldest_value_reg): Likewise.
6483         (copyprop_hardreg_forward_1): Likewise.
6484         * regrename.c (check_new_reg_p): Likewise.
6485         (regrename_do_replace): Likewise.
6486         * reload.c (push_reload): Likewise.
6487         (combine_reloads): Likewise.
6488         (find_dummy_reload): Likewise.
6489         (operands_match_p): Likewise.
6490         (find_reloads): Likewise.
6491         (find_equiv_reg): Likewise.
6492         (reload_adjust_reg_for_mode): Likewise.
6493         * reload1.c (count_pseudo): Likewise.
6494         (count_spilled_pseudo): Likewise.
6495         (find_reg): Likewise.
6496         (clear_reload_reg_in_use): Likewise.
6497         (free_for_value_p): Likewise.
6498         (allocate_reload_reg): Likewise.
6499         (choose_reload_regs): Likewise.
6500         (reload_adjust_reg_for_temp): Likewise.
6501         (emit_reload_insns): Likewise.
6502         (delete_output_reload): Likewise.
6503         * rtlanal.c (subreg_get_info): Likewise.
6504         * sched-deps.c (sched_analyze_reg): Likewise.
6505         * sel-sched.c (init_regs_for_mode): Likewise.
6506         (mark_unavailable_hard_regs): Likewise.
6507         (choose_best_reg_1): Likewise.
6508         (verify_target_availability): Likewise.
6509         * valtrack.c (dead_debug_insert_temp): Likewise.
6510         * var-tracking.c (track_loc_p): Likewise.
6511         (emit_note_insn_var_location): Likewise.
6512         * varasm.c (make_decl_rtl): Likewise.
6513         * reginfo.c (choose_hard_reg_mode): Likewise.
6514         (init_reg_modes_target): Refer directly to
6515         this_target_regs->x_hard_regno_nregs.
6517 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
6519         * ira-costs.c (record_operand_costs): Use in_hard_reg_set_p
6520         instead of hard_regno_nregs.
6522 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
6524         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Use
6525         end_hard_regno instead of hard_regno_nregs.
6526         * config/s390/s390.c (s390_reg_clobbered_rtx): Likewise.
6527         * config/sparc/sparc.h (ASM_DECLARE_REGISTER_GLOBAL): Likewise.
6528         * config/visium/visium.c (visium_hard_regno_mode_ok): Likewise.
6529         * ira-color.c (improve_allocation): Likewise.
6530         * lra-assigns.c (find_hard_regno_for_1): Likewise.
6531         * lra-lives.c (mark_regno_live): Likewise.
6532         (mark_regno_dead): Likewise.
6533         * lra-remat.c (operand_to_remat): Likewise.
6534         * lra.c (collect_non_operand_hard_regs): Likewise.
6535         * postreload.c (reload_combine_note_store): Likewise.
6536         (move2add_valid_value_p): Likewise.
6537         * reload.c (regno_clobbered_p): Likewise.
6539 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
6541         * config/frv/frv.c (FOR_EACH_REGNO): Use END_REGNO instead of
6542         hard_regno_nregs.
6543         * config/v850/v850.c (v850_reorg): Likewise.
6544         * reload.c (refers_to_regno_for_reload_p): Likewise.
6545         (find_equiv_reg): Likewise.
6546         * reload1.c (reload_reg_reaches_end_p): Likewise.
6548 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
6550         * caller-save.c (add_used_regs): Use REG_NREGS instead of
6551         hard_regno_nregs.
6552         * config/aarch64/aarch64.c (aarch64_split_combinev16qi): Likewise.
6553         * config/arm/arm.c (output_move_neon): Likewise.
6554         (arm_attr_length_move_neon): Likewise.
6555         (neon_split_vcombine): Likewise.
6556         * config/c6x/c6x.c (c6x_mark_reg_read): Likewise.
6557         (c6x_mark_reg_written): Likewise.
6558         (c6x_dwarf_register_span): Likewise.
6559         * config/i386/i386.c (ix86_save_reg): Likewise.
6560         * config/ia64/ia64.c (mark_reg_gr_used_mask): Likewise.
6561         (rws_access_reg): Likewise.
6562         * config/s390/s390.c (s390_call_saved_register_used): Likewise.
6563         * mode-switching.c (create_pre_exit): Likewise.
6564         * ree.c (combine_reaching_defs): Likewise.
6565         (add_removable_extension): Likewise.
6566         * regcprop.c (find_oldest_value_reg): Likewise.
6567         (copyprop_hardreg_forward_1): Likewise.
6568         * reload.c (reload_inner_reg_of_subreg): Likewise.
6569         (push_reload): Likewise.
6570         (combine_reloads): Likewise.
6571         (find_dummy_reload): Likewise.
6572         (reload_adjust_reg_for_mode): Likewise.
6573         * reload1.c (find_reload_regs): Likewise.
6574         (forget_old_reloads_1): Likewise.
6575         (reload_reg_free_for_value_p): Likewise.
6576         (reload_adjust_reg_for_temp): Likewise.
6577         (emit_reload_insns): Likewise.
6578         (delete_output_reload): Likewise.
6579         * sel-sched.c (choose_best_reg_1): Likewise.
6580         (choose_best_pseudo_reg): Likewise.
6582 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
6583             Alan Hayward  <alan.hayward@arm.com>
6584             David Sherwood <david.sherwood@arm.com>
6586         * defaults.h (SLOW_UNALIGNED_ACCESS): Delete.
6587         * target.def (slow_unaligned_access): New hook.
6588         * targhooks.h (default_slow_unaligned_access): Declare.
6589         * targhooks.c (default_slow_unaligned_access): New function.
6590         * doc/tm.texi.in (SLOW_UNALIGNED_ACCESS): Replace with...
6591         (TARGET_SLOW_UNALIGNED_ACCESS): ...this.
6592         * doc/tm.texi: Regenerate.
6593         * config/alpha/alpha.h (SLOW_UNALIGNED_ACCESS): Delete.
6594         * config/arm/arm.h (SLOW_UNALIGNED_ACCESS): Delete.
6595         * config/i386/i386.h (SLOW_UNALIGNED_ACCESS): Delete commented-out
6596         definition.
6597         * config/powerpcspe/powerpcspe.h (SLOW_UNALIGNED_ACCESS): Delete.
6598         * config/powerpcspe/powerpcspe.c (TARGET_SLOW_UNALIGNED_ACCESS):
6599         Redefine.
6600         (rs6000_slow_unaligned_access): New function.
6601         (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
6602         (expand_block_compare): Likewise.
6603         (expand_strn_compare): Likewise.
6604         (rs6000_rtx_costs): Likewise.
6605         * config/riscv/riscv.h (SLOW_UNALIGNED_ACCESS): Delete.
6606         (riscv_slow_unaligned_access): Likewise.
6607         * config/riscv/riscv.c (riscv_slow_unaligned_access): Rename to...
6608         (riscv_slow_unaligned_access_p): ...this and make static.
6609         (riscv_option_override): Update accordingly.
6610         (riscv_slow_unaligned_access): New function.
6611         (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
6612         * config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Delete.
6613         * config/rs6000/rs6000.c (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
6614         (rs6000_slow_unaligned_access): New function.
6615         (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
6616         (rs6000_rtx_costs): Likewise.
6617         * config/rs6000/rs6000-string.c (expand_block_compare)
6618         (expand_strn_compare): Use targetm.slow_unaligned_access instead
6619         of SLOW_UNALIGNED_ACCESS.
6620         * config/tilegx/tilegx.h (SLOW_UNALIGNED_ACCESS): Delete.
6621         * config/tilepro/tilepro.h (SLOW_UNALIGNED_ACCESS): Delete.
6622         * calls.c (expand_call): Use targetm.slow_unaligned_access instead
6623         of SLOW_UNALIGNED_ACCESS.
6624         * expmed.c (simple_mem_bitfield_p): Likewise.
6625         * expr.c (alignment_for_piecewise_move): Likewise.
6626         (emit_group_load_1): Likewise.
6627         (emit_group_store): Likewise.
6628         (copy_blkmode_from_reg): Likewise.
6629         (emit_push_insn): Likewise.
6630         (expand_assignment): Likewise.
6631         (store_field): Likewise.
6632         (expand_expr_real_1): Likewise.
6633         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
6634         * lra-constraints.c (simplify_operand_subreg): Likewise.
6635         * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
6636         * gimple-ssa-store-merging.c: Likewise in block comment at start
6637         of file.
6638         * tree-ssa-strlen.c: Include target.h.
6639         (handle_builtin_memcmp): Use targetm.slow_unaligned_access instead
6640         of SLOW_UNALIGNED_ACCESS.
6641         * system.h (SLOW_UNALIGNED_ACCESS): Poison.
6643 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
6645         PR rtl-optimization/82185
6646         * expmed.c (emit_store_flag_int): Only test tem if it has been
6647         initialized.
6649 2017-09-12  Richard Biener  <rguenther@suse.de>
6651         PR middle-end/82149
6652         * match.pd ((FTYPE) N CMP CST): Fix typo.
6654 2017-09-12  Simon Atanasyan  <simon.atanasyan@imgtec.com>
6656         * config/mips/mips.c (mips_attribute_table): Add 'short_call'
6657         attribute.
6658         (mips_near_type_p): Add 'short_call' attribute as a synonym
6659         for 'near'.
6660         * doc/extend.texi (short_call): Document new function attribute.
6662 2017-09-12  Jakub Jelinek  <jakub@redhat.com>
6664         PR target/82112
6665         * c-common.c (sync_resolve_size): Instead of c_dialect_cxx ()
6666         assertion check that in the condition.
6667         (get_atomic_generic_size): Likewise.  Before testing if parameter
6668         has pointer type, if it has array type, call for C++
6669         default_conversion to perform array-to-pointer conversion.
6671 2017-09-12  Richard Biener  <rguenther@suse.de>
6673         * tree-vect-generic.c (expand_vector_operations_1): Do nothing
6674         for operations we cannot scalarize.
6676 2017-09-12  Aldy Hernandez  <aldyh@redhat.com>
6678         * tree-ssa-threadbackward.c (fsm_find_thread_path): Make GC
6679         vectors heap vectors.  Clean up comments.
6680         Make visited_bbs a reference.
6681         (profitable_jump_thread_path): Make GC
6682         vectors heap vectors.  Clean up comments.
6683         Misc cleanups.
6684         (convert_and_register_jump_thread_path): Make GC vectors heap
6685         vectors.
6686         (check_subpath_and_update_thread_path): Same.  Clean up comments.
6687         Make visited_bbs a reference.
6688         (handle_phi): Abstract common code to to
6689         register_jump_thread_path_if_profitable.
6690         Rename VAR_BB to DEF_BB.
6691         Update comments.
6692         Make GC vectors heap vectors.
6693         Make visited_bbs a reference.
6694         (handle_assignment): Same.
6695         (register_jump_thread_path_if_profitable): New.
6696         (fsm_find_control_statement_thread_paths): Rename VAR_BB to
6697         DEF_BB.
6698         Make GC vectors heap vectors.  Clean up comments.
6699         Make visited_bbs a reference.
6700         (find_jump_threads_backwards): Make visited_bbs live in the stack.
6701         * tree-ssa-threadupdate.c (delete_jump_thread_path): Fix typo in
6702         comment.
6704 2017-09-11  Max Filippov  <jcmvbkbc@gmail.com>
6706         PR target/82181
6707         * config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
6708         words of E_DImode object are reachable by xtensa_uimm8x4 access.
6710 2017-09-11  Vidya Praveen  <vidyapraveen@arm.com>
6712         Revert r251800 and r251799.
6714 2017-09-11  Martin Jambor  <mjambor@suse.cz>
6716         PR hsa/82119
6717         * hsa-gen.c (gen_hsa_phi_from_gimple_phi): Process ADDR_EXPRs in
6718         arguments in advance.
6719         * hsa-regalloc.c (naive_process_phi): New parameter predecessors,
6720         use it to find predecessor edges.
6721         (naive_outof_ssa): Collect vector of predecessors.
6723 2017-09-08  Jason Merrill  <jason@redhat.com>
6725         PR c++/70029 - ICE with ref-qualifier and -flto
6726         * langhooks.h (struct lang_hooks_for_types): Add
6727         copy_lang_qualifiers.
6728         * attribs.c (build_type_attribute_qual_variant): Use it.
6729         * langhooks-def.h (LANG_HOOKS_COPY_LANG_QUALIFIERS): Default to
6730         NULL.
6731         (LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
6732         * tree.c (verify_type): Re-enable TYPE_CANONICAL main variant check.
6734 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
6736         PR target/81988
6737         * config/sparc/sparc.md (mulsi3): Rename into *mulsi3_sp32.
6738         (*mulsi3_sp64): New instruction.
6739         (mulsi3): New expander.
6741 2017-09-08  Uros Bizjak  <ubizjak@gmail.com>
6743         * config/alpha/alpha.c (alpha_print_operand) <case 'S'>: Remove.
6745 2017-09-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6747         * sancov.c: Include memmodel.h.
6749 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
6751         PR target/80897
6752         * config/sparc/sparc.c (sparc_emit_set_symbolic_const64): Deal with too
6753         large offsets.
6755 2017-09-07  Carl Love  <cel@us.ibm.com>
6757         * config/rs6000/vsx.md (define_insn "*stxvl"): Add missing argument to
6758         the sldi instruction.
6760 2017-09-07  David Edelsohn  <dje.gcc@gmail.com>
6762         * sancov.c: Include tm_p.h.
6764 2017-09-07  Jakub Jelinek  <jakub@redhat.com>
6766         PR target/81979
6767         * output.h (switch_to_other_text_partition): New declaration.
6768         * varasm.c (switch_to_other_text_partition): New function.
6769         * config/rs6000/rs6000.c (uses_TOC): Return 2 if
6770         NOTE_INSN_SWITCH_TEXT_SECTIONS is seen before finding load_toc_* insn.
6771         (rs6000_elf_declare_function_name): If uses_TOC returned 2, switch
6772         to the other text partition before emitting LCL label and switch back
6773         after emitting the word after it.
6775 2017-09-07  Richard Biener  <rguenther@suse.de>
6777         * passes.def (pass_split_crit_edges): Remove instance before PRE.
6778         * tree-ssa-pre.c (pass_pre::execute): Instead manually split
6779         critical edges here, after loop init.
6780         (pass_data_pre): Remove PROP_no_crit_edges flags.
6781         * tree-ssa-sccvn.c (vn_reference_lookup_3): Use vn_valueize
6782         for valueization of call args to avoid leaking VN_TOP.
6783         (visit_use): Assert we do not visit default defs.
6784         (init_scc_vn): Use build_decl for VN_TOP to make name nicer.
6785         Use error_mark_node to more easily detect leaking VN_TOP.
6786         All default-defs are varying, not VN_TOP.  Mark them visited.
6787         (run_scc_vn): Make code match comment.
6789 2017-09-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
6791         * config/rs6000/rs6000-cpus.def (OTHER_VSX_VECTOR_MASKS): Delete
6792         OPTION_MASK_FLOAT128_KEYWORD.
6793         (POWERPC_MASKS): Likewise.
6794         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Delete
6795         support for the -mfloat128-type option, and make -mfloat128
6796         default on PowerPC Linux systems.  Define or undefine
6797         __FLOAT128__ and  __FLOAT128_HARDWARE__ for the current options.
6798         Define __float128 to be __ieee128 if IEEE 128-bit support is
6799         enabled, or undefine it.
6800         (rs6000_cpu_cpp_builtins): Delete defining __FLOAT128__ here.
6801         Delete defining __FLOAT128_TYPE__.
6802         * config/rs6000/rs6000.opt (x_TARGET_FLOAT128_TYPE): Delete the
6803         -mfloat128-type option and make -mfloat128 default on PowerPC
6804         Linux systems.
6805         (TARGET_FLOAT128_TYPE): Likewise.
6806         (-mfloat128-type): Likewise.
6807         * config/rs6000/rs6000.c (rs6000_option_override_internal):
6808         Delete the -mfloat128-type option and make -mfloat128 default on
6809         PowerPC Linux systems.  Always use __ieee128 to be the keyword for
6810         the IEEE 128-bit type, and map __float128 to __ieee128 if IEEE
6811         128-bit floating point is enabled.  Change tests from using
6812         -mfloat128-type to -mfloat128.
6813         (rs6000_mangle_type): Use the correct mangling for the __float128
6814         type even if normal long double is restricted to 64-bits.
6815         (floatn_mode): Enable the _Float128 type by default on VSX Linux
6816         systems.
6817         * config/rs6000/rs6000.h (MASK_FLOAT128_TYPE): Delete.
6818         (MASK_FLOAT128_KEYWORD): Define new shortcut macro.
6819         (RS6000BTM_FLOAT128): Define in terms of -mfloat128, not
6820         -mfloat128-type.
6821         * doc/invoke.texi (RS/6000 and PowerPC Options): Update
6822         documentation for -mfloat128.
6824 2017-09-06  Olivier Hainque  <hainque@adacore.com>
6826         * config.gcc (powerpc-wrs-vxworksspe): Now match as vxworks*spe.
6828 2017-09-06  Wish Wu  <wishwu007@gmail.com>
6829             Jakub Jelinek  <jakub@redhat.com>
6831         * asan.c (initialize_sanitizer_builtins): Add
6832         BT_FN_VOID_UINT8_UINT8, BT_FN_VOID_UINT16_UINT16,
6833         BT_FN_VOID_UINT32_UINT32, BT_FN_VOID_UINT64_UINT64,
6834         BT_FN_VOID_FLOAT_FLOAT, BT_FN_VOID_DOUBLE_DOUBLE and
6835         BT_FN_VOID_UINT64_PTR variables.
6836         * builtin-types.def (BT_FN_VOID_UINT8_UINT8): New fn type.
6837         (BT_FN_VOID_UINT16_UINT16): Likewise.
6838         (BT_FN_VOID_UINT32_UINT32): Likewise.
6839         (BT_FN_VOID_FLOAT_FLOAT): Likewise.
6840         (BT_FN_VOID_DOUBLE_DOUBLE): Likewise.
6841         (BT_FN_VOID_UINT64_PTR): Likewise.
6842         * common.opt (flag_sanitize_coverage): New variable.
6843         (fsanitize-coverage=trace-pc): Remove.
6844         (fsanitize-coverage=): Add.
6845         * flag-types.h (enum sanitize_coverage_code): New enum.
6846         * fold-const.c (fold_range_test): Disable non-short-circuit
6847         optimization if flag_sanitize_coverage.
6848         (fold_truth_andor): Likewise.
6849         * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
6850         * opts.c (COVERAGE_SANITIZER_OPT): Define.
6851         (coverage_sanitizer_opts): New array.
6852         (get_closest_sanitizer_option): Add OPTS argument, handle also
6853         OPT_fsanitize_coverage_.
6854         (parse_sanitizer_options): Adjusted to also handle
6855         OPT_fsanitize_coverage_.
6856         (common_handle_option): Add OPT_fsanitize_coverage_.
6857         * sancov.c (instrument_comparison, instrument_switch): New function.
6858         (sancov_pass): Add trace-cmp support.
6859         * sanitizer.def (BUILT_IN_SANITIZER_COV_TRACE_CMP1,
6860         BUILT_IN_SANITIZER_COV_TRACE_CMP2, BUILT_IN_SANITIZER_COV_TRACE_CMP4,
6861         BUILT_IN_SANITIZER_COV_TRACE_CMP8,
6862         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP1,
6863         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP2,
6864         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP4,
6865         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP8,
6866         BUILT_IN_SANITIZER_COV_TRACE_CMPF, BUILT_IN_SANITIZER_COV_TRACE_CMPD,
6867         BUILT_IN_SANITIZER_COV_TRACE_SWITCH): New builtins.
6868         * doc/invoke.texi: Document -fsanitize-coverage=trace-cmp.
6870 2017-09-06  Richard Earnshaw  <rearnsha@arm.com>
6872         * config/arm/parsecpu.awk (fatal): Note that we've encountered an
6873         error.  Only quit immediately if parsing is complete.
6874         (BEGIN): Initialize fatal_err and parse_done.
6875         (begin fpu, end fpu): Check number of arguments.
6876         (begin arch, end arch): Likewise.
6877         (begin cpu, end cpu): Likewise.
6878         (cname, tune for, tune flags, architecture, fpu, option): Likewise.
6879         (optalias): Likewise.
6881 2017-09-06  Richard Earnshaw  <rearnsha@arm.com>
6883         * config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
6884         * config/arm/arm-isa.h: Delete.  Move definitions to ...
6885         * arm-cpus.in: ... here.  Use new feature and fgroup values.
6886         * config/arm/arm.c (arm_option_override): Use lower case for feature
6887         bit names.
6888         * config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
6889         (TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
6890         * config/arm/parsecpu.awk (END): Add new command 'isa'.
6891         (isa_pfx): Delete.
6892         (print_isa_bits_for): New function.
6893         (gen_isa): New function.
6894         (gen_comm_data): Use print_isa_bits_for.
6895         (define feature): New keyword.
6896         (define fgroup): New keyword.
6897         * config/arm/t-arm (OPTIONS_H_EXTRA): Add arm-isa.h
6898         (arm-isa.h): Add rule to generate file.
6899         * common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
6900         case for feature bit names.
6902 2017-09-06  Richard Biener  <rguenther@suse.de>
6904         * tree-ssa-pre.c (NECESSARY): Remove.
6905         (create_expression_by_pieces): Do not touch pass-local flags.
6906         (insert_into_preds_of_block): Likewise.
6907         (do_pre_regular_insertion): Likewise.
6908         (eliminate_insert): Likewise.
6909         (eliminate_dom_walker::before_dom_children): Likewise.
6910         (fini_eliminate): Do not look at inserted_exprs.
6911         (mark_operand_necessary): Remove.
6912         (remove_dead_inserted_code): Replace with simple work-list
6913         algorithm based on inserted_exprs and SSA uses.
6914         (pass_pre::execute): Re-order fini_eliminate and
6915         remove_dead_inserted_code.
6917 2017-09-06  Olivier Hainque  <hainque@adacore.com>
6919         * config/powerpcspe/vxworks.h (VXCPU_FOR_8548): Correct definition
6920         for VxWorks 7.  Adjust surrounding comments.
6922 2017-09-06  Richard Biener  <rguenther@suse.de>
6924         * gimple-ssa-strength-reduction.c
6925         (find_candidates_dom_walker::before_dom_children): Also allow
6926         pointer types.
6928 2017-09-06  Richard Biener  <rguenther@suse.de>
6930         PR tree-optimization/82108
6931         * tree-vect-stmts.c (vectorizable_load): Fix pointer adjustment
6932         for gap in the non-permutation SLP case.
6934 2017-09-06  Martin Jambor  <mjambor@suse.cz>
6936         PR tree-optimization/82078
6937         * tree-sra.c (sort_and_splice_var_accesses): Move call to
6938         add_access_to_work_queue...
6939         (build_accesses_from_assign): ...here.
6940         (propagate_all_subaccesses): Make sure racc is the group
6941         representative, if there is one.
6943 2017-09-06  Jakub Jelinek  <jakub@redhat.com>
6945         PR middle-end/82095
6946         * varasm.c (categorize_decl_for_section): Use SECCAT_TBSS for TLS vars with
6947         NULL DECL_INITIAL.
6949 2017-09-06  Richard Biener  <rguenther@suse.de>
6951         * gimple-ssa-strength-reduction.c
6952         (find_candidates_dom_walker::before_doom_children): Use a
6953         type and not a mode check.
6955 2017-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6957         PR target/77308
6958         * config/arm/predicates.md (arm_general_adddi_operand): Create new
6959         non-vfp predicate.
6960         * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Use new predicates.
6962 2017-09-05  Jeff Law  <law@redhat.com>
6964         PR tree-optimization/64910
6965         * tree-ssa-reassoc.c (reassociate_bb): Restrict last change to
6966         cases where we have 3 or more operands.
6968 2017-09-05  Jakub Jelinek  <jakub@redhat.com>
6970         PR middle-end/81768
6971         * omp-low.c (lower_omp_for): Recompute tree invariant if
6972         gimple_omp_for_initial/final is ADDR_EXPR.
6974         PR middle-end/81768
6975         * omp-expand.c (expand_omp_simd): Force second operands of COND_EXPR
6976         into gimple val before gimplification fo the COND_EXPR.
6978 2017-09-05  Aldy Hernandez  <aldyh@redhat.com>
6980         * tree-ssa-threadupdate.c (duplicate_thread_path): Remove unused
6981         REGION_COPY argument.
6982         (thread_through_all_blocks): Remove unused argument to
6983         duplicate_thread_path.
6985 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
6986             Alan Hayward  <alan.hayward@arm.com>
6987             David Sherwood  <david.sherwood@arm.com>
6989         * config/aarch64/aarch64-protos.h (aarch64_gen_adjusted_ldpstp):
6990         Take a scalar_mode rather than a machine_mode.
6991         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
6992         * config/aarch64/aarch64.c (aarch64_simd_container_mode): Likewise.
6993         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
6994         (aarch64_gen_adjusted_ldpstp): Likewise.
6995         (aarch64_expand_vector_init): Use scalar_mode instead of machine_mode.
6997 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
6998             Alan Hayward  <alan.hayward@arm.com>
6999             David Sherwood  <david.sherwood@arm.com>
7001         * config/aarch64/aarch64-protos.h (aarch64_is_extend_from_extract):
7002         Take a scalar_int_mode instead of a machine_mode.
7003         (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
7004         (aarch64_output_scalar_simd_mov_immediate): Likewise.
7005         (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
7006         (aarch64_simd_attr_length_rglist): Delete.
7007         * config/aarch64/aarch64.c (aarch64_is_extend_from_extract): Take
7008         a scalar_int_mode instead of a machine_mode.
7009         (aarch64_add_offset): Likewise.
7010         (aarch64_internal_mov_immediate): Likewise
7011         (aarch64_add_constant_internal): Likewise.
7012         (aarch64_add_constant): Likewise.
7013         (aarch64_movw_imm): Likewise.
7014         (aarch64_rtx_arith_op_extract_p): Likewise.
7015         (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
7016         (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
7017         Remove assert that the mode isn't a vector.
7018         (aarch64_output_scalar_simd_mov_immediate): Likewise.
7019         (aarch64_expand_mov_immediate): Update calls after above changes.
7020         (aarch64_output_casesi): Use as_a <scalar_int_mode>.
7021         (aarch64_and_bitmask_imm): Check for scalar integer modes.
7022         (aarch64_move_imm): Likewise.
7023         (aarch64_can_const_movi_rtx_p): Likewise.
7024         (aarch64_strip_extend): Likewise.
7025         (aarch64_extr_rtx_p): Likewise.
7026         (aarch64_rtx_costs): Likewise, using wode_mode as the mode of
7027         a CONST_INT when the mode parameter is VOIDmode.
7028         (aarch64_float_const_rtx_p): Use scalar_int_mode for a temporary.
7030 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
7032         * machmode.h (bitwise_mode_for_mode): Return opt_mode.
7033         * stor-layout.c (bitwise_mode_for_mode): Likewise.
7034         (bitwise_type_for_mode): Update accordingly.
7036 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
7038         * stor-layout.h (mode_for_size_tree): Return an opt_mode.
7039         * stor-layout.c (mode_for_size_tree): Likewise.
7040         (mode_for_array): Update accordingly.
7041         (layout_decl): Likewise.
7042         (compute_record_mode): Likewise.  Only set the mode once.
7044 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
7046         * target.def (get_mask_mode): Change return type to opt_mode.
7047         Expand commentary.
7048         * doc/tm.texi: Regenerate.
7049         * targhooks.h (default_get_mask_mode): Return an opt_mode.
7050         * targhooks.c (default_get_mask_mode): Likewise.
7051         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
7052         * optabs-query.c (can_vec_mask_load_store_p): Update use of
7053         targetm.get_mask_mode.
7054         * tree.c (build_truth_vector_type): Likewise.
7056 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
7058         * machmode.h (mode_for_vector): Return an opt_mode.
7059         * stor-layout.c (mode_for_vector): Likewise.
7060         (mode_for_int_vector): Update accordingly.
7061         (layout_type): Likewise.
7062         * config/i386/i386.c (emit_memmov): Likewise.
7063         (ix86_expand_set_or_movmem): Likewise.
7064         (ix86_expand_vector_init): Likewise.
7065         (ix86_get_mask_mode): Likewise.
7066         * config/powerpcspe/powerpcspe.c (rs6000_expand_vec_perm_const_1):
7067         Likewise.
7068         * config/rs6000/rs6000.c (rs6000_expand_vec_perm_const_1): Likewise.
7069         * expmed.c (extract_bit_field_1): Likewise.
7070         * expr.c (expand_expr_real_2): Likewise.
7071         * optabs-query.c (can_vec_perm_p): Likewise.
7072         (can_vec_mask_load_store_p): Likewise.
7073         * optabs.c (expand_vec_perm): Likewise.
7074         * targhooks.c (default_get_mask_mode): Likewise.
7075         * tree-vect-stmts.c (vectorizable_store): Likewise.
7076         (vectorizable_load): Likewise.
7077         (get_vectype_for_scalar_type_and_size): Likewise.
7079 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
7081         * machmode.h (mode_for_int_vector): New function.
7082         * stor-layout.c (mode_for_int_vector): Likewise.
7083         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Use it.
7084         * config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Likewise.
7085         * config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
7086         * config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
7087         (s390_expand_vcond): Likewise.
7089 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
7091         * machmode.h (opt_machine_mode): New type.
7092         (opt_mode<T>): Allow construction from anything that can be
7093         converted to a T.
7094         (is_a, as_a, dyn_cast): Add overloads for opt_mode.
7095         (mode_for_size): Return an opt_machine_mode.
7096         * stor-layout.c (mode_for_size): Likewise.
7097         (mode_for_size_tree): Update call accordingly.
7098         (bitwise_mode_for_mode): Likewise.
7099         (make_fract_type): Likewise.
7100         (make_accum_type): Likewise.
7101         * caller-save.c (replace_reg_with_saved_mem): Update call
7102         accordingly.
7103         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
7104         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
7105         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
7106         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
7107         * expmed.c (extract_bit_field_1): Likewise.
7108         * reload.c (get_secondary_mem): Likewise.
7109         * varasm.c (assemble_integer): Likewise.
7110         * lower-subreg.c (simplify_subreg_concatn): Likewise.  Move
7111         early-out.
7113 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
7115         * machmode.h (decimal_float_mode_for_size): New function.
7116         * real.h (REAL_VALUE_TO_TARGET_LONG_DOUBLE): Use float_mode_for_size.
7117         (REAL_VALUE_TO_TARGET_DOUBLE): Likewise.
7118         (REAL_VALUE_TO_TARGET_SINGLE): Likewise.
7119         (REAL_VALUE_TO_TARGET_DECIMAL128): Use decimal_float_mode_for_size.
7120         (REAL_VALUE_TO_TARGET_DECIMAL64): Likewise.
7121         (REAL_VALUE_TO_TARGET_DECIMAL32): Likewise.
7123 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
7125         * builtins.c (expand_builtin_powi): Use int_mode_for_size.
7126         (get_builtin_sync_mode): Likewise.
7127         (expand_ifn_atomic_compare_exchange): Likewise.
7128         (expand_builtin_atomic_clear): Likewise.
7129         (expand_builtin_atomic_test_and_set): Likewise.
7130         (fold_builtin_atomic_always_lock_free): Likewise.
7131         * calls.c (compute_argument_addresses): Likewise.
7132         (emit_library_call_value_1): Likewise.
7133         (store_one_arg): Likewise.
7134         * combine.c (combine_instructions): Likewise.
7135         * config/aarch64/aarch64.c (aarch64_function_value): Likewise.
7136         * config/arm/arm.c (arm_function_value): Likewise.
7137         (aapcs_allocate_return_reg): Likewise.
7138         * config/c6x/c6x.c (c6x_expand_movmem): Likewise.
7139         * config/i386/i386.c (construct_container): Likewise.
7140         (ix86_gimplify_va_arg): Likewise.
7141         (ix86_expand_sse_cmp): Likewise.
7142         (emit_memmov): Likewise.
7143         (emit_memset): Likewise.
7144         (expand_small_movmem_or_setmem): Likewise.
7145         (ix86_expand_pextr): Likewise.
7146         (ix86_expand_pinsr): Likewise.
7147         * config/lm32/lm32.c (lm32_block_move_inline): Likewise.
7148         * config/microblaze/microblaze.c (microblaze_block_move_straight):
7149         Likewise.
7150         * config/mips/mips.c (mips_function_value_1) Likewise.
7151         (mips_block_move_straight): Likewise.
7152         (mips_expand_ins_as_unaligned_store): Likewise.
7153         * config/powerpcspe/powerpcspe.c
7154         (rs6000_darwin64_record_arg_advance_flush): Likewise.
7155         (rs6000_darwin64_record_arg_flush): Likewise.
7156         * config/rs6000/rs6000.c
7157         (rs6000_darwin64_record_arg_advance_flush): Likewise.
7158         (rs6000_darwin64_record_arg_flush): Likewise.
7159         * config/sparc/sparc.c (sparc_function_arg_1): Likewise.
7160         (sparc_function_value_1): Likewise.
7161         * config/spu/spu.c (adjust_operand): Likewise.
7162         (spu_emit_branch_or_set): Likewise.
7163         (arith_immediate_p): Likewise.
7164         * emit-rtl.c (gen_lowpart_common): Likewise.
7165         * expr.c (expand_expr_real_1): Likewise.
7166         * function.c (assign_parm_setup_block): Likewise.
7167         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Likewise.
7168         * reload1.c (alter_reg): Likewise.
7169         * stor-layout.c (mode_for_vector): Likewise.
7170         (layout_type): Likewise.
7172 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
7174         * config/spu/spu.c (exp2_immediate_p): Use int_mode_for_mode.
7175         (spu_convert_move): Likewise.
7176         * lower-subreg.c (resolve_simple_move): Likewise.
7178 2017-09-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
7180         PR target/81833
7181         * config/rs6000/altivec.md (altivec_vsum2sws): Convert from a
7182         define_insn to a define_expand.
7183         (altivec_vsum2sws_direct): New define_insn.
7184         (altivec_vsumsws): Convert from a define_insn to a define_expand.
7186 2017-09-05  Wilco Dijkstra  <wdijkstr@arm.com>
7188         * config/arm/arm.c (arm_option_params_internal): Improve setting of
7189         max_insns_skipped.
7191 2017-09-05  H.J. Lu  <hongjiu.lu@intel.com>
7193         PR target/59501
7194         PR target/81624
7195         PR target/81769
7196         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Don't
7197         realign stack if stack alignment needed is less than incoming
7198         stack boundary.
7200 2017-09-05  Marek Polacek  <polacek@redhat.com>
7202         PR sanitizer/82072
7203         * convert.c (convert_to_integer_1) <case NEGATE_EXPR>: Move the ubsan
7204         check earlier.
7206 2017-09-05  Wilco Dijkstra  <wdijkstr@arm.com>
7208         * explow.c (get_dynamic_stack_size): Improve dynamic alignment.
7210 2017-09-05  Richard Biener  <rguenther@suse.de>
7212         PR tree-optimization/82084
7213         * fold-const.c (can_native_encode_string_p): Handle wide characters.
7215 2017-09-05  Richard Biener  <rguenther@suse.de>
7217         PR tree-optimization/82102
7218         * tree-ssa-pre.c (fini_eliminate): Check if lhs is NULL.
7220 2017-09-05  Martin Liska  <mliska@suse.cz>
7222         PR tree-optimization/82032
7223         * tree-cfg.c (generate_range_test): New function.
7224         * tree-cfg.h (generate_range_test): Declared here.
7225         * tree-cfgcleanup.c (convert_single_case_switch): New function.
7226         (cleanup_control_expr_graph): Use it.
7227         * tree-switch-conversion.c (try_switch_expansion): Remove
7228         assert.
7229         (emit_case_nodes): Use generate_range_test.
7231 2017-09-04  Uros Bizjak  <ubizjak@gmail.com>
7233         PR target/82098
7234         * config/i386/i386.md (*<btsc><mode>_mask): Add
7235         TARGET_USE_BT to insn constraint.
7236         (*btr<mode>_mask): Ditto.
7238 2017-09-04  Wilco Dijkstra  <wdijkstr@arm.com>
7240         * config/arm/arm.c (arm_legitimate_index_p): Add comment.
7241         (thumb2_legitimate_index_p): Use correct range for DI/DF mode.
7243 2017-09-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7245         PR target/77308
7246         * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Split early except for
7247         TARGET_NEON and TARGET_IWMMXT.
7248         (anddi3, iordi3, xordi3, one_cmpldi2): Split while expanding except for
7249         TARGET_NEON and TARGET_IWMMXT.
7250         (*one_cmpldi2_insn): Moved the body of one_cmpldi2 here.
7252 2017-09-04  Uros Bizjak  <ubizjak@gmail.com>
7254         * config/i386/i386-protos.h (ix86_tls_address_pattern_p) New prototype.
7255         (ix86_rewrite_tls_address): Ditto.
7256         * config/i386/i386.c (ix86_tls_address_pattern_p) New function.
7257         (ix86_rewrite_tls_address_1): Ditto.
7258         (ix86_rewrite_tls_address): Ditto.
7259         * config/i386/predicates.md (tls_address_pattern): New predicate.
7260         * config/i386/i386.md (TLS address splitter): New splitter.
7262 2017-09-04  Richard Biener  <rguenther@suse.de>
7264         PR tree-optimization/82084
7265         * fold-const.h (can_native_encode_string_p): Declare.
7266         * fold-const.c (can_native_encode_string_p): Factor out from ...
7267         (native_encode_string): ... here.
7268         * tree-vect-stmts.c (vectorizable_store): Call it to avoid
7269         vectorizing stores from constants we later cannot handle.
7271 2017-09-04  Marek Polacek  <polacek@redhat.com>
7273         PR c/81783
7274         * doc/invoke.texi: Update -Wtautological-compare documentation.
7276 2017-09-04  Jeff Law  <law@redhat.com>
7278         PR tree-optimization/64910
7279         * tree-ssa-reassoc.c (reassociate_bb): For bitwise binary ops,
7280         swap the first and last operand if the last is a constant.
7282 2017-09-04  Marek Polacek  <polacek@redhat.com>
7284         PR sanitizer/82072
7285         * convert.c (do_narrow): When sanitizing signed integer overflows,
7286         bail out for signed types.
7287         (convert_to_integer_1) <case NEGATE_EXPR>: Likewise.
7289 2017-09-04  Richard Biener  <rguenther@suse.de>
7291         PR tree-optimization/82060
7292         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
7293         Move devirtualization after stmt folding and before EH/AB/noreturn
7294         cleanup to get the stmt refs canonicalized.  Use a bool instead
7295         of gimple_modified_p since that doesn't work for NOPs.  Schedule
7296         NOPs generated by folding for removal.
7298 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
7299             Alan Hayward  <alan.hayward@arm.com>
7300             David Sherwood  <david.sherwood@arm.com>
7302         * coretypes.h (pad_direction): New enum.
7303         * defaults.h (DEFAULT_FUNCTION_ARG_PADDING): Delete.
7304         (FUNCTION_ARG_PADDING): Likewise.
7305         * target.def (function_arg_padding): New hook.
7306         * targhooks.h (default_function_arg_padding): Declare.
7307         * targhooks.c (default_function_arg_padding): New function.
7308         * doc/tm.texi.in (FUNCTION_ARG_PADDING): Replace with...
7309         (TARGET_FUNCTION_ARG_PADDING): ...this.
7310         * doc/tm.texi: Regenerate.
7311         * calls.c (store_unaligned_arguments_into_pseudos): Use pad_direction
7312         instead of direction.
7313         (compute_argument_addresses): Likewise.
7314         (load_register_parameters): Likewise.
7315         (emit_library_call_value_1): Likewise.
7316         (store_one_arg): Use targetm.calls.function_arg_padding instead
7317         of FUNCTION_ARG_PADDING.
7318         (must_pass_in_stack_var_size_or_pad): Likewise.
7319         * expr.c (emit_group_load_1): Use pad_direction instead of direction.
7320         (emit_group_store): Likewise.
7321         (emit_single_push_insn_1): Use targetm.calls.function_arg_padding
7322         instead of FUNCTION_ARG_PADDING.
7323         (emit_push_insn): Likewise, and propagate enum change throughout
7324         function.
7325         * function.h (direction): Delete.
7326         (locate_and_pad_arg_data::where_pad): Use pad_direction instead
7327         of direction.
7328         * function.c (assign_parm_find_stack_rtl): Likewise.
7329         (assign_parm_setup_block_p): Likewise.
7330         (assign_parm_setup_block): Likewise.
7331         (gimplify_parameters): Likewise.
7332         (locate_and_pad_parm): Use targetm.calls.function_arg_padding
7333         instead of FUNCTION_ARG_PADDING, and propagate enum change throughout
7334         function.
7335         * config/aarch64/aarch64.h (FUNCTION_ARG_PADDING): Delete.
7336         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
7337         * config/aarch64/aarch64-protos.h (aarch64_pad_arg_upward): Delete.
7338         * config/aarch64/aarch64.c (aarch64_pad_arg_upward): Replace with...
7339         (aarch64_function_arg_padding): ...this new function.
7340         (aarch64_gimplify_va_arg_expr): Use pad_direction instead of direction.
7341         (TARGET_FUNCTION_ARG_PADDING): Redefine.
7342         * config/arm/arm.h (FUNCTION_ARG_PADDING): Delete.
7343         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
7344         * config/arm/arm-protos.h (arm_pad_arg_upward): Delete.
7345         * config/arm/arm.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
7346         (arm_pad_arg_upward): Replace with...
7347         (arm_function_arg_padding): ...this new function.
7348         * config/c6x/c6x.h (BLOCK_REG_PADDING): Use pad_direction instead
7349         of direction.
7350         * config/ia64/hpux.h (FUNCTION_ARG_PADDING): Delete.
7351         * config/ia64/ia64-protos.h (ia64_hpux_function_arg_padding): Delete.
7352         * config/ia64/ia64.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
7353         (ia64_hpux_function_arg_padding): Replace with...
7354         (ia64_function_arg_padding): ...this new function.  Use pad_direction
7355         instead of direction.  Check for TARGET_HPUX.
7356         * config/iq2000/iq2000.h (FUNCTION_ARG_PADDING): Delete.
7357         * config/iq2000/iq2000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
7358         (iq2000_function_arg_padding): New function.
7359         * config/mips/mips-protos.h (mips_pad_arg_upward): Delete.
7360         * config/mips/mips.c (mips_pad_arg_upward): Replace with...
7361         (mips_function_arg_padding): ...this new function.
7362         (mips_pad_reg_upward): Update accordingly.
7363         (TARGET_FUNCTION_ARG_PADDING): Redefine.
7364         * config/mips/mips.h (PAD_VARARGS_DOWN): Use
7365         targetm.calls.function_arg_padding.
7366         (FUNCTION_ARG_PADDING): Delete.
7367         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
7368         * config/nios2/nios2.h (FUNCTION_ARG_PADDING): Delete.
7369         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
7370         * config/nios2/nios2-protos.h (nios2_function_arg_padding): Delete.
7371         (nios2_block_reg_padding): Return pad_direction instead of direction.
7372         * config/nios2/nios2.c (nios2_block_reg_padding): Return pad_direction
7373         instead of direction.
7374         (nios2_function_arg_padding): Likewise.  Make static.
7375         (TARGET_FUNCTION_ARG_PADDING): Redefine.
7376         * config/pa/pa.h (FUNCTION_ARG_PADDING): Delete.
7377         (BLOCK_REG_PADDING): Use targetm.calls.function_arg_padding.
7378         * config/pa/pa-protos.h (pa_function_arg_padding): Delete.
7379         * config/pa/pa.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
7380         (pa_function_arg_padding): Make static.  Return pad_direction instead
7381         of direction.
7382         * config/powerpcspe/powerpcspe.h (FUNCTION_ARG_PADDING): Delete.
7383         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
7384         * config/powerpcspe/aix.h (BLOCK_REG_PADDING): Use pad_direction
7385         instead of direction.  Use targetm.calls.function_arg_padding.
7386         * config/powerpcspe/darwin.h (BLOCK_REG_PADDING): Likewise.
7387         * config/powerpcspe/freebsd64.h (BLOCK_REG_PADDING): Likewise.
7388         * config/powerpcspe/linux64.h (BLOCK_REG_PADDING): Likewise.
7389         * config/powerpcspe/powerpcspe-protos.h (function_arg_padding): Delete.
7390         * config/powerpcspe/powerpcspe.c (TARGET_FUNCTION_ARG_PADDING):
7391         Redefine.
7392         (function_arg_padding): Rename to...
7393         (rs6000_function_arg_padding): ...this.  Make static.  Return
7394         pad_direction instead of direction.
7395         (rs6000_return_in_msb): Use rs6000_function_arg_padding.
7396         * config/rs6000/rs6000.h (FUNCTION_ARG_PADDING): Delete.
7397         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
7398         * config/rs6000/aix.h (BLOCK_REG_PADDING): Use pad_direction
7399         instead of direction.  Use targetm.calls.function_arg_padding.
7400         * config/rs6000/darwin.h (BLOCK_REG_PADDING): Likewise.
7401         * config/rs6000/freebsd64.h (BLOCK_REG_PADDING): Likewise.
7402         * config/rs6000/linux64.h (BLOCK_REG_PADDING): Likewise.
7403         * config/rs6000/rs6000-protos.h (function_arg_padding): Delete.
7404         * config/rs6000/rs6000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
7405         (function_arg_padding): Rename to...
7406         (rs6000_function_arg_padding): ...this.  Make static.  Return
7407         pad_direction instead of direction.
7408         (rs6000_return_in_msb): Use rs6000_function_arg_padding.
7409         * config/s390/s390.h (FUNCTION_ARG_PADDING): Delete.
7410         * config/s390/s390.c (s390_function_arg_padding): New function.
7411         (TARGET_FUNCTION_ARG_PADDING): Redefine.
7412         * config/sparc/sparc.h (FUNCTION_ARG_PADDING): Delete.
7413         * config/sparc/sparc-protos.h (function_arg_padding): Delete.
7414         * config/sparc/sparc.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
7415         (function_arg_padding): Rename to...
7416         (sparc_function_arg_padding): ...this.  Make static.  Return
7417         pad_direction instead of direction.
7418         * config/spu/spu.h (FUNCTION_ARG_PADDING): Delete.
7419         * config/spu/spu.c (spu_function_arg_padding): New function.
7420         (TARGET_FUNCTION_ARG_PADDING): Redefine.
7421         * system.h (FUNCTION_ARG_PADDING): Poison.
7423 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
7424             Alan Hayward  <alan.hayward@arm.com>
7425             David Sherwood  <david.sherwood@arm.com>
7427         * target.def (modes_tieable_p): New hook.
7428         * doc/tm.texi (MODES_TIEABLE_P): Replace with...
7429         (TARGET_MODES_TIEABLE_P): ...this.
7430         * doc/tm.texi.in: Regenerate.
7431         * hooks.h (hook_bool_mode_mode_true): Declare.
7432         * hooks.c (hook_bool_mode_mode_true): New function.
7433         * combine.c (subst): Use targetm.modes_tieable_p instead of
7434         MODES_TIEABLE_P.
7435         * dse.c (find_shift_sequence): Likewise.
7436         * expmed.c (extract_low_bits): Likewise.
7437         * lower-subreg.c: Include target.h.
7438         (find_decomposable_subregs): Use targetm.modes_tieable_p instead of
7439         MODES_TIEABLE_P.
7440         * rtlanal.c (rtx_cost): Likewise.
7441         * config/aarch64/aarch64.h (MODES_TIEABLE_P): Delete.
7442         * config/aarch64/aarch64-protos.h (aarch64_modes_tieable_p): Delete.
7443         * config/aarch64/aarch64.c (aarch64_modes_tieable_p): Make static.
7444         (TARGET_MODES_TIEABLE_P): Redefine.
7445         * config/alpha/alpha.h (MODES_TIEABLE_P): Delete.
7446         * config/alpha/alpha.c (alpha_modes_tieable_p): New function.
7447         (TARGET_MODES_TIEABLE_P): Redefine.
7448         * config/arc/arc.h (MODES_TIEABLE_P): Delete.
7449         * config/arc/arc.c (TARGET_MODES_TIEABLE_P): Redefine.
7450         (arc_modes_tieable_p): New function.
7451         * config/arm/arm.h (MODES_TIEABLE_P): Delete.
7452         * config/arm/arm-protos.h (arm_modes_tieable_p): Delete.
7453         * config/arm/arm.c (TARGET_MODES_TIEABLE_P): Redefine.
7454         (arm_modes_tieable_p): Make static.
7455         * config/avr/avr.h (MODES_TIEABLE_P): Delete.
7456         * config/bfin/bfin.h (MODES_TIEABLE_P): Delete.
7457         * config/bfin/bfin.c (bfin_modes_tieable_p): New function.
7458         (TARGET_MODES_TIEABLE_P): Redefine.
7459         * config/c6x/c6x.h (MODES_TIEABLE_P): Delete.
7460         * config/c6x/c6x.c (c6x_modes_tieable_p): New function.
7461         (TARGET_MODES_TIEABLE_P): Redefine.
7462         * config/cr16/cr16.h (MODES_TIEABLE_P): Delete.
7463         * config/cr16/cr16.c (TARGET_MODES_TIEABLE_P): Redefine.
7464         (cr16_modes_tieable_p): New function.
7465         * config/cris/cris.h (MODES_TIEABLE_P): Delete.
7466         * config/epiphany/epiphany.h (MODES_TIEABLE_P): Delete.
7467         * config/fr30/fr30.h (MODES_TIEABLE_P): Delete.
7468         (TRULY_NOOP_TRUNCATION): Update comment.
7469         * config/frv/frv.h (MODES_TIEABLE_P): Delete.
7470         (TRULY_NOOP_TRUNCATION): Update comment.
7471         * config/frv/frv.c (TARGET_MODES_TIEABLE_P): Redefine.
7472         (frv_modes_tieable_p): New function.
7473         * config/ft32/ft32.h (MODES_TIEABLE_P): Delete.
7474         * config/h8300/h8300.h (MODES_TIEABLE_P): Delete.
7475         * config/h8300/h8300.c (h8300_modes_tieable_p): New function.
7476         (TARGET_MODES_TIEABLE_P): Redefine.
7477         * config/i386/i386.h (MODES_TIEABLE_P): Delete.
7478         * config/i386/i386-protos.h (ix86_modes_tieable_p): Delete.
7479         * config/i386/i386.c (ix86_modes_tieable_p): Make static.
7480         (TARGET_MODES_TIEABLE_P): Redefine.
7481         * config/ia64/ia64.h (MODES_TIEABLE_P): Delete.
7482         * config/ia64/ia64.c (TARGET_MODES_TIEABLE_P): Redefine.
7483         (ia64_modes_tieable_p): New function.
7484         * config/iq2000/iq2000.h (MODES_TIEABLE_P): Delete.
7485         * config/iq2000/iq2000.c (TARGET_MODES_TIEABLE_P): Redefine.
7486         (iq2000_modes_tieable_p): New function.
7487         * config/lm32/lm32.h (MODES_TIEABLE_P): Delete.
7488         * config/lm32/lm32.c (TARGET_MODES_TIEABLE_P): Redefine.
7489         (lm32_modes_tieable_p): New function.
7490         * config/m32c/m32c.h (MODES_TIEABLE_P): Delete.
7491         * config/m32c/m32c-protos.h (m32c_modes_tieable_p): Delete.
7492         * config/m32c/m32c.c (m32c_modes_tieable_p): Make static.
7493         (TARGET_MODES_TIEABLE_P): Redefine.
7494         * config/m32r/m32r.h (MODES_TIEABLE_P): Delete.
7495         * config/m32r/m32r.c (TARGET_MODES_TIEABLE_P): Redefine.
7496         (m32r_modes_tieable_p): New function.
7497         * config/m68k/m68k.h (MODES_TIEABLE_P): Delete.
7498         * config/m68k/m68k.c (TARGET_MODES_TIEABLE_P): Redefine.
7499         (m68k_modes_tieable_p): New function.
7500         * config/mcore/mcore.h (MODES_TIEABLE_P): Delete.
7501         * config/mcore/mcore.c (TARGET_MODES_TIEABLE_P): Redefine.
7502         (mcore_modes_tieable_p): New function.
7503         * config/microblaze/microblaze.h (MODES_TIEABLE_P): Delete.
7504         * config/microblaze/microblaze.c (microblaze_modes_tieable_p): New
7505         function.
7506         (TARGET_MODES_TIEABLE_P): Redefine.
7507         * config/mips/mips.h (MODES_TIEABLE_P): Delete.
7508         * config/mips/mips-protos.h (mips_modes_tieable_p): Delete.
7509         * config/mips/mips.c (mips_modes_tieable_p): Make static.
7510         (TARGET_MODES_TIEABLE_P): Redefine.
7511         * config/mmix/mmix.h (MODES_TIEABLE_P): Delete.
7512         * config/mn10300/mn10300.h (MODES_TIEABLE_P): Delete.
7513         * config/mn10300/mn10300-protos.h (mn10300_modes_tieable): Delete.
7514         * config/mn10300/mn10300.c (mn10300_modes_tieable): Rename to...
7515         (mn10300_modes_tieable_p): ...this and make static.
7516         (TARGET_MODES_TIEABLE_P): Redefine.
7517         * config/moxie/moxie.h (MODES_TIEABLE_P): Delete.
7518         * config/msp430/msp430.h (MODES_TIEABLE_P): Delete.
7519         * config/msp430/msp430-protos.h (msp430_modes_tieable_p): Delete.
7520         * config/msp430/msp430.c (TARGET_MODES_TIEABLE_P): Redefine.
7521         (msp430_modes_tieable_p): Make static.
7522         * config/nds32/nds32.h (MODES_TIEABLE_P): Delete.
7523         * config/nds32/nds32.c (nds32_modes_tieable_p): New function.
7524         (TARGET_MODES_TIEABLE_P): Redefine.
7525         * config/nios2/nios2.h (MODES_TIEABLE_P): Delete.
7526         * config/nvptx/nvptx.h (MODES_TIEABLE_P): Delete.
7527         * config/nvptx/nvptx.c (nvptx_modes_tieable_p): New function.
7528         (TARGET_MODES_TIEABLE_P): Redefine.
7529         * config/pa/pa.h (MODES_TIEABLE_P): Delete.
7530         * config/pa/pa-protos.h (pa_modes_tieable_p): Delete.
7531         * config/pa/pa.c (pa_modes_tieable_p): Make static.
7532         (TARGET_MODES_TIEABLE_P): Redefine.
7533         * config/pdp11/pdp11.h (MODES_TIEABLE_P): Delete.
7534         * config/pdp11/pdp11.c (TARGET_MODES_TIEABLE_P): Redefine.
7535         (pdp11_modes_tieable_p): New function.
7536         * config/powerpcspe/powerpcspe.h (MODES_TIEABLE_P): Delete.
7537         * config/powerpcspe/powerpcspe.c (TARGET_MODES_TIEABLE_P): Redefine.
7538         (rs6000_modes_tieable_p): New function.
7539         (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
7540         * config/powerpcspe/powerpcspe.md: Update comment.
7541         * config/riscv/riscv.h (MODES_TIEABLE_P): Delete.
7542         * config/riscv/riscv.c (riscv_modes_tieable_p): New function.
7543         (TARGET_MODES_TIEABLE_P): Redefine.
7544         * config/rl78/rl78.h (MODES_TIEABLE_P): Delete.
7545         * config/rl78/rl78.c (TARGET_MODES_TIEABLE_P): Redefine.
7546         (rl78_modes_tieable_p): New function.
7547         * config/rs6000/rs6000.h (MODES_TIEABLE_P): Delete.
7548         * config/rs6000/rs6000.c (TARGET_MODES_TIEABLE_P): Redefine.
7549         (rs6000_modes_tieable_p): New function.
7550         (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
7551         * config/rs6000/rs6000.md: Update comment.
7552         * config/rx/rx.h (MODES_TIEABLE_P): Delete.
7553         * config/rx/rx.c (rx_modes_tieable_p): New function.
7554         (TARGET_MODES_TIEABLE_P): Redefine.
7555         * config/s390/s390.h (MODES_TIEABLE_P): Delete.
7556         * config/s390/s390.c (s390_modes_tieable_p): New function.
7557         (TARGET_MODES_TIEABLE_P): Redefine.
7558         * config/sh/sh.h (MODES_TIEABLE_P): Delete.
7559         * config/sh/sh.c (TARGET_MODES_TIEABLE_P): Redefine.
7560         (sh_modes_tieable_p): New function.
7561         * config/sparc/sparc.h (MODES_TIEABLE_P): Delete.
7562         * config/sparc/sparc-protos.h (sparc_modes_tieable_p): Delete.
7563         * config/sparc/sparc.c (TARGET_MODES_TIEABLE_P): Redefine.
7564         (sparc_modes_tieable_p): Make static.
7565         * config/spu/spu.h (MODES_TIEABLE_P): Delete.
7566         * config/spu/spu.c (spu_modes_tieable_p): New function.
7567         (TARGET_MODES_TIEABLE_P): Redefine.
7568         * config/stormy16/stormy16.h (MODES_TIEABLE_P): Delete.
7569         * config/stormy16/stormy16.c (xstormy16_modes_tieable_p): New function.
7570         (TARGET_MODES_TIEABLE_P): Redefine.
7571         * config/tilegx/tilegx.h (MODES_TIEABLE_P): Delete.
7572         * config/tilepro/tilepro.h (MODES_TIEABLE_P): Delete.
7573         * config/v850/v850.h (MODES_TIEABLE_P): Delete.
7574         * config/v850/v850.c (v850_modes_tieable_p): New function.
7575         (TARGET_MODES_TIEABLE_P): Redefine.
7576         * config/vax/vax.h (MODES_TIEABLE_P): Delete.
7577         * config/visium/visium.h (MODES_TIEABLE_P): Delete.
7578         * config/visium/visium.c (TARGET_MODES_TIEABLE_P): Redefine.
7579         (visium_modes_tieable_p): New function.
7580         * config/xtensa/xtensa.h (MODES_TIEABLE_P): Delete.
7581         * config/xtensa/xtensa.c (TARGET_MODES_TIEABLE_P): Redefine.
7582         (xtensa_modes_tieable_p): New function.
7583         * system.h (MODES_TIEABLE_P): Poison.
7585 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
7586             Alan Hayward  <alan.hayward@arm.com>
7587             David Sherwood  <david.sherwood@arm.com>
7589         * target.def (hard_regno_mode_ok): New hook.
7590         * doc/tm.texi (HARD_REGNO_MODE_OK): Replace with...
7591         (TARGET_HARD_REGNO_MODE_OK): ...this.
7592         * doc/tm.texi.in: Regenerate.
7593         * hooks.h (hook_bool_uint_mode_true): Declare.
7594         * hooks.c (hook_bool_uint_mode_true): New function.
7595         * doc/md.texi: Refer to targetm.hard_regno_mode_ok instead of
7596         HARD_REGNO_MODE_OK.
7597         * genpreds.c (write_insn_preds_c): Add an include of target.h.
7598         * alias.c (init_alias_target): Use targetm.hard_regno_mode_ok
7599         instead of HARD_REGNO_MODE_OK.
7600         * caller-save.c: Include target.h.
7601         (reg_save_code): Use targetm.hard_regno_mode_ok instead of
7602         HARD_REGNO_MODE_OK.
7603         * combine.c (can_combine_p): Likewise.
7604         (combinable_i3pat): Likewise.
7605         (can_change_dest_mode): Likewise.
7606         * expr.c (init_expr_target): Likewise.
7607         (convert_move): Likewise.
7608         (convert_modes): Likewise.
7609         * ira.c (setup_prohibited_class_mode_regs): Likewise.
7610         (setup_prohibited_mode_move_regs): Likewise.
7611         * ira.h (target_ira): Likewise.
7612         * lra-assigns.c (find_hard_regno_for_1): Likewise.
7613         * lra-constraints.c (process_alt_operands): Likewise.
7614         (split_reg): Likewise.
7615         * recog.c (peep2_find_free_register): Likewise.
7616         * ree.c (combine_reaching_defs): Likewise.
7617         * regcprop.c (maybe_mode_change): Likewise.
7618         * reginfo.c (init_reg_sets_1): Likewise.
7619         (choose_hard_reg_mode): Likewise.
7620         (simplifiable_subregs): Likewise.
7621         * regrename.c (check_new_reg_p): Likewise.
7622         * reload.c (find_valid_class): Likewise.
7623         (find_valid_class_1): Likewise.
7624         (reload_inner_reg_of_subreg): Likewise.
7625         (push_reload): Likewise.
7626         (combine_reloads): Likewise.
7627         (find_dummy_reload): Likewise.
7628         (find_reloads): Likewise.
7629         * reload1.c (find_reg): Likewise.
7630         (set_reload_reg): Likewise.
7631         (allocate_reload_reg): Likewise.
7632         (choose_reload_regs): Likewise.
7633         (reload_adjust_reg_for_temp): Likewise.
7634         * rtlanal.c (subreg_size_offset_from_lsb): Likewise.
7635         (simplify_subreg_regno): Likewise.
7636         * sel-sched.c (init_regs_for_mode): Likewise.
7637         * varasm.c (make_decl_rtl): Likewise.
7638         * config/aarch64/aarch64.h (HARD_REGNO_MODE_OK): Delete.
7639         (MODES_TIEABLE_P): Use targetm.hard_regno_mode_ok instead of
7640         HARD_REGNO_MODE_OK.
7641         * config/aarch64/aarch64-protos.h (aarch64_hard_regno_mode_ok): Delete.
7642         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Make static.
7643         (TARGET_HARD_REGNO_MODE_OK): Redefine.
7644         * config/alpha/alpha.h (HARD_REGNO_MODE_OK): Delete.
7645         * config/alpha/alpha.c (alpha_hard_regno_mode_ok): New function.
7646         (TARGET_HARD_REGNO_MODE_OK): Redefine.
7647         * config/arc/arc.h (arc_hard_regno_mode_ok): Delete.
7648         (arc_mode_class): Delete.
7649         (HARD_REGNO_MODE_OK): Delete.
7650         * config/arc/arc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
7651         (arc_hard_regno_mode_ok): Rename old array to...
7652         (arc_hard_regno_mode_ok_modes): ...this.
7653         (arc_conditional_register_usage): Update accordingly.
7654         (arc_mode_class): Make static.
7655         (arc_hard_regno_mode_ok): New function.
7656         * config/arm/arm.h (HARD_REGNO_MODE_OK): Delete.
7657         * config/arm/arm-protos.h (arm_hard_regno_mode_ok): Delete.
7658         * config/arm/arm.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
7659         (arm_hard_regno_mode_ok): Make static.
7660         * config/arm/arm.md (movdi): Use targetm.hard_regno_mode_ok instead of
7661         HARD_REGNO_MODE_OK.
7662         * config/avr/avr-protos.h (avr_hard_regno_mode_ok): Delete.
7663         * config/avr/avr.h (HARD_REGNO_MODE_OK): Delete.
7664         * config/avr/avr.c (avr_hard_regno_mode_ok): Make static and
7665         return a bool.
7666         (TARGET_HARD_REGNO_MODE_OK): Redefine.
7667         * config/bfin/bfin-protos.h (hard_regno_mode_ok): Delete.
7668         * config/bfin/bfin.h (HARD_REGNO_MODE_OK): Delete.
7669         * config/bfin/bfin.c (hard_regno_mode_ok): Rename to...
7670         (bfin_hard_regno_mode_ok): ...this.  Make static and return a bool.
7671         (TARGET_HARD_REGNO_MODE_OK): Redefine.
7672         * config/bfin/predicates.md (valid_reg_operand): Use
7673         targetm.hard_regno_mode_ok instead of HARD_REGNO_MODE_OK.
7674         * config/c6x/c6x.h (HARD_REGNO_MODE_OK): Delete.
7675         * config/c6x/c6x.c (c6x_hard_regno_mode_ok): New function.
7676         (TARGET_HARD_REGNO_MODE_OK): Redefine.
7677         * config/cr16/cr16.h (HARD_REGNO_MODE_OK): Delete.
7678         * config/cr16/cr16-protos.h (cr16_hard_regno_mode_ok): Delete.
7679         * config/cr16/cr16.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
7680         (cr16_hard_regno_mode_ok): Make static and return a bool.
7681         * config/cris/cris.h (HARD_REGNO_MODE_OK): Delete.
7682         * config/cris/cris.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
7683         (cris_hard_regno_mode_ok): New function.
7684         * config/epiphany/epiphany.h (epiphany_hard_regno_mode_ok): Delete.
7685         (epiphany_mode_class): Delete.
7686         (HARD_REGNO_MODE_OK): Delete.
7687         * config/epiphany/epiphany-protos.h (hard_regno_mode_ok): Delete.
7688         * config/epiphany/epiphany.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
7689         (hard_regno_mode_ok): Rename to...
7690         (epiphany_hard_regno_mode_ok): ...this.  Make static and return a bool.
7691         * config/fr30/fr30.h (HARD_REGNO_MODE_OK): Delete.
7692         * config/fr30/fr30.md: Refer to targetm.hard_regno_mode_ok instead of
7693         HARD_REGNO_MODE_OK.
7694         * config/frv/frv.h (HARD_REGNO_MODE_OK): Delete.
7695         * config/frv/frv-protos.h (frv_hard_regno_mode_ok): Delete.
7696         * config/frv/frv.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
7697         (frv_hard_regno_mode_ok): Make static and return a bool.
7698         * config/frv/frv.md: Refer to targetm.hard_regno_mode_ok instead of
7699         HARD_REGNO_MODE_OK.
7700         * config/ft32/ft32.h (HARD_REGNO_MODE_OK): Delete.
7701         * config/h8300/h8300.h (HARD_REGNO_MODE_OK): Delete.
7702         * config/h8300/h8300-protos.h (h8300_hard_regno_mode_ok): Delete.
7703         * config/h8300/h8300.c (h8300_hard_regno_mode_ok): Make static
7704         and return a bool.
7705         (TARGET_HARD_REGNO_MODE_OK): Redefine.
7706         * config/i386/i386.h (HARD_REGNO_MODE_OK): Delete.
7707         * config/i386/i386-protos.h (ix86_hard_regno_mode_ok): Delete.
7708         * config/i386/i386.c (ix86_hard_regno_mode_ok): Make static and
7709         return a bool.
7710         (TARGET_HARD_REGNO_MODE_OK): Redefine.
7711         * config/ia64/ia64.h (HARD_REGNO_MODE_OK): Delete.
7712         * config/ia64/ia64.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
7713         (ia64_hard_regno_mode_ok): New function.
7714         * config/iq2000/iq2000.h (HARD_REGNO_MODE_OK): Delete.
7715         * config/iq2000/iq2000.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
7716         (iq2000_hard_regno_mode_ok): New function.
7717         * config/lm32/lm32.h (HARD_REGNO_MODE_OK): Delete.
7718         * config/lm32/lm32.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
7719         (lm32_hard_regno_mode_ok): New function.
7720         * config/m32c/m32c.h (HARD_REGNO_MODE_OK): Delete.
7721         * config/m32c/m32c-protos.h (m32c_hard_regno_ok): Delete.
7722         * config/m32c/m32c.c (class_can_hold_mode): Use m32c_hard_regno_mode_ok
7723         instead of HARD_REGNO_MODE_OK.
7724         (m32c_hard_regno_ok): Rename to...
7725         (m32c_hard_regno_mode_ok): ...this.  Make static and return a bool.
7726         (m32c_cannot_change_mode_class): Update accordingly.
7727         (TARGET_HARD_REGNO_MODE_OK): Redefine.
7728         * config/m32r/m32r.h (m32r_hard_regno_mode_ok): Delete.
7729         (m32r_mode_class): Delete.
7730         (HARD_REGNO_MODE_OK): Delete.
7731         * config/m32r/m32r.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
7732         (m32r_hard_regno_mode_ok): Rename to...
7733         (m32r_hard_regno_modes): ...this.
7734         (m32r_mode_class): Make static.
7735         (m32r_hard_regno_mode_ok): New function.
7736         * config/m68k/m68k.h (HARD_REGNO_MODE_OK): Delete.
7737         * config/m68k/m68k-protos.h (m68k_regno_mode_ok): Delete.
7738         * config/m68k/m68k.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
7739         (m68k_hard_regno_mode_ok): Make static.
7740         * config/mcore/mcore.h (HARD_REGNO_MODE_OK): Delete.
7741         * config/mcore/mcore.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
7742         (mcore_hard_regno_mode_ok): New function.
7743         * config/microblaze/microblaze.h (microblaze_hard_regno_mode_ok)
7744         (HARD_REGNO_MODE_OK): Delete.
7745         * config/microblaze/microblaze.c (microblaze_hard_regno_mode_ok):
7746         Rename to...
7747         (microblaze_hard_regno_mode_ok_p): ...this and make static.
7748         (microblaze_hard_regno_mode_ok): New function.
7749         (TARGET_HARD_REGNO_MODE_OK): Redefine.
7750         * config/mips/mips.h (HARD_REGNO_MODE_OK): Delete.
7751         (mips_hard_regno_mode_ok): Delete.
7752         * config/mips/mips.c (mips_hard_regno_mode_ok): Rename to...
7753         (mips_hard_regno_mode_ok_p): ...this and make static.
7754         (mips_hard_regno_mode_ok_p): Rename to...
7755         (mips_hard_regno_mode_ok_uncached): ...this.
7756         (mips_hard_regno_mode_ok): New function.
7757         (mips_class_max_nregs): Use mips_hard_regno_mode_ok instead
7758         of HARD_REGNO_MODE_OK.
7759         (mips_option_override): Update after above name changes.
7760         (TARGET_HARD_REGNO_MODE_OK): Redefine.
7761         * config/mmix/mmix.h (HARD_REGNO_MODE_OK): Delete.
7762         * config/mn10300/mn10300.h (HARD_REGNO_MODE_OK): Delete.
7763         * config/mn10300/mn10300-protos.h (mn10300_hard_regno_mode_ok): Delete.
7764         * config/mn10300/mn10300.c (mn10300_hard_regno_mode_ok): Make static.
7765         (TARGET_HARD_REGNO_MODE_OK): Redefine.
7766         * config/moxie/moxie.h (HARD_REGNO_MODE_OK): Delete.
7767         * config/msp430/msp430.h (HARD_REGNO_MODE_OK): Delete.
7768         * config/msp430/msp430-protos.h (msp430_hard_regno_mode_ok): Delete.
7769         * config/msp430/msp430.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
7770         (msp430_hard_regno_mode_ok): Make static and return a bool.
7771         * config/nds32/nds32.h (HARD_REGNO_MODE_OK): Delete.
7772         * config/nds32/nds32-protos.h (nds32_hard_regno_mode_ok): Delete.
7773         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Make static
7774         and return a bool.
7775         (TARGET_HARD_REGNO_MODE_OK): Redefine.
7776         * config/nios2/nios2.h (HARD_REGNO_MODE_OK): Delete.
7777         * config/nvptx/nvptx.h (HARD_REGNO_MODE_OK): Delete.
7778         * config/pa/pa.h (MODES_TIEABLE_P): Update commentary.
7779         * config/pa/pa32-regs.h (HARD_REGNO_MODE_OK): Rename to...
7780         (PA_HARD_REGNO_MODE_OK): ...this
7781         * config/pa/pa64-regs.h (HARD_REGNO_MODE_OK): Rename to...
7782         (PA_HARD_REGNO_MODE_OK): ...this.
7783         * config/pa/pa.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
7784         (pa_hard_regno_mode_ok): New function.
7785         * config/pdp11/pdp11.h (HARD_REGNO_MODE_OK): Delete.
7786         * config/pdp11/pdp11.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
7787         (pdp11_hard_regno_mode_ok): New function.
7788         * config/powerpcspe/powerpcspe.h (HARD_REGNO_MODE_OK): Delete.
7789         * config/powerpcspe/powerpcspe-protos.h (rs6000_hard_regno_mode_ok_p):
7790         Delete.
7791         * config/powerpcspe/powerpcspe.c (rs6000_hard_regno_mode_ok_p):
7792         Make static.
7793         (TARGET_HARD_REGNO_MODE_OK): Redefine.
7794         (rs6000_hard_regno_mode_ok): Rename to...
7795         (rs6000_hard_regno_mode_ok_uncached): ...this.
7796         (rs6000_init_hard_regno_mode_ok): Update accordingly.
7797         (rs6000_hard_regno_mode_ok): New function.
7798         * config/riscv/riscv.h (HARD_REGNO_MODE_OK): Delete.
7799         * config/riscv/riscv-protos.h (riscv_hard_regno_mode_ok_p): Delete.
7800         * config/riscv/riscv.c (riscv_hard_regno_mode_ok_p): Rename to...
7801         (riscv_hard_regno_mode_ok): ...this and make static.
7802         (TARGET_HARD_REGNO_MODE_OK): Redefine.
7803         * config/rl78/rl78.h (HARD_REGNO_MODE_OK): Delete.
7804         * config/rl78/rl78-protos.h (rl78_hard_regno_mode_ok): Delete.
7805         * config/rl78/rl78.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
7806         (rl78_hard_regno_mode_ok): Make static and return bool.
7807         * config/rs6000/rs6000.h (HARD_REGNO_MODE_OK): Delete.
7808         * config/rs6000/rs6000-protos.h (rs6000_hard_regno_mode_ok_p):
7809         Delete.
7810         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok_p): Make static.
7811         (TARGET_HARD_REGNO_MODE_OK): Redefine.
7812         (rs6000_hard_regno_mode_ok): Rename to...
7813         (rs6000_hard_regno_mode_ok_uncached): ...this.
7814         (rs6000_init_hard_regno_mode_ok): Update accordingly.
7815         (rs6000_hard_regno_mode_ok): New function.
7816         * config/rx/rx.h (HARD_REGNO_MODE_OK): Delete.
7817         * config/rx/rx.c (rx_hard_regno_mode_ok): New function.
7818         (TARGET_HARD_REGNO_MODE_OK): Redefine.
7819         * config/s390/s390.h (HARD_REGNO_MODE_OK): Delete.
7820         * config/s390/s390-protos.h (s390_hard_regno_mode_ok): Delete.
7821         * config/s390/s390.c (s390_hard_regno_mode_ok): Make static.
7822         (TARGET_HARD_REGNO_MODE_OK): Redefine.
7823         * config/sh/sh.h (HARD_REGNO_MODE_OK): Delete.
7824         * config/sh/sh-protos.h (sh_hard_regno_mode_ok): Delete.
7825         * config/sh/sh.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
7826         (sh_hard_regno_mode_ok): Make static.
7827         * config/sparc/constraints.md: Refer to targetm.hard_regno_mode_ok
7828         instead of HARD_REGNO_MODE_OK.
7829         * config/sparc/sparc.h (hard_regno_mode_classes): Delete.
7830         (sparc_mode_class): Delete.
7831         (HARD_REGNO_MODE_OK): Delete.
7832         * config/sparc/sparc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
7833         (hard_regno_mode_classes): Make static.
7834         (sparc_mode_class): Likewise.
7835         (sparc_hard_regno_mode_ok): New function.
7836         * config/spu/spu.h (HARD_REGNO_MODE_OK): Delete.
7837         * config/stormy16/stormy16.h (HARD_REGNO_MODE_OK): Delete.
7838         * config/stormy16/stormy16.c (xstormy16_hard_regno_mode_ok): New
7839         function.
7840         (TARGET_HARD_REGNO_MODE_OK): Redefine.
7841         * config/tilegx/tilegx.h (HARD_REGNO_MODE_OK): Delete.
7842         * config/tilepro/tilepro.h (HARD_REGNO_MODE_OK): Delete.
7843         * config/v850/v850.h (HARD_REGNO_MODE_OK): Delete.
7844         * config/v850/v850.c (v850_hard_regno_mode_ok): New function.
7845         (TARGET_HARD_REGNO_MODE_OK): Redefine.
7846         * config/vax/vax.h (HARD_REGNO_MODE_OK): Delete.
7847         * config/visium/visium.h (HARD_REGNO_MODE_OK): Delete.
7848         * config/visium/visium.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
7849         (visium_hard_regno_mode_ok): New function.
7850         * config/visium/visium.md: Refer to targetm.hard_regno_mode_ok
7851         instead of HARD_REGNO_MODE_OK.
7852         * config/xtensa/xtensa.h (xtensa_hard_regno_mode_ok): Delete.
7853         (HARD_REGNO_MODE_OK): Delete.
7854         * config/xtensa/xtensa.c (xtensa_hard_regno_mode_ok): Rename to...
7855         (xtensa_hard_regno_mode_ok_p): ...this and make static.
7856         (xtensa_option_override): Update accordingly.
7857         (TARGET_HARD_REGNO_MODE_OK): Redefine.
7858         (xtensa_hard_regno_mode_ok): New function.
7859         * system.h (HARD_REGNO_MODE_OK): Poison.
7861 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
7862             Alan Hayward  <alan.hayward@arm.com>
7863             David Sherwood  <david.sherwood@arm.com>
7865         * target.def (hard_regno_call_part_clobbered): New hook.
7866         * doc/tm.texi.in (HARD_REGNO_CALL_PART_CLOBBERED): Replace with...
7867         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): ...this hook.
7868         * doc/tm.texi: Regenerate.
7869         * hooks.h (hook_bool_uint_mode_false): Declare.
7870         * hooks.c (hook_bool_uint_mode_false): New function.
7871         * regs.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
7872         * cselib.c (cselib_process_insn): Use
7873         targetm.hard_regno_call_part_clobbered instead of
7874         HARD_REGNO_CALL_PART_CLOBBERED.
7875         * ira-conflicts.c (ira_build_conflicts): Likewise.
7876         * ira-costs.c (ira_tune_allocno_costs): Likewise.
7877         * lra-constraints.c (need_for_call_save_p): Likewise.
7878         * lra-lives.c: Include target.h.
7879         (check_pseudos_live_through_calls): Use
7880         targetm.hard_regno_call_part_clobbered instead of
7881         HARD_REGNO_CALL_PART_CLOBBERED.
7882         * regcprop.c: Include target.h.
7883         (copyprop_hardreg_forward_1): Use
7884         targetm.hard_regno_call_part_clobbered instead of
7885         HARD_REGNO_CALL_PART_CLOBBERED.
7886         * reginfo.c (choose_hard_reg_mode): Likewise.
7887         * regrename.c (check_new_reg_p): Likewise.
7888         * reload.c (find_equiv_reg): Likewise.
7889         * reload1.c (emit_reload_insns): Likewise.
7890         * sched-deps.c (deps_analyze_insn): Likewise.
7891         * sel-sched.c (init_regs_for_mode): Likewise.
7892         (mark_unavailable_hard_regs): Likewise.
7893         * targhooks.c (default_dwarf_frame_reg_mode): Likewise.
7894         * config/aarch64/aarch64.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
7895         * config/aarch64/aarch64.c (aarch64_hard_regno_call_part_clobbered):
7896         New function.
7897         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
7898         * config/avr/avr.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
7899         * config/avr/avr-protos.h (avr_hard_regno_call_part_clobbered):
7900         Delete.
7901         * config/avr/avr.c (avr_hard_regno_call_part_clobbered): Make static
7902         and return a bool.
7903         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
7904         * config/i386/i386.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
7905         * config/i386/i386.c (ix86_hard_regno_call_part_clobbered): New
7906         function.
7907         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
7908         * config/mips/mips.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
7909         * config/mips/mips.c (mips_hard_regno_call_part_clobbered): New
7910         function.
7911         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
7912         * config/powerpcspe/powerpcspe.h (HARD_REGNO_CALL_PART_CLOBBERED):
7913         Delete.
7914         * config/powerpcspe/powerpcspe.c
7915         (rs6000_hard_regno_call_part_clobbered): New function.
7916         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
7917         * config/rs6000/rs6000.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
7918         * config/rs6000/rs6000.c (rs6000_hard_regno_call_part_clobbered):
7919         New function.
7920         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
7921         * config/s390/s390.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
7922         * config/s390/s390.c (s390_hard_regno_call_part_clobbered): New
7923         function.
7924         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
7925         * config/sh/sh.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
7926         * system.h (HARD_REGNO_CALL_PART_CLOBBERED): Poison.
7928 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
7929             Alan Hayward  <alan.hayward@arm.com>
7930             David Sherwood  <david.sherwood@arm.com>
7932         * rtl.h (subreg_memory_offset): Declare.
7933         * emit-rtl.c (subreg_memory_offset): New function.
7934         * expmed.c (store_bit_field_1): Use it.
7935         * expr.c (undefined_operand_subword_p): Likewise.
7936         * simplify-rtx.c (simplify_subreg): Likewise.
7938 2017-09-04  Alexander Monakov  <amonakov@ispras.ru>
7940         PR rtl-optimization/57448
7941         PR target/67458
7942         PR target/81316
7943         * optabs.c (expand_atomic_load): Place compiler memory barriers if
7944         using atomic_load pattern.
7945         (expand_atomic_store): Likewise.
7947 2017-09-04  Jakub Jelinek  <jakub@redhat.com>
7949         PR sanitizer/81981
7950         * gimple-fold.c (gimple_fold_call): Optimize away useless UBSAN_PTR
7951         and UBSAN_BOUNDS internal calls.  Clean up IFN_UBSAN_OBJECT_SIZE
7952         handling.  Use replace_call_with_value with NULL instead of
7953         gsi_replace, unlink_stmt_vdef and release_defs.
7955         * gdbhooks.py (OptMachineModePrinter.to_string): Use 8 spaces
7956         instead of tab.
7958         * lra-remat.c (reg_overlap_for_remat_p): Fix a pasto.
7960 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
7962         PR bootstrap/82045
7963         * rtl.h (emit_library_call_value_1): Declare.
7964         (emit_library_call): Replace declaration with a series of overloads.
7965         Remove the parameter count argument.
7966         (emit_library_call_value): Likewise.
7967         * calls.c (emit_library_call_value_1): Make global.  Replace varargs
7968         with an "rtx_mode_t *".
7969         (emit_library_call_value): Delete.
7970         (emit_library_call): Likewise.
7971         * asan.c (asan_emit_stack_protection): Update calls accordingly.
7972         (asan_emit_allocas_unpoison): Likewise.
7973         * builtins.c (expand_builtin_powi): Likewise.
7974         (expand_asan_emit_allocas_unpoison): Likewise.
7975         * cfgexpand.c (expand_main_function): Likewise.
7976         * config/aarch64/aarch64.c (aarch64_trampoline_init): Likewise.
7977         * config/aarch64/aarch64.h (PROFILE_HOOK): Likewise.
7978         * config/alpha/alpha.c (alpha_trampoline_init): Likewise.
7979         * config/arm/arm.c (arm_trampoline_init): Likewise.
7980         (arm_call_tls_get_addr): Likewise.
7981         (arm_expand_divmod_libfunc): Likewise.
7982         * config/bfin/bfin.md (umulsi3_highpart): Likewise.
7983         (smulsi3_highpart): Likewise.
7984         * config/c6x/c6x.c (c6x_initialize_trampoline): Likewise.
7985         (c6x_expand_compare): Likewise.
7986         (c6x_expand_movmem): Likewise.
7987         * config/frv/frv.c (frv_trampoline_init): Likewise.
7988         * config/i386/i386.c (ix86_trampoline_init): Likewise.
7989         (ix86_expand_divmod_libfunc): Likewise.
7990         * config/ia64/ia64.c (ia64_expand_tls_address): Likewise.
7991         (ia64_expand_compare): Likewise.
7992         (ia64_profile_hook): Likewise.
7993         * config/ia64/ia64.md (save_stack_nonlocal): Likewise.
7994         (nonlocal_goto): Likewise.
7995         (restore_stack_nonlocal): Likewise.
7996         * config/m32r/m32r.c (block_move_call): Likewise.
7997         (m32r_trampoline_init): Likewise.
7998         * config/m68k/linux.h (FINALIZE_TRAMPOLINE): Likewise.
7999         * config/m68k/m68k.c (m68k_call_tls_get_addr): Likewise.
8000         (m68k_call_m68k_read_tp): Likewise.
8001         * config/microblaze/microblaze.c (microblaze_call_tls_get_addr)
8002         (microblaze_expand_divide): Likewise.
8003         * config/mips/mips.h (mips_args): Likewise.
8004         * config/mips/sdemtk.h (mips_sync_icache): Likewise.
8005         (MIPS_ICACHE_SYNC): Likewise.
8006         * config/nios2/nios2.c (nios2_emit_expensive_div): Likewise.
8007         (nios2_trampoline_init): Likewise.
8008         * config/pa/pa.c (hppa_tls_call): Likewise.
8009         (pa_trampoline_init): Likewise.
8010         * config/pa/pa.md (canonicalize_funcptr_for_compare): Likewise.
8011         * config/powerpcspe/powerpcspe.c (rs6000_legitimize_tls_address)
8012         (expand_strn_compare): Likewise.
8013         (rs6000_generate_compare): Likewise.
8014         (rs6000_expand_float128_convert): Likewise.
8015         (output_profile_hook): Likewise.
8016         (rs6000_trampoline_init): Likewise.
8017         * config/powerpcspe/powerpcspe.md (neg<mode>2): Likewise.
8018         * config/riscv/riscv.h (PROFILE_HOOK): Likewise.
8019         * config/rs6000/rs6000-string.c (expand_strn_compare): Likewise.
8020         * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise.
8021         (rs6000_generate_compare): Likewise.
8022         (rs6000_expand_float128_convert): Likewise.
8023         (output_profile_hook): Likewise.
8024         (rs6000_trampoline_init): Likewise.
8025         * config/rs6000/rs6000.md (neg<mode>2): Likewise.
8026         * config/sh/sh.c (sh_trampoline_init): Likewise.
8027         * config/sparc/sparc.c (emit_soft_tfmode_libcall): Likewise.
8028         (sparc_emit_float_lib_cmp): Likewise.
8029         (sparc32_initialize_trampoline): Likewise.
8030         (sparc64_initialize_trampoline): Likewise.
8031         (sparc_profile_hook): Likewise.
8032         * config/spu/spu.c (ea_load_store): Likewise.
8033         * config/spu/spu.md (floatunssidf2): Likewise.
8034         * config/tilegx/tilegx.c (tilegx_trampoline_init): Likewise.
8035         * config/tilepro/tilepro.c (tilepro_trampoline_init): Likewise.
8036         * config/visium/visium.c (expand_block_move_4): Likewise.
8037         (expand_block_move_2): Likewise.
8038         (expand_block_move_1): Likewise.
8039         (expand_block_set_4): Likewise.
8040         (expand_block_set_2): Likewise.
8041         (expand_block_set_1): Likewise.
8042         (visium_trampoline_init): Likewise.
8043         (visium_profile_hook): Likewise.
8044         * config/xtensa/xtensa.c (xtensa_expand_nonlocal_goto): Likewise.
8045         (xtensa_setup_frame_addresses): Likewise.
8046         (xtensa_trampoline_init): Likewise.
8047         * except.c (sjlj_emit_function_enter): Likewise.
8048         (sjlj_emit_function_exit): Likewise.
8049         * explow.c (allocate_dynamic_stack_space): Likewise.
8050         (probe_stack_range): Likewise.
8051         * expr.c (convert_mode_scalar): Likewise.
8052         * optabs.c (expand_binop): Likewise.
8053         (expand_twoval_binop_libfunc): Likewise.
8054         (expand_unop): Likewise.
8055         (prepare_cmp_insn): Likewise.
8056         (prepare_float_lib_cmp): Likewise.
8057         (expand_float): Likewise.
8058         (expand_fix): Likewise.
8059         (expand_fixed_convert): Likewise.
8060         (maybe_emit_sync_lock_test_and_set): Likewise.
8061         (expand_atomic_compare_and_swap): Likewise.
8062         (expand_mem_thread_fence): Likewise.
8063         (expand_atomic_fetch_op): Likewise.
8065 2017-09-03  Gerald Pfeifer  <gerald@pfeifer.com>
8067         * doc/generic.texi (OpenACC): Adjust URL.
8068         * doc/invoke.texi (C Dialect Options): Ditto.
8070 2017-09-03  Uros Bizjak  <ubizjak@gmail.com>
8072         * config/i386/i386.md (*bt<mode>): Use nonimmediate_operand
8073         predicate for operand 1.  Add (m,<S>) constraint.
8074         (*jcc_bt<mode>): Use nonimmediate_operand predicate for operand 1.
8075         Prevent memory operand 1 with register operand 2.
8077 2017-09-01  Segher Boessenkool  <segher@kernel.crashing.org>
8079         PR rtl-optimization/82024
8080         * combine.c (try_combine): If the combination result is a PARALLEL,
8081         and we only need to retain the SET in there that would be placed
8082         at I2, check that we can place that at I3 instead, before doing so.
8084 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
8086         PR target/81766
8087         * config/i386/i386.c (ix86_init_large_pic_reg): Return label
8088         instead of void.
8089         (ix86_init_pic_reg): Remember label from ix86_init_large_pic_reg,
8090         if non-NULL and preceded by NOTE_INSN_BASIC_BLOCK, swap the note
8091         and label.
8093 2017-09-01  Joerg Sonnenberger  <joerg@bec.de>
8094             Jeff Law  <law@redhat.com>
8096         * varasm.c (bss_initializer_p): Do not put constants into .bss
8097         (categorize_decl_for_section): Handle bss_initializer_p returning
8098         false when DECL_INITIAL is NULL.
8100 2017-09-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8102         PR target/82012
8103         * config/s390/s390.c (s390_can_inline_p): New function.
8105 2017-09-01  Jeff Law  <law@redhat.com>
8107         PR tree-optimization/82052
8108         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
8109         Always initialize the returned slot after a hash table miss
8110         when INSERT is true.
8112 2017-09-01  Alexander Monakov  <amonakov@ispras.ru>
8114         * config/s390/s390.md (mem_signal_fence): Remove.
8115         * doc/md.texi (mem_signal_fence): Remove.
8116         * optabs.c (expand_mem_signal_fence): Remove uses of mem_signal_fence.
8117         Update comments.
8118         * target-insns.def (mem_signal_fence): Remove.
8120 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
8122         PR sanitizer/81902
8123         * doc/invoke.texi: Document -fsanitize=pointer-overflow.
8125         PR sanitizer/81923
8126         * asan.c (create_odr_indicator): Strip name encoding from assembler
8127         name before appending it after __odr_asan_.
8129 2017-09-01  Martin Liska  <mliska@suse.cz>
8131         PR tree-optimization/82059
8132         * gimple-ssa-isolate-paths.c (isolate_path): Add profile and
8133         frequency only when an edge is redirected.
8135 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
8137         * config/arc/arc-c.c (__ARC_LPC_WIDTH__): Add builtin define.
8138         * config/arc/arc.c (ARC_MAX_LOOP_LENGTH): Define.
8139         (arc_conditional_register_usage): Remove ARC600 lp_count
8140         exception.
8141         (arc_file_start): Emit Tag_ARC_CPU_variation.
8142         (arc_can_use_doloop_p): New conditions to use ZOLs.
8143         (hwloop_fail): New function.
8144         (hwloop_optimize): Likewise.
8145         (hwloop_pattern_reg): Likewise.
8146         (arc_doloop_hooks): New struct, to be used with reorg_loops.
8147         (arc_reorg_loops): New function, calls reorg_loops.
8148         (arc_reorg): Call arc_reorg_loops.  Remove old ZOL handling.
8149         (arc600_corereg_hazard): Remove ZOL checking, case handled by
8150         hwloop_optimize.
8151         (arc_loop_hazard): Remove function, functionality moved into
8152         hwloop_optimize.
8153         (arc_hazard): Remove arc_loop_hazard call.
8154         (arc_adjust_insn_length): Remove ZOL handling, functionality moved
8155         into hwloop_optimize.
8156         (arc_label_align): Remove ZOL handling.
8157         * config/arc/arc.h (LOOP_ALIGN): Changed to 0.
8158         * config/arc/arc.md (doloop_begin): Remove pattern.
8159         (doloop_begin_i): Likewise.
8160         (doloop_end_i): Likewise.
8161         (doloop_fallback): Likewise.
8162         (doloop_fallback_m): Likewise.
8163         (doloop_end): Reimplement expand.
8164         (arc_lp): New pattern for LP instruction.
8165         (loop_end): New pattern.
8166         (loop_fail): Likewise.
8167         (decrement_and_branch_until_zero): Likewise.
8168         * config/arc/arc.opt (mlpc-width): New option.
8169         * doc/invoke.texi (mlpc-width): Document option.
8171 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
8173         * config/arc/arc.c (arc_ifcvt): Remove use of merge_blocks call.
8174         (arc_ccfsm_advance): Fix checking for delay slots.
8175         (arc_reorg): Add rtl dump after each call to arc_ifcvt.
8177 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
8179         * config/arc/arc.md (movqi_insn): Add stores to save constant long
8180         immediates.
8181         (movhi_insn): Update store instruction constraint which are saving
8182         6-bit short immediates.
8183         (movsi_insn): Consider also short scaled load operations.
8184         (zero_extendhisi2_i): Use Usd constraint instead of T.
8185         (extendhisi2_i): Add q constraint.
8186         (arc_clzsi2): Add type and length attributes.
8187         (arc_ctzsi2): Likewise.
8188         * config/arc/constraints.md (Usc): Update constraint, the
8189         assembler can parse two relocations for a single instruction.
8191 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
8193         * config/arc/arc.c (arc_use_anchors_for_symbol_p): New function.
8194         (TARGET_USE_ANCHORS_FOR_SYMBOL_P): Define.
8196 2017-08-31  Olivier Hainque  <hainque@adacore.com>
8198         * config.gcc (powerpc-wrs-vxworks|vxworksae|vxworksmils): Now
8199         match as powerpc-wrs-vxworks*.
8201 2017-08-31  James Greenhalgh  <james.greenhalgh@arm.com>
8203         * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): Fix
8204         register constraint for by-element operand.
8205         (aarch64_mls_elt_merge<mode>): Likewise.
8207 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
8209         * config/arc/arc.c (arc_can_follow_jump): Check for short
8210         branches.
8212 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
8214         * config.gcc: Use g.opt for arc.
8215         * config/arc/arc.c (LEGITIMATE_SCALED_ADDRESS_P): Deleted,
8216         functionality moved to ...
8217         (legitimate_scaled_address_p): New function, ...here.
8218         (LEGITIMATE_SMALL_DATA_OFFSET_P): New define.
8219         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Use the above define.
8220         (legitimate_offset_address_p): Delete TARGET_NO_SDATA_SET
8221         condition.
8222         (arc_override_options): Handle G option.
8223         (arc_output_pic_addr_const): Correct function definition.
8224         (arc_legitimate_address_p): Use legitimate_scaled_address_p.
8225         (arc_decl_anon_ns_mem_p): Delete.
8226         (arc_in_small_data_p): Overhaul this function to take into
8227         consideration the value given via G option.
8228         (arc_rewrite_small_data_1): Renamed and corrected old
8229         arc_rewrite_small_data function.
8230         (arc_rewrite_small_data): New function.
8231         (small_data_pattern): Don't use pic_offset_table_rtx.
8232         * config/arc/arc.h (CC1_SPEC): Recognize G option.
8233         * config/arc/simdext.md (movmisalignv2hi): Use
8234         prepare_move_operands function.
8235         (mov*): Likewise.
8236         (movmisalign*): Likewise.
8237         * doc/invoke.texi (ARC options): Document -G option.
8239 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
8241         * config/arc/arc-protos.h (compact_sda_memory_operand): Update
8242         prototype.
8243         * config/arc/arc.c (arc_print_operand): Output scalled address for
8244         sdata whenever is possible.
8245         (arc_in_small_data_p): Allow sdata for 64bit datum when double
8246         load/stores are available.
8247         (compact_sda_memory_operand): Check for the alignment required by
8248         code density instructions.
8249         * config/arc/arc.md (movsi_insn): Use newly introduced Us0
8250         constraint.
8251         * config/arc/constraints.md (Usd): Update constraint.
8252         (Us0): New constraint.
8253         (Usc): Update constraint.
8255 2017-08-31  Richard Biener  <rguenther@suse.de>
8257         PR middle-end/82054
8258         * dwarf2out.c (dwarf2out_early_global_decl): Process each
8259         function only once.
8261 2017-08-31  Tamar Christina  <tamar.christina@arm.com>
8263         * config/aarch64/aarch64-builtins.c (aarch64_init_simd_builtins):
8264         Resize type_signature.
8266 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
8267             Alan Hayward  <alan.hayward@arm.com>
8268             David Sherwood  <david.sherwood@arm.com>
8270         * config/aarch64/aarch64.c (aarch64_base_register_rtx_p): Only allow
8271         subregs whose inner modes can be stored in GPRs.
8272         (aarch64_classify_index): Likewise.
8274 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
8275             Alan Hayward  <alan.hayward@arm.com>
8276             David Sherwood  <david.sherwood@arm.com>
8278         * config/aarch64/iterators.md (V_cmp_result): Rename to...
8279         (V_INT_EQUIV): ...this.
8280         (v_cmp_result): Rename to...
8281         (v_int_equiv): ...this.
8282         * config/aarch64/aarch64.md (xorsign<mode>3): Update accordingly.
8283         * config/aarch64/aarch64-simd.md (xorsign<mode>3): Likewise.
8284         (copysign<mode>3): Likewise.
8285         (aarch64_simd_bsl<mode>_internal): Likewise.
8286         (aarch64_simd_bsl<mode>): Likewise.
8287         (vec_cmp<mode><mode>): Likewise.
8288         (vcond<mode><mode>): Likewise.
8289         (vcond<v_cmp_mixed><mode>): Likewise.
8290         (vcondu<mode><v_cmp_mixed>): Likewise.
8291         (aarch64_cm<optab><mode>): Likewise.
8292         (aarch64_cmtst<mode>): Likewise.
8293         (aarch64_fac<optab><mode>): Likewise.
8294         (vec_perm_const<mode>): Likewise.
8295         (vcond_mask_<mode><v_cmp_result>): Rename to...
8296         (vcond_mask_<mode><v_int_equiv>): ...this.
8297         (vec_cmp<mode><v_cmp_result>): Rename to...
8298         (vec_cmp<mode><v_int_equiv>): ...this.
8300 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
8301             Alan Hayward  <alan.hayward@arm.com>
8302             David Sherwood  <david.sherwood@arm.com>
8304         * config/aarch64/aarch64-modes.def: Remove 32-, 48- and 64-byte
8305         vector modes.
8306         * config/aarch64/iterators.md (VRL2, VRL3, VRL4): Delete.
8307         * config/aarch64/aarch64.md (UNSPEC_LD2_DREG, UNSPEC_LD3_DREG)
8308         (UNSPEC_LD4_DREG): New unspecs.
8309         * config/aarch64/aarch64-simd.md (aarch64_ld2<mode>_dreg_le)
8310         (aarch64_ld2<mode>_dreg_be): Replace with...
8311         (aarch64_ld2<mode>_dreg): ...this pattern and use the new DREG
8312         unspec.
8313         (aarch64_ld3<mode>_dreg_le)
8314         (aarch64_ld3<mode>_dreg_be): Replace with...
8315         (aarch64_ld3<mode>_dreg): ...this pattern and use the new DREG
8316         unspec.
8317         (aarch64_ld4<mode>_dreg_le)
8318         (aarch64_ld4<mode>_dreg_be): Replace with...
8319         (aarch64_ld4<mode>_dreg): ...this pattern and use the new DREG
8320         unspec.
8322 2017-08-30  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8324         PR tree-optimization/81987
8325         * gimple-ssa-strength-reduction.c (insert_initializers): Don't
8326         insert an initializer in a location not dominated by the stride
8327         definition.
8329 2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>
8331         * tree-eh.c (lower_try_finally_switch): Set the location of the finally
8332         on the entire header of the finally block in the fallthru case.
8334 2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>
8336         * varasm.c (decode_addr_const): Deal with INDIRECT_REF <INTEGER_CST>.
8338 2017-08-30  Pat Haugen  <pthaugen@us.ibm.com>
8340         * config/rs6000/rs6000.c (rs6000_emit_prologue_move_from_cr): Rename from
8341         rs6000_emit_move_from_cr and call renamed function.
8342         (rs6000_emit_prologue): Call renamed functions.
8343         * config/rs6000/rs6000.md (prologue_movesi_from_cr): Rename from
8344         movesi_from_cr, remove volatile CRs.
8346 2017-08-30  Jon Beniston  <jon@beniston.com>
8347             Richard Biener  <rguenther@suse.de>
8349         * tree-vect-patterns.c (vect_pattern_recog_1): Use VECTOR_TYPE_P instead
8350         of VECTOR_MODE_P check.
8351         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Allow single
8352         element vector types.
8354 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8356         * df.h (df_read_modify_subreg_p): Remove in favor of...
8357         * rtl.h (read_modify_subreg_p): ...this new function.  Take a
8358         const_rtx instead of an rtx.
8359         * cprop.c (local_cprop_find_used_regs): Update accordingly.
8360         * df-problems.c (df_word_lr_mark_ref): Likewise.
8361         * ira-lives.c (mark_pseudo_reg_live): Likewise.
8362         (mark_pseudo_reg_dead): Likewise.
8363         (mark_ref_dead): Likewise.
8364         * reginfo.c (init_subregs_of_mode): Likewise.
8365         * sched-deps.c (sched_analyze_1): Likewise.
8366         * df-scan.c (df_def_record_1): Likewise.
8367         (df_uses_record): Likewise.
8368         (df_read_modify_subreg_p): Remove in favor of...
8369         * rtlanal.c (read_modify_subreg_p): ...this new function.  Take a
8370         const_rtx instead of an rtx.
8372 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8373             Alan Hayward  <alan.hayward@arm.com>
8374             David Sherwood  <david.sherwood@arm.com>
8376         * rtl.h (partial_subreg_p): New function.
8377         * caller-save.c (save_call_clobbered_regs): Use it.
8378         * calls.c (expand_call): Likewise.
8379         * combine.c (combinable_i3pat): Likewise.
8380         (simplify_set): Likewise.
8381         (make_extraction): Likewise.
8382         (make_compound_operation_int): Likewise.
8383         (gen_lowpart_or_truncate): Likewise.
8384         (force_to_mode): Likewise.
8385         (make_field_assignment): Likewise.
8386         (reg_truncated_to_mode): Likewise.
8387         (record_truncated_value): Likewise.
8388         (move_deaths): Likewise.
8389         * cse.c (record_jump_cond): Likewise.
8390         (cse_insn): Likewise.
8391         * cselib.c (cselib_lookup_1): Likewise.
8392         * expmed.c (extract_bit_field_using_extv): Likewise.
8393         * function.c (assign_parm_setup_reg): Likewise.
8394         * ifcvt.c (noce_convert_multiple_sets): Likewise.
8395         * ira-build.c (create_insn_allocnos): Likewise.
8396         * lra-coalesce.c (merge_pseudos): Likewise.
8397         * lra-constraints.c (match_reload): Likewise.
8398         (simplify_operand_subreg): Likewise.
8399         (curr_insn_transform): Likewise.
8400         * lra-lives.c (process_bb_lives): Likewise.
8401         * lra.c (new_insn_reg): Likewise.
8402         (lra_substitute_pseudo): Likewise.
8403         * regcprop.c (mode_change_ok): Likewise.
8404         (maybe_mode_change): Likewise.
8405         (copyprop_hardreg_forward_1): Likewise.
8406         * reload.c (push_reload): Likewise.
8407         (find_reloads): Likewise.
8408         (find_reloads_subreg_address): Likewise.
8409         * reload1.c (alter_reg): Likewise.
8410         (eliminate_regs_1): Likewise.
8411         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
8413 2017-08-30  David Edelsohn  <dje.gcc@gmail.com>
8415         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Revert
8416         back to if statements, including unpack.
8418 2017-08-30  Martin Liska  <mliska@suse.cz>
8420         PR inline-asm/82001
8421         * ipa-icf-gimple.c (func_checker::compare_tree_list_operand):
8422         Rename to ...
8423         (func_checker::compare_asm_inputs_outputs): ... this function.
8424         (func_checker::compare_gimple_asm): Use the function to compare
8425         also ASM constrains.
8426         * ipa-icf-gimple.h: Rename the function.
8428 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8429             Alan Hayward  <alan.hayward@arm.com>
8430             David Sherwood  <david.sherwood@arm.com>
8432         * coretypes.h (complex_mode): New type.
8433         * gdbhooks.py (build_pretty_printer): Handle it.
8434         * machmode.h (complex_mode): New class.
8435         (complex_mode::includes_p): New function.
8436         (is_complex_int_mode): Likewise.
8437         (is_complex_float_mode): Likewise.
8438         * genmodes.c (get_mode_class): Handle complex mode classes.
8439         * function.c (expand_function_end): Use is_complex_int_mode.
8441 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8442             Alan Hayward  <alan.hayward@arm.com>
8443             David Sherwood  <david.sherwood@arm.com>
8445         * coretypes.h (scalar_mode_pod): New typedef.
8446         * gdbhooks.py (build_pretty_printer): Handle it.
8447         * machmode.h (gt_ggc_mx, gt_pch_nx): New functions.
8448         * fixed-value.h (fixed_value::mode): Change type to scalar_mode_pod.
8449         * fold-const.c (fold_convert_const_int_from_fixed): Use scalar_mode.
8450         * tree-streamer-in.c (unpack_ts_fixed_cst_value_fields): Use
8451         as_a <scalar_mode>.
8453 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8454             Alan Hayward  <alan.hayward@arm.com>
8455             David Sherwood  <david.sherwood@arm.com>
8457         * machmode.h (mode_for_vector): Take a scalar_mode instead
8458         of a machine_mode.
8459         * stor-layout.c (mode_for_vector): Likewise.
8460         * explow.c (promote_mode): Use as_a <scalar_mode>.
8461         * sdbout.c (sdbout_parms): Use is_a <scalar_mode>.
8463 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8464             Alan Hayward  <alan.hayward@arm.com>
8465             David Sherwood  <david.sherwood@arm.com>
8467         * target.def (preferred_simd_mode): Take a scalar_mode
8468         instead of a machine_mode.
8469         * targhooks.h (default_preferred_simd_mode): Likewise.
8470         * targhooks.c (default_preferred_simd_mode): Likewise.
8471         * config/arc/arc.c (arc_preferred_simd_mode): Likewise.
8472         * config/arm/arm.c (arm_preferred_simd_mode): Likewise.
8473         * config/c6x/c6x.c (c6x_preferred_simd_mode): Likewise.
8474         * config/epiphany/epiphany.c (epiphany_preferred_simd_mode): Likewise.
8475         * config/i386/i386.c (ix86_preferred_simd_mode): Likewise.
8476         * config/mips/mips.c (mips_preferred_simd_mode): Likewise.
8477         * config/nvptx/nvptx.c (nvptx_preferred_simd_mode): Likewise.
8478         * config/powerpcspe/powerpcspe.c (rs6000_preferred_simd_mode):
8479         Likewise.
8480         * config/rs6000/rs6000.c (rs6000_preferred_simd_mode): Likewise.
8481         * config/s390/s390.c (s390_preferred_simd_mode): Likewise.
8482         * config/sparc/sparc.c (sparc_preferred_simd_mode): Likewise.
8483         * config/aarch64/aarch64.c (aarch64_preferred_simd_mode): Likewise.
8484         (aarch64_simd_scalar_immediate_valid_for_move): Update accordingly.
8485         * doc/tm.texi: Regenerate.
8486         * optabs-query.c (can_vec_mask_load_store_p): Return false for
8487         non-scalar modes.
8489 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8490             Alan Hayward  <alan.hayward@arm.com>
8491             David Sherwood  <david.sherwood@arm.com>
8493         * target.def (scalar_mode_supported_p): Take a scalar_mode
8494         instead of a machine_mode.
8495         * targhooks.h (default_scalar_mode_supported_p): Likewise.
8496         * targhooks.c (default_scalar_mode_supported_p): Likewise.
8497         * config/aarch64/aarch64.c (aarch64_scalar_mode_supported_p): Likewise.
8498         * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
8499         * config/arm/arm.c (arm_scalar_mode_supported_p): Likewise.
8500         * config/avr/avr.c (avr_scalar_mode_supported_p): Likewise.
8501         * config/c6x/c6x.c (c6x_scalar_mode_supported_p): Likewise.
8502         * config/i386/i386.c (ix86_scalar_mode_supported_p): Likewise.
8503         * config/ia64/ia64.c (ia64_scalar_mode_supported_p): Likewise.
8504         * config/mips/mips.c (mips_scalar_mode_supported_p): Likewise.
8505         * config/msp430/msp430.c (msp430_scalar_mode_supported_p): Likewise.
8506         * config/pa/pa.c (pa_scalar_mode_supported_p): Likewise.
8507         * config/pdp11/pdp11.c (pdp11_scalar_mode_supported_p): Likewise.
8508         * config/powerpcspe/powerpcspe.c (rs6000_scalar_mode_supported_p):
8509         Likewise.
8510         * config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): Likewise.
8511         * config/s390/s390.c (s390_scalar_mode_supported_p): Likewise.
8512         * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
8513         * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
8514         * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p):
8515         Likewise.
8516         * doc/tm.texi: Regenerate.
8518 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8519             Alan Hayward  <alan.hayward@arm.com>
8520             David Sherwood  <david.sherwood@arm.com>
8522         * coretypes.h (opt_scalar_mode): New typedef.
8523         * gdbhooks.py (build_pretty_printers): Handle it.
8524         * machmode.h (mode_iterator::get_2xwider): Add overload for
8525         opt_mode<T>.
8526         * emit-rtl.c (init_emit_once): Use opt_scalar_mode when iterating
8527         over scalar modes.
8528         * expr.c (convert_mode_scalar): Likewise.
8529         * omp-low.c (omp_clause_aligned_alignment): Likewise.
8530         * optabs.c (expand_float): Likewise.
8531         (expand_fix): Likewise.
8532         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
8534 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8535             Alan Hayward  <alan.hayward@arm.com>
8536             David Sherwood  <david.sherwood@arm.com>
8538         * optabs.c (expand_float): Explicitly check for scalars before
8539         using a branching expansion.
8540         (expand_fix): Likewise.
8542 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8543             Alan Hayward  <alan.hayward@arm.com>
8544             David Sherwood  <david.sherwood@arm.com>
8546         * expr.c (convert_mode): Split scalar handling out into...
8547         (convert_mode_scalar): ...this new function.  Treat the modes
8548         as scalar_modes.
8550 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8551             Alan Hayward  <alan.hayward@arm.com>
8552             David Sherwood  <david.sherwood@arm.com>
8554         * omp-expand.c (expand_omp_atomic): Use is_int_mode, is_float_mode
8555         and scalar_mode.
8556         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Likewise.
8558 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8559             Alan Hayward  <alan.hayward@arm.com>
8560             David Sherwood  <david.sherwood@arm.com>
8562         * fixed-value.h (fixed_from_double_int): Take a scalar_mode
8563         rather than a machine_mode.
8564         (fixed_from_string): Likewise.
8565         (fixed_convert): Likewise.
8566         (fixed_convert_from_int): Likewise.
8567         (fixed_convert_from_real): Likewise.
8568         (real_convert_from_fixed): Likewise.
8569         * fixed-value.c (fixed_from_double_int): Likewise.
8570         (fixed_from_string): Likewise.
8571         (fixed_convert): Likewise.
8572         (fixed_convert_from_int): Likewise.
8573         (fixed_convert_from_real): Likewise.
8574         (real_convert_from_fixed): Likewise.
8575         * config/avr/avr.c (avr_out_round): Use as_a <scalar_mode>.
8577 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8578             Alan Hayward  <alan.hayward@arm.com>
8579             David Sherwood  <david.sherwood@arm.com>
8581         * emit-rtl.c (immed_double_const): Use is_a <scalar_mode> instead
8582         of separate mode class checks.  Do not allow vector modes here.
8583         (immed_wide_int_const): Use as_a <scalar_mode>.
8584         * explow.c (trunc_int_for_mode): Likewise.
8585         * rtl.h (wi::int_traits<rtx_mode_t>::get_precision): Likewise.
8586         (wi::shwi): Likewise.
8587         (wi::min_value): Likewise.
8588         (wi::max_value): Likewise.
8589         * dwarf2out.c (loc_descriptor): Likewise.
8590         * simplify-rtx.c (simplify_immed_subreg): Fix rtx_mode_t argument
8591         for CONST_WIDE_INT.
8593 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8594             Alan Hayward  <alan.hayward@arm.com>
8595             David Sherwood  <david.sherwood@arm.com>
8597         * tree.h (SCALAR_TYPE_MODE): New macro.
8598         * expr.c (expand_expr_addr_expr_1): Use it.
8599         (expand_expr_real_2): Likewise.
8600         * fold-const.c (fold_convert_const_fixed_from_fixed): Likeise.
8601         (fold_convert_const_fixed_from_int): Likewise.
8602         (fold_convert_const_fixed_from_real): Likewise.
8603         (native_encode_fixed): Likewise
8604         (native_encode_complex): Likewise
8605         (native_encode_vector): Likewise.
8606         (native_interpret_fixed): Likewise.
8607         (native_interpret_real): Likewise.
8608         (native_interpret_complex): Likewise.
8609         (native_interpret_vector): Likewise.
8610         * omp-simd-clone.c (simd_clone_adjust_return_type): Likewise.
8611         (simd_clone_adjust_argument_types): Likewise.
8612         (simd_clone_init_simd_arrays): Likewise.
8613         (simd_clone_adjust): Likewise.
8614         * stor-layout.c (layout_type): Likewise.
8615         * tree.c (build_minus_one_cst): Likewise.
8616         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
8617         * tree-inline.c (estimate_move_cost): Likewise.
8618         * tree-ssa-math-opts.c (convert_plusminus_to_widen): Likewise.
8619         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise.
8620         (vectorizable_reduction): Likewise.
8621         * tree-vect-patterns.c (vect_recog_widen_mult_pattern): Likewise.
8622         (vect_recog_mixed_size_cond_pattern): Likewise.
8623         (check_bool_pattern): Likewise.
8624         (adjust_bool_pattern): Likewise.
8625         (search_type_for_mask_1): Likewise.
8626         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
8627         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
8628         (vectorizable_load): Likewise.
8629         (vectorizable_store): Likewise.
8630         * ubsan.c (ubsan_encode_value): Likewise.
8631         * varasm.c (output_constant): Likewise.
8633 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8634             Alan Hayward  <alan.hayward@arm.com>
8635             David Sherwood  <david.sherwood@arm.com>
8637         * coretypes.h (scalar_mode): New class.
8638         * machmode.h (scalar_mode): Likewise.
8639         (scalar_mode::includes_p): New function.
8640         (mode_to_inner): Return a scalar_mode rather than a machine_mode.
8641         * gdbhooks.py (build_pretty_printers): Handle scalar_mode.
8642         * genmodes.c (get_mode_class): Handle remaining scalar modes.
8643         * cfgexpand.c (expand_debug_expr): Use scalar_mode.
8644         * expmed.c (store_bit_field_1): Likewise.
8645         (extract_bit_field_1): Likewise.
8646         * expr.c (write_complex_part): Likewise.
8647         (read_complex_part): Likewise.
8648         (emit_move_complex_push): Likewise.
8649         (expand_expr_real_2): Likewise.
8650         * function.c (assign_parm_setup_reg): Likewise.
8651         (assign_parms_unsplit_complex): Likewise.
8652         * optabs.c (expand_binop): Likewise.
8653         * rtlanal.c (subreg_get_info): Likewise.
8654         * simplify-rtx.c (simplify_immed_subreg): Likewise.
8655         * varasm.c (output_constant_pool_2): Likewise.
8657 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8658             Alan Hayward  <alan.hayward@arm.com>
8659             David Sherwood  <david.sherwood@arm.com>
8661         * expmed.c (extract_high_half): Use scalar_int_mode and remove
8662         assertion.
8663         (expmed_mult_highpart_optab): Likewise.
8664         (expmed_mult_highpart): Likewise.
8666 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8667             Alan Hayward  <alan.hayward@arm.com>
8668             David Sherwood  <david.sherwood@arm.com>
8670         * builtins.h (builtin_strncpy_read_str): Take a scalar_int_mode
8671         instead of a machine_mode.
8672         (builtin_memset_read_str): Likewise.
8673         * builtins.c (c_readstr): Likewise.
8674         (builtin_memcpy_read_str): Likewise.
8675         (builtin_strncpy_read_str): Likewise.
8676         (builtin_memset_read_str): Likewise.
8677         (builtin_memset_gen_str): Likewise.
8678         (expand_builtin_signbit): Use scalar_int_mode for local variables.
8679         * cfgexpand.c (convert_debug_memory_address): Take a scalar_int_mode
8680         instead of a machine_mode.
8681         * combine.c (simplify_if_then_else): Use scalar_int_mode for local
8682         variables.
8683         (make_extraction): Likewise.
8684         (try_widen_shift_mode): Take and return scalar_int_modes instead
8685         of machine_modes.
8686         * config/aarch64/aarch64.c (aarch64_libgcc_cmp_return_mode): Return
8687         a scalar_int_mode instead of a machine_mode.
8688         * config/avr/avr.c (avr_addr_space_address_mode): Likewise.
8689         (avr_addr_space_pointer_mode): Likewise.
8690         * config/cr16/cr16.c (cr16_unwind_word_mode): Likewise.
8691         * config/msp430/msp430.c (msp430_addr_space_pointer_mode): Likewise.
8692         (msp430_unwind_word_mode): Likewise.
8693         * config/spu/spu.c (spu_unwind_word_mode): Likewise.
8694         (spu_addr_space_pointer_mode): Likewise.
8695         (spu_addr_space_address_mode): Likewise.
8696         (spu_libgcc_cmp_return_mode): Likewise.
8697         (spu_libgcc_shift_count_mode): Likewise.
8698         * config/rl78/rl78.c (rl78_addr_space_address_mode): Likewise.
8699         (rl78_addr_space_pointer_mode): Likewise.
8700         (fl78_unwind_word_mode): Likewise.
8701         (rl78_valid_pointer_mode): Take a scalar_int_mode instead of a
8702         machine_mode.
8703         * config/alpha/alpha.c (vms_valid_pointer_mode): Likewise.
8704         * config/ia64/ia64.c (ia64_vms_valid_pointer_mode): Likewise.
8705         * config/mips/mips.c (mips_mode_rep_extended): Likewise.
8706         (mips_valid_pointer_mode): Likewise.
8707         * config/tilegx/tilegx.c (tilegx_mode_rep_extended): Likewise.
8708         * config/ft32/ft32.c (ft32_valid_pointer_mode): Likewise.
8709         (ft32_addr_space_pointer_mode): Return a scalar_int_mode instead
8710         of a machine_mode.
8711         (ft32_addr_space_address_mode): Likewise.
8712         * config/m32c/m32c.c (m32c_valid_pointer_mode): Take a
8713         scalar_int_mode instead of a machine_mode.
8714         (m32c_addr_space_pointer_mode): Return a scalar_int_mode instead
8715         of a machine_mode.
8716         (m32c_addr_space_address_mode): Likewise.
8717         * config/powerpcspe/powerpcspe.c (rs6000_abi_word_mode): Likewise.
8718         (rs6000_eh_return_filter_mode): Likewise.
8719         * config/rs6000/rs6000.c (rs6000_abi_word_mode): Likewise.
8720         (rs6000_eh_return_filter_mode): Likewise.
8721         * config/s390/s390.c (s390_libgcc_cmp_return_mode): Likewise.
8722         (s390_libgcc_shift_count_mode): Likewise.
8723         (s390_unwind_word_mode): Likewise.
8724         (s390_valid_pointer_mode): Take a scalar_int_mode rather than a
8725         machine_mode.
8726         * target.def (mode_rep_extended): Likewise.
8727         (valid_pointer_mode): Likewise.
8728         (addr_space.valid_pointer_mode): Likewise.
8729         (eh_return_filter_mode): Return a scalar_int_mode rather than
8730         a machine_mode.
8731         (libgcc_cmp_return_mode): Likewise.
8732         (libgcc_shift_count_mode): Likewise.
8733         (unwind_word_mode): Likewise.
8734         (addr_space.pointer_mode): Likewise.
8735         (addr_space.address_mode): Likewise.
8736         * doc/tm.texi: Regenerate.
8737         * dojump.c (prefer_and_bit_test): Take a scalar_int_mode rather than
8738         a machine_mode.
8739         (do_jump): Use scalar_int_mode for local variables.
8740         * dwarf2cfi.c (init_return_column_size): Take a scalar_int_mode
8741         rather than a machine_mode.
8742         * dwarf2out.c (convert_descriptor_to_mode): Likewise.
8743         (scompare_loc_descriptor_wide): Likewise.
8744         (scompare_loc_descriptor_narrow): Likewise.
8745         * emit-rtl.c (adjust_address_1): Use scalar_int_mode for local
8746         variables.
8747         * except.c (sjlj_emit_dispatch_table): Likewise.
8748         (expand_builtin_eh_copy_values): Likewise.
8749         * explow.c (convert_memory_address_addr_space_1): Likewise.
8750         Take a scalar_int_mode rather than a machine_mode.
8751         (convert_memory_address_addr_space): Take a scalar_int_mode rather
8752         than a machine_mode.
8753         (memory_address_addr_space): Use scalar_int_mode for local variables.
8754         * expmed.h (expand_mult_highpart_adjust): Take a scalar_int_mode
8755         rather than a machine_mode.
8756         * expmed.c (mask_rtx): Likewise.
8757         (init_expmed_one_conv): Likewise.
8758         (expand_mult_highpart_adjust): Likewise.
8759         (extract_high_half): Likewise.
8760         (expmed_mult_highpart_optab): Likewise.
8761         (expmed_mult_highpart): Likewise.
8762         (expand_smod_pow2): Likewise.
8763         (expand_sdiv_pow2): Likewise.
8764         (emit_store_flag_int): Likewise.
8765         (adjust_bit_field_mem_for_reg): Use scalar_int_mode for local
8766         variables.
8767         (extract_low_bits): Likewise.
8768         * expr.h (by_pieces_constfn): Take a scalar_int_mode rather than
8769         a machine_mode.
8770         * expr.c (pieces_addr::adjust):  Likewise.
8771         (can_store_by_pieces): Likewise.
8772         (store_by_pieces): Likewise.
8773         (clear_by_pieces_1): Likewise.
8774         (expand_expr_addr_expr_1): Likewise.
8775         (expand_expr_addr_expr): Use scalar_int_mode for local variables.
8776         (expand_expr_real_1): Likewise.
8777         (try_casesi): Likewise.
8778         * final.c (shorten_branches): Likewise.
8779         * fold-const.c (fold_convert_const_int_from_fixed): Change the
8780         type of "mode" to machine_mode.
8781         * internal-fn.c (expand_arith_overflow_result_store): Take a
8782         scalar_int_mode rather than a machine_mode.
8783         (expand_mul_overflow): Use scalar_int_mode for local variables.
8784         * loop-doloop.c (doloop_modify): Likewise.
8785         (doloop_optimize): Likewise.
8786         * optabs.c (expand_subword_shift): Take a scalar_int_mode rather
8787         than a machine_mode.
8788         (expand_doubleword_shift_condmove): Likewise.
8789         (expand_doubleword_shift): Likewise.
8790         (expand_doubleword_clz): Likewise.
8791         (expand_doubleword_popcount): Likewise.
8792         (expand_doubleword_parity): Likewise.
8793         (expand_absneg_bit): Use scalar_int_mode for local variables.
8794         (prepare_float_lib_cmp): Likewise.
8795         * rtl.h (convert_memory_address_addr_space_1): Take a scalar_int_mode
8796         rather than a machine_mode.
8797         (convert_memory_address_addr_space): Likewise.
8798         (get_mode_bounds): Likewise.
8799         (get_address_mode): Return a scalar_int_mode rather than a
8800         machine_mode.
8801         * rtlanal.c (get_address_mode): Likewise.
8802         * stor-layout.c (get_mode_bounds): Take a scalar_int_mode rather
8803         than a machine_mode.
8804         * targhooks.c (default_mode_rep_extended): Likewise.
8805         (default_valid_pointer_mode): Likewise.
8806         (default_addr_space_valid_pointer_mode): Likewise.
8807         (default_eh_return_filter_mode): Return a scalar_int_mode rather
8808         than a machine_mode.
8809         (default_libgcc_cmp_return_mode): Likewise.
8810         (default_libgcc_shift_count_mode): Likewise.
8811         (default_unwind_word_mode): Likewise.
8812         (default_addr_space_pointer_mode): Likewise.
8813         (default_addr_space_address_mode): Likewise.
8814         * targhooks.h (default_eh_return_filter_mode): Likewise.
8815         (default_libgcc_cmp_return_mode): Likewise.
8816         (default_libgcc_shift_count_mode): Likewise.
8817         (default_unwind_word_mode): Likewise.
8818         (default_addr_space_pointer_mode): Likewise.
8819         (default_addr_space_address_mode): Likewise.
8820         (default_mode_rep_extended): Take a scalar_int_mode rather than
8821         a machine_mode.
8822         (default_valid_pointer_mode): Likewise.
8823         (default_addr_space_valid_pointer_mode): Likewise.
8824         * tree-ssa-address.c (addr_for_mem_ref): Use scalar_int_mode for
8825         local variables.
8826         * tree-ssa-loop-ivopts.c (get_shiftadd_cost): Take a scalar_int_mode
8827         rather than a machine_mode.
8828         * tree-switch-conversion.c (array_value_type): Use scalar_int_mode
8829         for local variables.
8830         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
8831         * var-tracking.c (use_narrower_mode): Take a scalar_int_mode rather
8832         than a machine_mode.
8834 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8835             Alan Hayward  <alan.hayward@arm.com>
8836             David Sherwood  <david.sherwood@arm.com>
8838         * dojump.c (do_jump_by_parts_greater_rtx): Change the type of
8839         the mode argument to scalar_int_mode.
8840         (do_jump_by_parts_zero_rtx): Likewise.
8841         (do_jump_by_parts_equality_rtx): Likewise.
8842         (do_jump_by_parts_greater): Take a mode argument.
8843         (do_jump_by_parts_equality): Likewise.
8844         (do_jump_1): Update calls accordingly.
8846 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8847             Alan Hayward  <alan.hayward@arm.com>
8848             David Sherwood  <david.sherwood@arm.com>
8850         * is-a.h (safe_dyn_cast): New function.
8851         * rtl.h (rtx_jump_table_data::get_data_mode): New function.
8852         (jump_table_for_label): Likewise.
8853         * final.c (final_addr_vec_align): Take an rtx_jump_table_data *
8854         instead of an rtx_insn *.
8855         (shorten_branches): Use dyn_cast instead of LABEL_P and
8856         JUMP_TABLE_DATA_P.  Use jump_table_for_label and
8857         rtx_jump_table_data::get_data_mode.
8858         (final_scan_insn): Likewise.
8860 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8861             Alan Hayward  <alan.hayward@arm.com>
8862             David Sherwood  <david.sherwood@arm.com>
8864         * combine.c (try_combine): Use is_a <scalar_int_mode> when
8865         trying to combine a full-register integer set with a subreg
8866         integer set.
8868 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8869             Alan Hayward  <alan.hayward@arm.com>
8870             David Sherwood  <david.sherwood@arm.com>
8872         * expr.c (expand_expr_addr_expr): Add a new_tmode local variable
8873         that is always either address_mode or pointer_mode.
8875 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8876             Alan Hayward  <alan.hayward@arm.com>
8877             David Sherwood  <david.sherwood@arm.com>
8879         * expr.c (expand_expr_real_2): Use word_mode instead of innermode
8880         when the two are known to be equal.
8882 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8883             Alan Hayward  <alan.hayward@arm.com>
8884             David Sherwood  <david.sherwood@arm.com>
8886         * simplify-rtx.c (simplify_const_unary_operation): Use
8887         is_a <scalar_int_mode> instead of checking for a nonzero
8888         precision.  Forcibly convert op_mode to a scalar_int_mode
8889         in that case.  More clearly differentiate the operand and
8890         result modes and use the former when deciding what the value
8891         of a count-bits operation should be.  Use is_int_mode instead
8892         of checking for a MODE_INT.  Remove redundant check for whether
8893         this mode has a zero precision.
8895 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8896             Alan Hayward  <alan.hayward@arm.com>
8897             David Sherwood  <david.sherwood@arm.com>
8899         * optabs.c (widen_leading): Change the type of the mode argument
8900         to scalar_int_mode.  Use opt_scalar_int_mode for the mode iterator.
8901         (widen_bswap): Likewise.
8902         (expand_parity): Likewise.
8903         (expand_ctz): Change the type of the mode argument to scalar_int_mode.
8904         (expand_ffs): Likewise.
8905         (epand_unop): Check for scalar integer modes before calling the
8906         above routines.
8908 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8909             Alan Hayward  <alan.hayward@arm.com>
8910             David Sherwood  <david.sherwood@arm.com>
8912         * expr.c (const_scalar_mask_from_tree): Add a mode argument.
8913         Expand commentary.
8914         (expand_expr_real_1): Update call accordingly.
8916 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8917             Alan Hayward  <alan.hayward@arm.com>
8918             David Sherwood  <david.sherwood@arm.com>
8920         * expmed.c (store_bit_field_using_insv): Add op0_mode and
8921         value_mode arguments.  Use scalar_int_mode internally.
8922         (store_bit_field_1): Rename the new integer mode from imode
8923         to op0_mode and use it instead of GET_MODE (op0).  Update calls
8924         to store_split_bit_field, store_bit_field_using_insv and
8925         store_fixed_bit_field.
8926         (store_fixed_bit_field): Add op0_mode and value_mode arguments.
8927         Use scalar_int_mode internally.  Use a bit count rather than a mode
8928         when calculating the largest bit size for get_best_mode.
8929         Update calls to store_split_bit_field and store_fixed_bit_field_1.
8930         (store_fixed_bit_field_1): Add mode and value_mode arguments.
8931         Remove assertion that OP0 has a scalar integer mode.
8932         (store_split_bit_field): Add op0_mode and value_mode arguments.
8933         Update calls to extract_fixed_bit_field.
8934         (extract_bit_field_using_extv): Add an op0_mode argument.
8935         Use scalar_int_mode internally.
8936         (extract_bit_field_1): Rename the new integer mode from imode to
8937         op0_mode and use it instead of GET_MODE (op0).  Update calls to
8938         extract_split_bit_field, extract_bit_field_using_extv and
8939         extract_fixed_bit_field.
8940         (extract_fixed_bit_field): Add an op0_mode argument.  Update calls
8941         to extract_split_bit_field and extract_fixed_bit_field_1.
8942         (extract_fixed_bit_field_1): Add a mode argument.  Remove assertion
8943         that OP0 has a scalar integer mode.  Use as_a <scalar_int_mode>
8944         on the target mode.
8945         (extract_split_bit_field): Add an op0_mode argument.  Update call
8946         to extract_fixed_bit_field.
8948 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8949             Alan Hayward  <alan.hayward@arm.com>
8950             David Sherwood  <david.sherwood@arm.com>
8952         * cse.c (cse_insn): Use opt_scalar_int_mode for the mode iterator.
8953         * explow.c (hard_function_value): Likewise.
8954         * expmed.c (extract_fixed_bit_field_1): Likewise.  Move the
8955         convert_to_mode call outside the loop.
8956         * expr.c (alignment_for_piecewise_move): Use opt_scalar_int_mode
8957         for the mode iterator.  Require the mode specified by max_pieces
8958         to exist.
8959         (emit_block_move_via_movmem): Use opt_scalar_int_mode for the
8960         mode iterator.
8961         (copy_blkmode_to_reg): Likewise.
8962         (set_storage_via_setmem): Likewise.
8963         * optabs.c (prepare_cmp_insn): Likewise.
8964         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
8965         * stor-layout.c (finish_bitfield_representative): Likewise.
8967 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8968             Alan Hayward  <alan.hayward@arm.com>
8969             David Sherwood  <david.sherwood@arm.com>
8971         * rtl.h (subreg_unpromoted_mode, subreg_promoted_mode): New functions.
8972         * expr.c (convert_move): Use them.
8973         (convert_modes): Likewise.
8974         (store_expr_with_bounds): Likewise.
8976 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8977             Alan Hayward  <alan.hayward@arm.com>
8978             David Sherwood  <david.sherwood@arm.com>
8980         * rtl.h (rtl_hooks::reg_nonzero_bits): Add a scalar_int_mode
8981         parameter for the mode of "x".  Remove the "known_x", "known_mode"
8982         and "known_ret" arguments.  Change the type of the mode argument
8983         to scalar_int_mode.
8984         (rtl_hooks:reg_num_sign_bit_copies): Likewise.
8985         * combine.c (reg_nonzero_bits_for_combine): Update accordingly.
8986         (reg_num_sign_bit_copies_for_combine): Likewise.
8987         * rtlanal.c (nonzero_bits1): Likewise.
8988         (num_sign_bit_copies1): Likewise.
8989         * rtlhooks-def.h (reg_nonzero_bits_general): Likewise.
8990         (reg_num_sign_bit_copies_general): Likewise.
8991         * rtlhooks.c (reg_num_sign_bit_copies_general): Likewise.
8992         (reg_nonzero_bits_general): Likewise.
8994 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8995             Alan Hayward  <alan.hayward@arm.com>
8996             David Sherwood  <david.sherwood@arm.com>
8998         * rtlanal.c (num_sign_bit_copies): Handle VOIDmode here rather
8999         than in subroutines.  Return 1 for non-integer modes.
9000         (cached_num_sign_bit_copies): Change the type of the mode parameter
9001         to scalar_int_mode.
9002         (num_sign_bit_copies1): Likewise.  Remove early exit for other mode
9003         classes.  Handle CONST_INT_P first and then check whether X also
9004         has a scalar integer mode.  Check the same thing for inner registers
9005         of a SUBREG and for values that are being extended or truncated.
9007 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9008             Alan Hayward  <alan.hayward@arm.com>
9009             David Sherwood  <david.sherwood@arm.com>
9011         * rtlanal.c (nonzero_bits): Handle VOIDmode here rather than
9012         in subroutines.  Return the mode mask for non-integer modes.
9013         (cached_nonzero_bits): Change the type of the mode parameter
9014         to scalar_int_mode.
9015         (nonzero_bits1): Likewise.  Remove early exit for other mode
9016         classes.  Handle CONST_INT_P first and then check whether X
9017         also has a scalar integer mode.
9019 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9020             Alan Hayward  <alan.hayward@arm.com>
9021             David Sherwood  <david.sherwood@arm.com>
9023         * expr.c (widest_int_mode_for_size): Make the comment match the code.
9024         Return a scalar_int_mode and assert that the size is greater than
9025         one byte.
9026         (by_pieces_ninsns): Update accordingly and remove VOIDmode handling.
9027         (op_by_pieces_d::op_by_pieces_d): Likewise.
9028         (op_by_pieces_d::run): Likewise.
9029         (can_store_by_pieces): Likewise.
9031 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9032             Alan Hayward  <alan.hayward@arm.com>
9033             David Sherwood  <david.sherwood@arm.com>
9035         * combine.c (extract_left_shift): Add a mode argument and update
9036         recursive calls.
9037         (make_compound_operation_int): Change the type of the mode parameter
9038         to scalar_int_mode and update the call to extract_left_shift.
9040 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9041             Alan Hayward  <alan.hayward@arm.com>
9042             David Sherwood  <david.sherwood@arm.com>
9044         * combine.c (simplify_and_const_int): Change the type of the mode
9045         parameter to scalar_int_mode.
9046         (simplify_and_const_int_1): Likewise.  Update recursive call.
9048 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9049             Alan Hayward  <alan.hayward@arm.com>
9050             David Sherwood  <david.sherwood@arm.com>
9052         * combine.c (simplify_compare_const): Check that the mode is a
9053         scalar_int_mode (rather than VOIDmode) before testing its
9054         precision.
9055         (simplify_comparison): Move COMPARISON_P handling out of the
9056         loop and restrict the latter part of the loop to scalar_int_modes.
9057         Check is_a <scalar_int_mode> before calling HWI_COMPUTABLE_MODE_P
9058         and when considering SUBREG_REGs.  Use is_int_mode instead of
9059         checking GET_MODE_CLASS against MODE_INT.
9061 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9062             Alan Hayward  <alan.hayward@arm.com>
9063             David Sherwood  <david.sherwood@arm.com>
9065         * combine.c (try_widen_shift_mode): Move check for equal modes to...
9066         (simplify_shift_const_1): ...here.  Use scalar_int_mode for
9067         shift_unit_mode and for modes involved in scalar shifts.
9069 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9070             Alan Hayward  <alan.hayward@arm.com>
9071             David Sherwood  <david.sherwood@arm.com>
9073         * combine.c (force_int_to_mode): New function, split out from...
9074         (force_to_mode): ...here.  Keep xmode up-to-date and use it
9075         instead of GET_MODE (x).
9077 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9078             Alan Hayward  <alan.hayward@arm.com>
9079             David Sherwood  <david.sherwood@arm.com>
9081         * optabs-query.h (extraction_insn::struct_mode): Change type to
9082         opt_scalar_int_mode and update comment.
9083         (extraction_insn::field_mode): Change type to scalar_int_mode.
9084         (extraction_insn::pos_mode): Likewise.
9085         * combine.c (make_extraction): Update accordingly.
9086         * optabs-query.c (get_traditional_extraction_insn): Likewise.
9087         (get_optab_extraction_insn): Likewise.
9088         * recog.c (simplify_while_replacing): Likewise.
9089         * expmed.c (narrow_bit_field_mem): Change the type of the mode
9090         parameter to opt_scalar_int_mode.
9092 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9093             Alan Hayward  <alan.hayward@arm.com>
9094             David Sherwood  <david.sherwood@arm.com>
9096         * machmode.h (bit_field_mode_iterator::next_mode): Take a pointer
9097         to a scalar_int_mode instead of a machine_mode.
9098         (bit_field_mode_iterator::m_mode): Change type to opt_scalar_int_mode.
9099         (get_best_mode): Return a boolean and use a pointer argument to store
9100         the selected mode.  Replace the limit mode parameter with a bit limit.
9101         * expmed.c (adjust_bit_field_mem_for_reg): Use scalar_int_mode
9102         for the values returned by bit_field_mode_iterator::next_mode.
9103         (store_bit_field): Update call to get_best_mode.
9104         (store_fixed_bit_field): Likewise.
9105         (extract_fixed_bit_field): Likewise.
9106         * expr.c (optimize_bitfield_assignment_op): Likewise.
9107         * fold-const.c (optimize_bit_field_compare): Likewise.
9108         (fold_truth_andor_1): Likewise.
9109         * stor-layout.c (bit_field_mode_iterator::next_mode): As above.
9110         Update for new type of m_mode.
9111         (get_best_mode): As above.
9113 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9114             Alan Hayward  <alan.hayward@arm.com>
9115             David Sherwood  <david.sherwood@arm.com>
9117         * expmed.c (strict_volatile_bitfield_p): Change the type of fieldmode
9118         to scalar_int_mode.  Remove check for SCALAR_INT_MODE_P.
9119         (store_bit_field): Check is_a <scalar_int_mode> before calling
9120         strict_volatile_bitfield_p.
9121         (extract_bit_field): Likewise.
9123 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9124             Alan Hayward  <alan.hayward@arm.com>
9125             David Sherwood  <david.sherwood@arm.com>
9127         * target.def (cstore_mode): Return a scalar_int_mode.
9128         * doc/tm.texi: Regenerate.
9129         * config/sparc/sparc.c (sparc_cstore_mode): Return a scalar_int_mode.
9130         * targhooks.h (default_cstore_mode): Likewise.
9131         * targhooks.c (default_cstore_mode): Likewise, using a forced
9132         conversion.
9133         * expmed.c (emit_cstore): Expect the target of the cstore to be
9134         a scalar_int_mode.
9136 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9137             Alan Hayward  <alan.hayward@arm.com>
9138             David Sherwood  <david.sherwood@arm.com>
9140         * cfgloop.h (rtx_iv): Change type of extend_mode and mode to
9141         scalar_int_mode.
9142         (niter_desc): Likewise mode.
9143         (iv_analyze): Add a mode parameter.
9144         (biv_p): Likewise.
9145         (iv_analyze_expr): Pass the mode paraeter before the rtx it describes
9146         and change its type to scalar_int_mode.
9147         * loop-iv.c: Update commentary at head of file.
9148         (iv_constant): Pass the mode paraeter before the rtx it describes
9149         and change its type to scalar_int_mode.  Remove VOIDmode handling.
9150         (iv_subreg): Change the type of the mode parameter to scalar_int_mode.
9151         (iv_extend): Likewise.
9152         (shorten_into_mode): Likewise.
9153         (iv_add): Use scalar_int_mode.
9154         (iv_mult): Likewise.
9155         (iv_shift): Likewise.
9156         (canonicalize_iv_subregs): Likewise.
9157         (get_biv_step_1): Pass the outer_mode parameter before the rtx
9158         it describes and change its mode to scalar_int_mode.   Also change
9159         the type of the returned inner_mode to scalar_int_mode.
9160         (get_biv_step): Likewise, turning outer_mode from a pointer
9161         into a direct parameter.  Update call to get_biv_step_1.
9162         (iv_analyze_biv): Add an outer_mode parameter.  Update calls to
9163         iv_constant and get_biv_step.
9164         (iv_analyze_expr): Pass the mode parameter before the rtx it describes
9165         and change its type to scalar_int_mode.  Don't initialise iv->mode
9166         to VOIDmode and remove later checks for its still being VOIDmode.
9167         Update calls to iv_analyze_op and iv_analyze_expr.  Check
9168         is_a <scalar_int_mode> when changing the mode under consideration.
9169         (iv_analyze_def): Ignore registers that don't have a scalar_int_mode.
9170         Update call to iv_analyze_expr.
9171         (iv_analyze_op): Add a mode parameter.  Reject subregs whose
9172         inner register is not also a scalar_int_mode.  Update call to
9173         iv_analyze_biv.
9174         (iv_analyze): Add a mode parameter.  Update call to iv_analyze_op.
9175         (biv_p): Add a mode parameter.  Update call to iv_analyze_biv.
9176         (iv_number_of_iterations): Use is_a <scalar_int_mode> instead of
9177         separate mode class checks.  Update calls to iv_analyze.  Remove
9178         fix-up of VOIDmodes after iv_analyze_biv.
9179         * loop-unroll.c (analyze_iv_to_split_insn): Reject registers that
9180         don't have a scalar_int_mode.  Update call to biv_p.
9182 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9183             Alan Hayward  <alan.hayward@arm.com>
9184             David Sherwood  <david.sherwood@arm.com>
9186         * cfgexpand.c (convert_debug_memory_address): Use
9187         as_a <scalar_int_mode>.
9188         * combine.c (expand_compound_operation): Likewise.
9189         (make_extraction): Likewise.
9190         (change_zero_ext): Likewise.
9191         (simplify_comparison): Likewise.
9192         * cse.c (cse_insn): Likewise.
9193         * dwarf2out.c (minmax_loc_descriptor): Likewise.
9194         (mem_loc_descriptor): Likewise.
9195         (loc_descriptor): Likewise.
9196         * expmed.c (init_expmed_one_mode): Likewise.
9197         (synth_mult): Likewise.
9198         (emit_store_flag_1): Likewise.
9199         (expand_divmod): Likewise.  Use HWI_COMPUTABLE_MODE_P instead
9200         of a comparison with size.
9201         * expr.c (expand_assignment): Use as_a <scalar_int_mode>.
9202         (reduce_to_bit_field_precision): Likewise.
9203         * function.c (expand_function_end): Likewise.
9204         * internal-fn.c (expand_arith_overflow_result_store): Likewise.
9205         * loop-doloop.c (doloop_modify): Likewise.
9206         * optabs.c (expand_binop): Likewise.
9207         (expand_unop): Likewise.
9208         (expand_copysign_absneg): Likewise.
9209         (prepare_cmp_insn): Likewise.
9210         (maybe_legitimize_operand): Likewise.
9211         * recog.c (const_scalar_int_operand): Likewise.
9212         * rtlanal.c (get_address_mode): Likewise.
9213         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
9214         (simplify_cond_clz_ctz): Likewise.
9215         * tree-nested.c (get_nl_goto_field): Likewise.
9216         * tree.c (build_vector_type_for_mode): Likewise.
9217         * var-tracking.c (use_narrower_mode): Likewise.
9219 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9220             Alan Hayward  <alan.hayward@arm.com>
9221             David Sherwood  <david.sherwood@arm.com>
9223         * tree.h (SCALAR_INT_TYPE_MODE): New macro.
9224         * builtins.c (expand_builtin_signbit): Use it.
9225         * cfgexpand.c (expand_debug_expr): Likewise.
9226         * dojump.c (do_jump): Likewise.
9227         (do_compare_and_jump): Likewise.
9228         * dwarf2cfi.c (expand_builtin_init_dwarf_reg_sizes): Likewise.
9229         * expmed.c (make_tree): Likewise.
9230         * expr.c (expand_expr_real_2): Likewise.
9231         (expand_expr_real_1): Likewise.
9232         (try_casesi): Likewise.
9233         * fold-const-call.c (fold_const_call_ss): Likewise.
9234         * fold-const.c (unextend): Likewise.
9235         (extract_muldiv_1): Likewise.
9236         (fold_single_bit_test): Likewise.
9237         (native_encode_int): Likewise.
9238         (native_encode_string): Likewise.
9239         (native_interpret_int): Likewise.
9240         * gimple-fold.c (gimple_fold_builtin_memset): Likewise.
9241         * internal-fn.c (expand_addsub_overflow): Likewise.
9242         (expand_neg_overflow): Likewise.
9243         (expand_mul_overflow): Likewise.
9244         (expand_arith_overflow): Likewise.
9245         * match.pd: Likewise.
9246         * stor-layout.c (layout_type): Likewise.
9247         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
9248         * tree-ssa-math-opts.c (convert_mult_to_widen): Likewise.
9249         * tree-ssanames.c (get_range_info): Likewise.
9250         * tree-switch-conversion.c (array_value_type) Likewise.
9251         * tree-vect-patterns.c (vect_recog_rotate_pattern): Likewise.
9252         (vect_recog_divmod_pattern): Likewise.
9253         (vect_recog_mixed_size_cond_pattern): Likewise.
9254         * tree-vrp.c (extract_range_basic): Likewise.
9255         (simplify_float_conversion_using_ranges): Likewise.
9256         * tree.c (int_fits_type_p): Likewise.
9257         * ubsan.c (instrument_bool_enum_load): Likewise.
9258         * varasm.c (mergeable_string_section): Likewise.
9259         (narrowing_initializer_constant_valid_p): Likewise.
9260         (output_constant): Likewise.
9262 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9263             Alan Hayward  <alan.hayward@arm.com>
9264             David Sherwood  <david.sherwood@arm.com>
9266         * machmode.h (NARROWEST_INT_MODE): New macro.
9267         * expr.c (alignment_for_piecewise_move): Use it instead of
9268         GET_CLASS_NARROWEST_MODE (MODE_INT).
9269         (push_block): Likewise.
9270         * stor-layout.c (bit_field_mode_iterator::bit_field_mode_iterator):
9271         Likewise.
9272         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
9274 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9275             Alan Hayward  <alan.hayward@arm.com>
9276             David Sherwood  <david.sherwood@arm.com>
9278         * postreload.c (move2add_valid_value_p): Change the type of the
9279         mode parameter to scalar_int_mode.
9280         (move2add_use_add2_insn): Add a mode parameter and use it instead
9281         of GET_MODE (reg).
9282         (move2add_use_add3_insn): Likewise.
9283         (reload_cse_move2add): Update accordingly.
9285 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9286             Alan Hayward  <alan.hayward@arm.com>
9287             David Sherwood  <david.sherwood@arm.com>
9289         * expr.c (expand_expr_real_2): Use scalar_int_mode for the
9290         double-word mode.
9291         * lower-subreg.c (resolve_shift_zext): Use is_a <scalar_int_mode>.
9292         * optabs.c (expand_unop): Likewise.
9294 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9295             Alan Hayward  <alan.hayward@arm.com>
9296             David Sherwood  <david.sherwood@arm.com>
9298         * dwarf2out.c (typed_binop): Change mode parameter to scalar_int_mode.
9299         (clz_loc_descriptor): Likewise.  Remove SCALAR_INT_MODE_P check.
9300         (popcount_loc_descriptor): Likewise.
9301         (bswap_loc_descriptor): Likewise.
9302         (rotate_loc_descriptor): Likewise.
9303         (mem_loc_descriptor): Add is_a <scalar_int_mode> checks before
9304         calling the functions above.
9306 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9307             Alan Hayward  <alan.hayward@arm.com>
9308             David Sherwood  <david.sherwood@arm.com>
9310         * combine.c (sign_extend_short_imm): Add is_a <scalar_int_mode>
9311         checks.
9312         (try_combine): Likewise.
9313         (simplify_if_then_else): Likewise.
9314         * cse.c (cse_insn): Likewise.
9315         * dwarf2out.c (mem_loc_descriptor): Likewise.
9316         * emit-rtl.c (gen_lowpart_common): Likewise.
9317         * simplify-rtx.c (simplify_truncation): Likewise.
9318         (simplify_binary_operation_1): Likewise.
9319         (simplify_const_relational_operation): Likewise.
9320         (simplify_ternary_operation): Likewise.
9321         * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise.
9323 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9324             Alan Hayward  <alan.hayward@arm.com>
9325             David Sherwood  <david.sherwood@arm.com>
9327         * cse.c (cse_insn): Add is_a <scalar_int_mode> checks.
9328         * reload.c (push_reload): Likewise.
9329         (find_reloads): Likewise.
9331 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9332             Alan Hayward  <alan.hayward@arm.com>
9333             David Sherwood  <david.sherwood@arm.com>
9335         * combine.c (find_split_point): Add is_a <scalar_int_mode> checks.
9336         (make_compound_operation_int): Likewise.
9337         (change_zero_ext): Likewise.
9338         * expr.c (convert_move): Likewise.
9339         (convert_modes): Likewise.
9340         * fwprop.c (forward_propagate_subreg): Likewise.
9341         * loop-iv.c (get_biv_step_1): Likewise.
9342         * optabs.c (widen_operand): Likewise.
9343         * postreload.c (move2add_valid_value_p): Likewise.
9344         * recog.c (simplify_while_replacing): Likewise.
9345         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
9346         (simplify_binary_operation_1): Likewise.  Remove redundant
9347         mode equality check.
9349 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9350             Alan Hayward  <alan.hayward@arm.com>
9351             David Sherwood  <david.sherwood@arm.com>
9353         * combine.c (combine_simplify_rtx): Add checks for
9354         is_a <scalar_int_mode>.
9355         (simplify_if_then_else): Likewise.
9356         (make_field_assignment): Likewise.
9357         (simplify_comparison): Likewise.
9358         * ifcvt.c (noce_try_bitop): Likewise.
9359         * loop-invariant.c (canonicalize_address_mult): Likewise.
9360         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
9362 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9363             Alan Hayward  <alan.hayward@arm.com>
9364             David Sherwood  <david.sherwood@arm.com>
9366         * gimple-fold.c (gimple_fold_builtin_memory_op): Use
9367         is_a <scalar_int_mode> instead of != BLKmode.
9369 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9370             Alan Hayward  <alan.hayward@arm.com>
9371             David Sherwood  <david.sherwood@arm.com>
9373         * cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>
9374         instead of != VOIDmode.
9375         * combine.c (if_then_else_cond): Likewise.
9376         (change_zero_ext): Likewise.
9377         * dwarf2out.c (mem_loc_descriptor): Likewise.
9378         (loc_descriptor): Likewise.
9379         * rtlanal.c (canonicalize_condition): Likewise.
9380         * simplify-rtx.c (simplify_relational_operation_1): Likewise.
9382 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9383             Alan Hayward  <alan.hayward@arm.com>
9384             David Sherwood  <david.sherwood@arm.com>
9386         * simplify-rtx.c (simplify_binary_operation_1): Use
9387         is_a <scalar_int_mode> instead of !VECTOR_MODE_P.
9389 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9390             Alan Hayward  <alan.hayward@arm.com>
9391             David Sherwood  <david.sherwood@arm.com>
9393         * wide-int.h (int_traits<unsigned char>) New class.
9394         (int_traits<unsigned short>) Likewise.
9395         * cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>.
9396         Use GET_MODE_UNIT_PRECISION and remove redundant test for
9397         SCALAR_INT_MODE_P.
9398         * combine.c (set_nonzero_bits_and_sign_copies): Use
9399         is_a <scalar_int_mode>.
9400         (find_split_point): Likewise.
9401         (combine_simplify_rtx): Likewise.
9402         (simplify_logical): Likewise.
9403         (expand_compound_operation): Likewise.
9404         (expand_field_assignment): Likewise.
9405         (make_compound_operation): Likewise.
9406         (extended_count): Likewise.
9407         (change_zero_ext): Likewise.
9408         (simplify_comparison): Likewise.
9409         * dwarf2out.c (scompare_loc_descriptor): Likewise.
9410         (ucompare_loc_descriptor): Likewise.
9411         (minmax_loc_descriptor): Likewise.
9412         (mem_loc_descriptor): Likewise.
9413         (loc_descriptor): Likewise.
9414         * expmed.c (init_expmed_one_mode): Likewise.
9415         * lra-constraints.c (lra_constraint_offset): Likewise.
9416         * optabs.c (prepare_libcall_arg): Likewise.
9417         * postreload.c (move2add_note_store): Likewise.
9418         * reload.c (operands_match_p): Likewise.
9419         * rtl.h (load_extend_op): Likewise.
9420         * rtlhooks.c (gen_lowpart_general): Likewise.
9421         * simplify-rtx.c (simplify_truncation): Likewise.
9422         (simplify_unary_operation_1): Likewise.
9423         (simplify_binary_operation_1): Likewise.
9424         (simplify_const_binary_operation): Likewise.
9425         (simplify_const_relational_operation): Likewise.
9426         (simplify_subreg): Likewise.
9427         * stor-layout.c (bitwise_mode_for_mode): Likewise.
9428         * var-tracking.c (adjust_mems): Likewise.
9429         (prepare_call_arguments): Likewise.
9431 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9432             Alan Hayward  <alan.hayward@arm.com>
9433             David Sherwood  <david.sherwood@arm.com>
9435         * machmode.h (is_int_mode): New fuction.
9436         * combine.c (find_split_point): Use it.
9437         (combine_simplify_rtx): Likewise.
9438         (simplify_if_then_else): Likewise.
9439         (simplify_set): Likewise.
9440         (simplify_shift_const_1): Likewise.
9441         (simplify_comparison): Likewise.
9442         * config/aarch64/aarch64.c (aarch64_rtx_costs): Likewise.
9443         * cse.c (notreg_cost): Likewise.
9444         (cse_insn): Likewise.
9445         * cselib.c (cselib_lookup_1): Likewise.
9446         * dojump.c (do_jump_1): Likewise.
9447         (do_compare_rtx_and_jump): Likewise.
9448         * dse.c (get_call_args): Likewise.
9449         * dwarf2out.c (rtl_for_decl_init): Likewise.
9450         (native_encode_initializer): Likewise.
9451         * expmed.c (emit_store_flag_1): Likewise.
9452         (emit_store_flag): Likewise.
9453         * expr.c (convert_modes): Likewise.
9454         (store_field): Likewise.
9455         (expand_expr_real_1): Likewise.
9456         * fold-const.c (fold_read_from_constant_string): Likewise.
9457         * gimple-ssa-sprintf.c (get_format_string): Likewise.
9458         * optabs-libfuncs.c (gen_int_libfunc): Likewise.
9459         * optabs.c (expand_binop): Likewise.
9460         (expand_unop): Likewise.
9461         (expand_abs_nojump): Likewise.
9462         (expand_one_cmpl_abs_nojump): Likewise.
9463         * simplify-rtx.c (mode_signbit_p): Likewise.
9464         (val_signbit_p): Likewise.
9465         (val_signbit_known_set_p): Likewise.
9466         (val_signbit_known_clear_p): Likewise.
9467         (simplify_relational_operation_1): Likewise.
9468         * tree.c (vector_type_mode): Likewise.
9470 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9471             Alan Hayward  <alan.hayward@arm.com>
9472             David Sherwood  <david.sherwood@arm.com>
9474         * machmode.h (smallest_mode_for_size): Fix formatting.
9475         (smallest_int_mode_for_size): New function.
9476         * cfgexpand.c (expand_debug_expr): Use smallest_int_mode_for_size
9477         instead of smallest_mode_for_size.
9478         * combine.c (make_extraction): Likewise.
9479         * config/arc/arc.c (arc_expand_movmem): Likewise.
9480         * config/arm/arm.c (arm_expand_divmod_libfunc): Likewise.
9481         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
9482         * config/s390/s390.c (s390_expand_insv): Likewise.
9483         * config/sparc/sparc.c (assign_int_registers): Likewise.
9484         * config/spu/spu.c (spu_function_value): Likewise.
9485         (spu_function_arg): Likewise.
9486         * coverage.c (get_gcov_type): Likewise.
9487         (get_gcov_unsigned_t): Likewise.
9488         * dse.c (find_shift_sequence): Likewise.
9489         * expmed.c (store_bit_field_1): Likewise.
9490         * expr.c (convert_move): Likewise.
9491         (store_field): Likewise.
9492         * internal-fn.c (expand_arith_overflow): Likewise.
9493         * optabs-query.c (get_best_extraction_insn): Likewise.
9494         * optabs.c (expand_twoval_binop_libfunc): Likewise.
9495         * stor-layout.c (layout_type): Likewise.
9496         (initialize_sizetypes): Likewise.
9497         * targhooks.c (default_get_mask_mode): Likewise.
9498         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Likewise.
9500 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9501             Alan Hayward  <alan.hayward@arm.com>
9502             David Sherwood  <david.sherwood@arm.com>
9504         * machmode.h (opt_mode::else_blk): New function.
9505         (int_mode_for_mode): Declare.
9506         * stor-layout.c (int_mode_for_mode): Return an opt_scalar_int_mode.
9507         * builtins.c (expand_builtin_signbit): Adjust for new int_mode_for_mode
9508         return type.
9509         * cfgexpand.c (expand_debug_expr): Likewise.
9510         * combine.c (gen_lowpart_or_truncate): Likewise.
9511         (gen_lowpart_for_combine): Likewise.
9512         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Likewise.
9513         * config/avr/avr.c (avr_to_int_mode): Likewise.
9514         (avr_out_plus_1): Likewise.
9515         (avr_out_plus): Likewise.
9516         (avr_out_round): Likewise.
9517         * config/i386/i386.c (ix86_split_to_parts): Likewise.
9518         * config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
9519         (s390_expand_vcond): Likewise.
9520         * config/spu/spu.c (spu_split_immediate): Likewise.
9521         (spu_expand_mov): Likewise.
9522         * dse.c (get_stored_val): Likewise.
9523         * expmed.c (store_bit_field_1): Likewise.
9524         (convert_extracted_bit_field): Use int_mode_for_mode instead of
9525         int_mode_for_size.
9526         (extract_bit_field_1): Adjust for new int_mode_for_mode return type.
9527         (extract_low_bits): Likewise.
9528         * expr.c (emit_group_load_1): Likewise.  Separate out the BLKmode
9529         handling rather than repeating the check.
9530         (emit_group_store): Likewise.
9531         (emit_move_via_integer): Adjust for new int_mode_for_mode return type.
9532         * optabs.c (expand_absneg_bit): Likewise.
9533         (expand_copysign_absneg): Likewise.
9534         (expand_copysign_bit): Likewise.
9535         * tree-if-conv.c (ifcvt_can_use_mask_load_store): Likewise.
9536         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
9537         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
9538         * var-tracking.c (prepare_call_arguments):  Likewise.
9539         * config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Use
9540         int_mode_for_mode instead of mode_for_size.
9541         * config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
9543 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9544             Alan Hayward  <alan.hayward@arm.com>
9545             David Sherwood  <david.sherwood@arm.com>
9547         * machmode.h (int_mode_for_size): New function.
9548         * builtins.c (set_builtin_user_assembler_name): Use int_mode_for_size
9549         instead of mode_for_size.
9550         * calls.c (save_fixed_argument_area): Likewise.  Make use of BLKmode
9551         explicit.
9552         * combine.c (expand_field_assignment): Use int_mode_for_size
9553         instead of mode_for_size.
9554         (make_extraction): Likewise.
9555         (simplify_shift_const_1): Likewise.
9556         (simplify_comparison): Likewise.
9557         * dojump.c (do_jump): Likewise.
9558         * dwarf2out.c (mem_loc_descriptor): Likewise.
9559         * emit-rtl.c (init_derived_machine_modes): Likewise.
9560         * expmed.c (flip_storage_order): Likewise.
9561         (convert_extracted_bit_field): Likewise.
9562         * expr.c (copy_blkmode_from_reg): Likewise.
9563         * graphite-isl-ast-to-gimple.c (max_mode_int_precision): Likewise.
9564         * internal-fn.c (expand_mul_overflow): Likewise.
9565         * lower-subreg.c (simple_move): Likewise.
9566         * optabs-libfuncs.c (init_optabs): Likewise.
9567         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
9568         * tree.c (vector_type_mode): Likewise.
9569         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
9570         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Likewise.
9571         * tree-vect-generic.c (expand_vector_parallel): Likewise.
9572         * tree-vect-stmts.c (vectorizable_load): Likewise.
9573         (vectorizable_store): Likewise.
9575 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9576             Alan Hayward  <alan.hayward@arm.com>
9577             David Sherwood  <david.sherwood@arm.com>
9579         * coretypes.h (pod_mode): New type.
9580         (scalar_int_mode_pod): New typedef.
9581         * machmode.h (pod_mode): New class.
9582         (int_n_data_t::m): Change type to scalar_int_mode_pod.
9583         * genmodes.c (emit_mode_int_n): Update accordingly.
9584         * lower-subreg.h (target_lower_subreg): Change type to
9585         scalar_int_mode_pod.
9586         * gdbhooks.py (build_pretty_printer): Handle pod_mode and
9587         scalar_int_mode_pod.
9589 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9590             Alan Hayward  <alan.hayward@arm.com>
9591             David Sherwood  <david.sherwood@arm.com>
9593         * config/powerpcspe/powerpcspe.h (rs6000_pmode): Change type from
9594         machine_mode to scalar_int_mode.
9595         * config/powerpcspe/powerpcspe.c (rs6000_pmode): Likewise.
9596         (rs6000_option_override_internal): Remove cast to int.
9597         * config/rs6000/rs6000.h (rs6000_pmode): Change type from
9598         machine_mode to scalar_int_mode.
9599         * config/rs6000/rs6000.c (rs6000_pmode): Likewise.
9600         (rs6000_option_override_internal): Remove cast to int.
9601         * config/s390/s390.h (Pmode): Remove cast to machine_mode.
9602         * config/epiphany/epiphany.h (RTX_OK_FOR_OFFSET_P): Add cast
9603         to machine_mode.
9604         * config/s390/s390.c (s390_expand_builtin): Likewise.
9605         * coretypes.h (scalar_int_mode): New type.
9606         (opt_scalar_int_mode): New typedef.
9607         * machmode.h (scalar_int_mode): New class.
9608         (scalar_int_mode::includes_p): New function.
9609         (byte_mode): Change type to scalar_int_mode.
9610         (word_mode): Likewise.
9611         (ptr_mode): Likewise.
9612         * emit-rtl.c (byte_mode): Likewise.
9613         (word_mode): Likewise.
9614         (ptr_mode): Likewise.
9615         (init_derived_machine_modes): Update accordingly.
9616         * genmodes.c (get_mode_class): Return scalar_int_mode for MODE_INT
9617         and MODE_PARTIAL_INT.
9618         * gdbhooks.py (build_pretty_printer): Handle scalar_int_mode and
9619         opt_scalar_int_mode.
9621 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9622             Alan Hayward  <alan.hayward@arm.com>
9623             David Sherwood  <david.sherwood@arm.com>
9625         * target.def (libgcc_floating_mode_supported_p): Take a
9626         scalar_float_mode.
9627         * doc/tm.texi: Regenerate.
9628         * targhooks.h (default_libgcc_floating_mode_supported_p): Take a
9629         scalar_float_mode.
9630         * targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
9631         * config/aarch64/aarch64.c (aarch64_libgcc_floating_mode_supported_p):
9632         Likewise.
9634 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9635             Alan Hayward  <alan.hayward@arm.com>
9636             David Sherwood  <david.sherwood@arm.com>
9638         * target.def (default_floatn_mode): Return an opt_scalar_float_mode.
9639         * doc/tm.texi: Regenerate.
9640         * config/arm/arm.c (arm_floatn_mode): Return an opt_scalar_float_mode.
9641         * config/powerpcspe/powerpcspe.c (rs6000_floatn_mode): Likewise.
9642         * config/rs6000/rs6000.c (rs6000_floatn_mode): Likewise.
9643         * targhooks.h (default_floatn_mode): Likewise.
9644         * targhooks.c (default_floatn_mode): Likewise.
9645         * tree.c (build_common_tree_nodes): Update accordingly.
9647 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9648             Alan Hayward  <alan.hayward@arm.com>
9649             David Sherwood  <david.sherwood@arm.com>
9651         * machmode.h (mode_iterator::start): Provide overload for opt_modes.
9652         (mode_iterator::iterate_p): Likewise.
9653         (mode_iterator::get_wider): Likewise.
9654         * expr.c (init_expr_target): Use opt_scalar_float_mode.
9656 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9657             Alan Hayward  <alan.hayward@arm.com>
9658             David Sherwood  <david.sherwood@arm.com>
9660         * coretypes.h (opt_scalar_float_mode): New typedef.
9661         * machmode.h (float_mode_for_size): New function.
9662         * emit-rtl.c (double_mode): Delete.
9663         (init_emit_once): Use float_mode_for_size.
9664         * stor-layout.c (layout_type): Likewise.
9665         * gdbhooks.py (build_pretty_printer): Handle opt_scalar_float_mode.
9667 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9668             Alan Hayward  <alan.hayward@arm.com>
9669             David Sherwood  <david.sherwood@arm.com>
9671         * output.h (assemble_real): Take a scalar_float_mode.
9672         * config/arm/arm.c (arm_assemble_integer): Update accordingly.
9673         * config/arm/arm.md (consttable_4): Likewise.
9674         (consttable_8): Likewise.
9675         (consttable_16): Likewise.
9676         * config/mips/mips.md (consttable_float): Likewise.
9677         * config/s390/s390.c (s390_output_pool_entry): Likewise.
9678         * varasm.c (assemble_real): Take a scalar_float_mode.
9679         (output_constant_pool_2): Update accordingly.
9680         (output_constant): Likewise.
9682 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9683             Alan Hayward  <alan.hayward@arm.com>
9684             David Sherwood  <david.sherwood@arm.com>
9686         * tree.h (SCALAR_FLOAT_TYPE_MODE): New macro.
9687         * builtins.c (expand_builtin_signbit): Use it instead of TYPE_MODE.
9688         * fold-const.c (fold_convert_const_real_from_fixed): Likewise.
9689         (native_encode_real): Likewise.
9690         (native_interpret_real): Likewise.
9691         * hsa-brig.c (emit_immediate_scalar_to_buffer): Likewise.
9692         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
9694 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9695             Alan Hayward  <alan.hayward@arm.com>
9696             David Sherwood  <david.sherwood@arm.com>
9698         * optabs-libfuncs.c (gen_trunc_conv_libfunc): Use is_a
9699         <scalar_float_mode>.  Simplify.
9700         (gen_extend_conv_libfunc): Likewise.
9702 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9703             Alan Hayward  <alan.hayward@arm.com>
9704             David Sherwood  <david.sherwood@arm.com>
9706         * coretypes.h (scalar_float_mode): New type.
9707         * machmode.h (mode_traits::from_int): Use machine_mode if
9708         USE_ENUM_MODES is defined.
9709         (is_a): New function.
9710         (as_a): Likewise.
9711         (dyn_cast): Likewise.
9712         (scalar_float_mode): New class.
9713         (scalar_float_mode::includes_p): New function.
9714         (is_float_mode): Likewise.
9715         * gdbhooks.py (MachineModePrinter): New class.
9716         (build_pretty_printer): Use it for scalar_float_mode.
9717         * real.h (FLOAT_MODE_FORMAT): Use as_a <scalar_float_mode>.
9718         (format_helper::format_helper): Turn into a template.
9719         * genmodes.c (get_mode_class): New function.
9720         (emit_insn_modes_h): Give modes the class returned by get_mode_class,
9721         or machine_mode if none.
9722         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Use
9723         as_a <scalar_float_mode>.
9724         * dwarf2out.c (mem_loc_descriptor): Likewise.
9725         (insert_float): Likewise.
9726         (add_const_value_attribute): Likewise.
9727         * simplify-rtx.c (simplify_immed_subreg): Likewise.
9728         * optabs.c (expand_absneg_bit): Take a scalar_float_mode.
9729         (expand_unop): Update accordingly.
9730         (expand_abs_nojump): Likewise.
9731         (expand_copysign_absneg): Take a scalar_float_mode.
9732         (expand_copysign_bit): Likewise.
9733         (expand_copysign): Update accordingly.
9735 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9736             Alan Hayward  <alan.hayward@arm.com>
9737             David Sherwood  <david.sherwood@arm.com>
9739         * coretypes.h (opt_mode): New class.
9740         * machmode.h (opt_mode): Likewise.
9741         (opt_mode::else_void): New function.
9742         (opt_mode::require): Likewise.
9743         (opt_mode::exists): Likewise.
9744         (GET_MODE_WIDER_MODE): Turn into a function and return an opt_mode.
9745         (GET_MODE_2XWIDER_MODE): Likewise.
9746         (mode_iterator::get_wider): Update accordingly.
9747         (mode_iterator::get_2xwider): Likewise.
9748         (mode_iterator::get_known_wider): Likewise, turning into a template.
9749         * combine.c (make_extraction): Update use of GET_MODE_WIDER_MODE,
9750         forcing a wider mode to exist.
9751         * config/cr16/cr16.h (LONG_REG_P): Likewise.
9752         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
9753         * config/c6x/c6x.c (c6x_rtx_costs): Update use of
9754         GET_MODE_2XWIDER_MODE, forcing a wider mode to exist.
9755         * lower-subreg.c (init_lower_subreg): Likewise.
9756         * optabs-libfuncs.c (init_sync_libfuncs_1): Likewise, but not
9757         on the final iteration.
9758         * config/i386/i386.c (ix86_expand_set_or_movmem): Check whether
9759         a wider mode exists before asking for a move pattern.
9760         (get_mode_wider_vector): Update use of GET_MODE_WIDER_MODE,
9761         forcing a wider mode to exist.
9762         (expand_vselect_vconcat): Update use of GET_MODE_2XWIDER_MODE,
9763         returning false if no such mode exists.
9764         * config/ia64/ia64.c (expand_vselect_vconcat): Likewise.
9765         * config/mips/mips.c (mips_expand_vselect_vconcat): Likewise.
9766         * expmed.c (init_expmed_one_mode): Update use of GET_MODE_WIDER_MODE.
9767         Avoid checking for a MODE_INT if we already know the mode is not a
9768         SCALAR_INT_MODE_P.
9769         (extract_high_half): Update use of GET_MODE_WIDER_MODE,
9770         forcing a wider mode to exist.
9771         (expmed_mult_highpart_optab): Likewise.
9772         (expmed_mult_highpart): Likewise.
9773         * expr.c (expand_expr_real_2): Update use of GET_MODE_WIDER_MODE,
9774         using else_void.
9775         * lto-streamer-in.c (lto_input_mode_table): Likewise.
9776         * optabs-query.c (find_widening_optab_handler_and_mode): Likewise.
9777         * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
9778         * internal-fn.c (expand_mul_overflow): Update use of
9779         GET_MODE_2XWIDER_MODE.
9780         * omp-low.c (omp_clause_aligned_alignment): Likewise.
9781         * tree-ssa-math-opts.c (convert_mult_to_widen): Update use of
9782         GET_MODE_WIDER_MODE.
9783         (convert_plusminus_to_widen): Likewise.
9784         * tree-switch-conversion.c (array_value_type): Likewise.
9785         * var-tracking.c (emit_note_insn_var_location): Likewise.
9786         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
9787         Return false inside rather than outside the loop if no wider mode
9788         exists
9789         * optabs.c (expand_binop): Update use of GET_MODE_WIDER_MODE
9790         and GET_MODE_2XWIDER_MODE
9791         (can_compare_p): Use else_void.
9792         * gdbhooks.py (OptMachineModePrinter): New class.
9793         (build_pretty_printer): Use it for opt_mode.
9795 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9796             Alan Hayward  <alan.hayward@arm.com>
9797             David Sherwood  <david.sherwood@arm.com>
9799         * tree-switch-conversion.c (array_value_type): Only read TYPE_MODE
9800         once.  Use get_narrowest_mode instead of GET_CLASS_NARROWEST_MODE.
9802 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9803             Alan Hayward  <alan.hayward@arm.com>
9804             David Sherwood  <david.sherwood@arm.com>
9806         * machmode.h (mode_traits): New structure.
9807         (get_narrowest_mode): New function.
9808         (mode_iterator::start): Likewise.
9809         (mode_iterator::iterate_p): Likewise.
9810         (mode_iterator::get_wider): Likewise.
9811         (mode_iterator::get_known_wider): Likewise.
9812         (mode_iterator::get_2xwider): Likewise.
9813         (FOR_EACH_MODE_IN_CLASS): New mode iterator.
9814         (FOR_EACH_MODE): Likewise.
9815         (FOR_EACH_MODE_FROM): Likewise.
9816         (FOR_EACH_MODE_UNTIL): Likewise.
9817         (FOR_EACH_WIDER_MODE): Likewise.
9818         (FOR_EACH_2XWIDER_MODE): Likewise.
9819         * builtins.c (expand_builtin_strlen): Use new mode iterators.
9820         * combine.c (simplify_comparison): Likewise
9821         * config/i386/i386.c (type_natural_mode): Likewise.
9822         * cse.c (cse_insn): Likewise.
9823         * dse.c (find_shift_sequence): Likewise.
9824         * emit-rtl.c (init_derived_machine_modes): Likewise.
9825         (init_emit_once): Likewise.
9826         * explow.c (hard_function_value): Likewise.
9827         * expmed.c (extract_fixed_bit_field_1): Likewise.
9828         (extract_bit_field_1): Likewise.
9829         (expand_divmod): Likewise.
9830         (emit_store_flag_1): Likewise.
9831         * expr.c (init_expr_target): Likewise.
9832         (convert_move): Likewise.
9833         (alignment_for_piecewise_move): Likewise.
9834         (widest_int_mode_for_size): Likewise.
9835         (emit_block_move_via_movmem): Likewise.
9836         (copy_blkmode_to_reg): Likewise.
9837         (set_storage_via_setmem): Likewise.
9838         (compress_float_constant): Likewise.
9839         * omp-low.c (omp_clause_aligned_alignment): Likewise.
9840         * optabs-query.c (get_best_extraction_insn): Likewise.
9841         * optabs.c (expand_binop): Likewise.
9842         (expand_twoval_unop): Likewise.
9843         (expand_twoval_binop): Likewise.
9844         (widen_leading): Likewise.
9845         (widen_bswap): Likewise.
9846         (expand_parity): Likewise.
9847         (expand_unop): Likewise.
9848         (prepare_cmp_insn): Likewise.
9849         (prepare_float_lib_cmp): Likewise.
9850         (expand_float): Likewise.
9851         (expand_fix): Likewise.
9852         (expand_sfix_optab): Likewise.
9853         * postreload.c (move2add_use_add2_insn): Likewise.
9854         * reg-stack.c (reg_to_stack): Likewise.
9855         * reginfo.c (choose_hard_reg_mode): Likewise.
9856         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
9857         * stor-layout.c (mode_for_size): Likewise.
9858         (smallest_mode_for_size): Likewise.
9859         (mode_for_vector): Likewise.
9860         (finish_bitfield_representative): Likewise.
9861         * tree-ssa-math-opts.c (target_supports_divmod_p): Likewise.
9862         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
9863         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
9864         * var-tracking.c (prepare_call_arguments): Likewise.
9866 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9867             Alan Hayward  <alan.hayward@arm.com>
9868             David Sherwood  <david.sherwood@arm.com>
9870         * genconditions.c (write_header): Add a "#define USE_ENUM_MODES".
9871         * genmodes.c (emit_insn_modes_h): Define FOOmode to E_FOOmode if
9872         USE_ENUM_MODES is defined and to ((void) 0, E_FOOmode) otherwise.
9873         * machmode.h (mode_size): Move earlier in file.
9874         (mode_precision): Likewise.
9875         (mode_inner): Likewise.
9876         (mode_nunits): Likewise.
9877         (mode_unit_size): Likewise.
9878         (unit_unit_precision): Likewise.
9879         (mode_wider): Likewise.
9880         (mode_2xwider): Likewise.
9881         (machine_mode): New class.
9882         (mode_to_bytes): New function.
9883         (mode_to_bits): Likewise.
9884         (mode_to_precision): Likewise.
9885         (mode_to_inner): Likewise.
9886         (mode_to_unit_size): Likewise.
9887         (mode_to_unit_precision): Likewise.
9888         (mode_to_nunits): Likewise.
9889         (GET_MODE_SIZE): Use mode_to_bytes.
9890         (GET_MODE_BITSIZE): Use mode_to_bits.
9891         (GET_MODE_PRECISION): Use mode_to_precision.
9892         (GET_MODE_INNER): Use mode_to_inner.
9893         (GET_MODE_UNIT_SIZE): Use mode_to_unit_size.
9894         (GET_MODE_UNIT_PRECISION): Use mode_to_unit_precision.
9895         (GET_MODE_NUNITS): Use mode_to_nunits.
9896         * system.h (ALWAYS_INLINE): New macro.
9897         * config/powerpcspe/powerpcspe-c.c
9898         (altivec_resolve_overloaded_builtin): Use machine_mode instead of
9899         int for arg1_mode and arg2_mode.
9901 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
9902             Alan Hayward  <alan.hayward@arm.com>
9903             David Sherwood  <david.sherwood@arm.com>
9905         * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
9906         Prefix mode names with E_ in case statements.
9907         * config/aarch64/aarch64-elf.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
9908         * config/aarch64/aarch64.c (aarch64_split_simd_combine): Likewise.
9909         (aarch64_split_simd_move): Likewise.
9910         (aarch64_gen_storewb_pair): Likewise.
9911         (aarch64_gen_loadwb_pair): Likewise.
9912         (aarch64_gen_store_pair): Likewise.
9913         (aarch64_gen_load_pair): Likewise.
9914         (aarch64_get_condition_code_1): Likewise.
9915         (aarch64_constant_pool_reload_icode): Likewise.
9916         (get_rsqrte_type): Likewise.
9917         (get_rsqrts_type): Likewise.
9918         (get_recpe_type): Likewise.
9919         (get_recps_type): Likewise.
9920         (aarch64_gimplify_va_arg_expr): Likewise.
9921         (aarch64_simd_container_mode): Likewise.
9922         (aarch64_emit_load_exclusive): Likewise.
9923         (aarch64_emit_store_exclusive): Likewise.
9924         (aarch64_expand_compare_and_swap): Likewise.
9925         (aarch64_gen_atomic_cas): Likewise.
9926         (aarch64_emit_bic): Likewise.
9927         (aarch64_emit_atomic_swap): Likewise.
9928         (aarch64_emit_atomic_load_op): Likewise.
9929         (aarch64_evpc_trn): Likewise.
9930         (aarch64_evpc_uzp): Likewise.
9931         (aarch64_evpc_zip): Likewise.
9932         (aarch64_evpc_ext): Likewise.
9933         (aarch64_evpc_rev): Likewise.
9934         (aarch64_evpc_dup): Likewise.
9935         (aarch64_gen_ccmp_first): Likewise.
9936         (aarch64_gen_ccmp_next): Likewise.
9937         * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
9938         (alpha_emit_xfloating_libcall): Likewise.
9939         (emit_insxl): Likewise.
9940         (alpha_arg_type): Likewise.
9941         * config/arc/arc.c (arc_vector_mode_supported_p): Likewise.
9942         (arc_preferred_simd_mode): Likewise.
9943         (arc_secondary_reload): Likewise.
9944         (get_arc_condition_code): Likewise.
9945         (arc_print_operand): Likewise.
9946         (arc_legitimate_constant_p): Likewise.
9947         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
9948         * config/arc/arc.md (casesi_load): Likewise.
9949         (casesi_compact_jump): Likewise.
9950         * config/arc/predicates.md (proper_comparison_operator): Likewise.
9951         (cc_use_register): Likewise.
9952         * config/arm/aout.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
9953         * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
9954         (arm_init_iwmmxt_builtins): Likewise.
9955         * config/arm/arm.c (thumb1_size_rtx_costs): Likewise.
9956         (neon_expand_vector_init): Likewise.
9957         (arm_attr_length_move_neon): Likewise.
9958         (maybe_get_arm_condition_code): Likewise.
9959         (arm_emit_vector_const): Likewise.
9960         (arm_preferred_simd_mode): Likewise.
9961         (arm_output_iwmmxt_tinsr): Likewise.
9962         (thumb1_output_casesi): Likewise.
9963         (thumb2_output_casesi): Likewise.
9964         (arm_emit_load_exclusive): Likewise.
9965         (arm_emit_store_exclusive): Likewise.
9966         (arm_expand_compare_and_swap): Likewise.
9967         (arm_evpc_neon_vuzp): Likewise.
9968         (arm_evpc_neon_vzip): Likewise.
9969         (arm_evpc_neon_vrev): Likewise.
9970         (arm_evpc_neon_vtrn): Likewise.
9971         (arm_evpc_neon_vext): Likewise.
9972         (arm_validize_comparison): Likewise.
9973         * config/arm/neon.md (neon_vc<cmp_op><mode>): Likewise.
9974         * config/avr/avr-c.c (avr_resolve_overloaded_builtin): Likewise.
9975         * config/avr/avr.c (avr_rtx_costs_1): Likewise.
9976         * config/c6x/c6x.c (c6x_vector_mode_supported_p): Likewise.
9977         (c6x_preferred_simd_mode): Likewise.
9978         * config/epiphany/epiphany.c (get_epiphany_condition_code): Likewise.
9979         (epiphany_rtx_costs): Likewise.
9980         * config/epiphany/predicates.md (proper_comparison_operator):
9981         Likewise.
9982         * config/frv/frv.c (condexec_memory_operand): Likewise.
9983         (frv_emit_move): Likewise.
9984         (output_move_single): Likewise.
9985         (output_condmove_single): Likewise.
9986         (frv_hard_regno_mode_ok): Likewise.
9987         (frv_matching_accg_mode): Likewise.
9988         * config/h8300/h8300.c (split_adds_subs): Likewise.
9989         (h8300_rtx_costs): Likewise.
9990         (h8300_print_operand): Likewise.
9991         (compute_mov_length): Likewise.
9992         (output_logical_op): Likewise.
9993         (compute_logical_op_length): Likewise.
9994         (compute_logical_op_cc): Likewise.
9995         (h8300_shift_needs_scratch_p): Likewise.
9996         (output_a_shift): Likewise.
9997         (compute_a_shift_length): Likewise.
9998         (compute_a_shift_cc): Likewise.
9999         (expand_a_rotate): Likewise.
10000         (output_a_rotate): Likewise.
10001         * config/i386/i386.c (classify_argument): Likewise.
10002         (function_arg_advance_32): Likewise.
10003         (function_arg_32): Likewise.
10004         (function_arg_64): Likewise.
10005         (function_value_64): Likewise.
10006         (ix86_gimplify_va_arg): Likewise.
10007         (ix86_legitimate_constant_p): Likewise.
10008         (put_condition_code): Likewise.
10009         (split_double_mode): Likewise.
10010         (ix86_avx256_split_vector_move_misalign): Likewise.
10011         (ix86_expand_vector_logical_operator): Likewise.
10012         (ix86_split_idivmod): Likewise.
10013         (ix86_expand_adjust_ufix_to_sfix_si): Likewise.
10014         (ix86_build_const_vector): Likewise.
10015         (ix86_build_signbit_mask): Likewise.
10016         (ix86_match_ccmode): Likewise.
10017         (ix86_cc_modes_compatible): Likewise.
10018         (ix86_expand_branch): Likewise.
10019         (ix86_expand_sse_cmp): Likewise.
10020         (ix86_expand_sse_movcc): Likewise.
10021         (ix86_expand_int_sse_cmp): Likewise.
10022         (ix86_expand_vec_perm_vpermi2): Likewise.
10023         (ix86_expand_vec_perm): Likewise.
10024         (ix86_expand_sse_unpack): Likewise.
10025         (ix86_expand_int_addcc): Likewise.
10026         (ix86_split_to_parts): Likewise.
10027         (ix86_vectorize_builtin_gather): Likewise.
10028         (ix86_vectorize_builtin_scatter): Likewise.
10029         (avx_vpermilp_parallel): Likewise.
10030         (inline_memory_move_cost): Likewise.
10031         (ix86_tieable_integer_mode_p): Likewise.
10032         (x86_maybe_negate_const_int): Likewise.
10033         (ix86_expand_vector_init_duplicate): Likewise.
10034         (ix86_expand_vector_init_one_nonzero): Likewise.
10035         (ix86_expand_vector_init_one_var): Likewise.
10036         (ix86_expand_vector_init_concat): Likewise.
10037         (ix86_expand_vector_init_interleave): Likewise.
10038         (ix86_expand_vector_init_general): Likewise.
10039         (ix86_expand_vector_set): Likewise.
10040         (ix86_expand_vector_extract): Likewise.
10041         (emit_reduc_half): Likewise.
10042         (ix86_emit_i387_round): Likewise.
10043         (ix86_mangle_type): Likewise.
10044         (ix86_expand_round_sse4): Likewise.
10045         (expand_vec_perm_blend): Likewise.
10046         (canonicalize_vector_int_perm): Likewise.
10047         (ix86_expand_vec_one_operand_perm_avx512): Likewise.
10048         (expand_vec_perm_1): Likewise.
10049         (expand_vec_perm_interleave3): Likewise.
10050         (expand_vec_perm_even_odd_pack): Likewise.
10051         (expand_vec_perm_even_odd_1): Likewise.
10052         (expand_vec_perm_broadcast_1): Likewise.
10053         (ix86_vectorize_vec_perm_const_ok): Likewise.
10054         (ix86_expand_vecop_qihi): Likewise.
10055         (ix86_expand_mul_widen_hilo): Likewise.
10056         (ix86_expand_sse2_abs): Likewise.
10057         (ix86_expand_pextr): Likewise.
10058         (ix86_expand_pinsr): Likewise.
10059         (ix86_preferred_simd_mode): Likewise.
10060         (ix86_simd_clone_compute_vecsize_and_simdlen): Likewise.
10061         * config/i386/sse.md (*andnot<mode>3): Likewise.
10062         (<mask_codefor><code><mode>3<mask_name>): Likewise.
10063         (*<code><mode>3): Likewise.
10064         * config/ia64/ia64.c (ia64_expand_vecint_compare): Likewise.
10065         (ia64_expand_atomic_op): Likewise.
10066         (ia64_arg_type): Likewise.
10067         (ia64_mode_to_int): Likewise.
10068         (ia64_scalar_mode_supported_p): Likewise.
10069         (ia64_vector_mode_supported_p): Likewise.
10070         (expand_vec_perm_broadcast): Likewise.
10071         * config/iq2000/iq2000.c (iq2000_move_1word): Likewise.
10072         (iq2000_function_arg_advance): Likewise.
10073         (iq2000_function_arg): Likewise.
10074         * config/m32c/m32c.c (m32c_preferred_reload_class): Likewise.
10075         * config/m68k/m68k.c (output_dbcc_and_branch): Likewise.
10076         (m68k_libcall_value): Likewise.
10077         (m68k_function_value): Likewise.
10078         (sched_attr_op_type): Likewise.
10079         * config/mcore/mcore.c (mcore_output_move): Likewise.
10080         * config/microblaze/microblaze.c (microblaze_function_arg_advance):
10081         Likewise.
10082         (microblaze_function_arg): Likewise.
10083         * config/mips/mips.c (mips16_build_call_stub): Likewise.
10084         (mips_print_operand): Likewise.
10085         (mips_mode_ok_for_mov_fmt_p): Likewise.
10086         (mips_vector_mode_supported_p): Likewise.
10087         (mips_preferred_simd_mode): Likewise.
10088         (mips_expand_vpc_loongson_even_odd): Likewise.
10089         (mips_expand_vec_unpack): Likewise.
10090         (mips_expand_vi_broadcast): Likewise.
10091         (mips_expand_vector_init): Likewise.
10092         (mips_expand_vec_reduc): Likewise.
10093         (mips_expand_msa_cmp): Likewise.
10094         * config/mips/mips.md (casesi_internal_mips16_<mode>): Likewise.
10095         * config/mn10300/mn10300.c (mn10300_print_operand): Likewise.
10096         (cc_flags_for_mode): Likewise.
10097         * config/msp430/msp430.c (msp430_print_operand): Likewise.
10098         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Likewise.
10099         (nds32_output_casesi_pc_relative): Likewise.
10100         * config/nds32/nds32.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
10101         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Likewise.
10102         (nvptx_gen_unpack): Likewise.
10103         (nvptx_gen_pack): Likewise.
10104         (nvptx_gen_shuffle): Likewise.
10105         (nvptx_gen_wcast): Likewise.
10106         (nvptx_preferred_simd_mode): Likewise.
10107         * config/pa/pa.c (pa_secondary_reload): Likewise.
10108         * config/pa/predicates.md (base14_operand): Likewise.
10109         * config/powerpcspe/powerpcspe-c.c
10110         (altivec_resolve_overloaded_builtin): Likewise.
10111         * config/powerpcspe/powerpcspe.c (rs6000_setup_reg_addr_masks):
10112         Likewise.
10113         (rs6000_preferred_simd_mode): Likewise.
10114         (output_vec_const_move): Likewise.
10115         (rs6000_expand_vector_extract): Likewise.
10116         (rs6000_split_vec_extract_var): Likewise.
10117         (reg_offset_addressing_ok_p): Likewise.
10118         (rs6000_legitimate_offset_address_p): Likewise.
10119         (rs6000_legitimize_address): Likewise.
10120         (rs6000_emit_set_const): Likewise.
10121         (rs6000_const_vec): Likewise.
10122         (rs6000_emit_move): Likewise.
10123         (spe_build_register_parallel): Likewise.
10124         (rs6000_darwin64_record_arg_recurse): Likewise.
10125         (swap_selector_for_mode): Likewise.
10126         (spe_init_builtins): Likewise.
10127         (paired_init_builtins): Likewise.
10128         (altivec_init_builtins): Likewise.
10129         (do_load_for_compare): Likewise.
10130         (rs6000_generate_compare): Likewise.
10131         (rs6000_expand_float128_convert): Likewise.
10132         (emit_load_locked): Likewise.
10133         (emit_store_conditional): Likewise.
10134         (rs6000_output_function_epilogue): Likewise.
10135         (rs6000_handle_altivec_attribute): Likewise.
10136         (rs6000_function_value): Likewise.
10137         (emit_fusion_gpr_load): Likewise.
10138         (emit_fusion_p9_load): Likewise.
10139         (emit_fusion_p9_store): Likewise.
10140         * config/powerpcspe/predicates.md (easy_fp_constant): Likewise.
10141         (fusion_gpr_mem_load): Likewise.
10142         (fusion_addis_mem_combo_load): Likewise.
10143         (fusion_addis_mem_combo_store): Likewise.
10144         * config/rs6000/predicates.md (easy_fp_constant): Likewise.
10145         (fusion_gpr_mem_load): Likewise.
10146         (fusion_addis_mem_combo_load): Likewise.
10147         (fusion_addis_mem_combo_store): Likewise.
10148         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
10149         Likewise.
10150         * config/rs6000/rs6000-string.c (do_load_for_compare): Likewise.
10151         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
10152         (rs6000_preferred_simd_mode): Likewise.
10153         (output_vec_const_move): Likewise.
10154         (rs6000_expand_vector_extract): Likewise.
10155         (rs6000_split_vec_extract_var): Likewise.
10156         (reg_offset_addressing_ok_p): Likewise.
10157         (rs6000_legitimate_offset_address_p): Likewise.
10158         (rs6000_legitimize_address): Likewise.
10159         (rs6000_emit_set_const): Likewise.
10160         (rs6000_const_vec): Likewise.
10161         (rs6000_emit_move): Likewise.
10162         (rs6000_darwin64_record_arg_recurse): Likewise.
10163         (swap_selector_for_mode): Likewise.
10164         (paired_init_builtins): Likewise.
10165         (altivec_init_builtins): Likewise.
10166         (rs6000_expand_float128_convert): Likewise.
10167         (emit_load_locked): Likewise.
10168         (emit_store_conditional): Likewise.
10169         (rs6000_output_function_epilogue): Likewise.
10170         (rs6000_handle_altivec_attribute): Likewise.
10171         (rs6000_function_value): Likewise.
10172         (emit_fusion_gpr_load): Likewise.
10173         (emit_fusion_p9_load): Likewise.
10174         (emit_fusion_p9_store): Likewise.
10175         * config/rx/rx.c (rx_gen_move_template): Likewise.
10176         (flags_from_mode): Likewise.
10177         * config/s390/predicates.md (s390_alc_comparison): Likewise.
10178         (s390_slb_comparison): Likewise.
10179         * config/s390/s390.c (s390_handle_vectorbool_attribute): Likewise.
10180         (s390_vector_mode_supported_p): Likewise.
10181         (s390_cc_modes_compatible): Likewise.
10182         (s390_match_ccmode_set): Likewise.
10183         (s390_canonicalize_comparison): Likewise.
10184         (s390_emit_compare_and_swap): Likewise.
10185         (s390_branch_condition_mask): Likewise.
10186         (s390_rtx_costs): Likewise.
10187         (s390_secondary_reload): Likewise.
10188         (__SECONDARY_RELOAD_CASE): Likewise.
10189         (s390_expand_cs): Likewise.
10190         (s390_preferred_simd_mode): Likewise.
10191         * config/s390/vx-builtins.md (vec_packsu_u<mode>): Likewise.
10192         * config/sh/sh.c (sh_print_operand): Likewise.
10193         (dump_table): Likewise.
10194         (sh_secondary_reload): Likewise.
10195         * config/sh/sh.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
10196         * config/sh/sh.md (casesi_worker_1): Likewise.
10197         (casesi_worker_2): Likewise.
10198         * config/sparc/predicates.md (icc_comparison_operator): Likewise.
10199         (fcc_comparison_operator): Likewise.
10200         * config/sparc/sparc.c (sparc_expand_move): Likewise.
10201         (emit_soft_tfmode_cvt): Likewise.
10202         (sparc_preferred_simd_mode): Likewise.
10203         (output_cbranch): Likewise.
10204         (sparc_print_operand): Likewise.
10205         (sparc_expand_vec_perm_bmask): Likewise.
10206         (vector_init_bshuffle): Likewise.
10207         * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
10208         (spu_vector_mode_supported_p): Likewise.
10209         (spu_expand_insv): Likewise.
10210         (spu_emit_branch_or_set): Likewise.
10211         (spu_handle_vector_attribute): Likewise.
10212         (spu_builtin_splats): Likewise.
10213         (spu_builtin_extract): Likewise.
10214         (spu_builtin_promote): Likewise.
10215         (spu_expand_sign_extend): Likewise.
10216         * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
10217         (tilegx_simd_int): Likewise.
10218         * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p): Likewise.
10219         (tilepro_simd_int): Likewise.
10220         * config/v850/v850.c (const_double_split): Likewise.
10221         (v850_print_operand): Likewise.
10222         (ep_memory_offset): Likewise.
10223         * config/vax/vax.c (vax_rtx_costs): Likewise.
10224         (vax_output_int_move): Likewise.
10225         (vax_output_int_add): Likewise.
10226         (vax_output_int_subtract): Likewise.
10227         * config/visium/predicates.md (visium_branch_operator): Likewise.
10228         * config/visium/visium.c (rtx_ok_for_offset_p): Likewise.
10229         (visium_print_operand_address): Likewise.
10230         * config/visium/visium.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
10231         * config/xtensa/xtensa.c (xtensa_mem_offset): Likewise.
10232         (xtensa_expand_conditional_branch): Likewise.
10233         (xtensa_copy_incoming_a7): Likewise.
10234         (xtensa_output_literal): Likewise.
10235         * dfp.c (decimal_real_maxval): Likewise.
10236         * targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
10238 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
10239             Alan Hayward  <alan.hayward@arm.com>
10240             David Sherwood  <david.sherwood@arm.com>
10242         * genmodes.c (mode_size_inline): Add an E_ prefix to mode names.
10243         (mode_nunits_inline): Likewise.
10244         (mode_inner_inline): Likewise.
10245         (mode_unit_size_inline): Likewise.
10246         (mode_unit_precision_inline): Likewise.
10247         (emit_insn_modes_h): Likewise.  Also emit a #define of the
10248         unprefixed name.
10249         (emit_mode_wider): Add an E_ prefix to mode names.
10250         (emit_mode_complex): Likewise.
10251         (emit_mode_inner): Likewise.
10252         (emit_mode_adjustments): Likewise.
10253         (emit_mode_int_n): Likewise.
10254         * config/aarch64/aarch64-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP)
10255         (v2si_UP, v2sf_UP, v1df_UP, di_UP, df_UP, v16qi_UP, v8hi_UP, v8hf_UP)
10256         (v4si_UP, v4sf_UP, v2di_UP, v2df_UP, ti_UP, oi_UP, ci_UP, xi_UP)
10257         (si_UP, sf_UP, hi_UP, hf_UP, qi_UP): Likewise.
10258         (CRC32_BUILTIN, ENTRY): Likewise.
10259         * config/aarch64/aarch64.c (aarch64_push_regs): Likewise.
10260         (aarch64_pop_regs): Likewise.
10261         (aarch64_process_components): Likewise.
10262         * config/alpha/alpha.c (alpha_emit_conditional_move): Likewise.
10263         * config/arm/arm-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP, v2si_UP)
10264         (v2sf_UP, di_UP, v16qi_UP, v8hi_UP, v8hf_UP, v4si_UP, v4sf_UP)
10265         (v2di_UP, ti_UP, ei_UP, oi_UP, hf_UP, si_UP, void_UP): Likewise.
10266         * config/arm/arm.c (arm_init_libfuncs): Likewise.
10267         * config/i386/i386-builtin-types.awk (ix86_builtin_type_vect_mode):
10268         Likewise.
10269         * config/i386/i386-builtin.def (pcmpestr): Likewise.
10270         (pcmpistr): Likewise.
10271         * config/microblaze/microblaze.c (double_memory_operand): Likewise.
10272         * config/mmix/mmix.c (mmix_output_condition): Likewise.
10273         * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
10274         Likewise.
10275         * config/rl78/rl78.c (mduc_regs): Likewise.
10276         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
10277         (htm_expand_builtin): Likewise.
10278         * config/sh/sh.h (REGISTER_NATURAL_MODE): Likewise.
10279         * config/sparc/sparc.c (emit_save_or_restore_regs): Likewise.
10280         * config/xtensa/xtensa.c (print_operand): Likewise.
10281         * expmed.h (NUM_MODE_PARTIAL_INT): Likewise.
10282         (NUM_MODE_VECTOR_INT): Likewise.
10283         * genoutput.c (null_operand): Likewise.
10284         (output_operand_data): Likewise.
10285         * genrecog.c (print_parameter_value): Likewise.
10286         * lra.c (debug_operand_data): Likewise.
10288 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
10290         * dwarf2out.c (scompare_loc_descriptor_wide)
10291         (scompare_loc_descriptor_narrow): New functions, split out from...
10292         (scompare_loc_descriptor): ...here.
10293         * expmed.c (emit_store_flag_int): New function, split out from...
10294         (emit_store_flag): ...here.
10296 2017-08-30  Richard Biener  <rguenther@suse.de>
10298         * dwarf2out.c (dwarf2out_finish): Remove setting AT_pubnames.
10299         (dwarf2out_early_finish): Move setting of AT_pubnames from
10300         early debug output to early finish.
10302 2017-08-30  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
10304         * gcc/config/msp430/msp430.h: Pass -mcode/data-region to the linker
10305         and -mdata-region to the assembler.
10307 2017-08-30  Richard Biener  <rguenther@suse.de>
10309         * dwarf2out.c (add_dwarf_attr): Check we don't add duplicate
10310         attributes.
10311         (gen_subprogram_die): Add DW_AT_object_pointer only early.
10312         (dwarf2out_early_global_decl): Only generate a DIE for the
10313         abstract origin if it doesn't already exist or is a declaration DIE.
10314         (resolve_addr): Do not add the linkage name twice when
10315         generating a stub DIE for the DW_TAG_GNU_call_site target.
10317 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
10319         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
10320         Use machine_mode rather than int for arg1_mode.
10322 2017-08-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
10324         PR target/82015
10325         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Insure
10326         that the second argument of the built-in functions to unpack
10327         128-bit scalar types to 64-bit values is 0 or 1.  Change to use a
10328         switch statement instead a lot of if statements.
10329         * config/rs6000/rs6000.md (unpack<mode>, FMOVE128_VSX iterator):
10330         Allow 64-bit values to be in Altivec registers as well as
10331         traditional floating point registers.
10332         (pack<mode>, FMOVE128_VSX iterator): Likewise.
10334 2017-08-29  Alexander Monakov  <amonakov@ispras.ru>
10336         * ira-costs.c (record_address_regs): Handle both operands of PLUS for
10337         MAX_REGS_PER_ADDRESS == 1.
10339 2017-08-29  Uros Bizjak  <ubizjak@gmail.com>
10341         * config/i386/i386.opt (flag_fentry): Do not init to -1.
10342         * config/i386/i386.c (ix86_option_override_internal): Simplify
10343         setting of opts->x_flag_entry.
10345 2017-08-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10346             Jakub Jelinek  <jakub@redhat.com>
10347             Richard Biener  <rguenther@suse.de>
10349         PR tree-optimization/81503
10350         * gimple-ssa-strength-reduction.c (replace_mult_candidate): Ensure
10351         folded constant fits in the target type; reorder tests for clarity.
10353 2017-08-29  Martin Liska  <mliska@suse.cz>
10355         * passes.def: Include pass_lower_switch.
10356         * stmt.c (dump_case_nodes): Remove and move to
10357         tree-switch-conversion.
10358         (case_values_threshold): Likewise.
10359         (expand_switch_as_decision_tree_p): Likewise.
10360         (emit_case_decision_tree): Likewise.
10361         (expand_case): Likewise.
10362         (balance_case_nodes): Likewise.
10363         (node_has_low_bound): Likewise.
10364         (node_has_high_bound): Likewise.
10365         (node_is_bounded): Likewise.
10366         (emit_case_nodes): Likewise.
10367         (struct simple_case_node): New struct.
10368         (add_case_node): Remove.
10369         (emit_case_dispatch_table): Use vector instead of case_list.
10370         (reset_out_edges_aux): Remove.
10371         (compute_cases_per_edge): Likewise.
10372         (expand_case): Build list of simple_case_node.
10373         (expand_sjlj_dispatch_table): Use it.
10374         * tree-switch-conversion.c (struct case_node): Moved from
10375         stmt.c and adjusted.
10376         (emit_case_nodes): Likewise.
10377         (node_has_low_bound): Likewise.
10378         (node_has_high_bound): Likewise.
10379         (node_is_bounded): Likewise.
10380         (case_values_threshold): Likewise.
10381         (reset_out_edges_aux): Likewise.
10382         (compute_cases_per_edge): Likewise.
10383         (add_case_node): Likewise.
10384         (dump_case_nodes): Likewise.
10385         (balance_case_nodes): Likewise.
10386         (expand_switch_as_decision_tree_p): Likewise.
10387         (emit_jump): Likewise.
10388         (emit_case_decision_tree): Likewise.
10389         (try_switch_expansion): Likewise.
10390         (do_jump_if_equal): Likewise.
10391         (emit_cmp_and_jump_insns): Likewise.
10392         (fix_phi_operands_for_edge): New function.
10393         (record_phi_operand_mapping): Likewise.
10394         (class pass_lower_switch): New pass.
10395         (pass_lower_switch::execute): New function.
10396         (make_pass_lower_switch): Likewise.
10397         (conditional_probability):
10398         * timevar.def: Add TV_TREE_SWITCH_LOWERING.
10399         * tree-pass.h: Add make_pass_lower_switch.
10401 2017-08-29  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
10403         PR target/80993
10404         * gcc/config/msp430/msp430.c (msp430_attr): Mark interrupt
10405         handlers as used.
10407 2017-08-29  Richard Biener  <rguenther@suse.de>
10409         * dwarf2out.c (add_dwarf_attr): When checking is enabled verify
10410         we do not add a DW_AT_inline attribute twice.
10411         (gen_subprogram_die): Remove code setting DW_AT_inline on
10412         DECL_ABSTRACT_P nodes.
10414 2017-08-29  Richard Sandiford  <richard.sandiford@linaro.org>
10416         * gimplify.c (gimplify_call_expr): Copy the nothrow flag to
10417         calls to internal functions.
10418         (gimplify_modify_expr): Likewise.
10419         * tree-call-cdce.c (use_internal_fn): Likewise.
10420         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
10421         (convert_to_divmod): Set the nothrow flag.
10422         * tree-if-conv.c (predicate_mem_writes):  Likewise.
10423         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
10424         (vectorizable_call): Likewise.
10425         (vectorizable_store): Likewise.
10426         (vectorizable_load): Likewise.
10427         * tree-vect-patterns.c (vect_recog_pow_pattern): Likewise.
10428         (vect_recog_mask_conversion_pattern): Likewise.
10430 2017-08-29  Martin Liska  <mliska@suse.cz>
10432         PR other/39851
10433         * gcc.c (driver_handle_option): Add new argument.
10434         * opts-common.c (handle_option): Pass
10435         target_option_override_hook.
10436         * opts-global.c (lang_handle_option): Add new option.
10437         (set_default_handlers):  Add new argument.
10438         (decode_options): Likewise.
10439         * opts.c (target_handle_option): Likewise.
10440         (common_handle_option): Call target_option_override_hook.
10441         * opts.h (struct cl_option_handler_func): Add hook for
10442         target option override.
10443         (struct cl_option_handlers): Likewise.
10444         (set_default_handlers): Add new argument.
10445         (decode_options): Likewise.
10446         (common_handle_option): Likewise.
10447         (target_handle_option): Likewise.
10448         * toplev.c (toplev::main): Pass targetm.target_option.override
10449         hook.
10451 2017-08-29  Richard Biener  <rguenther@suse.de>
10452         Dominik Infuehr <dominik.infuehr@theobroma-systems.com>
10454         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Properly confine
10455         life to the active subtree.
10457 2017-08-28  Jeff Law  <law@redhat.com>
10459         * tree-ssa-dom.c (edge_info::record_simple_equiv): Call
10460         derive_equivalences.
10461         (derive_equivalences_from_bit_ior, record_temporary_equivalences):
10462         Code moved into....
10463         (edge_info::derive_equivalences): New private member function
10465         * tree-ssa-dom.c (class edge_info): Changed from a struct
10466         to a class.  Add ctor/dtor, methods and data members.
10467         (edge_info::edge_info): Renamed from allocate_edge_info.
10468         Initialize additional members.
10469         (edge_info::~edge_info): New.
10470         (free_dom_edge_info): Delete the edge info.
10471         (record_edge_info): Use new class & associated member functions.
10472         Tighten forms for testing for edge equivalences.
10473         (record_temporary_equivalences): Iterate over the simple
10474         equivalences rather than assuming there's only one per edge.
10475         (cprop_into_successor_phis): Iterate over the simple
10476         equivalences rather than assuming there's only one per edge.
10477         (optimize_stmt): Use operand_equal_p rather than pointer
10478         equality for mini-DSE code.
10480 2017-08-28  Nathan Sidwell  <nathan@acm.org>
10482         * gcc.c (execute): Fold SIGPIPE handling into switch
10483         statement.  Adjust internal error message.
10485 2017-08-28  Richard Biener  <rguenther@suse.de>
10487         PR debug/81993
10488         * dwarf2out.c (gen_remaining_tmpl_value_param_die_attributes):
10489         Do nothing for removed DIEs.
10491 2017-08-28  Richard Biener  <rguenther@suse.de>
10493         PR tree-optimization/81977
10494         * tree-ssa-sccvn.c (vn_reference_lookup_3): Fix look through
10495         memcpy.
10497 2017-08-28  Alexander Monakov  <amonakov@ispras.ru>
10499         PR target/80640
10500         * doc/md.texi (mem_thread_fence): Remove mention of mode.  Rewrite.
10501         * optabs.c (expand_mem_thread_fence): Emit a compiler barrier when
10502         using targetm.gen_mem_thread_fence.
10504 2017-08-27  Uros Bizjak  <ubizjak@gmail.com>
10506         PR target/81995
10507         * config/i386/i386.md (*<btsc><mode>): Change operand 2
10508         predicate to register_operand.  Reorder operands.
10509         (*btr<mode>): Ditto.
10510         (*<btsc><mode>_mask): Change operand 3 predicate to register_operand.
10511         (*btr<mode>_mask): Ditto.
10513 2017-08-25  Steven Munroe  <munroesj@gcc.gnu.org>
10515         * config.gcc (powerpc*-*-*): Add xmmintrin.h and mm_malloc.h.
10516         * config/rs6000/xmmintrin.h: New file.
10517         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include xmmintrin.h.
10519 2017-08-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10521         PR target/81504
10522         * config/rs6000/rs6000-p8swap.c (find_alignment_op): Add reference
10523         parameter and_insn and return it.
10524         (recombine_lvx_pattern): Insert a copy to ensure availability of
10525         the base register of the copied masking operation at the point of
10526         the instruction replacement.
10527         (recombine_stvx_pattern): Likewise.
10529 2017-08-25  Michael Meissner  <meissner@linux.vnet.ibm.com>
10531         * config/rs6000/rs6000.opt (-mpower9-dform-scalar): Delete
10532         undocumented switches.
10533         (-mpower9-dform-vector): Likewise.
10534         (-mpower9-dform): Likewise.
10535         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
10536         comments to delete references to -mpower9-dform* switches.
10537         * config/rs6000/predicates.md (vsx_quad_dform_memory_operand):
10538         Delete reference to -mpower9-dform* switches, test for
10539         -mpower9-vector instead.
10540         * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Likewise.
10541         (OTHER_P9_VECTOR_MASKS): Likewise.
10542         (POWERPC_MASKS): Likewise.
10543         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Change
10544         tests against -mpower9-dform* to -mpower9-vector.  Delete code
10545         that checked for -mpower9-dform* consistancy with other options.
10546         Add test for -mpower9-misc to enable other power9 switches.
10547         (rs6000_init_hard_regno_mode_ok): Likewise.
10548         (rs6000_option_override_internal): Likewise.
10549         (rs6000_emit_prologue): Likewise.
10550         (rs6000_emit_epilogue): Likewise.
10551         (rs6000_opt_masks): Delete -mpower9-dform-{scalar,vector}.
10552         (rs6000_disable_incompatiable_switches): Delete -mpower9-dform.
10553         (emit_fusion_p9_load): Change tests for -mpower9-dform-scalar
10554         -mpower9-vector.
10555         (emit_fusion_p9_store): Likewise.
10556         * config/rs6000/rs6000.h (TARGET_P9_DFORM_SCALAR): Delete
10557         resetting these macros if the assembler does not support ISA 3.0
10558         instructions.
10559         (TARGET_P9_DFORM_VECTOR): Likewise.
10560         * config/rs6000/rs6000.md (peepholes to optimize altivec memory):
10561         Change to use -mpower9-vector instead of -mpower9-dform-scalar.
10563 2017-08-25  Alan Modra  <amodra@gmail.com>
10565         PR rtl-optimization/81747
10566         * cse.c (cse_extended_basic_block): Don't attempt to record
10567         equivalences for degenerate conditional branches that branch
10568         to their fall-through.
10570 2017-08-24  Martin Sebor  <msebor@redhat.com>
10572         PR middle-end/81908
10573         * gimple-fold.c (size_must_be_zero_p): New function.
10574         (gimple_fold_builtin_memory_op): Call it.
10576 2017-08-24  Steven Munroe  <munroesj@gcc.gnu.org>
10578         * config/rs6000/mm_malloc.h: New file.
10580 2017-08-24  Bin Cheng  <bin.cheng@arm.com>
10582         PR tree-optimization/81913
10583         * tree-ssa-loop-niter.c (number_of_iterations_cond): Skip niter
10584         analysis when either IVs in condition can wrap.
10586 2017-08-24  Uros Bizjak  <ubizjak@gmail.com>
10588         * dwarf2out.c (MAX_ARTIFICIAL_LABEL_BYTES): Increase to 40.
10589         * dwarf2cfi.c (MAX_ARTIFICIAL_LABEL_BYTES): Remove.
10591 2017-08-24  Richard Biener  <rguenther@suse.de>
10593         PR target/81921
10594         * targhooks.c (default_target_can_inline_p): Properly
10595         use target_option_default_node when no DECL_FUNCTION_SPECIFIC_TARGET
10596         is present and always compare.
10597         * config/i386/i386.c (ix86_valid_target_attribute_tree): Do not
10598         infer -mfpmath=sse from TARGET_SSE_P.
10599         (ix86_can_inline_p): Properly use target_option_default_node when
10600         no DECL_FUNCTION_SPECIFIC_TARGET is present and always compare.
10602 2017-08-24  Richard Biener  <rguenther@suse.de>
10604         PR debug/81936
10605         * dwarf2out.c (output_die): Handle flag_generate_offload like
10606         flag_generate_lto.
10607         (output_comp_unit): Likewise.
10608         (gen_array_type_die): Likewise.
10609         (dwarf2out_early_finish): Likewise.
10610         (note_variable_value_in_expr): Likewise.
10611         (dwarf2out_finish): Likewise.  Adjust assert.
10612         * cgraphunit.c (symbol_table::compile): Move setting of
10613         flag_generate_offload earlier ...
10614         (symbol_table::finalize_compilation_unit): ... here, before
10615         early debug finalization.
10617 2017-08-24  Richard Biener  <rguenther@suse.de>
10619         * config/i386/i386.c: Include symbol-summary.h, ipa-prop.h
10620         and ipa-fnsummary.h.
10621         (ix86_can_inline_p): When ix86_fpmath flags do not match
10622         check whether the callee uses FP math at all.
10624 2017-08-24  Aldy Hernandez  <aldyh@redhat.com>
10626         PR middle-end/81931
10627         * tree-ssanames.c (get_nonzero_bits): Use element_precision
10628         instead of TYPE_PRECISION.
10630 2017-08-24  Richard Sandiford  <richard.sandiford@linaro.org>
10631             Alan Hayward  <alan.hayward@arm.com>
10632             David Sherwood  <david.sherwood@arm.com>
10634         * combine.c (make_extraction): Use subreg_offset_from_lsb.
10636 2017-08-23  Daniel Santos  <daniel.santos@pobox.com>
10638         * config/i386/i386.h (ix86_frame::stack_realign_allocate_offset):
10639         Remove field.
10640         (ix86_frame::stack_realign_allocate): New field.
10641         (struct machine_frame_state): Modify comments.
10642         (machine_frame_state::sp_realigned_fp_end): New field.
10643         * config/i386/i386.c (ix86_compute_frame_layout): Rework stack frame
10644         layout calculation.
10645         (sp_valid_at): Add assertion to assure no attempt to access invalid
10646         offset of a realigned stack.
10647         (fp_valid_at): Likewise.
10648         (choose_baseaddr): Modify comments.
10649         (ix86_emit_outlined_ms2sysv_save): Adjust to changes in
10650         ix86_expand_prologue.
10651         (ix86_expand_prologue): Modify stack realignment and allocation.
10652         (ix86_expand_epilogue): Modify comments.
10653         * doc/sourcebuild.texi: Add documentation for target selectors avx2,
10654         avx2_runtime, avx512f, and avx512f_runtime.
10656 2017-08-23  Uros Bizjak  <ubizjak@gmail.com>
10658         * config/i386/i386.opt: Remove unneeded Init(0) initializations.
10659         (mstackrealign): Do not init to -1.
10660         * config/i386/i386.c (ix86_option_override_internal):
10661         Check opts_set, not opts when setting default value of
10662         opts->x_ix86_force_align_arg_pointer.
10664 2017-08-23  Richard Biener  <rguenther@suse.de>
10666         * function.c (fndecl_name): Use verbosity 1 (no arguments) for
10667         lang_hooks.decl_printable_name.
10668         * print-rtl-function.c (print_rtx_function): Likewise.
10669         * tree-pretty-print.c (dump_function_header): Likewise.
10671 2017-08-23  Richard Biener  <rguenther@suse.de>
10673         PR lto/81940
10674         * dwarf2out.c (dwarf2out_abstract_function): Handle LTO with
10675         -g0 at compile-time.
10677 2017-08-23  Tamar Christina  <tamar.christina@arm.com>
10679         PR middle-end/19706
10680         * doc/sourcebuild.texi (Other hardware attributes):
10681         Document xorsign.
10683 2017-08-23  Tamar Christina  <tamar.christina@arm.com>
10685         PR middle-end/19706
10686         * tree-ssa-math-opts.c (convert_expand_mult_copysign):
10687         Fix single-use check.
10689 2017-08-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10691         * gcc.c (execute): Only test for SIGKILL and SIGQUIT if available.
10693 2017-08-22  Daniel Santos  <daniel.santos@pobox.com>
10695         * doc/install.texi: Modify to add more details on running selected
10696         tests.
10698 2017-08-22  Daniel Santos  <daniel.santos@pobox.com>
10700         * config/i386/i386.c (ix86_option_override_internal): Error when -mx32
10701         is combined with -mabi=ms.
10702         (ix86_function_type_abi): Limit errors for mixing -mx32 with attribute
10703         ms_abi.
10705 2017-08-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10707         PR tree-optimization/81488
10708         * gimple-ssa-strength-reduction (struct slsr_cand_d): Add visited
10709         and cached_basis fields.
10710         (MAX_SPREAD): New constant.
10711         (alloc_cand_and_find_basis): Initialize new fields.
10712         (clear_visited): New function.
10713         (create_phi_basis_1): Rename from create_phi_basis, set visited
10714         and cached_basis fields.
10715         (create_phi_basis): New wrapper function.
10716         (phi_add_costs_1): Rename from phi_add_costs, add spread
10717         parameter, set visited field, short-circuit when limits reached.
10718         (phi_add_costs): New wrapper function.
10719         (record_phi_increments_1): Rename from record_phi_increments, set
10720         visited field.
10721         (record_phi_increments): New wrapper function.
10722         (phi_incr_cost_1): Rename from phi_incr_cost, set visited field.
10723         (phi_incr_cost): New wrapper function.
10724         (all_phi_incrs_profitable_1): Rename from
10725         all_phi_incrs_profitable, set visited field.
10726         (all_phi_incrs_profitable): New wrapper function.
10728 2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
10729             Alan Hayward  <alan.hayward@arm.com>
10730             David Sherwood  <david.sherwood@arm.com>
10732         * rtl.h (paradoxical_subreg_p): Define inline, and add a version
10733         that takes the outer and inner modes.
10734         * doc/rtl.texi: Use paradoxical_subreg_p instead of a GET_MODE_SIZE
10735         comparison as the canonical test for a paradoxical subreg.
10736         * combine.c (simplify_set): Use paradoxical_subreg_p.
10737         (make_extraction): Likewise.
10738         (force_to_mode): Likewise.
10739         (rtx_equal_for_field_assignment_p): Likewise.
10740         (gen_lowpart_for_combine): Likewise.
10741         (simplify_comparison): Likewise.
10742         * cse.c (equiv_constant): Likewise.
10743         * expmed.c (store_bit_field_1): Likewise.
10744         * final.c (alter_subreg): Likewise.
10745         * fwprop.c (propagate_rtx): Likewise.
10746         (forward_propagate_subreg): Likewise.
10747         * ira-conflicts.c (ira_build_conflicts): Likewise.
10748         * lower-subreg.c (simplify_gen_subreg_concatn): Likewise.
10749         * lra-constraints.c (curr_insn_transform): Likewise.
10750         (split_reg): Likewise.
10751         * lra-eliminations.c (move_plus_up): Likewise.
10752         (lra_eliminate_regs_1): Likewise.
10753         * recog.c (general_operand): Likewise.
10754         * ree.c (combine_reaching_defs): Likewise.
10755         * reload.c (push_reload): Likewise.
10756         (find_reloads): Likewise.
10757         * reload1.c (elimination_effects): Likewise.
10758         (compute_reload_subreg_offset): Likewise.
10759         (choose_reload_regs): Likewise.
10760         * rtlanal.c (subreg_lsb_1): Likewise.
10761         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
10762         (simplify_subreg): Likewise.
10763         * var-tracking.c (track_loc_p): Likewise.
10764         * emit-rtl.c (byte_lowpart_offset): Likewise.
10765         (paradoxical_subreg_p): Delete out-of-line definition.
10767 2017-08-22  Jeff Law  <law@redhat.com>
10769         PR tree-optimization/81741
10770         PR tree-optimization/71947
10771         * tree-ssa-dom.c: Include tree-inline.h.
10772         (record_temporary_equivalences): Only record SSA_NAME = SSA_NAME
10773         equivalences if one is more expensive to compute than the other.
10774         * tree-ssa-scopedtables.h (class const_or_copies): Make
10775         record_const_or_copy_raw method private.
10776         (class avail_exprs_stack): New method simplify_binary_operation.
10777         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr): Call
10778         avail_exprs_stack::simplify_binary_operation as needed.
10779         (avail_exprs_stack::simplify_binary_operation): New function.
10781 2017-08-22  Sebastian Huber  <sebastian.huber@embedded-brains.de>
10783         * config.gcc (powerpc-*-rtems*): Add rs6000/linux64.opt.
10784         * config/rs6000/rtems.h (ASM_PREFERRED_EH_DATA_FORMAT): New define.
10785         (DOT_SYMBOLS): Likewise.
10786         (MINIMAL_TOC_SECTION_ASM_OP): Likewise.
10787         (RELOCATABLE_NEEDS_FIXUP): Likewise.
10788         (RS6000_ABI_NAME): Likewise.
10789         (TARGET_CMODEL): Likewise.
10790         (TOC_SECTION_ASM_OP): Likewise.
10791         (SET_CMODEL): New macro.
10792         (SUBSUBTARGET_OVERRIDE_OPTIONS): Evaluate cmodel options.
10794 2017-08-22  Richard Biener  <rguenther@suse.de>
10796         * tree-inline.c (remap_type_1): Change asserts on TYPE_SIZE[_UNIT]
10797         to allow for free-lang-data replacements similar to verify_type_variant.
10799 2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
10800             Alan Hayward  <alan.hayward@arm.com>
10801             David Sherwood  <david.sherwood@arm.com>
10803         * config/aarch64/aarch64.md (casesi): Use DImode rather than
10804         VOIDmode for the LABEL_REF.
10806 2017-08-22  Richard Biener  <rguenther@suse.de>
10808         * tree-cfg.c (gimple_split_edge): Avoid reallocating target PHI nodes.
10810 2017-08-22  Richard Biener  <rguenther@suse.de>
10812         * common.opt (feliminate-dwarf2-dups): Ignore.
10813         * doc/invoke.texi (feliminate-dwarf2-dups): Remove documentation.
10814         * dwarf2out.c (push_new_compile_unit, pop_compile_unit,
10815         same_die_p_wrap, compute_section_prefix,
10816         is_symbol_die, assign_symbol_names, break_out_includes): Remove.
10817         (comdat_symbol_id, comdat_symbol_number): Likewise.
10818         (cu_hash_table_entry, cu_hash_table_entry_hasher, cu_hash_type):
10819         Likewise.
10820         (check_duplicate_cu, record_comdat_symbol_number): Likewise.
10821         (output_die): Mark unreachable path unreachable.
10822         (dwarf2out_start_source_file): Do not create DW_TAG_GNU_BINCL.
10823         (dwarf2out_end_source_file): Do not create DW_TAG_GNU_EINCL.
10824         (dwarf2out_init): Remove code handling flag_eliminate_dwarf2_dups.
10825         (dwarf2out_early_finish): Likewise.
10827 2017-08-22  Aldy Hernandez  <aldyh@redhat.com>
10829         * wide-int.h (hwi_with_prec::hwi_with_prec): Sign extend.
10831 2017-08-22  Georg-Johann Lay  <avr@gjlay.de>
10833         PR target/81910
10834         * config/avr/avr.c (avr_handle_addr_attribute): Early return if
10835         not VAR_P. Filter attribute warnings with OPT_Wattributes.
10836         (avr_attribute_table) <io, io_low, address>: Initialize
10837         .decl_required with true.
10839 2017-08-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
10841         * config/rs6000/rs6000-cpus.def (-mvsx-scalar-float): Delete
10842         undocumented debugging options.
10843         (-mvsx-scalar-double): Likewise.
10844         (-mallow-df-permute): Likewise.
10845         (-mvectorize-builtins): Likewise.
10846         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
10847         (rs6000_builtin_vectorized_function): Likewise.
10848         (rs6000_builtin_md_vectorized_function): Likewise.
10849         (rs6000_opt_vars): Likewise.
10851 2017-08-21  Uros Bizjak  <ubizjak@gmail.com>
10853         PR target/46091
10854         * config/i386/i386.md (*btsq_imm): Rename from *btsq.
10855         (*btrq_imm): Rename from *btrq.
10856         (*btcq_imm): Rename from *btcq.
10857         (btsc): New code attribute.
10858         (*<btsc><mode>): New insn pattern.
10859         (*btr<mode>): Ditto.
10860         (*<btsc><mode>_mask): New insn_and_split pattern.
10861         (*btr<mode>_mask): Ditto.
10863 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
10864             Alan Hayward  <alan.hayward@arm.com>
10865             David Sherwood  <david.sherwood@arm.com>
10867         * function.c (pad_below): Simplify padding calculation.
10869 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
10870             Alan Hayward  <alan.hayward@arm.com>
10871             David Sherwood  <david.sherwood@arm.com>
10873         * target.def (function_prologue): Remove frame size argument.
10874         (function_epilogue): Likewise.
10875         * doc/tm.texi: Regenerate.
10876         * final.c (final_start_function): Update call to function_prologue.
10877         (final_end_function): Update call to function_epilogue.
10878         (default_function_pro_epilogue): Remove frame size argument.
10879         * output.h (default_function_pro_epilogue): Likewise.
10880         * config/arm/arm.c (arm_output_function_epilogue): Likewise.
10881         (arm_output_function_prologue): Likewise.
10882         * config/frv/frv.c (frv_function_prologue): Likewise.
10883         (frv_function_epilogue): Likewise.
10884         * config/i386/i386.c (ix86_output_function_epilogue): Likewise.
10885         * config/ia64/ia64.c (ia64_output_function_prologue): Likewise.
10886         (ia64_output_function_epilogue): Likewise.
10887         * config/m32r/m32r.c (m32r_output_function_prologue): Likewise.
10888         (m32r_output_function_epilogue): Likewise.
10889         * config/microblaze/microblaze.c (microblaze_function_prologue)
10890         (microblaze_function_epilogue): Likewise.
10891         * config/mips/mips.c (mips_output_function_prologue): Likewise.
10892         (mips_output_function_epilogue): Likewise.
10893         * config/mmix/mmix.c (mmix_target_asm_function_prologue): Likewise.
10894         (mmix_target_asm_function_epilogue): Likewise.
10895         * config/msp430/msp430.c (msp430_start_function): Likewise.
10896         * config/nds32/nds32.c (nds32_asm_function_prologue): Likewise.
10897         (nds32_asm_function_epilogue): Likewise.
10898         * config/nios2/nios2.c (nios2_asm_function_prologue): Likewise.
10899         * config/pa/pa.c (pa_output_function_prologue): Likewise.
10900         (pa_output_function_epilogue): Likewise.
10901         * config/powerpcspe/powerpcspe.c (rs6000_output_function_prologue)
10902         (rs6000_output_function_epilogue): Likewise.
10903         * config/rl78/rl78.c (rl78_start_function): Likewise.
10904         * config/rs6000/rs6000.c (rs6000_output_function_prologue): Likewise.
10905         (rs6000_output_function_epilogue): Likewise.
10906         * config/rx/rx.c (rx_output_function_prologue): Likewise.
10907         * config/sh/sh.c (sh_output_function_epilogue): Likewise.
10908         * config/sparc/sparc.c (sparc_asm_function_prologue): Likewise.
10909         (sparc_asm_function_epilogue): Likewise.
10911 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
10913         * tree.h (type_has_mode_precision_p): New function.
10914         * convert.c (convert_to_integer_1): Use it.
10915         * expr.c (expand_expr_real_2): Likewise.
10916         (expand_expr_real_1): Likewise.
10917         * fold-const.c (fold_single_bit_test_into_sign_test): Likewise.
10918         * match.pd: Likewise.
10919         * tree-ssa-forwprop.c (simplify_rotate): Likewise.
10920         * tree-ssa-math-opts.c (convert_mult_to_fma): Likewise.
10921         * tree-tailcall.c (process_assignment): Likewise.
10922         * tree-vect-loop.c (vectorizable_reduction): Likewise.
10923         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern)
10924         (vect_recog_mult_pattern, vect_recog_divmod_pattern): Likewise.
10925         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
10926         (vectorizable_assignment): Likewise.
10927         (vectorizable_shift): Likewise.
10928         (vectorizable_operation): Likewise.
10929         * tree-vrp.c (register_edge_assert_for_2): Likewise.
10931 2017-08-21  Wilco Dijkstra  <wdijkstr@arm.com>
10933         * match.pd: Add pow (C, x) simplification.
10935 2017-08-21  Richard Biener  <rguenther@suse.de>
10937         PR tree-optimization/81900
10938         * tree-ssa-pre.c (compute_antic_aux): Properly compute changed
10939         for blocks with abnormal predecessors.
10940         (compute_antic): Do not set visited flag prematurely.
10942 2017-08-21  Georg-Johann Lay  <avr@gjlay.de>
10944         PR target/79883
10945         * config/avr/avr.c (avr_set_current_function): Typo in diagnostic.
10947 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
10949         * stor-layout.h (vector_type_mode): Move to...
10950         * tree.h (vector_type_mode): ...here.
10951         * stor-layout.c (vector_type_mode): Move to...
10952         * tree.c (vector_type_mode): ...here.  Include rtl.h and regs.h.
10954 2017-08-21  Richard Biener  <rguenther@suse.de>
10956         * debug.h (struct gcc_debug_hooks): Add die_ref_for_decl and
10957         register_external_die hooks.
10958         (debug_false_tree_charstarstar_uhwistar): Declare.
10959         (debug_nothing_tree_charstar_uhwi): Likewise.
10960         * debug.c (do_nothing_debug_hooks): Adjust.
10961         (debug_false_tree_charstarstar_uhwistar): New do nothing.
10962         (debug_nothing_tree_charstar_uhwi): Likewise.
10963         * dbxout.c (dbx_debug_hooks): Adjust.
10964         (xcoff_debug_hooks): Likewise.
10965         * sdbout.c (sdb_debug_hooks): Likewise.
10966         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
10967         * dwarf2out.c (macinfo_label_base): New global.
10968         (dwarf2out_register_external_die): New function for the
10969         register_external_die hook.
10970         (dwarf2out_die_ref_for_decl): Likewise for die_ref_for_decl.
10971         (dwarf2_debug_hooks): Use them.
10972         (dwarf2_lineno_debug_hooks): Adjust.
10973         (struct die_struct): Add with_offset flag.
10974         (DEBUG_LTO_DWO_INFO_SECTION, DEBUG_LTO_INFO_SECTION,
10975         DEBUG_LTO_DWO_ABBREV_SECTION, DEBUG_LTO_ABBREV_SECTION,
10976         DEBUG_LTO_DWO_MACINFO_SECTION, DEBUG_LTO_MACINFO_SECTION,
10977         DEBUG_LTO_DWO_MACRO_SECTION, DEBUG_LTO_MACRO_SECTION,
10978         DEBUG_LTO_LINE_SECTION, DEBUG_LTO_DWO_STR_OFFSETS_SECTION,
10979         DEBUG_LTO_STR_DWO_SECTION, DEBUG_STR_LTO_SECTION): New macros
10980         defining section names for the early LTO debug variants.
10981         (reset_indirect_string): New helper.
10982         (add_AT_external_die_ref): Helper for dwarf2out_register_external_die.
10983         (print_dw_val): Add support for offsetted symbol references.
10984         (get_ultimate_context): Split out from is_cxx.
10985         (is_cxx): Use get_ultimate_context.
10986         (is_fortran): Add decl overload.
10987         (compute_comp_unit_symbol): Split out worker from
10988         compute_section_prefix.
10989         (compute_section_prefix): Call compute_comp_unit_symbol and
10990         set comdat_type_p here.
10991         (output_die): Skip DIE symbol output for the LTO added one.
10992         Handle DIE symbol references with offset.
10993         (output_comp_unit): Guard section name mangling properly.
10994         For LTO debug sections emit a symbol at the section beginning
10995         which we use to refer to its DIEs.
10996         (add_abstract_origin_attribute): For DIEs registered via
10997         dwarf2out_register_external_die directly refer to the early
10998         DIE rather than indirectly through the shadow one we created.
10999         Remove obsolete call to dwarf2out_abstract_function for
11000         non-function/block origins.
11001         (gen_array_type_die): When generating early LTO debug do
11002         not emit DW_AT_string_length.
11003         (gen_formal_parameter_die): Do not re-create DIEs for PARM_DECLs
11004         late when in LTO.  As suggested place a gcc_unreachable for
11005         the DECL_ABSTRACT_P case.
11006         (gen_subprogram_die): Avoid another specification DIE
11007         for early built declarations/definitions for the late LTO case.
11008         (gen_variable_die): Add type references for late duplicated VLA dies
11009         when in late LTO.
11010         (gen_inlined_subroutine_die): Do not call dwarf2out_abstract_function,
11011         we have the abstract instance already.
11012         (process_scope_var): Adjust decl DIE contexts in LTO which
11013         first puts them in limbo.
11014         (gen_decl_die): Do not generate type DIEs late apart from
11015         types for VLAs or for decls we do not yet have a DIE.  Do not
11016         call dwarf2out_abstract_function late.
11017         (dwarf2out_early_global_decl): Make sure to create DIEs
11018         for abstract instances of a decl first.
11019         (dwarf2out_late_global_decl): Adjust comment.
11020         (output_macinfo_op): With multiple macro sections use
11021         macinfo_label_base to distinguish labels.
11022         (output_macinfo): Likewise.  Update macinfo_label_base.
11023         Pass in the line info label.
11024         (note_variable_value_in_expr): When generating LTO resolve
11025         all variable values here by generating DIEs as needed.
11026         (init_sections_and_labels): Add early LTO debug flag parameter
11027         and generate different sections and names if set.  Add generation
11028         counter for the labels so we can have multiple of them.
11029         (reset_dies): Helper to allow DIEs to be output multiple times.
11030         (dwarf2out_finish): When outputting DIEs to the fat part of an
11031         LTO object first reset DIEs.
11032         (dwarf2out_early_finish): Output early DIEs when generating LTO.
11033         (modified_type_die): Check for decl_ultimate_origin being self
11034         before recursing.
11035         (gen_type_die_with_usage): Likewise.
11036         (gen_typedef_die): Allow decl_ultimate_origin being self.
11037         (set_decl_abstract_flags): Remove.
11038         (set_block_abstract_flags): Likewise.
11039         (dwarf2out_abstract_function): Treat the early generated DIEs
11040         as the abstract copy and only add DW_AT_inline and
11041         DW_AT_artificial here and call set_decl_origin_self.
11042         If the DIE has an abstract origin don't do anything.
11043         * tree.c (free_lang_data): Build a dummy TRANSLATION_UNIT_DECL
11044         if we have none yet (Go fails to build one, PR78628).
11045         (variably_modified_type_p): Prevent endless recursion for Ada
11046         cyclic pointer types.
11047         * lto-streamer-in.c: Include debug.h.
11048         (dref_queue): New global.
11049         (lto_read_tree_1): Stream in DIE references.
11050         (lto_input_tree): Register DIE references.
11051         (input_function): Stream DECL_DEBUG_ARGS.
11052         * lto-streamer-out.c: Include debug.h.
11053         (lto_write_tree_1): Output DIE references.
11054         (DFS::DFS_write_tree_body): Follow DECL_ABSTRACT_ORIGIN.
11055         Force a TRANSLATION_UNIT_DECL DECL_CONTEXT for file-scope decls.
11056         (output_function): Stream DECL_DEBUG_ARGS.
11057         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
11058         Stream DECL_ABSTRACT_ORIGIN.
11059         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
11060         (write_ts_decl_minimal_tree_pointers): Force a TRANSLATION_UNIT_DECL
11061         DECL_CONTEXT for file-scope decls.
11062         * lto-streamer.h (struct dref_entry): Declare.
11063         (dref_queue): Likewise.
11064         * cfgexpand.c (pass_expand::execute): Do not call the
11065         outlining_inline_function hook here.
11066         * lto-wrapper.c (debug_obj): New global.
11067         (tool_cleanup): Unlink it if required.
11068         (debug_objcopy): New function.
11069         (run_gcc): Handle early debug sections in the IL files by
11070         extracting them to separate files, partially linkin them and
11071         feeding the result back as result to the linker.
11072         * config/darwin.h (DEBUG_LTO_INFO_SECTION, DEBUG_LTO_ABBREV_SECTION,
11073         DEBUG_LTO_MACINFO_SECTION, DEBUG_LTO_LINE_SECTION,
11074         DEBUG_STR_LTO_SECTION, DEBUG_LTO_MACRO_SECTION): Put early debug
11075         sections into a separate segment.
11076         * config/darwin.c (darwin_asm_named_section): Handle __GNU_DWARF_LTO
11077         segments.
11078         (darwin_asm_dwarf_section): Likewise.
11079         (darwin_asm_output_dwarf_offset): Likewise.
11080         * config/i386/i386.c (make_resolver_func): Set DECL_IGNORED_P.
11082 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
11083             Alan Hayward  <alan.hayward@arm.com>
11084             David Sherwood  <david.sherwood@arm.com>
11086         * read-md.h (md_reader::record_potential_iterator_use): Replace
11087         pointer argument with an rtx and an index.
11088         * read-rtl.c (iterator_group::apply_iterator): Likewise.
11089         (apply_mode_iterator): Likewise.
11090         (apply_code_iterator): Likewise.
11091         (apply_int_iterator): Likewise.
11092         (apply_subst_iterator): Likewise.
11093         (record_iterator_use): Likewise.
11094         (record_attribute_use): Likewise.
11095         (md_reader::record_potential_iterator_use): Likewise.  Update calls
11096         to record_iterator_use and apply_iterator.
11097         (iterator_use): Replace ptr with x and index.
11098         (attribute_use): Likewise.
11099         (apply_attribute_uses): Update calls to apply_iterator.
11100         (apply_iterators): Likewise.  Update initialization of iterator_use.
11101         (rtx_reader::read_rtx_code): Update calls to record_iterator_use
11102         and record_potential_iterator_use.
11103         (rtx_reader::read_rtx_operand): Likewise.
11105 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
11106             Alan Hayward  <alan.hayward@arm.com>
11107             David Sherwood  <david.sherwood@arm.com>
11109         * varasm.c (const_rtx_hash_1): Don't hash in the mode of a
11110         CONST_WIDE_INT.
11112 2017-08-21  Richard Biener  <rguenther@suse.de>
11114         PR middle-end/81884
11115         * tree-ssa-alias.c (stmt_kills_ref_p): Handle array accesses
11116         at struct end conservatively when comparing common bases.
11118 2017-08-21  Richard Biener  <rguenther@suse.de>
11120         * tree-ssa-loop-im.c (struct lim_aux_data): Add ref index member.
11121         (mem_ref_in_stmt): Remove.
11122         (determine_max_movement): Use ref index to get at the reference.
11123         (invariantness_dom_walker::before_dom_children): Deal with
11124         lim data already initialized.
11125         (gather_mem_refs_stmt): Initialize lim data and record ref index.
11127 2017-08-19  Uros Bizjak  <ubizjak@gmail.com>
11129         * config/i386/i386.h (OPTION_MASK_ISA_ROUND): Remove.
11130         (TARGET_ISA_ROUND): Ditto.
11131         (TARGET_ROUND): Ditto.
11132         * config/i386/i386.c: Substitute TARGET_ROUND with TARGET_SSE4_1.
11133         * config/i386/i386.md: Ditto.
11134         * config/i386/sse.md: Ditto.
11135         * config/i386/i386-builtin.def: Substitute OPTION_MASK_ISA_ROUND
11136         with OPTION_MASK_ISA_SSE4_1.
11138 2017-08-19  Uros Bizjak  <ubizjak@gmail.com>
11140         PR target/81894
11141         * doc/extend.texi (x86 Built-in Functions): Correct the name of
11142         __builtin_ia32_lzcnt_u16.
11144 2017-08-18  Peter Bergner  <bergner@vnet.ibm.com>
11146         PR target/80210
11147         * config/rs6000/rs6000.c (rs6000_activate_target_options): New function.
11148         (rs6000_set_current_function): Rewrite function to use it.
11150 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
11152         PR c/53037
11153         * print-tree.c (print_node): Support DECL_WARN_IF_NOT_ALIGN
11154         and TYPE_WARN_IF_NOT_ALIGN.
11155         * stor-layout.c (do_type_align): Merge DECL_WARN_IF_NOT_ALIGN.
11156         (handle_warn_if_not_align): New.
11157         (place_union_field): Call handle_warn_if_not_align.
11158         (place_field): Call handle_warn_if_not_align.
11159         Copy TYPE_WARN_IF_NOT_ALIGN.
11160         (finish_builtin_struct): Copy TYPE_WARN_IF_NOT_ALIGN.
11161         (layout_type): Likewise.
11162         * tree-core.h (tree_type_common): Add warn_if_not_align.  Set
11163         spare to 18.
11164         (tree_decl_common): Add warn_if_not_align.
11165         * tree.c (build_range_type_1): Copy TYPE_WARN_IF_NOT_ALIGN.
11166         * tree.h (TYPE_WARN_IF_NOT_ALIGN): New.
11167         (SET_TYPE_WARN_IF_NOT_ALIGN): Likewise.
11168         (DECL_WARN_IF_NOT_ALIGN): Likewise.
11169         (SET_DECL_WARN_IF_NOT_ALIGN): Likewise.
11170         * doc/extend.texi: Document warn_if_not_aligned attribute.
11171         * doc/invoke.texi: Document -Wif-not-aligned and -Wpacked-not-aligned.
11173 2017-08-17  Martin Liska  <mliska@suse.cz>
11175         PR bootstrap/81864
11176         * tree-loop-distribution.c (ddrs_table): Change type to pointer type.
11177         (get_data_dependence): Use it as pointer type.
11178         (distribute_loop): Likewise.
11180 2017-08-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11182         * config/rs6000/altivec.md (UNSPEC_VMRGOW_DIRECT): New constant.
11183         (p8_vmrgew_v4sf_direct): Generalize to p8_vmrgew_<mode>_direct.
11184         (p8_vmrgow_<mode>_direct): New define_insn.
11185         * config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Properly
11186         handle endianness for vmrgew and vmrgow permute patterns.
11188 2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>
11190         * config/rs6000/altivec.md (VParity): Remove TARGET_VSX_TIMODE.
11191         * config/rs6000/rs6000-cpus.def: Remove comment.
11192         (ISA_2_7_MASKS_SERVER): Delete OPTION_MASK_VSX_TIMODE;
11193         (POWERPC_MASKS): Likewise.
11194         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Remove unneeded
11195         use of TARGET_VSX_TIMODE.
11196         (rs6000_setup_reg_addr_masks): Change TARGET_VSX_TIMODE to TARGET_VSX.
11197         (rs6000_init_hard_regno_mode_ok): Remove unneeded uses of
11198         TARGET_VSX_TIMODE.  Change use of TARGET_VSX_TIMODE to TARGET_VSX.
11199         (rs6000_option_override_internal): Remove dead code.
11200         (rs6000_legitimize_address): Change TARGET_VSX_TIMODE to TARGET_VSX.
11201         (rs6000_legitimize_reload_address): Likewise.
11202         (rs6000_legitimate_address_p): Likewise.
11203         (rs6000_opt_masks): Delete "vsx-timode".
11204         (rs6000_disable_incompatible_switches): Remove mention of -mvsx-timode
11205         from function comment.
11206         * config/rs6000/rs6000.h (MASK_VSX_TIMODE): Delete.
11207         * config/rs6000/rs6000.md (FMOVE128_GPR): Remove TARGET_VSX_TIMODE.
11208         (V16QI, V8HI, V4SI, V4SF, V2DI, V2DF, V1TI): Remove useless empty
11209         condition.
11210         * config/rs6000/rs6000.opt (mvsx-timode): Replace with stub.
11211         * config/rs6000/vector.md (VEC_IP): Remove TARGET_VSX_TIMODE.
11212         * config/rs6000/vsx.md (VSX_LE_128): Likewise.
11213         (VSX_TI): Likewise.
11214         (VSX_M): Likewise.
11215         (define_peephole2): Likewise.
11217 2017-08-17  Martin Sebor  <msebor@redhat.com>
11219         PR c/81859
11220         * pretty-print.c (pp_format): Use strnlen in %.*s to avoid reading
11221         past the end of an array.
11222         (test_pp_format): Add test cases.
11224 2017-08-17  Richard Sandiford  <richard.sandiford@linaro.org>
11226         * internal-fn.def (CLRSB, CLZ, CTZ, FFS, PARITY, POPCOUNT): Add
11227         missing ECF_NOTHROW flags.
11229 2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>
11231         PR target/72804
11232         * config/rs6000/vsx.md (*vsx_le_permute_<mode>): Add support for
11233         operands residing in integer registers.
11234         (*vsx_le_perm_load_<mode>): Likewise.
11235         (*vsx_le_perm_store_<mode>): Likewise.
11236         (define_peephole2): Add peepholes to optimize the above.
11238 2017-08-17  Marek Polacek  <polacek@redhat.com>
11240         PR middle-end/81814
11241         * fold-const.c (operand_equal_for_comparison_p): Remove code that used
11242         to mimic what shorten_compare did.  Change the return type to bool.
11243         (fold_cond_expr_with_comparison): Update call to
11244         operand_equal_for_comparison_p.
11245         (fold_ternary_loc): Likewise.
11247 2017-08-17  Jackson Woodruff  <jackson.woodruff@arm.com>
11249         * aarch64-simd.md (mov<mode>): No longer force zero immediate into
11250         register.
11251         (*aarch64_simd_mov<mode>): Add new case for stp using zero immediate.
11253 2017-08-17  Richard Biener  <rguenther@suse.de>
11255         * tree-ssa-structalias.c (solve_graph): When propagating
11256         to successors update the graphs succ edges and avoid duplicate work.
11258 2017-08-17  Maxim Ostapenko  <m.ostapenko@samsung.com>
11260         PR target/81861
11261         * config/i386/i386.c (ix86_option_override_internal): Save target
11262         specific options after ix86_stack_protector_guard_reg was changed.
11264 2017-08-17  Richard Biener  <rguenther@suse.de>
11266         PR tree-optimization/81827
11267         * tree-ssa-structalias.c (struct variable_info): Add is_reg_var flag.
11268         (new_var_info): Initialize it conservatively.
11269         (get_call_vi): Mark register vars.
11270         (new_scalar_tmp_constraint_exp): Likewise.
11271         (handle_rhs_call): Likewise.
11272         (handle_const_call): Likewise.
11273         (create_function_info_for): Likewise.
11274         (solve_constraints): Sort varinfos to separate register from
11275         non-register vars to pack points-to solution bitmaps during
11276         iteration.
11278 2017-08-17  Marek Polacek  <polacek@redhat.com>
11280         * gimplify.c (gimplify_adjust_omp_clauses): Compare with 0 instead of 1.
11282 2017-08-17  Richard Biener  <rguenther@suse.de>
11284         * tree-vrp.c (vrp_int_const_binop): Do not set *overflow_p
11285         to true when overflow is undefined and we saturated the result.
11287 2017-08-17  Alan Modra  <amodra@gmail.com>
11289         PR target/80938
11290         * config/rs6000/rs6000.c (rs6000_savres_strategy): Revert 2017-08-09.
11291         Don't use store multiple if only one reg needs saving.
11292         (interesting_frame_related_regno): New function.
11293         (rs6000_frame_related): Don't emit frame info for regs that
11294         don't need saving.
11295         (rs6000_emit_epilogue): Likewise.
11297 2017-08-16  Nathan Sidwell  <nathan@acm.org>
11299         * tree-core.h (tree_type_non_common): Rename binfo to lang_1.
11300         * tree.h (TYPE_BINFO): Use type_non_common.maxval.
11301         (TYPE_LANG_SLOT_1): Use type_non_common.lang_1, for any type.
11302         * tree.c (free_lang_data_in_type): Use else-if chain.  Always
11303         clear TYPE_LANG_1.  Remove obsolete member-function stripping.
11304         (find_decls_types_r): Comment about TYPE_MAX_VALUES_RAW.
11305         (verify_type): Adjust for TYPE_BINFO move.
11306         * lto-streamer-out.c (DFS::DFS_write_tree_body): No need to
11307         process TYPE_BINFO directly.
11308         (hash_tree): Likewise.
11309         * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
11310         Likewise.
11311         * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
11312         Likewise.
11314 2017-08-16  David Malcolm  <dmalcolm@redhat.com>
11316         * diagnostic-show-locus.c (colorizer::m_caret): Remove unused field.
11318 2017-08-16  Uros Bizjak  <ubizjak@gmail.com>
11320         PR target/46091
11321         * config/i386/i386.md (*anddi_1_btr): Change predicates of
11322         operand 0 and operand 1 to nomimmediate_operand. Add "m" constraint.
11323         Add ix86_binary_operator_ok to insn constraint.
11324         (*iordi_1_bts): Ditto.
11325         (*xordi_1_btc): Ditto.
11326         (*btsq): Change predicate of operand 0 to nonimmediate_operand.
11327         Update corresponding peephole2 pattern.
11328         (*btrq): Ditto.
11329         (*btcq): Ditto.
11331 2017-08-16  Bin Cheng  <bin.cheng@arm.com>
11333         PR tree-optimization/81832
11334         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Don't
11335         copy loop header which has IFN_LOOP_DIST_ALIAS call.
11337 2017-08-16  Marek Polacek  <polacek@redhat.com>
11339         PR middle/81695
11340         * fold-const.c (fold_indirect_ref_1): Restore original behavior
11341         regarding size_zero_node.
11343 2017-08-16  Martin Liska  <mliska@suse.cz>
11345         PR target/81753
11346         * config.gcc: Respect previously set extra_objs in case
11347         of darwin target.
11349 2017-08-16  Richard Sandiford  <richard.sandiford@linaro.org>
11351         PR tree-optimization/81835
11352         * tree-vect-loop.c (vect_is_simple_reduction): Simply checks for
11353         the phi SSA_NAME.  Check that the condition in a COND_EXPR does
11354         not depend on the phi.
11356 2017-08-16  Alan Modra  <amodra@gmail.com>
11358         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Delete
11359         dead code.
11361 2017-08-16  Alan Modra  <amodra@gmail.com>
11363         * config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p): Merge..
11364         (save_reg_p): ..into this.  Update all callers.
11365         (first_reg_to_save): Simplify.
11367 2017-08-16  Alan Modra  <amodra@gmail.com>
11369         * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't restore
11370         fixed regs.
11372 2017-08-15  Joseph Myers  <joseph@codesourcery.com>
11374         PR target/78460
11375         PR target/67712
11376         * config/sh/sh-mem.cc (sh_expand_cmpnstr): Only unroll for
11377         constant count if that count is less than 32.
11379 2017-08-15  Nathan Sidwell  <nathan@acm.org>
11381         * gcc.c (execute): Emit friendlier message if inferior is killed
11382         by an external cause.
11384 2017-08-15  Richard Biener  <rguenther@suse.de>
11386         PR tree-optimization/81790
11387         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Handle both
11388         CONSTRUCTORs from simplifying and VN.
11390 2017-08-14  Martin Sebor  <msebor@redhat.com>
11392         * builtin-attrs.def: Add comments.
11394 2017-08-14  Martin Sebor  <msebor@redhat.com>
11396         PR c/81117
11397         * doc/extend.texi (attribute nonstring): Document new attribute.
11399 2017-08-14  Martin Sebor  <msebor@redhat.com>
11401         PR c/81117
11402         * tree-diagnostic.c (default_tree_printer): Handle %G.
11403         * gimple-pretty-print.h (percent_G_format): Declare new function.
11404         * gimple-pretty-print.c (percent_G_format): Define.
11405         * tree-pretty-print.c (percent_K_format): Add argument.
11407 2017-08-14  Martin Sebor  <msebor@redhat.com>
11409         PR translation/79998
11410         * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call):
11411         Remove a stray space.
11413 2017-08-14  Uros Bizjak  <ubizjak@gmail.com>
11415         PR target/46091
11416         * config/i386/i386.md (*anddi_1_btr): New insn_and_split pattern.
11417         (*iordi_1_bts): Ditto.
11418         (*xordi_1_btc): Ditto.
11420 2017-08-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11422         PR target/79845
11423         * config/rs6000/linux64.h (INVALID_64BIT): Use quoted strings.
11424         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
11425         Likewise.
11426         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Use
11427         quoted strings, and make more translator-friendly.
11428         (darwin_rs6000_override_options): Likewise.
11429         (rs6000_option_override_internal): Likewise.
11430         (rs6000_return_in_memory): Fix overlong line.
11431         (init_cmulative_args): Use quoted strings, and make more
11432         translator-friendly.
11433         (rs6000_pass_by_reference): Fix overlong line.
11434         (def_builtin): Use quoted strings.
11435         (altivec_expand_predicate_builtin): Use quoted strings, and make
11436         more translator-friendly.
11437         (htm_expand_builtin): Use quoted strings.
11438         (cpu_expand_builtin): Use quoted strings, and make more
11439         translator-friendly.
11440         (altivec_expand_builtin): Likewise.
11441         (paired_expand_predicate_builtin): Likewise.
11442         (rs6000_invalid_builtin): Likewise.
11443         (builtin_function_type): Use quoted strings.
11444         (rs6000_expand_split_stack_prologue): Use quoted strings, and make
11445         more translator-friendly.
11446         (rs6000_trampoline_init): Likewise.
11447         (rs6000_handle_altivec_attribute): Likewise.
11448         (rs6000_inner_target_options): Use quoted strings.
11449         (rs6000_disable_incompatible_switches): Likewise.
11450         * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Use quoted
11451         strings, and make more translator-friendly.
11452         (SUBSUBTARGET_OVERRIDE_OPTIONS): Use quoted strings.
11454 2017-08-14  Bin Cheng  <bin.cheng@arm.com>
11456         PR tree-optimization/81799
11457         * tree-loop-distribution.c (version_loop_by_alias_check): Force
11458         cond_expr to simple gimple operand.
11460 2017-08-14  Wilco Dijkstra  <wdijkstr@arm.com>
11462         PR middle-end/46932
11463         * doc/sourcebuild.texi (autoincdec): Add autoincdec description.
11465 2017-08-14  Georg-Johann Lay  <avr@gjlay.de>
11467         PR target/81754
11468         PR target/81268
11469         * config/avr/avr.opt (mgas-isr-prologues): New Var avr_gasisr_prologues.
11470         * config/avr/avr.md (gasisr, *gasisr): Use it instead of
11471         TARGET_GASISR_PROLOGUES.
11472         * config/avr/avr.c (avr_option_override): Same.
11473         (avr_pass_pre_proep::execute): Same.
11475 2017-08-13  H.J. Lu  <hongjiu.lu@intel.com>
11477         PR target/81820
11478         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Replace
11479         frame pointer with stack pointer - UNITS_PER_WORD in debug insns.
11481 2017-08-13  Uros Bizjak  <ubizjak@gmail.com>
11483         * config/i386/i386.md (*load_tp_<mode>): Redefine as
11484         define_insn_and_split.  Split to a memory load from 0 in
11485         DEFAULT_TLS_SEG_REG address space.  Merge with *load_tp_x32
11486         using PTR mode iterator.
11487         (*load_tp_x32_zext"): Redefine as define_insn_and_split.
11488         Split to a memory load from 0 in DEFAULT_TLS_SEG_REG address space.
11489         (*add_tp_<mode>): Redefine as define_insn_and_split.
11490         Split to an add with a memory load from 0 in DEFAULT_TLS_SEG_REG
11491         address space.  Merge with *add_tp_x32 using PTR mode iterator.
11492         (*add_tp_x32_zext"): Redefine as define_insn_and_split.
11493         Split to an add with a  memory load from 0 in
11494         DEFAULT_TLS_SEG_REG address space.
11496 2017-08-12  Andrew Pinski  <apinski@cavium.com>
11498         * config/aarch64/aarch64-option-extensions.def (rdma):
11499         Fix feature string to what Linux prints out in /proc/cpuinfo.
11501 2017-08-12  Pierre-Marie de Rodat  <derodat@adacore.com>
11503         PR ada/79542
11504         * dwarf2out.c (modified_type_die): For C typedef types that have
11505         an ultimate origin, process the ultimate origin instead of the
11506         input type.
11507         (gen_typedef_die): Assert that input DECLs have no ultimate
11508         origin.
11509         (gen_type_die_with_usage): For typedef variants that have an
11510         ultimate origin, just call gen_decl_die on the original DECL.
11511         (process_scope_var): Avoid creating DIEs for local typedefs and
11512         concrete static variables.
11514 2017-08-12  Alan Modra  <amodra@gmail.com>
11516         PR target/81170
11517         PR target/81295
11518         * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
11519         match gnu-user.h startfile.
11520         (ENDFILE_LINUX_SPEC): Similarly.
11522 2017-08-11  Thomas Schwinge  <thomas@codesourcery.com>
11524         PR lto/81430
11525         * config/nvptx/nvptx.c (nvptx_override_options_after_change):
11526         Remove function.
11527         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Remove definition.
11529 2017-08-11  Tamar Christina  <tamar.christina@arm.com>
11530         * config/aarch64/aarch64.md (mov<mode>): Change.
11531         (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
11532         aarch64_reg_or_fp_float into aarch64_reg_or_fp_zero.
11533         * config/aarch64/predicates.md (aarch64_reg_or_fp_float): Removed.
11535 2017-08-11  Eric Botcazou  <ebotcazou@adacore.com>
11537         * tree-sra.c (build_access_from_expr_1): Use more precise diagnostics
11538         for storage order barriers.
11540 2017-08-11  Martin Liska  <mliska@suse.cz>
11542         PR tree-opt/79987
11543         * tree-chkp.c (chkp_get_bounds_for_decl_addr): Do not instrument
11544         variables of void type.
11546 2017-08-11  Martin Liska  <mliska@suse.cz>
11548         * asan.c (asan_protect_global): Replace ASM_OUTPUT_DEF with
11549         TARGET_SUPPORTS_ALIASES.
11550         * cgraph.c (cgraph_node::create_same_body_alias): Likewise.
11551         * ipa-visibility.c (can_replace_by_local_alias): Likewise.
11552         (optimize_weakref): Likewise.
11553         * symtab.c (symtab_node::noninterposable_alias): Likewise.
11554         * varpool.c (varpool_node::create_extra_name_alias): Likewise.
11555         * defaults.h: Introduce TARGET_SUPPORTS_ALIASES.
11557 2017-08-11  Martin Liska  <mliska@suse.cz>
11559         PR ipa/81213
11560         * config/i386/i386.c (make_resolver_func): Do complete
11561         refactoring of the function.
11563 2017-08-10  Uros Bizjak  <ubizjak@gmail.com>
11565         PR target/81708
11566         * config/i386/i386.opt (mstack-protector-guard-symbol=): New option
11567         * config/i386/i386.c (ix86_stack_protect_guard): Use
11568         ix86_stack_protect_guard_symbol_str to generate varible declaration.
11569         * doc/invoke.texi (x86 Options): Document
11570         -mstack-protector-guard-symbol= option.
11572 2017-08-10  Uros Bizjak  <ubizjak@gmail.com>
11574         * config/i386/i386-protos.h (ix86_split_stack_guard): New prototype.
11575         * config/i386/i386.c (ix86_split_stack_guard): New function.
11576         (ix86_xpand_split_stack_prologue): Call ix86_split_stack_guard.
11577         (ix86_legitimate_address_p) <case UNSPEC_STACK_CHECK>: Remove.
11578         (i386_asm_output_addr_const_extra) <case UNSPEC_STACK_CHECK>: Ditto.
11579         (optput_pic_addr_const): Remove UNSPEC_STACK_CHECK handling.
11580         * config/i386/i386.md (unspec): Remove UNSPEC_STACK_CHECK.
11581         (split_stack_space_check): Call ix86_split_stack_guard.
11583 2017-08-10  Martin Sebor  <msebor@redhat.com>
11585         * print-tree.c (print_node): Print location using the established
11586         format %s:%i%i.
11587         Replace spaces with colons.
11588         (debug_raw, debug): Ditto.
11590 2017-08-10  Martin Sebor  <msebor@redhat.com>
11592         PR c++/81586
11593         * pretty-print.c (pp_format): Correct the handling of %s precision.
11595 2017-08-10  H.J. Lu  <hongjiu.lu@intel.com>
11597         PR target/81736
11598         * config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
11599         to ...
11600         (ix86_finalize_stack_frame_flags): This.  Also clear
11601         frame_pointer_needed if -fno-omit-frame-pointer is used without
11602         stack access.
11603         (ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
11604         with ix86_finalize_stack_frame_flags.
11605         (ix86_expand_epilogue): Likewise.
11606         (ix86_expand_split_stack_prologue): Likewise.
11607         * doc/invoke.texi: Add a note for -fno-omit-frame-pointer.
11609 2017-08-10  Martin Liska  <mliska@suse.cz>
11611         PR c++/81355
11612         * c-attribs.c (handle_target_attribute):
11613         Report warning for an empty string argument of target attribute.
11615 2017-08-09  Jakub Jelinek  <jakub@redhat.com>
11617         PR c/81687
11618         * omp-low.c (omp_copy_decl): Don't remap FORCED_LABEL or DECL_NONLOCAL
11619         LABEL_DECLs.
11620         * tree-cfg.c (move_stmt_op): Don't adjust DECL_CONTEXT of FORCED_LABEL
11621         or DECL_NONLOCAL labels.
11622         (move_stmt_r) <case GIMPLE_LABEL>: Adjust DECL_CONTEXT of FORCED_LABEL
11623         or DECL_NONLOCAL labels here.
11625 2017-08-09  Will Schmidt  <will_schmidt@vnet.ibm.com>
11627         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add blurb
11628         to indicate when early gimple folding has been disabled.
11629         (rs6000_gimple_fold_builtin): Add debug content.
11630         (rs6000_invalid_builtin): Fix whitespace.
11631         (rs6000_expand_builtin): Fix whitespace.
11632         * config/rs6000/rs6000.opt: Add option for -mfold-gimple.
11634 2017-08-09  Segher Boessenkool  <segher@kernel.crashing.org>
11636         PR target/80938
11637         * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't use
11638         SAVE_MULTIPLE if not all the registers that saves, should be saved.
11640 2017-08-09  Jim Wilson  <jim.wilson@linaro.org>
11642         * config/aarch64/aarch64-cores.def (falkor): Use falkor pipeline.
11643         (qdf24xx): Likewise.
11644         * config/aarch64/aarch64.md: Include falkor.md.
11645         * config/aarch64/falkor.md: New.
11647 2017-08-09  Marek Polacek  <polacek@redhat.com>
11649         PR c/81233
11650         * diagnostic-core.h (emit_diagnostic_valist): Add declaration.
11651         * diagnostic.c (emit_diagnostic): Add a comment.
11652         (emit_diagnostic_valist): New function.
11654 2017-08-09  Marek Polacek  <polacek@redhat.com>
11656         PR c/81417
11657         * input.c (make_location): New overload.
11658         * input.h (make_location): Declare.
11660 2017-08-08  Alan Modra  <amodra@gmail.com>
11661             H.J. Lu  <hongjiu.lu@intel.com>
11663         PR driver/81523
11664         * gcc.c (NO_PIE_SPEC): Delete.
11665         (PIE_SPEC): Define as !no-pie/pie.  Move static|shared|r
11666         exclusion..
11667         (LINK_PIE_SPEC): ..to here.
11668         (LINK_COMMAND_SPEC): Support -no-pie.
11669         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct
11670         chain of crtbegin*.o selection, update for PIE_SPEC changes and
11671         format.
11672         (GNU_USER_TARGET_ENDFILE_SPEC): Similarly.
11673         * config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly.
11674         (ENDFILE_CRTEND_SPEC): Similarly.
11676 2017-08-08  Uros Bizjak  <ubizjak@gmail.com>
11678         PR target/81708
11679         * config/i386/i386.opt (mstack-protector-guard-reg=): New option
11680         (mstack-protector-guard-offset=): Ditto.
11681         * config/i386/i386.c (ix86_option_override): Handle
11682         -mstack-protector-guard-reg= and -mstack-protector-guard-offset=
11683         options.
11684         (ix86_stack_protect_guard): Use ix86_stack_protect_guard_reg and
11685         ix86_stack_protect_guard_offset variables.
11686         (TARGET_STACK_PROTECT_GUARD): Always define.
11687         * doc/invoke.texi (x86 Options): Document -mstack-protector-guard-reg=
11688         and -mstack-protector-guard-offset= options.
11690 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
11692         * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): Handle
11693         boundary case for the last candidate.
11695 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
11697         * doc/invoke.texi: Document -ftree-loop-distribution for O3.
11698         * opts.c (default_options_table): Add OPT_ftree_loop_distribution.
11700 2017-08-08  Tamar Christina  <tamar.christina@arm.com>
11702         PR middle-end/19706
11703         * config/aarch64/aarch64.md (xorsign<mode>3): New optabs.
11704         * config/aarch64/aarch64-builtins.c
11705         (aarch64_builtin_vectorized_function): Added CASE_CFN_XORSIGN.
11706         * config/aarch64/aarch64-simd-builtins.def: Added xorsign BINOP.
11707         * config/aarch64/aarch64-simd.md: Added xorsign<mode>3
11709 2017-08-08  Tamar Christina  <tamar.christina@arm.com>
11710             Andrew Pinski <pinskia@gmail.com>
11712         PR middle-end/19706
11713         * internal-fn.def (XORSIGN): New.
11714         * optabs.def (xorsign_optab): New.
11715         * tree-ssa-math-opts.c (is_copysign_call_with_1): New.
11716         (convert_expand_mult_copysign): New.
11717         (pass_optimize_widening_mul::execute): Call
11718         convert_expand_mult_copysign.
11720 2017-08-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
11722         PR tree-optimization/81354
11723         * gimple-ssa-strength-reduction.c (create_add_on_incoming_edge):
11724         Insert on edges rather than explicitly creating landing pads.
11725         (analyze_candidates_and_replace): Commit edge inserts.
11727 2017-08-08  Richard Biener  <rguenther@suse.de>
11729         PR middle-end/81719
11730         * tree-ssa-loop-niter.c: Include tree-dfa.h.
11731         (expand_simple_operations): Also look through ADDR_EXPRs with
11732         MEM_REF bases treating them as POINTER_PLUS_EXPR.
11734 2017-08-08  Richard Biener  <rguenther@suse.de>
11736         PR tree-optimization/81723
11737         * tree-vect-slp.c (struct bst_traits): New hash traits.
11738         (bst_fail): New global.
11739         (vect_build_slp_tree_2): New worker, split out from ...
11740         (vect_build_slp_tree): ... this now wrapping it with using
11741         bst_fail set to cache SLP tree build fails.  Properly handle
11742         max_tree_size.
11743         (vect_analyze_slp_instance): Allocate and free bst_fail.
11745 2017-08-08  Martin Liska  <mliska@suse.cz>
11747         PR tree-opt/81696
11748         * ipa-icf-gimple.c (func_checker::compare_cst_or_decl): Consider
11749         LABEL_DECLs that can be from a different function.
11751 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
11753         PR tree-optimization/81744
11754         * tree-predcom.c (prepare_finalizers_chain): Deep copy expr of
11755         loop's number of iterations.
11757 2017-08-08  Martin Liska  <mliska@suse.cz>
11759         * asan.c: Include header files.
11760         * attribs.c (build_decl_attribute_variant): New function moved
11761         from tree.[ch].
11762         (build_type_attribute_qual_variant): Likewise.
11763         (cmp_attrib_identifiers): Likewise.
11764         (simple_cst_list_equal): Likewise.
11765         (omp_declare_simd_clauses_equal): Likewise.
11766         (attribute_value_equal): Likewise.
11767         (comp_type_attributes): Likewise.
11768         (build_type_attribute_variant): Likewise.
11769         (lookup_ident_attribute): Likewise.
11770         (remove_attribute): Likewise.
11771         (merge_attributes): Likewise.
11772         (merge_type_attributes): Likewise.
11773         (merge_decl_attributes): Likewise.
11774         (merge_dllimport_decl_attributes): Likewise.
11775         (handle_dll_attribute): Likewise.
11776         (attribute_list_equal): Likewise.
11777         (attribute_list_contained): Likewise.
11778         * attribs.h (lookup_attribute): New function moved from tree.[ch].
11779         (lookup_attribute_by_prefix): Likewise.
11780         * bb-reorder.c: Include header files.
11781         * builtins.c: Likewise.
11782         * calls.c: Likewise.
11783         * cfgexpand.c: Likewise.
11784         * cgraph.c: Likewise.
11785         * cgraphunit.c: Likewise.
11786         * convert.c: Likewise.
11787         * dwarf2out.c: Likewise.
11788         * final.c: Likewise.
11789         * fold-const.c: Likewise.
11790         * function.c: Likewise.
11791         * gimple-expr.c: Likewise.
11792         * gimple-fold.c: Likewise.
11793         * gimple-pretty-print.c: Likewise.
11794         * gimple.c: Likewise.
11795         * gimplify.c: Likewise.
11796         * hsa-common.c: Likewise.
11797         * hsa-gen.c: Likewise.
11798         * internal-fn.c: Likewise.
11799         * ipa-chkp.c: Likewise.
11800         * ipa-cp.c: Likewise.
11801         * ipa-devirt.c: Likewise.
11802         * ipa-fnsummary.c: Likewise.
11803         * ipa-inline.c: Likewise.
11804         * ipa-visibility.c: Likewise.
11805         * ipa.c: Likewise.
11806         * lto-cgraph.c: Likewise.
11807         * omp-expand.c: Likewise.
11808         * omp-general.c: Likewise.
11809         * omp-low.c: Likewise.
11810         * omp-offload.c: Likewise.
11811         * omp-simd-clone.c: Likewise.
11812         * opts-global.c: Likewise.
11813         * passes.c: Likewise.
11814         * predict.c: Likewise.
11815         * sancov.c: Likewise.
11816         * sanopt.c: Likewise.
11817         * symtab.c: Likewise.
11818         * toplev.c: Likewise.
11819         * trans-mem.c: Likewise.
11820         * tree-chkp.c: Likewise.
11821         * tree-eh.c: Likewise.
11822         * tree-into-ssa.c: Likewise.
11823         * tree-object-size.c: Likewise.
11824         * tree-parloops.c: Likewise.
11825         * tree-profile.c: Likewise.
11826         * tree-ssa-ccp.c: Likewise.
11827         * tree-ssa-live.c: Likewise.
11828         * tree-ssa-loop.c: Likewise.
11829         * tree-ssa-sccvn.c: Likewise.
11830         * tree-ssa-structalias.c: Likewise.
11831         * tree-ssa.c: Likewise.
11832         * tree-streamer-in.c: Likewise.
11833         * tree-vectorizer.c: Likewise.
11834         * tree-vrp.c: Likewise.
11835         * tsan.c: Likewise.
11836         * ubsan.c: Likewise.
11837         * varasm.c: Likewise.
11838         * varpool.c: Likewise.
11839         * tree.c: Remove functions moved to attribs.[ch].
11840         * tree.h: Likewise.
11841         * config/aarch64/aarch64.c: Add attrs.h header file.
11842         * config/alpha/alpha.c: Likewise.
11843         * config/arc/arc.c: Likewise.
11844         * config/arm/arm.c: Likewise.
11845         * config/avr/avr.c: Likewise.
11846         * config/bfin/bfin.c: Likewise.
11847         * config/c6x/c6x.c: Likewise.
11848         * config/cr16/cr16.c: Likewise.
11849         * config/cris/cris.c: Likewise.
11850         * config/darwin.c: Likewise.
11851         * config/epiphany/epiphany.c: Likewise.
11852         * config/fr30/fr30.c: Likewise.
11853         * config/frv/frv.c: Likewise.
11854         * config/ft32/ft32.c: Likewise.
11855         * config/h8300/h8300.c: Likewise.
11856         * config/i386/winnt.c: Likewise.
11857         * config/ia64/ia64.c: Likewise.
11858         * config/iq2000/iq2000.c: Likewise.
11859         * config/lm32/lm32.c: Likewise.
11860         * config/m32c/m32c.c: Likewise.
11861         * config/m32r/m32r.c: Likewise.
11862         * config/m68k/m68k.c: Likewise.
11863         * config/mcore/mcore.c: Likewise.
11864         * config/microblaze/microblaze.c: Likewise.
11865         * config/mips/mips.c: Likewise.
11866         * config/mmix/mmix.c: Likewise.
11867         * config/mn10300/mn10300.c: Likewise.
11868         * config/moxie/moxie.c: Likewise.
11869         * config/msp430/msp430.c: Likewise.
11870         * config/nds32/nds32-isr.c: Likewise.
11871         * config/nds32/nds32.c: Likewise.
11872         * config/nios2/nios2.c: Likewise.
11873         * config/nvptx/nvptx.c: Likewise.
11874         * config/pa/pa.c: Likewise.
11875         * config/pdp11/pdp11.c: Likewise.
11876         * config/powerpcspe/powerpcspe.c: Likewise.
11877         * config/riscv/riscv.c: Likewise.
11878         * config/rl78/rl78.c: Likewise.
11879         * config/rx/rx.c: Likewise.
11880         * config/s390/s390.c: Likewise.
11881         * config/sh/sh.c: Likewise.
11882         * config/sol2.c: Likewise.
11883         * config/sparc/sparc.c: Likewise.
11884         * config/spu/spu.c: Likewise.
11885         * config/stormy16/stormy16.c: Likewise.
11886         * config/tilegx/tilegx.c: Likewise.
11887         * config/tilepro/tilepro.c: Likewise.
11888         * config/v850/v850.c: Likewise.
11889         * config/vax/vax.c: Likewise.
11890         * config/visium/visium.c: Likewise.
11891         * config/xtensa/xtensa.c: Likewise.
11893 2017-08-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
11895         PR target/81593
11896         * config/rs6000/vsx.md (vsx_concat_<mode>, VSX_D): Cleanup
11897         constraints since the -mupper-regs-* switches have been
11898         eliminated.
11899         (vsx_concat_<mode>_1): New combiner insns to recognize inserting
11900         into a vector from a double word element that was extracted from
11901         another vector, and eliminate extra XXPERMDI instructions.
11902         (vsx_concat_<mode>_2): Likewise.
11903         (vsx_concat_<mode>_3): Likewise.
11904         (vsx_set_<mode>, VSX_D): Rewrite vector set in terms of vector
11905         concat to allow optimizing inserts from previous extracts.
11907 2017-08-07  Uros Bizjak  <ubizjak@gmail.com>
11909         * config/i386/i386.c (ix86_stack_protect_guard): Generate
11910         memory reference to a SSP offset in TLS address space.
11911         (ix86_print_operand) <case '@'>: Remove.
11912         (ix86_print_operand_punct_valid_p): Remove '@' code.
11913         * config/i386/i386.md (unspec): Remove UNSPEC_SP_TLS_SET and
11914         UNSPEC_SP_TLS_TEST.
11915         (stack_tls_protect_set_<mode>): Remove.
11916         (stack_protect_set): Do not call gen_stack_tls_protect_set_<mode>.
11917         (stack_tls_protect_test_<mode>): Remove.
11918         (stack_protect_test): Do not call gen_stack_tls_protect_test_<mode>.
11920 2017-08-07  Olivier Hainque  <hainque@adacore.com>
11922         PR target/81755
11923         * config/vxworksae.h (VXWORKS_HAVE_TLS): Define.
11925 2017-08-07  Douglas Rupp  <rupp@adacore.com>
11927         * Makefile.in (install-mkheaders): Fix typo, where the multi_dir
11928         variable was referenced as multidir in command.
11930 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
11932         PR c/69389
11933         * gimplify.c (goa_stabilize_expr): Handle BIT_INSERT_EXPR and
11934         BIT_FIELD_REF.
11936 2017-08-07  Martin Liska  <mliska@suse.cz>
11938         * config/m32c/m32c.c: Add include of stringpool.h and attribs.h.
11939         * config/rl78/rl78.c: Add include of attribs.h.
11940         * config/sh/sh.c: Likewise.
11941         * config/v850/v850.c: Likewise.
11943 2017-08-07  Tom de Vries  <tom@codesourcery.com>
11945         PR middle-end/78266
11946         * omp-expand.c (expand_oacc_for): Ensure diff_type is large enough.
11948 2017-08-07  Martin Liska  <mliska@suse.cz>
11950         * config/mips/mips.c: Include attribs.h.
11952 2017-08-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
11954         PR fortran/68829
11955         * doc/invoke.texi: Document change in behvaior for -Ofast for
11956         Fortran.
11958 2017-08-07  Wilco Dijkstra  <wdijkstr@arm.com>
11960         * config/aarch64/aarch64.c (aarch64_pushwb_single_reg):
11961         Use gen_frame_mem.
11962         (aarch64_pop_regs): Likewise.
11963         (aarch64_gen_load_pair): Likewise.
11964         (aarch64_save_callee_saves): Likewise.
11965         (aarch64_restore_callee_saves): Likewise.
11967 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
11969         * config/i386/i386.c: Revert the last change.
11971 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
11973         PR target/81736
11974         * config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
11975         to ...
11976         (ix86_finalize_stack_frame_flags): This.  Also clear
11977         frame_pointer_needed if -fno-omit-frame-pointer is used without
11978         stack access.
11979         (ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
11980         with ix86_finalize_stack_frame_flags.
11981         (ix86_expand_epilogue): Likewise.
11982         (ix86_expand_split_stack_prologue): Likewise.
11984 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
11986         PR target/81743
11987         * config/i386/i386.c (get_builtin_code_for_version): Set priority
11988         to P_AES for Westmere.
11990 2017-08-07  Jonathan Yong  <10walls@gmail.com>
11992         * config/i386/mingw.opt (fset-stack-executable): Removed.
11993         * config/i386/cygming.opt (fset-stack-executable): Moved
11994         from mingw.opt.
11995         * config/i386/cygwin.h: Define CHECK_EXECUTE_STACK_ENABLED.
11997 2017-08-07  Segher Boessenkool  <segher@kernel.crashing.org>
11999         * print-rtl.c (print_exp): Print NOT as "~" instead of as "!".
12001 2017-08-07  Marek Polacek  <polacek@redhat.com>
12003         PR middle-end/81737
12004         * fold-const.c (fold_indirect_ref_1): Check type_domain.
12006 2017-08-07  Martin Liska  <mliska@suse.cz>
12008         * attribs.h (canonicalize_attr_name): New function.
12009         (cmp_attribs): Move from c-format.c and adjusted.
12010         (is_attribute_p): Moved from tree.h.
12011         * tree-inline.c: Add new includes.
12012         * tree.c (cmp_attrib_identifiers): Use cmp_attribs.
12013         (private_is_attribute_p): Remove.
12014         (private_lookup_attribute): Likewise.
12015         (private_lookup_attribute_by_prefix): Simplify.
12016         (remove_attribute): Use is_attribute_p.
12017         * tree.h: Remove removed declarations.
12019 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
12021         PR middle-end/81698
12022         * stmt.c (emit_case_dispatch_table): Add DEFAULT_EDGE argument,
12023         instead of computing it in the function.  Formatting fix.
12024         (expand_case): Don't rely on default_edge being the first edge,
12025         clear it if removing it, pass default_edge to
12026         emit_case_dispatch_table.
12027         (expand_sjlj_dispatch_table): Pass NULL as DEFAULT_EDGE, formatting
12028         fix.
12030 2017-08-06  Uros Bizjak  <ubizjak@gmail.com>
12032         * config/alpha/alpha.c (alpha_reorg): If trap is the last active
12033         insn in the function, emit NOP after the insn.
12035 2017-08-06  Tom de Vries  <tom@codesourcery.com>
12037         * omp-expand.c (expand_oacc_for): Add missing edge probability for tile
12038         and element loops.
12040 2017-08-06  Tom de Vries  <tom@codesourcery.com>
12042         * omp-expand.c (expand_oacc_for): Add missing edge probability for chunk
12043         loop.
12045 2017-08-04  Yury Gribov  <tetra2005@gmail.com>
12047         PR tree-optimization/57371
12048         * match.pd: New pattern.
12050 2017-08-04  Marek Polacek  <polacek@redhat.com>
12052         PR middle-end/81695
12053         * fold-const.c (fold_indirect_ref_1): For ((int *)&a + 4 -> a[1],
12054         perform the computation in offset_int.
12056 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
12058         PR tree-optimization/81136
12059         * tree-vectorizer.h: Include tree-hash-traits.h.
12060         (vec_base_alignments): New typedef.
12061         (vec_info): Add a base_alignments field.
12062         (vect_record_base_alignments): Declare.
12063         * tree-data-ref.h (data_reference): Add an is_conditional_in_stmt
12064         field.
12065         (DR_IS_CONDITIONAL_IN_STMT): New macro.
12066         (create_data_ref): Add an is_conditional_in_stmt argument.
12067         * tree-data-ref.c (create_data_ref): Likewise.  Use it to initialize
12068         the is_conditional_in_stmt field.
12069         (data_ref_loc): Add an is_conditional_in_stmt field.
12070         (get_references_in_stmt): Set the is_conditional_in_stmt field.
12071         (find_data_references_in_stmt): Update call to create_data_ref.
12072         (graphite_find_data_references_in_stmt): Likewise.
12073         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Likewise.
12074         * tree-vect-data-refs.c (vect_analyze_data_refs): Likewise.
12075         (vect_record_base_alignment): New function.
12076         (vect_record_base_alignments): Likewise.
12077         (vect_compute_data_ref_alignment): Adjust base_addr and aligned_to
12078         for nested statements even if we fail to compute a misalignment.
12079         Use pooled base alignments for unconditional references.
12080         (vect_find_same_alignment_drs): Compare base addresses instead
12081         of base objects.
12082         (vect_analyze_data_refs_alignment): Call vect_record_base_alignments.
12083         * tree-vect-slp.c (vect_slp_analyze_bb_1): Likewise.
12085 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
12087         * tree-vectorizer.h (vec_info): Add a constructor and destructor.
12088         Add an explicit name for the enum.  Use auto_vec for slp_instances
12089         and grouped_stores.
12090         (_loop_vec_info): Add a constructor and destructor.  Use auto_vec
12091         for all vectors.
12092         (_bb_vec_info): Add a constructor and destructor.
12093         (vinfo_for_stmt): Return NULL for uids of -1 as well.
12094         (destroy_loop_vec_info): Delete.
12095         (vect_destroy_datarefs): Likewise.
12096         * tree-vectorizer.c (vect_destroy_datarefs): Delete.
12097         (vec_info::vec_info): New function.
12098         (vec_info::~vec_info): Likewise.
12099         (vectorize_loops): Use delete instead of destroy_loop_vec_info.
12100         * tree-parloops.c (gather_scalar_reductions): Use delete instead of
12101         destroy_loop_vec_info.
12102         * tree-vect-loop.c (new_loop_vec_info): Replace with...
12103         (_loop_vec_info::_loop_vec_info): ...this.
12104         (destroy_loop_vec_info): Replace with...
12105         (_loop_vec_info::~_loop_vec_info): ...this.  Unconditionally delete
12106         the stmt_vec_infos.  Leave handling of vec_info information to its
12107         destructor.  Remove explicit vector releases.
12108         (vect_analyze_loop_form): Use new instead of new_loop_vec_info.
12109         (vect_analyze_loop): Use delete instead of destroy_loop_vec_info.
12110         * tree-vect-slp.c (new_bb_vec_info): Replace with...
12111         (_bb_vec_info::_bb_vec_info): ...this.  Don't reserve space in
12112         BB_VINFO_GROUPED_STORES or BB_VINFO_SLP_INSTANCES.
12113         (destroy_bb_vec_info): Replace with...
12114         (_bb_vec_info::~_bb_vec_info): ...this.  Leave handling of vec_info
12115         information to its destructor.
12116         (vect_slp_analyze_bb_1): Use new and delete instead of
12117         new_bb_vec_info and destroy_bb_vec_info.
12118         (vect_slp_bb): Replace 2 calls to destroy_bb_vec_info with a
12119         single delete.
12121 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
12123         * tree-data-ref.h (subscript): Add access_fn field.
12124         (data_dependence_relation): Add could_be_independent_p.
12125         (SUB_ACCESS_FN, DDR_COULD_BE_INDEPENDENT_P): New macros.
12126         (same_access_functions): Move to tree-data-ref.c.
12127         * tree-data-ref.c (ref_contains_union_access_p): New function.
12128         (access_fn_component_p): Likewise.
12129         (access_fn_components_comparable_p): Likewise.
12130         (dr_analyze_indices): Add a reference to access_fn_component_p.
12131         (dump_data_dependence_relation): Use SUB_ACCESS_FN instead of
12132         DR_ACCESS_FN.
12133         (constant_access_functions): Likewise.
12134         (add_other_self_distances): Likewise.
12135         (same_access_functions): Likewise.  (Moved from tree-data-ref.h.)
12136         (initialize_data_dependence_relation): Use XCNEW and remove
12137         explicit zeroing of DDR_REVERSED_P.  Look for a subsequence
12138         of access functions that have the same type.  Allow the
12139         subsequence to end with different bases in some circumstances.
12140         Record the chosen access functions in SUB_ACCESS_FN.
12141         (build_classic_dist_vector_1): Replace ddr_a and ddr_b with
12142         a_index and b_index.  Use SUB_ACCESS_FN instead of DR_ACCESS_FN.
12143         (subscript_dependence_tester_1): Likewise dra and drb.
12144         (build_classic_dist_vector): Update calls accordingly.
12145         (subscript_dependence_tester): Likewise.
12146         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Check
12147         DDR_COULD_BE_INDEPENDENT_P.
12148         * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Test
12149         comp_alias_ddrs instead of may_alias_ddrs.
12150         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
12151         New function.
12152         (vect_analyze_data_ref_dependence): Use it if
12153         DDR_COULD_BE_INDEPENDENT_P, but fall back to using the recorded
12154         distance vectors if that fails.
12155         (dependence_distance_ge_vf): New function.
12156         (vect_prune_runtime_alias_test_list): Use it.  Don't clear
12157         LOOP_VINFO_MAY_ALIAS_DDRS.
12159 2017-08-04  Richard Biener  <rguenther@suse.de>
12161         PR middle-end/81705
12162         * fold-const.c (fold_binary_loc): Properly restrict
12163         minus_var0 && minus_var1 case when associating undefined overflow
12164         entities.
12166 2017-08-04  Tom de Vries  <tom@codesourcery.com>
12168         * omp-simd-clone.c (simd_clone_adjust): Add missing edge probability.
12170 2017-08-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12172         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
12173         Don't start diagnostic messages with a capital letter.
12174         * config/rs6000/rs6000.c (rs6000_option_override_internal):
12175         Likewise.
12176         (rs6000_invalid_builtin): Likewise.
12177         (rs6000_trampoline_init): Likewise.
12179 2017-08-03  Jakub Jelinek  <jakub@redhat.com>
12181         PR target/81621
12182         * bb-reorder.c (pass_partition_blocks::execute): Return TODO_df_finish
12183         after setting changeable df flags.
12185 2017-08-03  Richard Biener  <rguenther@suse.de>
12187         * tree-ssa-reassoc.c (should_break_up_subtract): Also break
12188         up if the use is in USE - X.
12190 2017-08-03  Alexander Monakov  <amonakov@ispras.ru>
12192         * toplev.c (dumpfile.h): New include.
12193         (internal_error_reentered): New static function.  Use it...
12194         (internal_error_function): ...here to handle reentered internal_error.
12196 2017-08-03  Richard Biener  <rguenther@suse.de>
12198         PR middle-end/81148
12199         * fold-const.c (split_tree): Add minus_var and minus_con
12200         arguments, remove unused loc arg.  Never generate NEGATE_EXPRs
12201         here but always use minus_*.
12202         (associate_trees): Assert we never associate with MINUS_EXPR
12203         and NULL first operand.  Do not recurse for PLUS_EXPR operands
12204         when associating as MINUS_EXPR either.
12205         (fold_binary_loc): Track minus_var and minus_con.
12207 2017-08-03  Tom de Vries  <tom@codesourcery.com>
12209         PR lto/81430
12210         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers): If
12211         ACCEL_COMPILER, apply finish_options on
12212         DECL_FUNCTION_SPECIFIC_OPTIMIZATION.
12214 2017-08-03  Tom de Vries  <tom@codesourcery.com>
12216         PR target/81662
12217         * config/nvptx/nvptx.c (nvptx_option_override): Emit sorry if
12218         function_entry_patch_area_size > 0.
12220 2017-08-03  Jakub Jelinek  <jakub@redhat.com>
12222         PR driver/81650
12223         * calls.c (alloc_max_size): Use HOST_WIDE_INT_UC (10??)
12224         instead of 10??LU, perform unit multiplication in wide_int,
12225         don't change alloc_object_size_limit if the limit is larger
12226         than SSIZE_MAX.
12228         PR tree-optimization/81655
12229         PR tree-optimization/81588
12230         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Handle also
12231         the case when ranges[i].low and high are 1 for unsigned type with
12232         precision 1.
12234         PR middle-end/81052
12235         * omp-low.c (diagnose_sb_0): Handle flag_openmp_simd like flag_openmp.
12236         (pass_diagnose_omp_blocks::gate): Enable also for flag_openmp_simd.
12238 2017-08-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12240         * tree-vrp.h: Add include guard.
12242 2017-08-02  Uros Bizjak  <ubizjak@gmail.com>
12244         PR target/81644
12245         * config/i386/i386.md (unspecv): Add UNSPECV_UD2.
12246         (ud2): New insn pattern.
12247         * config/i386/i386.c (ix86_expand_epilogue):
12248         For naked functions, generate ud2 instead of trap insn.
12250 2017-08-02  Marek Polacek  <polacek@redhat.com>
12252         PR other/81667
12253         * alloc-pool.h (base_pool_allocator): Initialize m_elt_size.
12255 2017-08-02  Tom de Vries  <tom@codesourcery.com>
12256             Cesar Philippidis  <cesar@codesourcery.com>
12258         * config/nvptx/nvptx.c (nvptx_lockless_update, nvptx_lockfull_update):
12259         Add missing edge probabilities.
12261 2017-08-02  Tamar Christina  <tamar.christina@arm.com>
12263         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
12264         Correct endianness.
12266 2017-08-02  Jakub Jelinek  <jakub@redhat.com>
12268         PR middle-end/79499
12269         * function.c (thread_prologue_and_epilogue_insns): Determine blocks
12270         for find_many_sub_basic_blocks bitmap by looking up BLOCK_FOR_INSN
12271         of first NONDEBUG_INSN_P in each of the split_prologue_seq and
12272         prologue_seq sequences - if any.
12274 2017-08-02  Richard Biener  <rguenther@suse.de>
12276         * tree-vect-stmts.c (vectorizable_store): Perform vector extracts
12277         via vectors if supported, integer extracts via punning if supported
12278         or otherwise vector extracts.
12280 2017-08-02  Richard Biener  <rguenther@suse.de>
12282         * tree-ssa-pre.c (bitmap_insert_into_set_1): Remove and inline
12283         into ...
12284         (bitmap_insert_into_set): ... this.
12286 2017-08-02  Richard Biener  <rguenther@suse.de>
12288         PR tree-optimization/81633
12289         Revert
12290         2015-08-17  Alan Hayward  <alan.hayward@arm.com>
12292         PR tree-optimization/71752
12293         * tree-vect-slp.c (vect_get_slp_defs): Handle null operands.
12295 2017-08-01  Daniel Santos  <daniel.santos@pobox.com>
12297         * config/i386/i386.h (ix86_frame::outlined_save_offset): Remove field.
12298         (machine_function::call_ms2sysv_pad_out): Remove field.
12299         * config/i386/i386.c (xlogue_layout::get_stack_space_used): Modify.
12300         (ix86_compute_frame_layout): Likewise.
12302 2017-08-01  H.J. Lu  <hongjiu.lu@intel.com>
12304         PR target/81654
12305         * config/i386/i386.c (ix86_set_func_type): Disallow naked
12306         attribute with interrupt attribute.
12308 2017-08-01  Andrew Pinski  <apinski@cavium.com>
12310         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Check
12311         BIT_INSERT_EXPR's operand 1
12312         to see if the types precision matches.
12314 2017-08-01  Martin Liska  <mliska@suse.cz>
12316         PR middle-end/70140
12317         * builtins.c (expand_builtin_memcpy_args): Remove.
12318         (expand_builtin_memcpy): Call newly added function
12319         expand_builtin_memory_copy_args.
12320         (expand_builtin_memcpy_with_bounds): Likewise.
12321         (expand_builtin_mempcpy): Remove last argument.
12322         (expand_builtin_mempcpy_with_bounds): Likewise.
12323         (expand_builtin_memory_copy_args): New function created from
12324         expand_builtin_mempcpy_args with small modifications.
12325         (expand_builtin_mempcpy_args): Remove.
12326         (expand_builtin_stpcpy): Remove unused argument.
12327         (expand_builtin): Likewise.
12328         (expand_builtin_with_bounds): Likewise.
12330 2017-08-01  Martin Liska  <mliska@suse.cz>
12332         Revert r250771
12333         Make mempcpy more optimal (PR middle-end/70140).
12335 2017-08-01  Jakub Jelinek  <jakub@redhat.com>
12337         PR target/81622
12338         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
12339         __builtin_vec_cmpne verify both arguments are compatible vectors
12340         before looking at TYPE_MODE on the element type.  For __builtin_vec_ld
12341         verify arg1_type is a pointer or array type.  For __builtin_vec_st,
12342         move computation of aligned to after checking the argument types.
12343         Formatting fixes.
12345         PR target/80846
12346         * config/rs6000/vsx.md (vextract_fp_from_shorth,
12347         vextract_fp_from_shortl): Add element mode after mode in gen_vec_init*
12348         calls.
12350 2017-08-01  Jerome Lambourg  <lambourg@adacore.com>
12351             Doug Rupp  <rupp@adacore.com>
12352             Olivier Hainque  <hainque@adacore.com>
12354         * config.gcc (arm-wrs-vxworks*): Rework to handle arm-wrs-vxworks7 as
12355         well as arm-wrs-vxworks. Update target_cpu_name from arm6 (arch v3) to
12356         arm8 (arch v4).
12357         * config/arm/vxworks.h (MAYBE_TARGET_BPABI_CPP_BUILTINS): New, helper
12358         for TARGET_OS_CPP_BUILTIN.
12359         (TARGET_OS_CPP_BUILTIN): Invoke MAYBE_TARGET_BPABI_CPP_BUILTINS(),
12360         refine CPU definitions for arm_arch5 and add those for arm_arch6 and
12361         arm_arch7.
12362         (MAYBE_ASM_ABI_SPEC): New, helper for SUBTARGET_EXTRA_ASM_SPEC,
12363         passing required abi options to the assembler for EABI configurations.
12364         (EXTRA_CC1_SPEC): New macro, to help prevent the implicit production
12365         of .text.hot and .text.unlikely sections for kernel modules when
12366         using ARM style exceptions.
12367         (CC1_SPEC): Remove obsolete attempt at mimicking Diab toolchain
12368         options. Add EXTRA_CC1_SPEC.
12369         (VXWORKS_ENDIAN_SPEC): Adjust comment and remove handling of Diab
12370         toolchain options.
12371         (DWARF2_UNWIND_INFO): Redefine to handle the pre/post VxWorks 7
12372         transition.
12373         (ARM_TARGET2_DWARF_FORMAT): Define.
12374         * config/arm/t-vxworks: Adjust multilib control to removal of the
12375         Diab command line options.
12377 2017-08-01  Martin Liska  <mliska@suse.cz>
12379         PR gcov-profile/81561
12380         * gcov.c (unblock): Make unblocking safe as we need to preserve
12381         index correspondence of blocks and block_lists.
12383 2017-08-01  Richard Biener  <rguenther@suse.de>
12385         PR tree-optimization/81181
12386         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
12387         (compute_antic): ... end of iteration here.
12389 2017-08-01  James Greenhalgh  <james.greenhalgh@arm.com>
12391         * common.opt (ftree-vectorize): No longer set flag_tree_vectorize.
12392         (ftree-loop-vectorize): Set as EnabledBy ftree-vectorize.
12393         (ftree-slp-vectorize): Likewise.
12394         * omp-expand (expand_omp_simd): Remove flag_tree_vectorize, as it
12395         can no longer be set independent of flag_tree_loop_vectorize.
12396         * omp-general.c (emp_max_vf): Likewise.
12397         * opts.c (enable_fdo_optimizations): Remove references to
12398         flag_tree_vectorize, these are now implicit.
12399         (common_handle_option): Remove handling for OPT_ftree_vectorize,
12400         and leave it for the options machinery.
12402 2017-08-01  Martin Liska  <mliska@suse.cz>
12404         PR middle-end/70140
12405         * builtins.c (expand_builtin_memcpy_args): Remove.
12406         (expand_builtin_memcpy): Call newly added function
12407         expand_builtin_memory_copy_args.
12408         (expand_builtin_memcpy_with_bounds): Likewise.
12409         (expand_builtin_mempcpy): Remove last argument.
12410         (expand_builtin_mempcpy_with_bounds): Likewise.
12411         (expand_builtin_memory_copy_args): New function created from
12412         expand_builtin_mempcpy_args with small modifications.
12413         (expand_builtin_mempcpy_args): Remove.
12414         (expand_builtin_stpcpy): Remove unused argument.
12415         (expand_builtin): Likewise.
12416         (expand_builtin_with_bounds): Likewise.
12418 2017-08-01  Uros Bizjak  <ubizjak@gmail.com>
12420         PR target/81641
12421         * config/i386/i386.c (ix86_print_operand_address_as): For -masm=intel
12422         print "ds:" only for immediates in generic address space.
12424 2017-08-01  Uros Bizjak  <ubizjak@gmail.com>
12426         PR target/81639
12427         * config/i386/i386.c (ix86_funciton_naked): New prototype.
12428         (ix86_function_ok_for_sibcall): Return false for naked functions.
12430 2017-08-01  Richard Biener  <rguenther@suse.de>
12432         * tree-ssa-pre.c (print_pre_expr): Handle NULL expr.
12433         (compute_antic): Seed worklist with exit block predecessors.
12434         * cfganal.c (dfs_find_deadend): For a cycle return the source
12435         of the edge closing it.
12437 2017-08-01  Tamar Christina  <tamar.christina@arm.com>
12439         * config/aarch64/aarch64.c
12440         (aarch64_can_const_movi_rtx_p): Move 0 check.
12442 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
12444         * tree.h (POINTER_TYPE_OVERFLOW_UNDEFINED): Delete.
12445         * fold-const.c (fold_comparison, fold_binary_loc): Delete use of
12446         above macro.
12447         * match.pd: Ditto in address comparison pattern.
12449 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
12451         PR tree-optimization/81627
12452         * tree-predcom.c (prepare_finalizers): Always rewrite into loop
12453         closed ssa form for store-store chain.
12455 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
12457         PR tree-optimization/81620
12458         * tree-predcom.c (add_ref_to_chain): Don't set has_max_use_after
12459         for store-store chain.
12461 2017-08-01  Jakub Jelinek  <jakub@redhat.com>
12463         PR tree-optimization/81588
12464         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If
12465         ranges[i].in_p, invert comparison code ccode.  For >/>=,
12466         swap rhs1 and rhs2 and comparison code unconditionally,
12467         for </<= don't do that.  Don't swap rhs1/rhs2 again if
12468         ranges[i].in_p, instead invert comparison code ccode if
12469         opcode or oe->rank is BIT_IOR_EXPR.
12471         PR target/80846
12472         * optabs.def (vec_extract_optab, vec_init_optab): Change from
12473         a direct optab to conversion optab.
12474         * optabs.c (expand_vector_broadcast): Use convert_optab_handler
12475         with GET_MODE_INNER as last argument instead of optab_handler.
12476         * expmed.c (extract_bit_field_1): Likewise.  Use vector from
12477         vector extraction if possible and optab is available.
12478         * expr.c (store_constructor): Use convert_optab_handler instead
12479         of optab_handler.  Use vector initialization from smaller
12480         vectors if possible and optab is available.
12481         * tree-vect-stmts.c (vectorizable_load): Likewise.
12482         * doc/md.texi (vec_extract, vec_init): Document that the optabs
12483         now have two modes.
12484         * config/i386/i386.c (ix86_expand_vector_init): Handle expansion
12485         of vec_init from half-sized vectors with the same element mode.
12486         * config/i386/sse.md (ssehalfvecmode): Add V4TI case.
12487         (ssehalfvecmodelower, ssescalarmodelower): New mode attributes.
12488         (reduc_plus_scal_v8df, reduc_plus_scal_v4df, reduc_plus_scal_v2df,
12489         reduc_plus_scal_v16sf, reduc_plus_scal_v8sf, reduc_plus_scal_v4sf,
12490         reduc_<code>_scal_<mode>, reduc_umin_scal_v8hi): Add element mode
12491         after mode in gen_vec_extract* calls.
12492         (vec_extract<mode>): Renamed to ...
12493         (vec_extract<mode><ssescalarmodelower>): ... this.
12494         (vec_extract<mode><ssehalfvecmodelower>): New expander.
12495         (rotl<mode>3, rotr<mode>3, <shift_insn><mode>3, ashrv2di3): Add
12496         element mode after mode in gen_vec_init* calls.
12497         (VEC_INIT_HALF_MODE): New mode iterator.
12498         (vec_init<mode>): Renamed to ...
12499         (vec_init<mode><ssescalarmodelower>): ... this.
12500         (vec_init<mode><ssehalfvecmodelower>): New expander.
12501         * config/i386/mmx.md (vec_extractv2sf): Renamed to ...
12502         (vec_extractv2sfsf): ... this.
12503         (vec_initv2sf): Renamed to ...
12504         (vec_initv2sfsf): ... this.
12505         (vec_extractv2si): Renamed to ...
12506         (vec_extractv2sisi): ... this.
12507         (vec_initv2si): Renamed to ...
12508         (vec_initv2sisi): ... this.
12509         (vec_extractv4hi): Renamed to ...
12510         (vec_extractv4hihi): ... this.
12511         (vec_initv4hi): Renamed to ...
12512         (vec_initv4hihi): ... this.
12513         (vec_extractv8qi): Renamed to ...
12514         (vec_extractv8qiqi): ... this.
12515         (vec_initv8qi): Renamed to ...
12516         (vec_initv8qiqi): ... this.
12517         * config/rs6000/vector.md (VEC_base_l): New mode attribute.
12518         (vec_init<mode>): Renamed to ...
12519         (vec_init<mode><VEC_base_l>): ... this.
12520         (vec_extract<mode>): Renamed to ...
12521         (vec_extract<mode><VEC_base_l>): ... this.
12522         * config/rs6000/paired.md (vec_initv2sf): Renamed to ...
12523         (vec_initv2sfsf): ... this.
12524         * config/rs6000/altivec.md (splitter, altivec_copysign_v4sf3,
12525         vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
12526         vec_unpacku_lo_v8hi, mulv16qi3, altivec_vreve<mode>2): Add
12527         element mode after mode in gen_vec_init* calls.
12528         * config/aarch64/aarch64-simd.md (vec_init<mode>): Renamed to ...
12529         (vec_init<mode><Vel>): ... this.
12530         (vec_extract<mode>): Renamed to ...
12531         (vec_extract<mode><Vel>): ... this.
12532         * config/aarch64/iterators.md (Vel): New mode attribute.
12533         * config/s390/s390.c (s390_expand_vec_strlen, s390_expand_vec_movstr):
12534         Add element mode after mode in gen_vec_extract* calls.
12535         * config/s390/vector.md (non_vec_l): New mode attribute.
12536         (vec_extract<mode>): Renamed to ...
12537         (vec_extract<mode><non_vec_l>): ... this.
12538         (vec_init<mode>): Renamed to ...
12539         (vec_init<mode><non_vec_l>): ... this.
12540         * config/s390/s390-builtins.def (s390_vlgvb, s390_vlgvh, s390_vlgvf,
12541         s390_vlgvf_flt, s390_vlgvg, s390_vlgvg_dbl): Add element mode after
12542         vec_extract mode.
12543         * config/arm/iterators.md (V_elem_l): New mode attribute.
12544         * config/arm/neon.md (vec_extract<mode>): Renamed to ...
12545         (vec_extract<mode><V_elem_l>): ... this.
12546         (vec_extractv2di): Renamed to ...
12547         (vec_extractv2didi): ... this.
12548         (vec_init<mode>): Renamed to ...
12549         (vec_init<mode><V_elem_l>): ... this.
12550         (reduc_plus_scal_<mode>, reduc_plus_scal_v2di, reduc_smin_scal_<mode>,
12551         reduc_smax_scal_<mode>, reduc_umin_scal_<mode>,
12552         reduc_umax_scal_<mode>, neon_vget_lane<mode>, neon_vget_laneu<mode>):
12553         Add element mode after gen_vec_extract* calls.
12554         * config/mips/mips-msa.md (vec_init<mode>): Renamed to ...
12555         (vec_init<mode><unitmode>): ... this.
12556         (vec_extract<mode>): Renamed to ...
12557         (vec_extract<mode><unitmode>): ... this.
12558         * config/mips/loongson.md (vec_init<mode>): Renamed to ...
12559         (vec_init<mode><unitmode>): ... this.
12560         * config/mips/mips-ps-3d.md (vec_initv2sf): Renamed to ...
12561         (vec_initv2sfsf): ... this.
12562         (vec_extractv2sf): Renamed to ...
12563         (vec_extractv2sfsf): ... this.
12564         (reduc_plus_scal_v2sf, reduc_smin_scal_v2sf, reduc_smax_scal_v2sf):
12565         Add element mode after gen_vec_extract* calls.
12566         * config/mips/mips.md (unitmode): New mode iterator.
12567         * config/spu/spu.c (spu_expand_prologue, spu_allocate_stack,
12568         spu_builtin_extract): Add element mode after gen_vec_extract* calls.
12569         * config/spu/spu.md (inner_l): New mode attribute.
12570         (vec_init<mode>): Renamed to ...
12571         (vec_init<mode><inner_l>): ... this.
12572         (vec_extract<mode>): Renamed to ...
12573         (vec_extract<mode><inner_l>): ... this.
12574         * config/sparc/sparc.md (veltmode): New mode iterator.
12575         (vec_init<VMALL:mode>): Renamed to ...
12576         (vec_init<VMALL:mode><VMALL:veltmode>): ... this.
12577         * config/ia64/vect.md (vec_initv2si): Renamed to ...
12578         (vec_initv2sisi): ... this.
12579         (vec_initv2sf): Renamed to ...
12580         (vec_initv2sfsf): ... this.
12581         (vec_extractv2sf): Renamed to ...
12582         (vec_extractv2sfsf): ... this.
12583         * config/powerpcspe/vector.md (VEC_base_l): New mode attribute.
12584         (vec_init<mode>): Renamed to ...
12585         (vec_init<mode><VEC_base_l>): ... this.
12586         (vec_extract<mode>): Renamed to ...
12587         (vec_extract<mode><VEC_base_l>): ... this.
12588         * config/powerpcspe/paired.md (vec_initv2sf): Renamed to ...
12589         (vec_initv2sfsf): ... this.
12590         * config/powerpcspe/altivec.md (splitter, altivec_copysign_v4sf3,
12591         vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
12592         vec_unpacku_lo_v8hi, mulv16qi3): Add element mode after mode in
12593         gen_vec_init* calls.
12595 2017-08-01  Richard Biener  <rguenther@suse.de>
12597         PR tree-optimization/81297
12598         * tree-vrp.c (get_single_symbol): Remove assert, instead drop
12599         TREE_OVERFLOW from INTEGER_CSTs.
12601 2017-07-31  Segher Boessenkool  <segher@kernel.crashing.org>
12603         * config/rs6000/rs6000.c (enum rs6000_reg_type): Delete trailing comma.
12605 2017-07-31  Carl Love  <cel@us.ibm.com>
12607         * config/rs6000/rs6000-c: Add support for built-in functions
12608         vector signed char vec_xl_be (signed long long, signed char *);
12609         vector unsigned char vec_xl_be (signed long long, unsigned char *);
12610         vector signed int vec_xl_be (signed long long, signed int *);
12611         vector unsigned int vec_xl_be (signed long long, unsigned int *);
12612         vector signed long long vec_xl_be (signed long long, signed long long *);
12613         vector unsigned long long vec_xl_be (signed long long, unsigned long long *);
12614         vector signed short vec_xl_be (signed long long, signed short *);
12615         vector unsigned short vec_xl_be (signed long long, unsigned short *);
12616         vector double vec_xl_be (signed long long, double *);
12617         vector float vec_xl_be (signed long long, float *);
12618         * config/rs6000/altivec.h (vec_xl_be): Add #define.
12619         * config/rs6000/rs6000-builtin.def (XL_BE_V16QI, XL_BE_V8HI, XL_BE_V4SI)
12620         XL_BE_V2DI, XL_BE_V4SF, XL_BE_V2DF, XL_BE): Add definitions
12621         for the builtins.
12622         * config/rs6000/rs6000.c (altivec_expand_xl_be_builtin): Add function.
12623         (altivec_expand_builtin): Add switch statement to call
12624         altivec_expand_xl_be for each builtin.
12625         (altivec_init_builtins): Add def_builtin for _builtin_vsx_le_be_v8hi,
12626         __builtin_vsx_le_be_v4si, __builtin_vsx_le_be_v2di,
12627         __builtin_vsx_le_be_v4sf, __builtin_vsx_le_be_v2df,
12628         __builtin_vsx_le_be_v16qi.
12629         * doc/extend.texi: Update the built-in documentation file for the
12630         new built-in functions.
12632 2017-07-31  Uros Bizjak  <ubizjak@gmail.com>
12634         PR target/25967
12635         * config/i386/i386.c (ix86_allocate_stack_slots_for_args):
12636         New function.
12637         (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
12639 2017-07-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12641         * config.gcc: Add z14.
12642         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
12643         CPU model numbers for z13s and z14.
12644         * config/s390/s390-c.c (s390_resolve_overloaded_builtin): Replace
12645         arch12 with z14.
12646         * config/s390/s390-opts.h (enum processor_type): Rename
12647         PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
12648         * config/s390/s390.c (processor_table): Add field for CPU name to
12649         be passed to Binutils.
12650         (s390_asm_output_machine_for_arch): Use the new field in
12651         processor_table for Binutils.
12652         (s390_expand_builtin): Replace arch12 with z14.
12653         (s390_issue_rate): Rename PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
12654         (s390_get_sched_attrmask): Likewise.
12655         (s390_get_unit_mask): Likewise.
12656         * config/s390/s390.opt: Add z14 to processor_type enum.
12658 2017-07-31  Martin Jambor  <mjambor@suse.cz>
12660         PR hsa/81477
12661         * ipa-fnsummary.c (ipa_fn_summary_generate): Set versionable
12662         regardless of optimization level.
12664 2017-07-31  Jan Hubicka <hubicka@ucw.cz>
12665             Martin Liska  <mliska@suse.cz>
12667         * predict.def: Remove old comment and adjust probability.
12668         * gimplify.c (should_warn_for_implicit_fallthrough): Ignore
12669         PREDICT statements.
12671 2017-07-31  Uros Bizjak  <ubizjak@gmail.com>
12673         PR target/25967
12674         * config/i386/i386.c (ix86_function_naked): New function.
12675         (ix86_can_use_return_insn_p): Return false for naked functions.
12676         (ix86_expand_prologue): Skip prologue for naked functions.
12677         (ix86_expand_epilogue): Skip epilogue for naked functions
12678         and emit trap instruction.
12679         (ix86_warn_func_return): New function.
12680         (ix86_attribute_table): Add "naked" attribute specification.
12681         (TARGET_WARN_FUNC_RETURN): Define.
12682         * doc/extend.texi (x86 Function Attributes) <naked>: Document it.
12684 2017-07-31  Martin Liska  <mliska@suse.cz>
12686         * gimple-pretty-print.c (dump_gimple_label): Never dump BB info.
12687         (dump_gimple_bb_header): Always dump BB info.
12688         (pp_cfg_jump): Do not append info about BB when dumping a jump.
12690 2017-07-31  Martin Liska  <mliska@suse.cz>
12692         PR sanitize/81530
12693         * convert.c (convert_to_integer_1): Guard condition with flag_sanitize_p
12694         also with current_function_decl non-null equality.
12696 2017-07-31  Jakub Jelinek  <jakub@redhat.com>
12698         PR sanitizer/81604
12699         * ubsan.c (ubsan_type_descriptor): For UBSAN_PRINT_ARRAY don't
12700         change type to the element type, instead add eltype variable and
12701         use it where we are interested in the element type.
12703         PR tree-optimization/81603
12704         * ipa-polymorphic-call.c
12705         (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Perform
12706         offset arithmetic in offset_int, bail out if the resulting bit offset
12707         doesn't fit into shwi.
12709 2017-07-31  Martin Liska  <mliska@suse.cz>
12711         * gimplify.c (mostly_copy_tree_r): Remove Java specific hunk.
12712         (gimplify_save_expr): Fix comment.
12714 2017-07-30  H.J. Lu  <hongjiu.lu@intel.com>
12716         PR target/79793
12717         * config/i386/i386.c (ix86_function_arg): Update arguments for
12718         exception handler.
12719         (ix86_compute_frame_layout): Set the initial stack offset to
12720         INCOMING_FRAME_SP_OFFSET.  Update red-zone offset with
12721         INCOMING_FRAME_SP_OFFSET.
12722         (ix86_expand_epilogue): Don't pop the 'ERROR_CODE' off the
12723         stack before exception handler returns.
12724         * config/i386/i386.h (INCOMING_FRAME_SP_OFFSET): Add the
12725         the 'ERROR_CODE' for exception handler.
12727 2017-07-30  Uros Bizjak  <ubizjak@gmail.com>
12729         * config/i386/i386.h (ASM_PRINTF_EXTENSIONS): New macro.
12730         (ASM_OUTPUT_REG_PUSH): Rewrite with new operand modifiers.
12731         (ASM_OUTPUT_REG_POP): Ditto.
12732         * config/i386/i386.c (ix86_asm_output_function_label): Use fputs
12733         instead of asm_fprintf to output pure string.
12735 2017-07-29  Jakub Jelinek  <jakub@redhat.com>
12737         * debug.h (struct gcc_debug_hooks): Add IMPLICIT argument
12738         to imported_module_or_decl hook.
12739         (debug_nothing_tree_tree_tree_bool): Remove.
12740         (debug_nothing_tree_tree_tree_bool_bool): New declaration.
12741         * debug.c (do_nothing_debug_hooks): Use
12742         debug_nothing_tree_tree_tree_bool_bool instead of
12743         debug_nothing_tree_tree_tree_bool.
12744         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
12745         * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
12746         * sdbout.c (sdb_debug_hooks): Likewise.
12747         * dwarf2out.c (dwarf2_lineno_debug_hooks): Likewise.
12748         (gen_namespace_die): Add DW_AT_export_symbols attribute if
12749         langhook wants it.
12750         (dwarf2out_imported_module_or_decl): Add IMPLICIT argument,
12751         if true, -gdwarf-5 and decl will have DW_AT_export_symbols
12752         attribute, don't add anything.
12754 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
12756         * fold-const.c (fold_build1_stat_loc): Remove _stat from name.
12757         (fold_build2_stat_loc): Likewise.
12758         (fold_build3_stat_loc): Likewise.
12759         * fold-const.h (fold_build1, fold_build2, fold_build3): Adjust.
12760         (fold_build1_loc): Remove macro.
12761         (fold_build2_loc): Likewise.
12762         (fold_build3_loc): Likewise.
12764 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
12766         * gimple.c (gimple_build_debug_bind_stat): Remove _stat from name.
12767         (gimple_build_debug_bind_source_stat): Likewise.
12768         * gimple.h (gimple_build_debug_bind): Remove macro.
12769         (gimple_build_debug_bind_source): Likewise.
12771 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
12773         * bitmap.c (bitmap_alloc): Adjust.
12774         (bitmap_gc_alloc): Likewise.
12775         * bitmap.h (bitmap_initialize_stat): Remove _stat from name.
12777 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
12779         * bitmap.c (bitmap_obstack_alloc_stat): Rename to bitmap_alloc.
12780         (bitmap_gc_alloc_stat): Rename to bitmap_gc_alloc.
12781         * bitmap.h (bitmap_obstack_alloc_stat): Adjust prototype.
12782         (bitmap_gc_alloc_stat): Likewise.
12783         (BITMAP_ALLOC, BITMAP_GGC_ALLOC): Adjust.
12785 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
12787         * rtl.c (shallow_copy_rtx_stat): Remove _stat from name.
12788         * rtl.h (shallow_copy_rtx): Remove macro.
12790 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
12792         * emit-rtl.c (gen_raw_REG): Adjust.
12793         * gengenrtl.c (gendef): Likewise.
12794         * rtl.c (rtx_alloc_stat): Remove _stat from name.
12795         * rtl.h (rtx_alloc): Remove macro.
12797 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
12799         * tree.c (build_tree_list_vec_stat): Remove _stat from name.
12800         (build_tree_list_stat): Likewise.
12801         * tree.h (build_tree_list): Remove macro.
12802         (build_tree_list_vec): Likewise.
12804 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
12806         * tree.c (make_vector_stat): Remove _stat from name.
12807         (build_vector_stat): Likewise.
12808         * tree.h (make_vector_stat): Remove macro.
12809         (build_vector_stat): Likewise.
12811 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
12813         * tree.h (build_var_debug_value): Remove prototype.
12815 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
12817         * tree.c (tree_cons_stat): Remove _stat from name.
12818         * tree.h (tree_cons): Remove macro.
12820 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
12822         * tree.c (build_vl_exp_stat): Remove _stat from name.
12823         * tree.h (build_vl_exp): Remove macro.
12825 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
12827         * tree.c (build_decl_stat): Remove _stat from name.
12828         * tree.h (build_decl): Remove macro.
12830 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
12832         * gimple.c (gimple_build_with_ops_stat): Adjust.
12833         (gimple_alloc_stat): Remove _stat from name.
12834         * gimple.h (gimple_alloc): Remove macro.
12836 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
12838         * tree.c (make_tree_vec_stat): Remove _stat from name.
12839         (grow_tree_vec_stat): Likewise.
12840         * tree.h (make_tree_vec_stat): Adjust prototype.
12841         (grow_tree_vec_stat): Likewise.
12842         (make_tree_vec): Remove macro.
12843         (grow_tree_vec): Likewise.
12845 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
12847         * fold-const.c (fold_build1_stat_loc): Adjust.
12848         (fold_build2_stat_loc): Likewise.
12849         (fold_build3_stat_loc): Likewise.
12850         * tree.c (build0_stat): Remove _stat from name.
12851         (build1_stat): Likewise.
12852         (build2_stat): Likewise.
12853         (build3_stat): Likewise.
12854         (build4_stat): Likewise.
12855         (build5_stat): Likewise.
12856         * tree.h (build1_loc): Remove macro, and rename _stat function
12857         to this.
12858         (build2_loc): Likewise.
12859         (build3_loc): Likewise.
12860         (build4_loc): Likewise.
12861         (build5_loc): Likewise.
12863 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
12865         * tree.c (make_int_cst_stat): Remove _stat from name.
12866         * tree.h (make_int_cst_stat): Adjust prototype.
12867         (make_int_cst): Remove macro.
12869 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
12871         * tree.c (make_tre_binfo_stat): Remove _stat from name.
12872         * tree.h (make_tree_binfo_stat): Adjust prototype.
12873         (make_tree_binfo): Remove.
12875 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
12877         * tree.c (copy_node_stat): Rename to copy_node.
12878         (build_distinct_type_copy): Adjust.
12879         * tree.h (copy_node_stat): Adjust prototype.
12880         (copy_node): Remove macro.
12882 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
12884         * tree.c (make_node_stat): rename to make_node.
12885         (build_tree_list_stat): Adjust.
12886         (build0_stat): Likewise.
12887         (build2_stat): Likewise.
12888         (build3_stat): Likewise.
12889         (build4_stat): Likewise.
12890         (build5_stat): Likewise.
12891         (build_decl_stat): Likewise.
12892         * tree.h (make_node_stat): Adjust prototype.
12893         (make_node): remove macro.
12895 2017-07-28  Peter Bergner  <bergner@vnet.ibm.com>
12897         * config/rs6000/ppc-auxv.h (PPC_FEATURE2_DARN): New define.
12898         (PPC_FEATURE2_SCV): Likewise.
12899         * config/rs6000/rs6000.c (cpu_supports_info): Use them.
12901 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
12903         * config/aarch64/aarch64.c
12904         (aarch64_internal_mov_immediate): Add new special pattern.
12905         * config/aarch64/aarch64.md (*movdi_aarch64):
12906         Add reg/32bit const mov case.
12908 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
12909             Richard Sandiford <richard.sandiford@linaro.org>
12911         * config/aarch64/aarch64.md (mov<mode>): Generalize.
12912         (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
12913         Add integer and movi cases.
12914         (movi-split-hf-df-sf split, fp16): New.
12915         (enabled): Added TARGET_FP_F16INST.
12916         * config/aarch64/iterators.md (GPF_HF): New.
12917         * config/aarch64/predicates.md (aarch64_reg_or_fp_float): New.
12919 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
12921         * config/aarch64/aarch64.c
12922         (aarch64_simd_container_mode): Add prototype.
12923         (aarch64_expand_mov_immediate): Add HI support.
12924         (aarch64_reinterpret_float_as_int, aarch64_float_const_rtx_p: New.
12925         (aarch64_can_const_movi_rtx_p): New.
12926         (aarch64_preferred_reload_class):
12927         Remove restrictions of using FP registers for certain SIMD operations.
12928         (aarch64_rtx_costs): Added new cost for CONST_DOUBLE moves.
12929         (aarch64_valid_floating_const): Add integer move validation.
12930         (aarch64_simd_imm_scalar_p): Remove.
12931         (aarch64_output_scalar_simd_mov_immediate): Generalize function.
12932         (aarch64_legitimate_constant_p): Expand list of supported cases.
12933         * config/aarch64/aarch64-protos.h
12934         (aarch64_float_const_rtx_p, aarch64_can_const_movi_rtx_p): New.
12935         (aarch64_reinterpret_float_as_int): New.
12936         (aarch64_simd_imm_scalar_p): Remove.
12937         * config/aarch64/constraints.md (Uvi): New.
12938         (Dd): Split into Ds and new Dd.
12939         * config/aarch64/aarch64.md (*movsi_aarch64):
12940         Add SIMD mov case.
12941         (*movdi_aarch64): Add SIMD mov case.
12943 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
12945         * tree-predcom.c: (struct chain): Handle store-store chain in which
12946         stores for elimination only store loop invariant values.
12947         (execute_pred_commoning_chain): Ditto.
12948         (prepare_initializers_chain_store_elim): Ditto.
12949         (prepare_finalizers): Ditto.
12950         (is_inv_store_elimination_chain): New function.
12951         (initialize_root_vars_store_elim_1): New function.
12953 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
12955         * tree-predcom.c: Revise general description of the pass.
12956         (enum chain_type): New enum type for store elimination.
12957         (struct chain): New field supporting store elimination.
12958         (struct component): Ditto.
12959         (dump_chain): Dump store-stores chain.
12960         (release_chain): Release resources.
12961         (split_data_refs_to_components): Compute and create component
12962         contains only stores for elimination.
12963         (get_chain_last_ref_at): New function.
12964         (make_invariant_chain): Initialization.
12965         (make_rooted_chain): Specify chain type in parameter and record it.
12966         (add_looparound_copies): Skip for store-stores chain.
12967         (determine_roots_comp): Compute type of chain and pass it to
12968         make_rooted_chain.
12969         (initialize_root_vars_store_elim_2): New function.
12970         (finalize_eliminated_stores): New function.
12971         (remove_stmt): Handle store for elimination.
12972         (execute_pred_commoning_chain): Execute predictive commoning on
12973         store-store chains.
12974         (determine_unroll_factor): Skip unroll for store-stores chain.
12975         (prepare_initializers_chain_store_elim): New function.
12976         (prepare_initializers_chain): Hanlde store-store chain.
12977         (prepare_finalizers_chain, prepare_finalizers): New function.
12978         (tree_predictive_commoning_loop): Return integer value indicating
12979         if loop is unrolled or lcssa form is corrupted.
12980         (tree_predictive_commoning): Rewrite for lcssa form if necessary.
12982 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
12984         * tree-predcom.c (initialize_root): Delete.
12985         (execute_pred_commoning_chain): Initialize root vars and replace
12986         reference of non-combined chain directly, rather than call above
12987         function.
12989 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
12991         * tree-predcom.c (ref_at_iteration): Add parameter NITERS.  Compute
12992         memory reference to DR at (NITERS + ITERS)-th iteration of loop.
12994 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
12996         * tree-predcom.c (struct chain): New field init_seq.
12997         (release_chain): Release init_seq.
12998         (prepare_initializers_chain): Record intialization stmts in above
12999         field.
13000         (insert_init_seqs): New function.
13001         (tree_predictive_commoning_loop): Call insert_init_seqs.
13003 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
13005         * tree-predcom.c (determine_roots_comp): Skip trivial components.
13007 2017-07-28  Richard Biener  <rguenther@suse.de>
13009         * match.pd: Remove superfluous :c.
13010         * genmatch.c (simplify::id): Add member.
13011         (lower_commutative, lower_opt_convert, lower_cond, lower_for):
13012         Copy id.
13013         (current_id): New global.
13014         (dt_node::parent): Move from ...
13015         (dt_operand::parent): ... here.  Add for_id member.
13016         (is_a_helper <dt_operand *>::test): DT_TRUE is also a dt_operand.
13017         (decision_tree::find_node): Relax order requirement when
13018         merging DT_TRUE nodes to ones inbetween the current simplify
13019         and the one we try to merge with.  Add diagnostic whenever
13020         we need to enforce pattern order by not merging.
13021         (decision_tree::insert): Set current_id.
13022         (decision_tree::print_node): Dump parent node and for_id.
13023         (parser::last_id): Add member.
13024         (parser::push_simplify): Assign unique id.
13025         (parser::parser): Initialize last_id.
13027 2017-07-28  Martin Liska  <mliska@suse.cz>
13029         PR sanitizer/81340
13030         * sanopt.c (sanitize_rewrite_addressable_params): Set VALUE_EXPR after
13031         gimple_build_debug_bind.
13033 2017-07-28  Richard Biener  <rguenther@suse.de>
13035         PR tree-optimization/81502
13036         * match.pd: Add pattern combining BIT_INSERT_EXPR with
13037         BIT_FIELD_REF.
13038         * tree-cfg.c (verify_expr): Verify types of BIT_FIELD_REF
13039         size/pos operands.
13040         (verify_gimple_assign_ternary): Likewise for BIT_INSERT_EXPR pos.
13041         * gimple-fold.c (maybe_canonicalize_mem_ref_addr): Use bitsizetype
13042         for BIT_FIELD_REF args.
13043         * fold-const.c (make_bit_field_ref): Likewise.
13044         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
13046 2017-07-28  Jakub Jelinek  <jakub@redhat.com>
13048         PR sanitizer/80998
13049         * sanopt.c (pass_sanopt::execute): Handle IFN_UBSAN_PTR.
13050         * tree-ssa-alias.c (call_may_clobber_ref_p_1): Likewise.
13051         * flag-types.h (enum sanitize_code): Add SANITIZER_POINTER_OVERFLOW.
13052         Or it into SANITIZER_UNDEFINED.
13053         * ubsan.c: Include gimple-fold.h and varasm.h.
13054         (ubsan_expand_ptr_ifn): New function.
13055         (instrument_pointer_overflow): New function.
13056         (maybe_instrument_pointer_overflow): New function.
13057         (instrument_object_size): Formatting fix.
13058         (pass_ubsan::execute): Call instrument_pointer_overflow
13059         and maybe_instrument_pointer_overflow.
13060         * internal-fn.c (expand_UBSAN_PTR): New function.
13061         * ubsan.h (ubsan_expand_ptr_ifn): Declare.
13062         * sanitizer.def (__ubsan_handle_pointer_overflow,
13063         __ubsan_handle_pointer_overflow_abort): New builtins.
13064         * tree-ssa-tail-merge.c (merge_stmts_p): Handle IFN_UBSAN_PTR.
13065         * internal-fn.def (UBSAN_PTR): New internal function.
13066         * opts.c (sanitizer_opts): Add pointer-overflow.
13067         * lto-streamer-in.c (input_function): Handle IFN_UBSAN_PTR.
13068         * fold-const.c (build_range_check): Compute pointer range check in
13069         integral type if pointer arithmetics would be needed.  Formatting
13070         fixes.
13072 2017-07-28  Martin Liska  <mliska@suse.cz>
13074         PR sanitizer/81460
13075         * sanopt.c (sanitize_rewrite_addressable_params): Do not rewrite
13076         parameters that are of a variable-length.
13078 2017-07-28  Sebastian Huber  <sebastian.huber@embedded-brains.de>
13080         * config.gcc (powerpc-*-rtems*): Remove rs6000/eabi.h.  Add
13081         rs6000/biarch64.h.
13082         * config/rs6000/rtems.h (ASM_DECLARE_FUNCTION_SIZE): New macro.
13083         (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise.
13084         (CRT_CALL_STATIC_FUNCTION): Likewise.
13085         (ASM_DEFAULT_SPEC): New define.
13086         (ASM_SPEC32): Likewise.
13087         (ASM_SPEC64): Likewise.
13088         (ASM_SPEC_COMMON): Likewise.
13089         (ASM_SPEC): Likewise.
13090         (INVALID_64BIT): Likewise.
13091         (LINK_OS_DEFAULT_SPEC): Likewise.
13092         (LINK_OS_SPEC32): Likewise.
13093         (LINK_OS_SPEC64): Likewise.
13094         (POWERPC_LINUX): Likewise.
13095         (PTRDIFF_TYPE): Likewise.
13096         (RESTORE_FP_PREFIX): Likewise.
13097         (RESTORE_FP_SUFFIX): Likewise.
13098         (SAVE_FP_PREFIX): Likewise.
13099         (SAVE_FP_SUFFIX): Likewise.
13100         (SIZE_TYPE): Likewise.
13101         (SUBSUBTARGET_OVERRIDE_OPTIONS): Likewise.
13102         (TARGET_64BIT): Likewise.
13103         (TARGET_64BIT): Likewise.
13104         (TARGET_AIX): Likewise.
13105         (WCHAR_TYPE_SIZE): Likewise.
13106         (WCHAR_TYPE): Undefine.
13107         (TARGET_OS_CPP_BUILTINS): Add 64-bit PowerPC defines.
13108         (CPP_OS_DEFAULT_SPEC): Use previous CPP_OS_RTEMS_SPEC.
13109         (CPP_OS_RTEMS_SPEC): Delete.
13110         (SUBSUBTARGET_EXTRA_SPECS): Remove cpp_os_rtems.  Add
13111         asm_spec_common, asm_spec32, asm_spec64, link_os_spec32, and
13112         link_os_spec64.
13113         * config/rs6000/t-rtems: Add mcpu=e6500/m64 multilibs.
13115 2017-07-28  Jakub Jelinek  <jakub@redhat.com>
13117         PR tree-optimization/81578
13118         * tree-parloops.c (build_new_reduction): Bail out if
13119         reduction_code isn't one of the standard OpenMP reductions.
13120         Move the details printing after that decision.
13122 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
13124         * config/rs6000/predicates.md (volatile_mem_operand): Remove code
13125         related to reload_in_progress.
13126         (splat_input_operand): Likewise.
13127         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_rtx):
13128         Delete prototype.
13129         * config/rs6000/rs6000.c (machine_function): Remove sdmode_stack_slot
13130         field.
13131         (TARGET_EXPAND_TO_RTL_HOOK): Delete.
13132         (TARGET_INSTANTIATE_DECLS): Likewise.
13133         (legitimate_indexed_address_p): Delete reload_in_progress code.
13134         (rs6000_debug_legitimate_address_p): Likewise.
13135         (rs6000_eliminate_indexed_memrefs): Likewise.
13136         (rs6000_emit_le_vsx_store): Likewise.
13137         (rs6000_emit_move_si_sf_subreg): Likewise.
13138         (rs6000_emit_move): Likewise.
13139         (register_to_reg_type): Likewise.
13140         (rs6000_pre_atomic_barrier): Likewise.
13141         (rs6000_machopic_legitimize_pic_address): Likewise.
13142         (rs6000_allocate_stack_temp): Likewise.
13143         (rs6000_address_for_fpconvert): Likewise.
13144         (rs6000_address_for_altivec): Likewise.
13145         (rs6000_secondary_memory_needed_rtx): Delete function.
13146         (rs6000_check_sdmode): Likewise.
13147         (rs6000_alloc_sdmode_stack_slot): Likewise.
13148         (rs6000_instantiate_decls): Likewise.
13149         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_RTX): Delete.
13150         * config/rs6000/rs6000.md (splitter for *movsi_got_internal):
13151         Delete reload_in_progress.
13152         (*vec_reload_and_plus_<mptrsize>): Likewise.
13153         * config/rs6000/vsx.md (vsx_mul_v2di): Likewise.
13154         (vsx_div_v2di): Likewise.
13155         (vsx_udiv_v2di): Likewise.
13157 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
13159         * config/rs6000/rs6000.opt (mlra): Replace with stub.
13160         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete OPTION_MASK_LRA.
13161         * config/rs6000/rs6000.c (TARGET_LRA_P): Delete.
13162         (rs6000_debug_reg_global): Delete print of LRA status.
13163         (rs6000_option_override_internal): Delete dead LRA related code.
13164         (rs6000_lra_p): Delete function.
13165         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mlra.
13167 2017-07-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
13169         * config.gcc (riscv*-*-elf*): Add (riscv*-*-rtems*).
13170         * config/riscv/rtems.h: New file.
13172 2017-07-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13173             Sudakshina Das  <sudi.das@arm.com>
13175         * config/aarch64/aarch64.md
13176         (define_split for and<mode>3nr_compare): Move
13177         non aarch64_logical_operand to a register.
13178         (define_split for and_<SHIFT:optab><mode>3nr_compare0): Move non
13179         register immediate operand to a register.
13180         * config/aarch64/predicates.md (aarch64_mov_imm_operand): New.
13182 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
13184         PR middle-end/81564
13185         * tree-cfg.c (group_case_labels_stmt): Handle already deleted blocks.
13187 2017-07-27  Richard Biener  <rguenther@suse.de>
13189         PR tree-optimization/81573
13190         PR tree-optimization/81494
13191         * tree-vect-loop.c (vect_create_epilog_for_reduction): Handle
13192         multi defuse cycle case.
13194 2017-07-27  Richard Biener  <rguenther@suse.de>
13196         PR tree-optimization/81571
13197         * tree-vect-slp.c (vect_build_slp_tree): Properly verify reduction
13198         PHIs.
13200 2017-07-27  Eric Botcazou  <ebotcazou@adacore.com>
13202         * config/sparc/sparc.c (sparc_option_override): Set MASK_FSMULD flag
13203         earlier and only if MASK_FPU is set.  Adjust formatting.
13205 2017-07-27  Martin Liska  <mliska@suse.cz>
13207         * opt-functions.awk: Add validation of value of Init.
13208         * optc-gen.awk: Pass new argument.
13210 2017-07-27  Martin Liska  <mliska@suse.cz>
13212         * auto-profile.c (autofdo_source_profile::update_inlined_ind_target):
13213         Fix wrong condition.
13215 2017-07-27  Martin Liska  <mliska@suse.cz>
13217         * auto-profile.c (afdo_annotate_cfg): Assign zero counts to
13218         BBs and edges seen by autoFDO.
13220 2017-07-27  Richard Biener  <rguenther@suse.de>
13222         PR tree-optimization/81502
13223         * tree-ssa.c (non_rewritable_lvalue_p): Handle BIT_INSERT_EXPR
13224         with incompatible but same sized type.
13225         (execute_update_addresses_taken): Likewise.
13227 2017-07-27  James Greenhalgh  <james.greenhalgh@arm.com>
13229         * tree-ssa-loop-ch.c (pass_ch::process_loop_p): Guard on
13230         flag_tree_loop_vectorize rather than flag_tree_vectorize.
13232 2017-07-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13234         PR target/81534
13235         * config/s390/s390.md ("*atomic_compare_and_swap<mode>_1")
13236         ("*atomic_compare_and_swapdi_2", "*atomic_compare_and_swapsi_3"):
13237         Change s_operand to memory_operand.
13239 2017-07-27  Richard Sandiford  <richard.sandiford@linaro.org>
13241         * config/rs6000/rs6000-protos.h (rs6000_emit_le_vsx_permute): Declare.
13242         * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Replace with...
13243         (rs6000_emit_le_vsx_permute): ...this.  Take the destination as input.
13244         Emit instructions rather than returning an expression.  Handle TFmode
13245         and KFmode by casting to TImode.
13246         (rs6000_emit_le_vsx_load): Update to use rs6000_emit_le_vsx_permute.
13247         (rs6000_emit_le_vsx_store): Likewise.
13248         * config/rs6000/vsx.md (VSX_TI): New iterator.
13249         (*vsx_le_permute_<mode>): Use it instead of VSX_LE_128.
13250         (*vsx_le_undo_permute_<mode>): Likewise.
13251         (*vsx_le_perm_load_<mode>): Use rs6000_emit_le_vsx_permute to
13252         emit the split sequence.
13253         (*vsx_le_perm_store_<mode>): Likewise.
13255 2017-07-27  Jakub Jelinek  <jakub@redhat.com>
13257         PR tree-optimization/81555
13258         PR tree-optimization/81556
13259         * tree-ssa-reassoc.c (rewrite_expr_tree): Add NEXT_CHANGED argument,
13260         if true, force CHANGED for the recursive invocation.
13261         (reassociate_bb): Remember original length of ops array, pass
13262         len != orig_len as NEXT_CHANGED in rewrite_expr_tree call.
13264         * attribs.c (decl_attributes): Imply noinline, noclone and no_icf
13265         attributes for noipa attribute.  For naked attribute use
13266         lookup_attribute first before lookup_attribute_spec.
13267         * final.c (rest_of_handle_final): Disable IPA RA for functions with
13268         noipa attribute.
13269         * ipa-visibility.c (non_local_p): Fix comment typos.  Return true
13270         for functions with noipa attribute.
13271         (cgraph_externally_visible_p): Return true for functions with noipa
13272         attribute.
13273         * cgraph.c (cgraph_node::get_availability): Return AVAIL_INTERPOSABLE
13274         for functions with noipa attribute.
13275         * doc/extend.texi: Document noipa function attribute.
13276         * tree-ssa-structalias.c (refered_from_nonlocal_fn): Set *nonlocal_p
13277         also for functions with noipa attribute.
13278         (ipa_pta_execute): Set nonlocal_p also for nodes with noipa attribute.
13280 2017-07-26  Andrew Pinski  <apinski@cavium.com>
13282         * config/aarch64/aarch64.c (thunderx_vector_cost): Decrease cost of
13283         vec_unalign_load_cost and vec_unalign_store_cost.
13285 2017-07-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
13287         * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Delete
13288         -mvsx-small-integer option.
13289         (ISA_3_0_MASKS_IEEE): Likewise.
13290         (OTHER_VSX_VECTOR_MASKS): Likewise.
13291         (POWERPC_MASKS): Likewise.
13292         * config/rs6000/rs6000.opt (-mvsx-small-integer): Likewise.
13293         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Simplify
13294         code, only testing for DImode being allowed in non-VSX floating
13295         point registers.
13296         (rs6000_init_hard_regno_mode_ok): Change TARGET_VSX_SMALL_INTEGER
13297         to TARGET_P8_VECTOR test.  Remove redundant VSX test inside of
13298         another VSX test.
13299         (rs6000_option_override_internal): Delete -mvsx-small-integer.
13300         (rs6000_expand_vector_set): Change TARGET_VSX_SMALL_INTEGER to
13301         TARGET_P8_VECTOR test.
13302         (rs6000_secondary_reload_simple_move): Likewise.
13303         (rs6000_preferred_reload_class): Delete TARGET_VSX_SMALL_INTEGER,
13304         since TARGET_P9_VECTOR was already tested.
13305         (rs6000_opt_masks): Remove -mvsx-small-integer.
13306         * config/rs6000/vsx.md (vsx_extract_<mode>): Delete
13307         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
13308         used.
13309         (vsx_extract_<mode>_p9): Delete TARGET_VSX_SMALL_INTEGER, since a
13310         test for TARGET_VEXTRACTUB was used, and that uses
13311         TARGET_P9_VECTOR.
13312         (p9 extract splitter): Likewise.
13313         (vsx_extract_<mode>_di_p9): Likewise.
13314         (vsx_extract_<mode>_store_p9): Likewise.
13315         (vsx_extract_si): Delete TARGET_VSX_SMALL_INTEGER, since a test
13316         for TARGET_P9_VECTOR was used.  Delete code that is now dead with
13317         the elimination of TARGET_VSX_SMALL_INTEGER.
13318         (vsx_extract_<mode>_p8): Likewise.
13319         (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_fl_<FL_CONV:mode>): Likewise.
13320         (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_ufl_<FL_CONV:mode>): Likewise.
13321         (vsx_set_<mode>_p9): Likewise.
13322         (vsx_set_v4sf_p9): Likewise.
13323         (vsx_set_v4sf_p9_zero): Likewise.
13324         (vsx_insert_extract_v4sf_p9): Likewise.
13325         (vsx_insert_extract_v4sf_p9_2): Likewise.
13326         * config/rs6000/rs6000.md (sign extend splitter): Change
13327         TARGET_VSX_SMALL_INTEGER to TARGET_P8_VECTOR test.
13328         (floatsi<mode>2_lfiwax_mem): Likewise.
13329         (floatunssi<mode>2_lfiwzx_mem): Likewise.
13330         (float<QHI:mode><FP_ISA3:mode>2): Delete TARGET_VSX_SMALL_INTEGER,
13331         since a test for TARGET_P9_VECTOR was used.
13332         (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
13333         (floatuns<QHI:mode><FP_ISA3:mode>2): Likewise.
13334         (floatuns<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
13335         (fix_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to
13336         TARGET_P8_VECTOR test.
13337         (fix_trunc<mode>si2_stfiwx): Likewise.
13338         (fix_trunc<mode>si2_internal): Likewise.
13339         (fix_trunc<SFDF:mode><QHI:mode>2): Delete
13340         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
13341         used.
13342         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
13343         (fixuns_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to
13344         TARGET_P8_VECTOR test.
13345         (fixuns_trunc<mode>si2_stfiwx): Likewise.
13346         (fixuns_trunc<SFDF:mode><QHI:mode>2): Delete
13347         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
13348         used.
13349         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
13350         (fctiw<u>z_<mode>_smallint): Delete TARGET_VSX_SMALL_INTEGER,
13351         since a test for TARGET_P9_VECTOR was used.
13352         (splitter for loading small constants): Likewise.
13354 2017-07-26  Andrew Pinski  <apinski@cavium.com>
13356         * config/aarch64/aarch64.c (thunderx_vector_cost): Fix
13357         vec_fp_stmt_cost.
13359 2017-07-26  H.J. Lu  <hongjiu.lu@intel.com>
13361         PR target/81563
13362         * config/i386/i386.c (sp_valid_at): Properly check CFA offset.
13363         (fp_valid_at): Likewise.
13365 2017-07-26  James Greenhalgh  <james.greenhalgh@arm.com>
13367         * config/aarch64/aarch64.c (cortexa57_addrcost_table): Remove.
13368         (qdf24xx_addrcost_table): Likewise.
13369         (cortexa57_tunings): Update to use generic_branch_cost.
13370         (cortexa72_tunings): Likewise.
13371         (cortexa73_tunings): Likewise.
13372         (qdf24xx_tunings): Likewise.
13374 2017-07-26  James Greenhalgh  <james.greenhalgh@arm.com>
13376         * config/aarch64/aarch64.c (cortexa57_branch_cost): Remove.
13377         (thunderx2t99_branch_cost): Likewise.
13378         (cortexa35_tunings): Update to use generic_branch_cost.
13379         (cortexa53_tunings): Likewise.
13380         (cortexa57_tunings): Likewise.
13381         (cortexa72_tunings): Likewise.
13382         (cortexa73_tunings): Likewise.
13383         (thunderx2t99_tunings): Likewise.
13385 2017-07-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
13387         * config/sparc/sparc.c (dump_target_flag_bits): Dump MASK_FSMULD.
13388         (sparc_option_override): Honour MASK_FSMULD.
13389         * config/sparc/sparc.h (MASK_FEATURES): Add MASK_FSMULD.
13390         * config/sparc/sparc.md (muldf3_extend): Use TARGET_FSMULD.
13391         * config/sparc/sparc.opt (mfsmuld): New option.
13392         * doc/invoke.texi (mfsmuld): Document option.
13394 2017-07-26  Marek Polacek  <polacek@redhat.com>
13396         PR middle-end/70992
13397         * tree.c (build2_stat): Don't set TREE_CONSTANT on divisions by zero.
13399 2017-07-26  Richard Biener  <rguenther@suse.de>
13401         * gimple-match-head.c (do_valueize): Return OP if valueize
13402         returns NULL_TREE.
13403         (get_def): New helper to get at the def stmt of a SSA name
13404         if valueize allows.
13405         * genmatch.c (dt_node::gen_kids_1): Use get_def instead of
13406         do_valueize to get at the def stmt.
13407         (dt_operand::gen_gimple_expr): Simplify do_valueize calls.
13409 2017-07-26  Wilco Dijkstra  <wdijkstr@arm.com>
13411         PR middle-end/46932
13412         * auto-inc-dec.c (parse_add_or_inc): Block autoinc on sfp.
13414 2017-07-26  Martin Liska  <mliska@suse.cz>
13416         PR sanitize/81186
13417         * function.c (expand_function_start): Make expansion of
13418         nonlocal_goto_save_area after parm_birth_insn.
13420 2017-07-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
13422         * config/sparc/sparc.c (sparc_option_override): Remove MASK_FPU
13423         from all CPU target flags enable members.
13425 2017-07-26  Richard Biener  <rguenther@suse.de>
13427         * genmatch.c (dt_simplify::gen): Make iterator vars const.
13428         (decision_tree::gen): Make 'type' const.
13429         (write_predicate): Likewise.
13431 2017-07-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
13433         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok):
13434         Eliminate TARGET_UPPER_REGS_{DF,DI,SF} usage.
13435         (rs6000_option_override_internal): Likewise.
13436         (rs6000_expand_vector_set): Likewise.
13437         * config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Delete.
13438         (TARGET_UPPER_REGS_SF): Likewise.
13439         (TARGET_UPPER_REGS_DI): Likewise.
13440         (TARGET_VEXTRACTUB): Eliminate TARGET_UPPER_REGS_{DF,DI,SF}.
13441         (TARGET_DIRECT_MOVE_64BIT): Likewise.
13442         * config/rs6000/rs6000.md (ALTIVEC_DFORM): Likewise.
13443         (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
13444         (Splitters for DI constants in Altivec registers): Likewise.
13445         * config/rs6000/vsx.md (vsx_set_<mode>_p9): Likewise.
13446         (vsx_set_v4sf_p9): Likewise.
13447         (vsx_set_v4sf_p9_zero): Likewise.
13448         (vsx_insert_extract_v4sf_p9): Likewise.
13449         (vsx_insert_extract_v4sf_p9_2): Likewise.
13451 2017-07-25  Carl Love  <cel@us.ibm.com>
13453         * doc/extend.texi: Update the built-in documentation file for the
13454         existing built-in functions
13455         vector signed char vec_cnttz (vector signed char);
13456         vector unsigned char vec_cnttz (vector unsigned char);
13457         vector signed short vec_cnttz (vector signed short);
13458         vector unsigned short vec_cnttz (vector unsigned short);
13459         vector signed int vec_cnttz (vector signed int);
13460         vector unsigned int vec_cnttz (vector unsigned int);
13461         vector signed long long vec_cnttz (vector signed long long);
13462         vector unsigned long long vec_cnttz (vector unsigned long long);
13464 2017-07-25  Andrew Pinski  <apinski@cavium.com>
13466         * tree-ssa-uninit.c (warn_uninitialized_vars): Don't warn about memory
13467         accesses where the use is for the first operand of a BIT_INSERT.
13469 2017-07-25  Jim Wilson  <jim.wilson@linaro.org>
13471         PR bootstrap/81521
13472         * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
13473         for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
13475 2017-07-25  Jim Wilson  <jim.wilson@linaro.org>
13477         * config/i386/gstabs.h: Delete.
13478         * config/i386/openbsd.h, config/i386/t-openbsd: Likewise.
13480 2017-07-25  Uros Bizjak  <ubizjak@gmail.com>
13482         * config/i386/i386.c (ix86_decompose_address): Do not check for
13483         register RTX when looking at index_reg or base_reg.
13484         * config/i386/i386.h (INCOMING_RETURN_ADDR_RTX): Use stack_pointer_rtx.
13486 2017-07-25  Eric Botcazou  <ebotcazou@adacore.com>
13488         * gimple.c (gimple_assign_set_rhs_with_ops): Do not ask gsi_replace
13489         to update EH info here.
13491 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
13493         * match.pd ((X * CST1) * CST2): Simplify to X * (CST1 * CST2).
13495 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
13497         * match.pd ((X * CST) * Y): Reassociate to (X * Y) * CST.
13499 2017-07-25  Torsten Duwe  <duwe@suse.de>
13501         * common.opt: Introduce -fpatchable-function-entry
13502         command line option, and its variables function_entry_patch_area_size
13503         and function_entry_patch_area_start.
13504         * opts.c (common_handle_option): Add -fpatchable_function_entry_ case,
13505         including a two-value parser.
13506         * target.def (print_patchable_function_entry): New target hook.
13507         * targhooks.h (default_print_patchable_function_entry): New function.
13508         * targhooks.c (default_print_patchable_function_entry): Likewise.
13509         * toplev.c (process_options): Switch off IPA-RA if
13510         patchable function entries are being generated.
13511         * varasm.c (assemble_start_function): Look at the
13512         patchable-function-entry command line switch and current
13513         function attributes and maybe generate NOP instructions by
13514         calling the print_patchable_function_entry hook.
13515         * doc/extend.texi: Document patchable_function_entry attribute.
13516         * doc/invoke.texi: Document -fpatchable_function_entry
13517         command line option.
13518         * doc/tm.texi.in (TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY):
13519         New target hook.
13520         * doc/tm.texi: Re-generate.
13522 2017-07-25  Jakub Jelinek  <jakub@redhat.com>
13524         PR target/81532
13525         * config/i386/constraints.md (Yd, Ye): Use ALL_SSE_REGS for
13526         TARGET_AVX512DQ rather than TARGET_AVX512BW.
13528 2017-07-25  Tamar Christina  <tamar.christina@arm.com>
13530         * config/arm/parsecpu.awk (all_cores): Remove duplicates.
13532 2017-07-25  Richard Biener  <rguenther@suse.de>
13534         PR tree-optimization/81455
13535         * tree-ssa-loop-unswitch.c (find_loop_guard): Make sure to
13536         not walk in cycles when looking for guards.
13538 2017-07-25  Richard Biener  <rguenther@suse.de>
13540         PR tree-optimization/81529
13541         * tree-vect-stmts.c (process_use): Disregard live induction PHIs
13542         when optimizing backedge uses.
13544 2017-07-25  David Edelsohn  <dje.gcc@gmail.com>
13546         * dwarf2asm.c (dw2_asm_output_nstring): Encode double quote
13547         character for AIX.
13548         * dwarf2out.c (output_macinfo): Copy debug_line_section_label
13549         to dl_section_ref.  On AIX, append an expression to subtract
13550         the size of the section length to dl_section_ref.
13552 2017-07-25  Segher Boessenkool  <segher@kernel.crashing.org>
13554         * configure.ac: If any of the config.* scripts fail, exit 1.
13555         * configure: Regenerate.
13557 2017-07-25  Richard Biener  <rguenther@suse.de>
13559         PR middle-end/81546
13560         * tree-ssa-operands.c (verify_imm_links): Remove cap on number
13561         of immediate uses, be more verbose on errors.
13563 2017-07-25  Richard Biener  <rguenther@suse.de>
13565         PR tree-optimization/81510
13566         * tree-vect-loop.c (vect_is_simple_reduction): When the
13567         reduction stmt is not inside the loop bail out.
13569 2017-07-25  Richard Biener  <rguenther@suse.de>
13571         PR tree-optimization/81303
13572         * tree-vect-loop-manip.c (vect_loop_versioning): Build
13573         profitability check against LOOP_VINFO_NITERSM1.
13575 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
13577         * domwalk.c (cmp_bb_postorder): Simplify.
13578         (sort_bbs_postorder): New function.  Use it...
13579         (dom_walker::walk): ...here to optimize common cases.
13581 2017-07-25  Martin Liska  <mliska@suse.cz>
13583         PR ipa/81520
13584         * ipa-visibility.c (function_and_variable_visibility): Make the
13585         redirection just on target that supports aliasing.
13586         Fix GNU coding style.
13588 2017-07-25  Sebastian Huber  <sebastian.huber@embedded-brains.de>
13590         PR libgcc/61152
13591         * config/aarch64/rtems.h: Add GCC Runtime Library Exception.
13592         Format changes.
13593         * config/arm/rtems.h: Likewise.
13594         * config/bfin/rtems.h: Likewise.
13595         * config/i386/rtemself.h: Likewise.
13596         * config/lm32/rtems.h: Likewise.
13597         * config/m32c/rtems.h: Likewise.
13598         * config/m68k/rtemself.h: Likewise.
13599         * config/microblaze/rtems.h: Likewise.
13600         * config/mips/rtems.h: Likewise.
13601         * config/moxie/rtems.h: Likewise.
13602         * config/nios2/rtems.h: Likewise.
13603         * config/powerpcspe/rtems.h: Likewise.
13604         * config/rs6000/rtems.h: Likewise.
13605         * config/rtems.h: Likewise.
13606         * config/sh/rtems.h: Likewise.
13607         * config/sh/rtemself.h: Likewise.
13608         * config/sparc/rtemself.h: Likewise.
13610 2017-07-25  Georg-Johann Lay  <avr@gjlay.de>
13612         PR 81487
13613         * hsa-brig.c (brig_init): Use xasprintf instead of asprintf.
13614         * gimple-pretty-print.c (dump_profile, dump_probability): Same.
13615         * tree-ssa-structalias.c (alias_get_name): Same.
13617 2017-07-25  Bin Cheng  <bin.cheng@arm.com>
13619         PR target/81414
13620         * config/aarch64/cortex-a57-fma-steering.c (analyze): Skip fmul/fmac
13621         instructions if no du chain is found.
13623 2017-07-25  Georg-Johann Lay  <avr@gjlay.de>
13625         * config/avr/avr-log.c (avr_log_vadump) ['T']: Print NULL-TREE.
13627 2017-07-25  Richard Biener  <rguenther@suse.de>
13629         PR middle-end/81505
13630         * fold-const.c (fold_negate_const): TREE_OVERFLOW should be
13631         sticky.
13633 2017-07-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
13635         * config/rs6000/rs6000-cpus.def (ISA_2_6_MASKS_SERVER): Delete
13636         upper-regs options.
13637         (ISA_2_7_MASKS_SERVER): Likewise.
13638         (ISA_3_0_MASKS_IEEE): Likewise.
13639         (OTHER_P8_VECTOR_MASKS): Likewise.
13640         (OTHER_VSX_VECTOR_MASKS): Likewise.
13641         (POWERPC_MASKS): Likewise.
13642         (power7 cpu): Use ISA_2_6_MASKS_SERVER instead of using a
13643         duplicate list of options.
13644         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove
13645         explicit -mupper-regs options.
13646         * config/rs6000/rs6000.opt (-mvsx-scalar-memory): Delete
13647         -mupper-regs* options.  Delete -mvsx-scalar-memory, which was an
13648         alias for -mupper-regs-df.
13649         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
13650         (rs6000_init_hard_regno_mode_ok): Likewise.
13651         (rs6000_option_override_internal): Likewise.
13652         (rs6000_opt_masks): Likewise.
13653         * config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Define upper regs
13654         options in terms of whether -mvsx or -mpower8-vector was used.
13655         (TARGET_UPPER_REGS_DI): Likewise.
13656         (TARGET_UPPER_REGS_SF): Likewise.
13657         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete the
13658         -mupper-regs-* options.
13660 2017-07-24  Segher Boessenkool  <segher@kernel.crashing.org>
13662         * passes.c (emergency_dump_function): Print some empty lines and a
13663         header before the RTL dump.
13665 2017-07-24  Segher Boessenkool  <segher@kernel.crashing.org>
13667         * cfgrtl.c (rtl_dump_bb): Don't call NEXT_INSN on NULL.
13669 2017-07-24  Wilco Dijkstra  <wdijkstr@arm.com>
13671         PR target/79041
13672         * config/aarch64/aarch64.c (aarch64_classify_symbol):
13673         Avoid SYMBOL_SMALL_ABSOLUTE for literals with pc-relative literals.
13675 2017-07-24  Carl Love  <cel@us.ibm.com>
13677         * config/rs6000/rs6000-c.c: Add support for built-in functions
13678         vector float vec_extract_fp32_from_shorth (vector unsigned short);
13679         vector float vec_extract_fp32_from_shortl (vector unsigned short);
13680         * config/rs6000/altivec.h (vec_extract_fp_from_shorth,
13681         vec_extract_fp_from_shortl): Add defines for the two builtins.
13682         * config/rs6000/rs6000-builtin.def (VEXTRACT_FP_FROM_SHORTH,
13683         VEXTRACT_FP_FROM_SHORTL): Add BU_P9V_OVERLOAD_1 and BU_P9V_VSX_1
13684         new builtins.
13685         * config/rs6000/vsx.md vsx_xvcvhpsp): Add define_insn.
13686         (vextract_fp_from_shorth, vextract_fp_from_shortl): Add define_expands.
13687         * doc/extend.texi: Update the built-in documentation file for the
13688         new built-in function.
13690 2017-07-24  Jakub Jelinek  <jakub@redhat.com>
13692         PR bootstrap/81521
13693         * tree.def: Remove TYPE_METHODS documentation, adjust TYPE_FIELDS
13694         documentation.
13695         * doc/generic.texi: Likewise.
13696         * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
13697         for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
13699 2017-07-24  Jackson Woodruff  <jackson.woodruff@arm.com>
13701         * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): New.
13702         (aarch64_mls_elt_merge<mode>): Likewise.
13704 2017-07-23  Krister Walfridsson  <krister.walfridsson@gmail.com>
13706         * config.gcc (*-*-netbsd*): Remove check for NetBSD versions not
13707         having __cxa_atexit.
13709 2017-07-23  Michael Collison  <michael.collison@arm.com>
13711         * config/arm/arm.c (arm_option_override): Deprecate
13712         use of -mstructure-size-boundary.
13713         * config/arm/arm.opt: Deprecate -mstructure-size-boundary.
13714         * doc/invoke.texi: Deprecate -mstructure-size-boundary.
13716 2017-07-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13718         PR target/80695
13719         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
13720         Reduce cost estimate for direct moves.
13722 2017-07-23  Uros Bizjak  <ubizjak@gmail.com>
13724         PR target/80569
13725         * config/i386/i386.c (ix86_option_override_internal): Disable
13726         BMI, BMI2 and TBM instructions for -m16.
13728 2017-07-21  Carl Love  <cel@us.ibm.com>
13730         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
13731         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
13732         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
13733         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
13734         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
13735         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
13736         VMULOSW): New enum "unspec" values.
13737         (altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
13738         altivec_vmulosw): New patterns.
13739         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
13740         VMULOSW): Add definitions.
13742 2017-07-21  Jim Wilson  <jim.wilson@linaro.org>
13744         * config/aarch64/aarch64-cores.def (falkor): Add AARCH64_FL_RDMA.
13745         (qdf24xx): Likewise.
13746         * config/aarch64/aarch64-options-extensions.def (rdma); New.
13747         * config/aarch64/aarch64.h (AARCH64_FL_RDMA): New.
13748         (AARCH64_FL_V8_1): Renumber.
13749         (AARCH64_FL_FOR_ARCH8_1): Add AARCH64_FL_RDMA.
13750         (AARCH64_ISA_RDMA): Use AARCH64_FL_RDMA.
13751         * config/aarch64/arm_neon.h: Use +rdma instead of arch=armv8.1-a.
13752         * doc/invoke.texi (AArch64 Options): Mention +rmda in -march docs.  Add
13753         rdma to feature modifiers list.
13755 2017-07-21  Yury Gribov  <tetra2005@gmail.com>
13757         PR middle-end/56727
13758         * ipa-visibility (function_and_variable_visibility): Convert
13759         recursive PLT call to direct call if appropriate.
13761 2017-07-21  Andrew Pinski  <apinski@cavium.com>
13763         * tree-ssa-sccvn.c (vn_nary_op_eq): Check BIT_INSERT_EXPR's
13764         operand 1 to see if the types precision matches.
13765         * fold-const.c (operand_equal_p): Likewise.
13767 2017-07-21  Richard Biener  <rguenther@suse.de>
13769         PR tree-optimization/81303
13770         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Pass
13771         in datarefs vector.  Allow NULL dr0 for no peeling cost estimate.
13772         (vect_peeling_hash_get_lowest_cost): Adjust.
13773         (vect_enhance_data_refs_alignment): Likewise.  Use
13774         vect_get_peeling_costs_all_drs to compute the penalty for no
13775         peeling to match up costs.
13777 2017-07-21  Richard Biener  <rguenther@suse.de>
13779         PR tree-optimization/81500
13780         * tree-vect-loop.c (vect_is_simple_reduction): Properly fail if
13781         we didn't identify a reduction path.
13783 2017-07-21  Tom de Vries  <tom@codesourcery.com>
13784             Cesar Philippidis  <cesar@codesourcery.com>
13786         PR gcov-profile/81442
13787         * config/nvptx/nvptx.c (nvptx_goacc_reduction_init): Add missing edge
13788         probabilities.
13790 2017-07-21  Tom de Vries  <tom@codesourcery.com>
13792         PR lto/81430
13793         * config/nvptx/nvptx.c (nvptx_override_options_after_change): New
13794         function.
13795         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define to
13796         nvptx_override_options_after_change.
13798 2017-07-21  Ulrich Drepper  <drepper@redhat.com>
13800         * dwarf2out.c (output_file_names): Avoid double testing for
13801         dwarf_version >= 5.
13803 2017-07-21  Georg-Johann Lay  <avr@gjlay.de>
13805         * doc/invoke.texi (AVR Built-in Functions): Re-layout section.
13807 2016-07-21  Jan Hubicka  <hubicka@ucw.cz>
13809         * cfgcleanup.c (flow_find_cross_jump): Do not crossjump across
13810         hot/cold regions.
13811         (try_crossjump_to_edge): Do not punt on partitioned functions.
13813 2016-07-21  Jan Hubicka  <hubicka@ucw.cz>
13815         * bb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges):
13816         Put all BBs reachable only via paths crossing cold region to cold
13817         region.
13818         * cfgrtl.c (find_bbs_reachable_by_hot_paths): New function.
13820 2016-07-21  Richard Biener  <rguenther@suse.de>
13822         PR tree-optimization/81303
13823         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Take
13824         into account prologue and epilogue iterations when raising
13825         min_profitable_iters to sth at least covering one vector iteration.
13827 2017-07-21  Tamar Christina  <tamar.christina@arm.com>
13829         * config/arm/arm.c (arm_test_cpu_arch_dat):
13830         Check for overlap.
13832 2017-07-20  Nathan Sidwell  <nathan@acm.org>
13834         Remove TYPE_METHODS.
13835         * tree.h (TYPE_METHODS): Delete.
13836         * dwarf2out.c (gen_member_die): Member fns are on TYPE_FIELDS.
13837         * dbxout.c (dbxout_type_fields): Ignore FUNCTION_DECLs.
13838         (dbxout_type_methods): Scan TYPE_FIELDS.
13839         (dbxout_type): Don't check TYPE_METHODS here.
13840         * function.c (use_register_for_decl): Always ignore register for
13841         class types when not optimizing.
13842         * ipa-devirt.c (odr_types_equivalent_p): Delete TYPE_METHODS scan.
13843         * tree.c (free_lang_data_in_type): Stitch out member functions and
13844         templates from TYPE_FIELDS.
13845         (build_distinct_type_copy, verify_type_variant,
13846         verify_type): Member fns are on TYPE_FIELDS.
13847         * tree-dump.c (dequeue_and_dump): No TYPE_METHODS.
13848         * tree-pretty-print.c (dump_generic_node): Likewise.
13850 2017-07-20  Jakub Jelinek  <jakub@redhat.com>
13852         PR target/80846
13853         * config/i386/i386.c (ix86_expand_vector_init_general): Handle
13854         V2TImode and V4TImode.
13855         (ix86_expand_vector_extract): Likewise.
13856         * config/i386/sse.md (VMOVE): Enable V4TImode even for just
13857         TARGET_AVX512F, instead of only for TARGET_AVX512BW.
13858         (ssescalarmode): Handle V4TImode and V2TImode.
13859         (VEC_EXTRACT_MODE): Add V4TImode and V2TImode.
13860         (*vec_extractv2ti, *vec_extractv4ti): New insns.
13861         (VEXTRACTI128_MODE): New mode iterator.
13862         (splitter for *vec_extractv?ti first element): New.
13863         (VEC_INIT_MODE): New mode iterator.
13864         (vec_init<mode>): Consolidate 3 expanders into one using
13865         VEC_INIT_MODE mode iterator.
13867 2017-07-20  Alexander Monakov  <amonakov@ispras.ru>
13869         * lra-assigns.c (pseudo_compare_func): Fix comparison step based on
13870         non_spilled_static_chain_regno_p.
13872 2017-07-20  Alexander Monakov  <amonakov@ispras.ru>
13874         * gimple-ssa-store-merging.c (sort_by_bitpos): Return 0 on equal bitpos.
13876 2017-07-20  Jan Hubicka  <hubicka@ucw.cz>
13878         * bb-reorder.c (connect_traces): Allow copying of blocks within
13879         single partition.
13881 2017-07-20  Richard Biener  <rguenther@suse.de>
13883         * gimple.h (gimple_phi_result): Add gphi * overload.
13884         (gimple_phi_result_ptr): Likewise.
13885         (gimple_phi_arg): Likewise.  Adjust index assert to only
13886         allow actual argument accesses rather than all slots available
13887         by capacity.
13888         (gimple_phi_arg_def): Add gphi * overload.
13889         * tree-phinodes.c (make_phi_node): Initialize only actual
13890         arguments.
13891         (resize_phi_node): Clear memory not covered by old node,
13892         do not initialize excess argument slots.
13893         (reserve_phi_args_for_new_edge): Initialize new argument slot
13894         completely.
13896 2017-07-20  Bin Cheng  <bin.cheng@arm.com>
13898         PR tree-optimization/81388
13899         Revert r238585:
13900         2016-07-21  Bin Cheng  <bin.cheng@arm.com>
13902         * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Clean up
13903         by removing computation of may_be_zero.
13905 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
13906             Tom de Vries  <tom@codesourcery.com>
13908         PR middle-end/81030
13909         * cfgbuild.c (find_many_sub_basic_blocks): Update REG_BR_PROB note
13910         when gimple level profile disagrees with what RTL expander did.
13912 2017-07-20  Richard Biener  <rguenther@suse.de>
13914         PR tree-optimization/61171
13915         * tree-vectorizer.h (slp_instance): Add reduc_phis member.
13916         (vect_analyze_stmt): Add slp instance parameter.
13917         (vectorizable_reduction): Likewise.
13918         * tree-vect-loop.c (vect_analyze_loop_operations): Adjust.
13919         (vect_is_simple_reduction): Deal with chains not detected
13920         as SLP reduction chain, specifically not properly associated
13921         chains containing a mix of plus/minus.
13922         (get_reduction_op): Remove.
13923         (get_initial_defs_for_reduction): Simplify, pass in whether
13924         this is a reduction chain, pass in the SLP node for the PHIs.
13925         (vect_create_epilog_for_reduction): Get the SLP instance as
13926         arg and adjust.
13927         (vectorizable_reduction): Get the SLP instance as arg.
13928         During analysis remember the SLP node with the PHIs in the
13929         instance.  Simplify getting at the vectorized reduction PHIs.
13930         * tree-vect-slp.c (vect_slp_analyze_node_operations): Pass
13931         through SLP instance.
13932         (vect_slp_analyze_operations): Likewise.
13933         * tree-vect-stms.c (vect_analyze_stmt): Likewise.
13934         (vect_transform_stmt): Likewise.
13936 2017-07-20  Tom de Vries  <tom@codesourcery.com>
13938         PR tree-optimization/81489
13939         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Move
13940         read of phi arg location to before loop that modifies phi.
13942 2017-07-20  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
13944         * match.pd (((m1 >/</>=/<= m2) * d -> (m1 >/</>=/<= m2) ? d : 0):
13945         New pattern.
13947 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
13949         PR middle-end/81331
13950         * except.c (execute): Fix ordering issue.
13952 2018-07-19  Segher Boessenkool  <segher@kernel.crashing.org>
13954         PR rtl-optimization/81423
13955         * combine.c (make_compound_operation_int): Don't try to optimize
13956         the AND of a SUBREG of an LSHIFTRT if that SUBREG is paradoxical.
13958 2017-07-19  Segher Boessenkool  <segher@kernel.crashing.org>
13960         PR rtl-optimization/81423
13961         * simplify-rtx.c (simplify_truncation): Handle truncating an IOR
13962         with a constant that is -1 in the truncated to mode.
13964 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
13966         * predict.c (propagate_unlikely_bbs_forward): Break out from ...
13967         (determine_unlikely_bbs): ... here.
13968         * predict.h (propagate_unlikely_bbs_forward): Declare.
13969         * cfgexpand.c (pass_expand::execute): Use it.
13970         * bb-reorder.c (sanitize_hot_paths): Do not consider known to be
13971         unlikely edges.
13972         (find_rarely_executed_basic_blocks_and_crossing_edges): Use
13973         propagate_unlikely_bbs_forward.
13975 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
13977         PR middle-end/81331
13978         * except.c (maybe_add_nop_after_section_switch): New function.
13979         (execute): Use it.
13981 2017-07-19  Tom de Vries  <tom@codesourcery.com>
13983         * gimple.h (gimple_phi_set_arg): Make assert more strict.
13985 2017-07-19  Tom de Vries  <tom@codesourcery.com>
13987         * gimple.h (gimple_phi_arg): Make assert more strict.
13989 2017-07-19  Steven Munroe  <munroesj@gcc.gnu.org>
13991         * config.gcc (powerpc*-*-*): Add mmintrin.h.
13992         * config/rs6000/mmintrin.h: New file.
13993         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include mmintrin.h.
13995 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
13997         PR tree-optimization/81346
13998         * match.pd: Optimize (X - 1U) <= INT_MAX-1U into (int) X > 0.
14000 2017-07-19  Tom de Vries  <tom@codesourcery.com>
14002         * config/nvptx/nvptx.md (VECIM): Add V2DI.
14004 2017-07-19  Tom de Vries  <tom@codesourcery.com>
14006         * config/nvptx/nvptx-modes.def: Add V2DImode.
14007         * config/nvptx/nvptx-protos.h (nvptx_data_alignment): Declare.
14008         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2DImode.
14009         (nvptx_output_mov_insn): Handle lack of mov.b128.
14010         (nvptx_print_operand): Handle 'H' and 'L' codes.
14011         (nvptx_vector_mode_supported): Allow V2DImode.
14012         (nvptx_preferred_simd_mode): New function.
14013         (nvptx_data_alignment): New function.
14014         (TARGET_VECTORIZE_PREFERRED_SIMD_MODE): Redefine to
14015         nvptx_preferred_simd_mode.
14016         * config/nvptx/nvptx.h (STACK_BOUNDARY, BIGGEST_ALIGNMENT): Change from
14017         64 to 128 bits.
14018         (DATA_ALIGNMENT): Define.  Set to nvptx_data_alignment.
14020 2017-07-19  Tom de Vries  <tom@codesourcery.com>
14022         * config/nvptx/nvptx-modes.def: New file.  Add V2SImode.
14023         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2SImode.
14024         (nvptx_vector_mode_supported): New function.  Allow V2SImode.
14025         (TARGET_VECTOR_MODE_SUPPORTED_P): Redefine to nvptx_vector_mode_supported.
14026         * config/nvptx/nvptx.md (VECIM): New mode iterator. Add V2SI.
14027         (mov<VECIM>_insn): New define_insn.
14028         (define_expand "mov<VECIM>): New define_expand.
14030 2017-07-19  Tom de Vries  <tom@codesourcery.com>
14032         * config/nvptx/nvptx.c (nvptx_print_operand): Handle v2 vector mode.
14034 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
14036         PR tree-optimization/81346
14037         * fold-const.h (fold_div_compare, range_check_type): Declare.
14038         * fold-const.c (range_check_type): New function.
14039         (build_range_check): Use range_check_type.
14040         (fold_div_compare): No longer static, rewritten into
14041         a match.pd helper function.
14042         (fold_comparison): Don't call fold_div_compare here.
14043         * match.pd (X / C1 op C2): New optimization using fold_div_compare
14044         as helper function.
14046 2017-07-19  Nathan Sidwell  <nathan@acm.org>
14048         * tree.h (TYPE_MINVAL, TYPE_MAXVAL): Rename to ...
14049         (TYPE_MIN_VALUE_RAW, TYPE_MAX_VALUE_RAW): ... these.
14050         * tree.c (find_decls_types_r, verify_type): Use
14051         TYPE_{MIN,MAX}_VALUE_RAW.
14052         * lto-streamer-out.c (DFS::DFS_write_tree_body): Likewise.
14053         (hash_tree): Likewise.
14054         * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
14055         Likewise.
14056         * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
14057         Likewise.
14059 2017-07-18  Tom de Vries  <tom@codesourcery.com>
14061         PR middle-end/81464
14062         * omp-expand.c (expand_omp_for_static_chunk): Handle
14063         equal-argument loop exit phi.
14065 2017-07-18  Uros Bizjak  <ubizjak@gmail.com>
14067         PR target/81471
14068         * config/i386/i386.md (rorx_immediate_operand): New mode attribute.
14069         (*bmi2_rorx<mode>3_1): Use rorx_immediate_operand as
14070         operand 2 predicate.
14071         (*bmi2_rorxsi3_1_zext): Use const_0_to_31_operand as
14072         operand 2 predicate.
14073         (ror,rol -> rorx splitters): Use const_int_operand as
14074         operand 2 predicate.
14076 2017-06-18  Richard Biener  <rguenther@suse.de>
14078         PR tree-optimization/81410
14079         * tree-vect-stmts.c (vectorizable_load): Properly adjust for
14080         the gap in the ! slp_perm SLP case after each group.
14082 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
14084         PR middle-end/81463
14085         * cfgloopmanip.c (scale_loop_profile): Watch out for zero frequency
14086         again.
14088 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
14090         PR middle-end/81462
14091         * predict.c (set_even_probabilities): Cleanup; do not affect
14092         probabilities that are already known.
14093         (combine_predictions_for_bb): Call even when count is set.
14095 2017-07-18  Nathan Sidwell  <nathan@acm.org>
14097         * tree-parloops.c (try_transform_to_exit_first_loop_alt): Use
14098         TYPE_MAX_VALUE.
14100 2017-07-18  Bin Cheng  <bin.cheng@arm.com>
14102         PR target/81408
14103         * tree-ssa-loop-niter.c (number_of_iterations_exit): Dump missed
14104         optimization for loop niter analysis.
14106 2017-07-18  Georg-Johann Lay  <avr@gjlay.de>
14108         PR target/81473
14109         * config/avr/avr.c (avr_optimize_casesi): Don't use
14110         INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX.
14112 2017-07-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
14114         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Remove
14115         body_cost_vec from _vect_peel_extended_info.
14116         (vect_peeling_hash_get_lowest_cost): Do not set body_cost_vec.
14117         (vect_peeling_hash_choose_best_peeling): Remove body_cost_vec and
14118         npeel.
14120 2017-07-18  Bin Cheng  <bin.cheng@arm.com>
14122         * config/arm/arm.c (emit_unlikely_jump): Remove unused var.
14124 2017-07-18  Richard Biener  <rguenther@suse.de>
14126         PR tree-optimization/80620
14127         PR tree-optimization/81403
14128         * tree-ssa-pre.c (phi_translate_1): Clear range and points-to
14129         info when re-using a VN table entry.
14131 2017-07-18  Richard Biener  <rguenther@suse.de>
14133         PR tree-optimization/81418
14134         * tree-vect-loop.c (vectorizable_reduction): Properly compute
14135         vectype_in.  Verify that with lane-reducing reduction operations
14136         we have a single def-use cycle.
14138 2017-07-17  Carl Love  <cel@us.ibm.com>
14140         Revert commit r249424   2017-06-20  Carl Love  <cel@us.ibm.com>
14142         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
14143         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
14144         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
14145         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
14146         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
14147         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
14148         VMULOSW): New enum "unspec" values.
14149         (vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
14150         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
14151         altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
14152         altivec_vmulosw): New patterns.
14153         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
14154         VMULOSW): Add definitions.
14155 2017-07-17  Uros Bizjak  <ubizjak@gmail.com>
14157         * config/alpha/alpha.c: Include predict.h.
14159 2017-07-17  Yury Gribov  <tetra2005@gmail.com>
14161         * tree-vrp.c (compare_assert_loc): Fix comparison function
14162         to return predictable results.
14164 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
14166         * config/arc/arc.md (adddi3): Remove support for mexpand-adddi
14167         option.
14168         (subdi3): Likewise.
14169         * config/arc/arc.opt (mexpand-adddi): Deprecate it.
14170         * doc/invoke.texi (mexpand-adddi): Update text.
14172 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
14174         * config/arc/arc.md (clzsi2): Expand to an arc_clzsi2 instruction
14175         that also clobbers the CC register. The old expand code is moved
14176         to ...
14177         (*arc_clzsi2): ... here.
14178         (ctzsi2): Expand to an arc_ctzsi2 instruction that also clobbers
14179         the CC register. The old expand code is moved to ...
14180         (arc_ctzsi2): ... here.
14182 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
14184         * config/arc/arc.opt (mindexed-loads): Use initial value
14185         TARGET_INDEXED_LOADS_DEFAULT.
14186         (mauto-modify-reg): Use initial value
14187         TARGET_AUTO_MODIFY_REG_DEFAULT.
14188         * config/arc/elf.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
14189         (TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
14190         * config/arc/linux.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
14191         (TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
14193 2017-07-17  Martin Liska  <mliska@suse.cz>
14195         PR sanitizer/81302
14196         * opts.c (finish_options): Do not allow -fgnu-tm
14197         w/ -fsanitize={kernel-,}address.  Say sorry.
14199 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
14201         PR target/81369
14202         * tree-loop-distribution.c (classify_partition): Only assert on
14203         numer of iterations.
14204         (merge_dep_scc_partitions): Delete prameter.  Update function call.
14205         (distribute_loop): Remove code handling loop with unknown niters.
14206         (pass_loop_distribution::execute): Skip loop with unknown niters.
14208 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
14210         PR target/81369
14211         * tree-loop-distribution.c (merge_dep_scc_partitions): Sink call to
14212         function sort_partitions_by_post_order.
14214 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
14216         PR tree-optimization/81374
14217         * tree-loop-distribution.c (pass_loop_distribution::execute): Record
14218         the max index of basic blocks, rather than number of basic blocks.
14220 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
14222         * config/arc/arc-protos.h (arc_legitimate_pc_offset_p): Remove
14223         proto.
14224         (arc_legitimate_pic_operand_p): Likewise.
14225         * config/arc/arc.c (arc_legitimate_pic_operand_p): Remove
14226         function.
14227         (arc_needs_pcl_p): Likewise.
14228         (arc_legitimate_pc_offset_p): Likewise.
14229         (arc_legitimate_pic_addr_p): Remove LABEL_REF case, as this
14230         function is also used in constrains.md.
14231         (arc_legitimate_constant_p): Use arc_legitimate_pic_addr_p to
14232         validate pic constants. Handle CONST_INT, CONST_DOUBLE, MINUS and
14233         PLUS.  Only return true/false in known cases, otherwise assert.
14234         (arc_legitimate_address_p): Remove arc_legitimate_pic_addr_p as it
14235         is already called in arc_legitimate_constant_p.
14236         * config/arc/arc.h (CONSTANT_ADDRESS_P): Consider also LABEL for
14237         pic addresses.
14238         (LEGITIMATE_PIC_OPERAND_P): Use
14239         arc_raw_symbolic_reference_mentioned_p function.
14240         * config/arc/constraints.md (Cpc): Use arc_legitimate_pic_addr_p
14241         function.
14242         (Cal): Likewise.
14243         (C32): Likewise.
14245 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
14246         Andrew Burgess  <andrew.burgess@embecosm.com>
14248         * config/arc/arc-protos.h (arc_compute_function_type): Change prototype.
14249         (arc_return_address_register): New function.
14250         * config/arc/arc.c (arc_handle_fndecl_attribute): New function.
14251         (arc_handle_fndecl_attribute): Add naked attribute.
14252         (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
14253         (TARGET_WARN_FUNC_RETURN): Likewise.
14254         (arc_allocate_stack_slots_for_args): New function.
14255         (arc_warn_func_return): Likewise.
14256         (machine_function): Change type fn_type.
14257         (arc_compute_function_type): Consider new naked function type,
14258         change function return type.
14259         (arc_must_save_register): Adapt to handle new
14260         arc_compute_function_type's return type.
14261         (arc_expand_prologue): Likewise.
14262         (arc_expand_epilogue): Likewise.
14263         (arc_return_address_regs): Delete.
14264         (arc_return_address_register): New function.
14265         (arc_epilogue_uses): Use above function.
14266         * config/arc/arc.h (arc_return_address_regs): Delete prototype.
14267         (arc_function_type): Change encoding, add naked type.
14268         (ARC_INTERRUPT_P): Change to handle the new encoding.
14269         (ARC_FAST_INTERRUPT_P): Likewise.
14270         (ARC_NORMAL_P): Define.
14271         (ARC_NAKED_P): Likewise.
14272         (arc_compute_function_type): Delete prototype.
14273         * config/arc/arc.md (in_ret_delay_slot): Use
14274         arc_return_address_register function.
14275         (simple_return): Likewise.
14276         (p_return_i): Likewise.
14278 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
14280         PR tree-optimization/81428
14281         * match.pd (X / X -> one): Don't optimize _Fract divisions, as 1
14282         can't be built for those types.
14284 2017-07-17  Georg-Johann Lay  <avr@gjlay.de>
14286         Remove stuff dead since r239246.
14288         * config/avr/avr-arch.h (avr_inform_devices): Remove dead proto.
14289         * config/avr/avr-devices.c (mcu_name, comparator, avr_mcus_str)
14290         (avr_inform_devices): Remove dead stuff.
14292 2017-07-17  Tamar Christina  <tamar.christina@arm.com>
14294         * config/arm/arm_neon.h: Fix softp typo.
14296 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
14298         PR tree-optimization/81365
14299         * tree-ssa-phiprop.c (propagate_with_phi): When considering hoisting
14300         aggregate moves onto bb predecessor edges, make sure there are no
14301         loads that could alias the lhs in between the start of bb and the
14302         loads from *phi.
14304 2017-07-17  Georg-Johann Lay  <avr@gjlay.de>
14306         PR 80929
14307         * config/avr/avr.c (avr_mul_highpart_cost): New static function.
14308         (avr_rtx_costs_1) [TRUNCATE]: Use it to compute mul_highpart cost.
14309         [LSHIFTRT, outer_code = TRUNCATE]: Same.
14311 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
14313         PR tree-optimization/81396
14314         * tree-ssa-math-opts.c (struct symbolic_number): Add n_ops field.
14315         (init_symbolic_number): Initialize it to 1.
14316         (perform_symbolic_merge): Add n_ops from both operands into the new
14317         n_ops.
14318         (find_bswap_or_nop): Don't consider n->n == cmpnop computations
14319         without base_addr as useless if they need more than one operation.
14320         (bswap_replace): Handle !bswap case for NULL base_addr.
14322 2017-07-17  Tom de Vries  <tom@codesourcery.com>
14324         PR target/81069
14325         * config/nvptx/nvptx.c (nvptx_single): Insert diverging branch as late
14326         as possible.
14328 2017-07-17  Sebastian Huber  <sebastian.huber@embedded-brains.de>
14330         * config/sparc/rtemself.h (TARGET_OS_CPP_BUILTINS): Add
14331         conditional builtin define __FIX_LEON3FT_B2BST.
14333 2017-07-17  Daniel Cederman  <cederman@gaisler.com>
14335         * config/sparc/t-rtems: Add mfix-gr712rc multilibs. Replace
14336         MULTILIB_EXCEPTIONS with MULTILIB_REQUIRED. Match -mfix-gr712rc
14337         with -mfix-ut700.
14339 2017-07-16  Eric Botcazou  <ebotcazou@adacore.com>
14341         PR rtl-optimization/81424
14342         * optabs.c (prepare_cmp_insn): Use copy_to_reg instead of force_reg
14343         to remove potential trapping from operands if -fnon-call-exceptions.
14345 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
14347         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Use
14348         profile_proability for scalling.
14349         * scale_profile_for_vect_loop.c (scale_profile_for_vect_loop): Likewise.
14351 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
14353         * cgraph.c (cgraph_edge::redirect_call_stmt_to_caller): Cleanup.
14355 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
14357         * cfgloopmanip.c (scale_loop_profile): Avoid use of REG_BR_PROB_BASE
14358         fixpoint arithmetics.
14360 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
14362         * tree-ssa-loop-unswitch.c (hoist_guard): Avoid use of REG_BR_PROB_BASE
14363         fixpoint arithmetics.
14365 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
14367         * asan.c (create_cond_insert_point): Avoid use of REG_BR_PROB_BASE
14368         fixpoint arithmetics.
14370 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
14372         * profile-count.h (profile_probability::from_reg_br_prob_note,
14373         profile_probability::to_reg_br_prob_note): New functions.
14374         * doc/rtl.texi (REG_BR_PROB_NOTE): Update documentation.
14375         * reg-notes.h (REG_BR_PROB, REG_BR_PRED): Update docs.
14376         * predict.c (probability_reliable_p): Update.
14377         (edge_probability_reliable_p): Update.
14378         (br_prob_note_reliable_p): Update.
14379         (invert_br_probabilities): Update.
14380         (add_reg_br_prob_note): New function.
14381         (combine_predictions_for_insn): Update.
14382         * asan.c (asan_clear_shadow): Update.
14383         * cfgbuild.c (compute_outgoing_frequencies): Update.
14384         * cfgrtl.c (force_nonfallthru_and_redirect): Update.
14385         (update_br_prob_note): Update.
14386         (rtl_verify_edges): Update.
14387         (purge_dead_edges): Update.
14388         (fixup_reorder_chain): Update.
14389         * emit-rtl.c (try_split): Update.
14390         * ifcvt.c (cond_exec_process_insns): Update.
14391         (cond_exec_process_if_block): Update.
14392         (dead_or_predicable): Update.
14393         * internal-fn.c (expand_addsub_overflow): Update.
14394         (expand_neg_overflow): Update.
14395         (expand_mul_overflow): Update.
14396         * loop-doloop.c (doloop_modify): Update.
14397         * loop-unroll.c (compare_and_jump_seq): Update.
14398         * optabs.c (emit_cmp_and_jump_insn_1): Update.
14399         * predict.h: Update.
14400         * reorg.c (mostly_true_jump): Update.
14401         * rtl.h: Update.
14402         * config/aarch64/aarch64.c (aarch64_emit_unlikely_jump): Update.
14403         * config/alpha/alpha.c (emit_unlikely_jump): Update.
14404         * config/arc/arc.c: (emit_unlikely_jump): Update.
14405         * config/arm/arm.c: (emit_unlikely_jump): Update.
14406         * config/bfin/bfin.c (cbranch_predicted_taken_p): Update.
14407         * config/frv/frv.c (frv_print_operand_jump_hint): Update.
14408         * config/i386/i386.c (ix86_expand_split_stack_prologue): Update.
14409         (ix86_print_operand): Update.
14410         (ix86_split_fp_branch): Update.
14411         (predict_jump): Update.
14412         * config/ia64/ia64.c (ia64_print_operand): Update.
14413         * config/mmix/mmix.c (mmix_print_operand): Update.
14414         * config/powerpcspe/powerpcspe.c (output_cbranch): Update.
14415         (rs6000_expand_split_stack_prologue): Update.
14416         * config/rs6000/rs6000.c: Update.
14417         * config/s390/s390.c (s390_expand_vec_strlen): Update.
14418         (s390_expand_vec_movstr): Update.
14419         (s390_expand_cs_tdsi): Update.
14420         (s390_expand_split_stack_prologue): Update.
14421         * config/sh/sh.c (sh_print_operand): Update.
14422         (expand_cbranchsi4): Update.
14423         (expand_cbranchdi4): Update.
14424         * config/sparc/sparc.c (output_v9branch): Update.
14425         * config/spu/spu.c (get_branch_target): Update.
14426         (ea_load_store_inline): Update.
14427         * config/tilegx/tilegx.c (cbranch_predicted_p): Update.
14428         * config/tilepro/tilepro.c: Update.
14430 2017-07-16  Eric Botcazou  <ebotcazou@adacore.com>
14432         * gimplify.c (mostly_copy_tree_r): Revert latest change.
14433         (gimplify_save_expr): Likewise.
14435 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
14437         * ipa-visibility.c (function_and_variable_visibility): Fix pasto.
14439 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
14441         * ipa-fnsummary.c (pass_data_ipa_fn_summary): Use
14442         TV_IPA_FNSUMMARY.
14443         * timevar.def (TV_IPA_FNSUMMARY): Define.
14445 2017-07-16  Daniel Cederman  <cederman@gaisler.com>
14447         * config/sparc/sparc.md (divdf3_fix): Add NOP to prevent back
14448         to back store errata sensitive sequence from being generated.
14449         (sqrtdf2_fix): Likewise.
14451 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
14453         * tree-ssa-threadupdate.c (compute_path_counts,
14454         update_joiner_offpath_counts): Use profile_probability.
14456 2017-07-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14458         Revert:
14459         2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14461         * config/arm/arm-c.c (arm_cpu_builtins): Define
14462         __ARM_FEATURE_NUMERIC_MAXMIN solely based on TARGET_VFP5.
14464 2017-07-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14466         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
14467         array entries to represent __ieee128 versions of the
14468         scalar_test_data_class, scalar_test_neg, scalar_extract_exp,
14469         scalar_extract_sig, and scalar_insert_exp built-in functions.
14470         (altivec_resolve_overloaded_builtin): Add special case handling
14471         for the __builtin_scalar_insert_exp function, as represented by
14472         the P9V_BUILTIN_VEC_VSIEDP constant.
14473         * config/rs6000/rs6000-builtin.def (VSEEQP): Add scalar extract
14474         exponent support for __ieee128 argument.
14475         (VSESQP): Add scalar extract signature support for __ieee128
14476         argument.
14477         (VSTDCNQP): Add scalar test negative support for __ieee128
14478         argument.
14479         (VSIEQP): Add scalar insert exponent support for __int128 argument
14480         with __ieee128 result.
14481         (VSIEQPF): Add scalar insert exponent support for __ieee128
14482         argument with __ieee128 result.
14483         (VSTDCQP): Add scalar test data class support for __ieee128
14484         argument.
14485         (VSTDCNQP): Add overload support for scalar test negative with
14486         __ieee128 argument.
14487         (VSTDCQP): Add overload support for scalar test data class
14488         __ieee128 argument.
14489         * config/rs6000/vsx.md (UNSPEC_VSX_SXSIG) Replace
14490         UNSPEC_VSX_SXSIGDP.
14491         (UNSPEC_VSX_SIEXPQP): New constant.
14492         (xsxexpqp): New insn for VSX scalar extract exponent quad
14493         precision.
14494         (xsxsigqp): New insn for VSX scalar extract significand quad
14495         precision.
14496         (xsiexpqpf): New insn for VSX scalar insert exponent quad
14497         precision with floating point argument.
14498         (xststdcqp): New expand for VSX scalar test data class quad
14499         precision.
14500         (xststdcnegqp): New expand for VSX scalar test negative quad
14501         precision.
14502         (xststdcqp): New insn to match expansions for VSX scalar test data
14503         class quad precision and VSX scalar test negative quad precision.
14504         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
14505         special case operand checking to enforce that second operand of
14506         VSX scalar test data class with quad precision argument is a 7-bit
14507         unsigned literal.
14508         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
14509         prototypes and descriptions of __ieee128 versions of
14510         scalar_extract_exp, scalar_extract_sig, scalar_insert_exp,
14511         scalar_test_data_class, and scalar_test_neg built-in functions.
14513 2016-07-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
14515         PR tree-optimization/81162
14516         * gimple-ssa-strength-reduction.c (replace_mult_candidate): Don't
14517         replace a negate with an add.
14519 2017-07-14  James Greenhalgh  <james.greenhalgh@arm.com>
14521         * doc/invoke.texi (arm/-mcpu): Document +crypto.
14523 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14525         * config/arm/arm-c.c (arm_cpu_builtins): Define
14526         __ARM_FEATURE_NUMERIC_MAXMIN solely based on TARGET_VFP5.
14528 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14530         * config/arm/arm-cpus.in (cortex-r52): Add new entry.
14531         (armv8-r): Set ARM Cortex-R52 as default CPU.
14532         * config/arm/arm-tables.opt: Regenerate.
14533         * config/arm/arm-tune.md: Regenerate.
14534         * config/arm/driver-arm.c (arm_cpu_table): Add entry for ARM
14535         Cortex-R52.
14536         * doc/invoke.texi: Mention -mtune=cortex-r52 and availability of fp.dp
14537         extension for -mcpu=cortex-r52.
14539 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14541         * config/arm/arm-isa.h (isa_bit_FP_ARMv8): Delete enumerator.
14542         (ISA_FP_ARMv8): Define as ISA_FPv5 and ISA_FP_D32.
14543         * config/arm/arm-cpus.in (armv8-r): Define fp.sp as enabling FPv5.
14544         (fp-armv8): Define it as FP_ARMv8 only.
14545         config/arm/arm.h (TARGET_FPU_ARMV8): Delete.
14546         (TARGET_VFP_FP16INST): Define using TARGET_VFP5 rather than
14547         TARGET_FPU_ARMV8.
14548         config/arm/arm.c (arm_rtx_costs_internal): Replace checks against
14549         TARGET_FPU_ARMV8 by checks against TARGET_VFP5.
14550         * config/arm/arm-builtins.c (arm_builtin_vectorized_function): Define
14551         first ARM_CHECK_BUILTIN_MODE definition using TARGET_VFP5 rather
14552         than TARGET_FPU_ARMV8.
14553         * config/arm/arm-c.c (arm_cpu_builtins): Likewise for
14554         __ARM_FEATURE_NUMERIC_MAXMIN macro definition.
14555         * config/arm/arm.md (cmov<mode>): Condition on TARGET_VFP5 rather than
14556         TARGET_FPU_ARMV8.
14557         * config/arm/neon.md (neon_vrint): Likewise.
14558         (neon_vcvt): Likewise.
14559         (neon_<fmaxmin_op><mode>): Likewise.
14560         (<fmaxmin><mode>3): Likewise.
14561         * config/arm/vfp.md (l<vrint_pattern><su_optab><mode>si2): Likewise.
14562         * config/arm/predicates.md (arm_cond_move_operator): Check against
14563         TARGET_VFP5 rather than TARGET_FPU_ARMV8 and fix spacing.
14565 2017-07-14  Jackson Woodruff  <jackson.woodruff@arm.com>
14567         * config/aarch64/aarch64.c (aarch64_print_operand): Move comments
14568         to top of function.
14570 2017-07-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14572         * gimple-ssa-store-merging.c (clear_bit_region): Replace reference to
14573         loop in comment with memset.
14575 2017-07-14  Martin Liska  <mliska@suse.cz>
14577         * cfgexpand.c (expand_gimple_basic_block): Remove dead comment.
14578         * dwarf2out.c (is_java): Remove the function.
14579         (output_pubname): Remove usage of the function.
14580         (lower_bound_default): Remove usage of DW_LANG_Java.
14581         (gen_compile_unit_die): Likewise.
14582         * gcc.c: Remove compiler defaults for .java and .zip files.
14583         * gimple-expr.c (remove_suffix): Change as there's no longer
14584         extension than 4-letter one.
14585         * gimplify.c (mostly_copy_tree_r): Remove Java-special part.
14586         (gimplify_save_expr): Likewise.
14587         * ipa-utils.h (polymorphic_type_binfo_p): Remove the comment
14588         as it's possible even for other languages than Java.
14589         * langhooks.h (struct lang_hooks): Remove Java from a comment.
14590         * lto-opts.c (lto_write_options): Remove reference to Java.
14591         * opts.c (strip_off_ending): Update file extension handling.
14592         * tree-cfg.c (verify_gimple_call): Remove comment with Java.
14593         * tree-eh.c (lower_resx): Likewise.
14594         * tree.c (free_lang_data_in_type): Remove dead code.
14595         (find_decls_types_r): Likewise.
14596         (build_common_builtin_nodes): Remove Java from a comment.
14597         (verify_type): Remove dead code.
14598         * varasm.c (assemble_external): Remove Java from a comment.
14600 2017-07-14  Martin Liska  <mliska@suse.cz>
14602         * opts.c (finish_options): Add quotes.
14603         (common_handle_option): Likewise.
14605 2017-07-14  Martin Liska  <mliska@suse.cz>
14607         * dbxout.c (get_lang_number): Do not handle GNU Pascal.
14608         * dbxout.h (extern void dbxout_stab_value_internal_label_diff):
14609         Remove N_SO_PASCAL.
14610         * dwarf2out.c (lower_bound_default): Do not handle
14611         DW_LANG_Pascal83.
14612         (gen_compile_unit_die): Likewise.
14613         * gcc.c: Remove default extension binding for GNU Pascal.
14614         * stmt.c: Remove Pascal language from a comment.
14615         * xcoffout.c: Likewise.
14617 2017-07-13  David Malcolm  <dmalcolm@redhat.com>
14619         PR c/81405
14620         * diagnostic-show-locus.c (fixit_cmp): New function.
14621         (layout::layout): Sort m_fixit_hints.
14622         (column_range::column_range): Assert that the values are valid.
14623         (struct char_span): New struct.
14624         (correction::overwrite): New method.
14625         (struct source_line): New struct.
14626         (line_corrections::add_hint): Add assertions.  Reimplement memcpy
14627         calls in terms of classes source_line and char_span, and
14628         correction::overwrite.
14629         (selftest::test_overlapped_fixit_printing_2): New function.
14630         (selftest::diagnostic_show_locus_c_tests): Call it.
14632 2017-07-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
14634         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Return
14635         early if there is no lhs.
14637 2017-07-13  Martin Liska  <mliska@suse.cz>
14639         * dwarf2out.c (gen_pointer_type_die): Remove dead code.
14640         (gen_reference_type_die): Likewise.
14641         * stor-layout.c: Remove Pascal-related comment.
14643 2017-07-13  Martin Liska  <mliska@suse.cz>
14645         * opts.c (finish_options): Add quotes to error messages.
14646         (parse_sanitizer_options): Likewise.
14648 2017-07-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14650         * doc/invoke.texi (armv8-r): Document +fp.sp ARMv8-R extension.
14652 2017-07-13  Richard Earnshaw  <rearnsha@arm.com>
14654         * config/arm/vxworks.h (TARGET_ENDIAN_DEFAULT): Define.
14656 2017-07-13  Maxim Ostapenko  <m.ostapenko@samsung.com>
14658         * asan.c (asan_emit_allocas_unpoison): Use ptr_mode for arguments
14659         during expansion.
14660         * builtins.c (expand_asan_emit_allocas_unpoison): Likewise.
14662 2017-07-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
14664         PR target/81193
14665         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If GLIBC
14666         provides the hardware capability bits, define the macro
14667         __BUILTIN_CPU_SUPPORTS__.
14668         * config/rs6000/rs6000.c (cpu_expand_builtin): Generate a warning
14669         if GLIBC does not provide the hardware capability bits.  Add a
14670         gcc_unreachable call if the built-in cpu function is neither
14671         __builtin_cpu_is nor __builtin_cpu_supports.
14672         (rs6000_get_function_versions_dispatcher): Change the warning
14673         that an old GLIBC is used which does not export the capability
14674         bits to be an error.
14675         * doc/extend.texi (target_clones attribute): Document the
14676         restriction that GLIBC 2.23 or newer is needed on the PowerPC.
14677         (PowerPC built-in functions): Document that GLIBC 2.23 or newer is
14678         needed by __builtin_cpu_is and __builtin_cpu_supports.  Document
14679         the macros defined by GCC if the newer GLIBC is available.
14681 2017-07-12  Jeff Law  <law@redhat.com>
14683         * config/riscv/riscv.c: Remove unnecessary includes.  Reorder
14684         remaining includes slightly.
14685         * config/riscv/riscv-builtins.c: Include profile-count.h.
14687 2017-07-12  Georg-Johann Lay  <avr@gjlay.de>
14689         PR target/79883
14690         * config/avr/avr.c (avr_set_current_function): In diagnostic
14691         messages: Quote keywords and (parts of) identifiers.
14692         [WITH_AVRLIBC]: Warn for functions named "ISR", "SIGNAL" or
14693         "INTERUPT".
14695 2017-07-12  Carl Love  <cel@us.ibm.com>
14697         * config/rs6000/rs6000-c.c: Add support for built-in functions
14698         vector bool char vec_revb (vector bool char);
14699         vector bool short vec_revb (vector short char);
14700         vector bool int vec_revb (vector bool int);
14701         vector bool long long vec_revb (vector bool long long);
14702         * doc/extend.texi: Update the built-in documentation file for the
14703         new built-in functions.
14705 2017-07-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14707         * config/s390/s390.md: Remove movcc splitter.
14709 2017-07-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14711         * config/s390/s390.c (s390_rtx_costs): Return proper costs for
14712         load/store on condition.
14714 2017-07-12  Georg-Johann Lay  <avr@gjlay.de>
14716         PR target/81407
14717         * config/avr/avr.c (avr_encode_section_info)
14718         [progmem && !TREE_READONLY]: Error if progmem object needs
14719         constructing.
14721 2017-07-11  Michael Collison  <michael.collison@arm.com>
14723         * config/aarch64/aarch64-simd.md (aarch64_sub<mode>_compare0):
14724         New pattern.
14726 2017-07-11  Carl Love  <cel@us.ibm.com>
14728         * config/rs6000/rs6000-c.c: Add support for builtins
14729         vector unsigned int vec_parity_lsbb (vector signed int);
14730         vector unsigned int vec_parity_lsbb (vector unsigned int);
14731         vector unsigned __int128 vec_parity_lsbb (vector signed __int128);
14732         vector unsigned __int128 vec_parity_lsbb (vector unsigned __int128);
14733         vector unsigned long long vec_parity_lsbb (vector signed long long);
14734         vector unsigned long long vec_parity_lsbb (vector unsigned long long);
14735         * config/rs6000/rs6000-builtin.def (VPARITY_LSBB): Add BU_P9V_OVERLOAD1.
14736         * config/rs6000/altivec.h (vec_parity_lsbb): Add define.
14737         * doc/extend.texi: Update the built-in documentation file for the
14738         new built-in functions.
14740 2017-07-11  David Malcolm  <dmalcolm@redhat.com>
14742         * diagnostic-show-locus.c: Include "gcc-rich-location.h".
14743         (layout::m_primary_loc): New field.
14744         (layout::layout): Initialize new field.  Move location filtering
14745         logic from here to...
14746         (layout::maybe_add_location_range): ...this new method.  Add
14747         support for filtering to just the lines already specified by other
14748         locations.
14749         (layout::will_show_line_p): New method.
14750         (gcc_rich_location::add_location_if_nearby): New method.
14751         (selftest::test_add_location_if_nearby): New test function.
14752         (selftest::diagnostic_show_locus_c_tests): Call it.
14753         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
14754         New method.
14756 2017-07-11  Tom de Vries  <tom@codesourcery.com>
14758         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG): New macro.
14759         (bb_first_real_insn): New function.
14760         (nvptx_single): Add extra initialization of broadcasted condition
14761         variables.
14763 2017-07-11  Nathan Sidwell  <nathan@acm.org>
14765         * dwarf2out.c (gen_member_die): Remove useless check for anon ctors.
14767 2017-07-11  Georg-Johann Lay  <avr@gjlay.de>
14769         * doc/extend.texi (AVR Function Attributes): Remove weblink to
14770         Binutils doc as TEXI will mess them up.
14771         * doc/invoke.texi (AVR Options): Same here.
14773 2017-07-11  Daniel Cederman  <cederman@gaisler.com>
14775         * config/sparc/sparc.opt (mfix-ut700): New option.
14776         (mfix-gr712rc): Likewise.
14777         (sparc_fix_b2bst): New variable.
14778         * doc/invoke.texi (SPARC options): Document them.
14779         (ARM options): Fix warnings.
14780         * config/sparc/sparc.c (sparc_do_work_around_errata): Insert NOP
14781         instructions to prevent sequences that can trigger the store-store
14782         errata for certain LEON3FT processors.
14783         (pass_work_around_errata::gate): Also test sparc_fix_b2bst.
14784         (sparc_option_override): Set sparc_fix_b2bst appropriately.
14785         * config/sparc/sparc.md (fix_b2bst): New attribute.
14786         (in_branch_delay): Prevent stores in delay slot if fix_b2bst.
14788 2017-07-10  Uros Bizjak  <ubizjak@gmail.com>
14790         PR target/81375
14791         * config/i386/i386.md (divsf3): Add TARGET_SSE to TARGET_SSE_MATH.
14792         (rcpps): Ditto.
14793         (*rsqrtsf2_sse): Ditto.
14794         (rsqrtsf2): Ditto.
14795         (div<mode>3): Macroize insn from divdf3 and divsf3
14796         using MODEF mode iterator.
14798 2017-07-10  Martin Sebor  <msebor@redhat.com>
14800         PR tree-optimization/80397
14801         * gimple-ssa-sprintf.c (format_integer): Use INTEGRAL_TYPE_P()
14802         instead of testing for equality to INTEGER_TYPE.
14804 2017-07-10  Vineet Gupta <vgupta@synopsys.com>
14806         * config.gcc: Remove uclibc from arc target spec.
14808 2017-07-10  Claudiu Zissulescu  <claziss@synopsys.com>
14810         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Define.
14812 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
14814         PR lto/80838
14815         * lto-wrapper.c (remove_option): New function.
14816         (merge_and_complain): Merge PIC/PIE options more realistically.
14818 2017-07-10  Georg-Johann Lay  <avr@gjlay.de>
14820         Better ISR prologues by supporting GASes __gcc_isr pseudo insn.
14822         PR target/20296
14823         PR target/81268
14824         * configure.ac [target=avr]: Add GAS check for -mgcc-isr.
14825         (HAVE_AS_AVR_MGCCISR_OPTION):  If so, AC_DEFINE it.
14826         * config.in: Regenerate.
14827         * configure: Regenerate.
14828         * doc/extend.texi (AVR Function Attributes) <no_gccisr>: Document it.
14829         * doc/invoke.texi (AVR Options) <-mgas-isr-prologues>: Document it.
14830         * config/avr/avr.opt (-mgas-isr-prologues): New option and...
14831         (TARGET_GASISR_PROLOGUES): ...target mask.
14832         * common/config/avr/avr-common.c
14833         (avr_option_optimization_table) [OPT_LEVELS_1_PLUS_NOT_DEBUG]:
14834         Set -mgas-isr-prologues.
14835         * config/avr/avr-passes.def (avr_pass_pre_proep): Add
14836         INSERT_PASS_BEFORE for it.
14837         * config/avr/avr-protos.h (make_avr_pass_pre_proep): New proto.
14838         * config/avr/avr.c (avr_option_override)
14839         [!HAVE_AS_AVR_MGCCISR_OPTION]: Unset TARGET_GASISR_PROLOGUES.
14840         (avr_no_gccisr_function_p, avr_hregs_split_reg): New static functions.
14841         (avr_attribute_table) <no_gccisr>: Add new function attribute.
14842         (avr_set_current_function) <is_no_gccisr>: Init machine field.
14843         (avr_pass_data_pre_proep, avr_pass_pre_proep): New pass data
14844         and rtl_opt_pass.
14845         (make_avr_pass_pre_proep): New function.
14846         (emit_push_sfr) <treg>: Add argument to function and use it
14847         instead of TMP_REG.
14848         (avr_expand_prologue) [machine->gasisr.maybe]: Emit gasisr insn
14849         and set machine->gasisr.yes.
14850         (avr_expand_epilogue) [machine->gasisr.yes]: Similar.
14851         (avr_asm_function_end_prologue) [machine->gasisr.yes]: Add
14852         __gcc_isr.n_pushed to .L__stack_usage.
14853         (TARGET_ASM_FINAL_POSTSCAN_INSN): Define to...
14854         (avr_asm_final_postscan_insn): ...this new static function.
14855         * config/avr/avr.h (machine_function)
14856         <is_no_gccisr, use_L__stack_usage>: New fields.
14857         <gasisr, gasisr.yes, gasisr.maybe, gasisr.regno>: New fields.
14858         * config/avr/avr.md (UNSPECV_GASISR): Add unspecv enum.
14859         (GASISR_Prologue, GASISR_Epilogue, GASISR_Done): New define_constants.
14860         (gasisr, *gasisr): New expander and insn.
14861         * config/avr/gen-avr-mmcu-specs.c (print_mcu)
14862         [HAVE_AS_AVR_MGCCISR_OPTION]: Print asm_gccisr spec.
14863         * config/avr/specs.h (ASM_SPEC) <asm_gccisr>: Add sub spec.
14865 2017-07-10  Richard Earnshaw  <rearnsha@arm.com>
14867         * config/arm/parsecpu.awk (gen_comm_data): Do not escape single quotes
14868         in quoted strings.
14870 2017-07-10  Georg-Johann Lay  <avr@gjlay.de>
14872         Move jump-tables out of .text again.
14874         PR target/81075
14875         * config/avr/avr.c (ASM_OUTPUT_ADDR_VEC_ELT): Remove function.
14876         (ASM_OUTPUT_ADDR_VEC): New function.
14877         (avr_adjust_insn_length) [JUMP_TABLE_DATA_P]: Return 0.
14878         (avr_final_prescan_insn) [avr_log.insn_addresses]: Dump
14879         INSN_ADDRESSes as asm comment.
14880         * config/avr/avr.h (JUMP_TABLES_IN_TEXT_SECTION): Adjust comment.
14881         (ASM_OUTPUT_ADDR_VEC_ELT): Remove define.
14882         (ASM_OUTPUT_ADDR_VEC): Define to avr_output_addr_vec.
14883         * config/avr/avr.md (*tablejump): Adjust comment.
14884         * config/avr/elf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove.
14885         * config/avr/avr-log.c (avr_log_set_avr_log) <insn_addresses>:
14886         New detail.
14887         * config/avr/avr-protos.h (avr_output_addr_vec_elt): Remove proto.
14888         (avr_output_addr_vec): New proto.
14889         (avr_log_t) <insn_addresses>: New field.
14891 2017-07-09  H.J. Lu  <hongjiu.lu@intel.com>
14893         PR target/81313
14894         * config/i386/i386.c (ix86_function_arg_advance): Set
14895         outgoing_args_on_stack to true if there are outgoing arguments
14896         on stack.
14897         (ix86_function_arg): Likewise.
14898         (ix86_get_drap_rtx): Use DRAP only if there are outgoing
14899         arguments on stack and ACCUMULATE_OUTGOING_ARGS is false.
14900         * config/i386/i386.h (machine_function): Add
14901         outgoing_args_on_stack.
14903 2017-07-09  Krister Walfridsson  <krister.walfridsson@gmail.com>
14905         * config.gcc (*-*-netbsd*): Remove check for NetBSD versions not
14906         supporting pthreds.
14907         * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always enable pthreads.
14909 2017-07-08  Richard Sandiford  <richard.sandiford@linaro.org>
14911         * Makefile.in (HOOKS_H, RTL_BASE_H, FUNCTION_H, EXPR_H, REGS_H)
14912         (REAL_H): Remove $(MACHMODE_H).
14913         (FIXED_VALUE_H, TREE_CORE_H, CFGLOOP_H): Remove $(MACHMODE_H) and
14914         double-int.h.
14915         (CORETYPES_H): Add signop.h, wide-int.h, wide-int-print.h,
14916         $(MACHMODE_H) and double-int.h.
14917         (build/min-insn-modes.o): Depend on $(CORETYPES_H) rather than
14918         $(MACHMODE_H).
14919         (gengtype-state.o, gengtype.o, build/gengtype.o): Don't depend on
14920         double-int.h.
14922 2017-07-07  Andrew Pinski  <apinski@cavium.com>
14924         * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Check
14925         prev_set and curr_set for AARCH64_FUSE_ALU_BRANCH.
14927 2017-07-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
14929         * config/rs6000/rs6000.c (rs6000_get_function_versions_dispatcher):
14930         Add warning if GCC was not configured to link against a GLIBC that
14931         exports the hardware capability bits.
14932         (make_resolver_func): Make resolver function private and not a
14933         COMDAT function.  Create the name with clone_function_name instead
14934         of make_unique_name.
14936         PR target/81348
14937         * config/rs6000/rs6000.md (HI sign_extend splitter): Use the
14938         correct operand in doing the split.
14940 2017-07-07 Carl Love  <cel@us.ibm.com>
14942         * config/rs6000/rs6000-c: Add support for built-in function
14943         vector unsigned short vec_pack_to_short_fp32 (vector float,
14944                                                       vector float).
14945         * config/rs6000/rs6000-builtin.def (CONVERT_4F32_8I16): Add
14946         BU_P9V_AV_2 and BU_P9V_OVERLOAD_2 definitions.
14947         * config/rs6000/altivec.h (vec_pack_to_short_fp32): Add define.
14948         * config/rs6000/altivec.md(UNSPEC_CONVERT_4F32_8I16): Add UNSPEC.
14949         (convert_4f32_8i16): Add define_expand.
14950         * doc/extend.texi: Update the built-in documentation file for the
14951         new built-in function.
14953 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14955         * config/sparc/m8.md: New file.
14956         * config/sparc/sparc.md: Include m8.md.
14958 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14960         * config/sparc/sparc.opt: New option -mvis4b.
14961         * config/sparc/sparc.c (dump_target_flag_bits): Handle MASK_VIS4B.
14962         (sparc_option_override): Handle VIS4B.
14963         (enum sparc_builtins): Define
14964         SPARC_BUILTIN_DICTUNPACK{8,16,32},
14965         SPARC_BUILTIN_FPCMP{LE,GT,EQ,NE}{8,16,32}SHL,
14966         SPARC_BUILTIN_FPCMPU{LE,GT}{8,16,32}SHL,
14967         SPARC_BUILTIN_FPCMPDE{8,16,32}SHL and
14968         SPARC_BUILTIN_FPCMPUR{8,16,32}SHL.
14969         (check_constant_argument): New function.
14970         (sparc_vis_init_builtins): Define builtins
14971         __builtin_vis_dictunpack{8,16,32},
14972         __builtin_vis_fpcmp{le,gt,eq,ne}{8,16,32}shl,
14973         __builtin_vis_fpcmpu{le,gt}{8,16,32}shl,
14974         __builtin_vis_fpcmpde{8,16,32}shl and
14975         __builtin_vis_fpcmpur{8,16,32}shl.
14976         (sparc_expand_builtin): Check that the constant operands to
14977         __builtin_vis_fpcmp*shl and _builtin_vis_dictunpack* are indeed
14978         constant and in range.
14979         * config/sparc/sparc-c.c (sparc_target_macros): Handle
14980         TARGET_VIS4B.
14981         * config/sparc/sparc.h (SPARC_IMM2_P): Define.
14982         (SPARC_IMM5_P): Likewise.
14983         * config/sparc/sparc.md (cpu_feature): Add new feagure "vis4b".
14984         (enabled): Handle vis4b.
14985         (UNSPEC_DICTUNPACK): New unspec.
14986         (UNSPEC_FPCMPSHL): Likewise.
14987         (UNSPEC_FPUCMPSHL): Likewise.
14988         (UNSPEC_FPCMPDESHL): Likewise.
14989         (UNSPEC_FPCMPURSHL): Likewise.
14990         (cpu_feature): New CPU feature `vis4b'.
14991         (dictunpack{8,16,32}): New insns.
14992         (FPCSMODE): New mode iterator.
14993         (fpcscond): New code iterator.
14994         (fpcsucond): Likewise.
14995         (fpcmp{le,gt,eq,ne}{8,16,32}{si,di}shl): New insns.
14996         (fpcmpu{le,gt}{8,16,32}{si,di}shl): Likewise.
14997         (fpcmpde{8,16,32}{si,di}shl): Likewise.
14998         (fpcmpur{8,16,32}{si,di}shl): Likewise.
14999         * config/sparc/constraints.md: Define constraints `q' for unsigned
15000         2-bit integer constants and `t' for unsigned 5-bit integer
15001         constants.
15002         * config/sparc/predicates.md (imm5_operand_dictunpack8): New
15003         predicate.
15004         (imm5_operand_dictunpack16): Likewise.
15005         (imm5_operand_dictunpack32): Likewise.
15006         (imm2_operand): Likewise.
15007         * doc/invoke.texi (SPARC Options): Document -mvis4b.
15008         * doc/extend.texi (SPARC VIS Built-in Functions): Document the
15009         ditunpack* and fpcmp*shl builtins.
15011 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
15013         * config.gcc: Handle m8 in --with-{cpu,tune} options.
15014         * config.in: Add HAVE_AS_SPARC6 define.
15015         * config/sparc/driver-sparc.c (cpu_names): Add entry for the SPARC
15016         M8.
15017         * config/sparc/sol2.h (CPP_CPU64_DEFAULT_SPEC): Define for
15018         TARGET_CPU_m8.
15019         (ASM_CPU32_DEFAUILT_SPEC): Likewise.
15020         (CPP_CPU_SPEC): Handle m8.
15021         (ASM_CPU_SPEC): Likewise.
15022         * config/sparc/sparc-opts.h (enum processor_type): Add
15023         PROCESSOR_M8.
15024         * config/sparc/sparc.c (m8_costs): New struct.
15025         (sparc_option_override): Handle TARGET_CPU_m8.
15026         (sparc32_initialize_trampoline): Likewise.
15027         (sparc64_initialize_trampoline): Likewise.
15028         (sparc_issue_rate): Likewise.
15029         (sparc_register_move_cost): Likewise.
15030         * config/sparc/sparc.h (TARGET_CPU_m8): Define.
15031         (CPP_CPU64_DEFAULT_SPEC): Define for M8.
15032         (ASM_CPU64_DEFAULT_SPEC): Likewise.
15033         (CPP_CPU_SPEC): Handle M8.
15034         (ASM_CPU_SPEC): Likewise.
15035         (AS_M8_FLAG): Define.
15036         * config/sparc/sparc.md: Add m8 to the cpu attribute.
15037         * config/sparc/sparc.opt: New option -mcpu=m8 for sparc targets.
15038         * configure.ac (HAVE_AS_SPARC6): Check for assembler support for
15039         M8 instructions.
15040         * configure: Regenerate.
15041         * doc/invoke.texi (SPARC Options): Document -mcpu=m8 and
15042         -mtune=m8.
15044 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
15046         * config/sparc/niagara7.md: Rework the DFA scheduler to use insn
15047         subtypes.
15048         * config/sparc/sparc.md: Remove the `v3pipe' insn attribute.
15049         ("*movdi_insn_sp32"): Do not set v3pipe.
15050         ("*movsi_insn"): Likewise.
15051         ("*movdi_insn_sp64"): Likewise.
15052         ("*movsf_insn"): Likewise.
15053         ("*movdf_insn_sp32"): Likewise.
15054         ("*movdf_insn_sp64"): Likewise.
15055         ("*zero_extendsidi2_insn_sp64"): Likewise.
15056         ("*sign_extendsidi2_insn"): Likewise.
15057         ("*mov<VM32:mode>_insn"): Likewise.
15058         ("*mov<VM64:mode>_insn_sp64"): Likewise.
15059         ("*mov<VM64:mode>_insn_sp32"): Likewise.
15060         ("<plusminus_insn><VADDSUB:mode>3"): Likewise.
15061         ("<vlop:code><VL:mode>3"): Likewise.
15062         ("*not_<vlop:code><VL:mode>3"): Likewise.
15063         ("*nand<VL:mode>_vis"): Likewise.
15064         ("*<vlnotop:code>_not1<VL:mode>_vis"): Likewise.
15065         ("*<vlnotop:code>_not2<VL:mode>_vis"): Likewise.
15066         ("one_cmpl<VL:mode>2"): Likewise.
15067         ("faligndata<VM64:mode>_vis"): Likewise.
15068         ("alignaddrsi_vis"): Likewise.
15069         ("alignaddrdi_vis"): Likweise.
15070         ("alignaddrlsi_vis"): Likewise.
15071         ("alignaddrldi_vis"): Likewise.
15072         ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise.
15073         ("bmaskdi_vis"): Likewise.
15074         ("bmasksi_vis"): Likewise.
15075         ("bshuffle<VM64:mode>_vis"): Likewise.
15076         ("cmask8<P:mode>_vis"): Likewise.
15077         ("cmask16<P:mode>_vis"): Likewise.
15078         ("cmask32<P:mode>_vis"): Likewise.
15079         ("pdistn<P:mode>_vis"): Likewise.
15080         ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise.
15082 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
15084         * config/sparc/sparc.md ("subtype"): New insn attribute.
15085         ("*wrgsr_sp64"): Set insn subtype.
15086         ("*rdgsr_sp64"): Likewise.
15087         ("alignaddrsi_vis"): Likewise.
15088         ("alignaddrdi_vis"): Likewise.
15089         ("alignaddrlsi_vis"): Likewise.
15090         ("alignaddrldi_vis"): Likewise.
15091         ("<plusminus_insn><VADDSUB:mode>3"): Likewise.
15092         ("fexpand_vis"): Likewise.
15093         ("fpmerge_vis"): Likewise.
15094         ("faligndata<VM64:mode>_vis"): Likewise.
15095         ("bshuffle<VM64:mode>_vis"): Likewise.
15096         ("cmask8<P:mode>_vis"): Likewise.
15097         ("cmask16<P:mode>_vis"): Likewise.
15098         ("cmask32<P:mode>_vis"): Likewise.
15099         ("fchksm16_vis"): Likewise.
15100         ("v<vis3_shift_patname><GCM:mode>3"): Likewise.
15101         ("fmean16_vis"): Likewise.
15102         ("fp<plusminus_insn>64_vis"): Likewise.
15103         ("<plusminus_insn>v8qi3"): Likewise.
15104         ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise.
15105         ("<vis4_minmax_patname><VMMAX:mode>3"): Likewise.
15106         ("<vis4_uminmax_patname><VMMAX:mode>3"): Likewise.
15107         ("<vis3_addsub_ss_patname>v8qi3"): Likewise.
15108         ("<vis4_addsub_us_patname><VAUS:mode>3"): Likewise.
15109         ("*movqi_insn"): Likewise.
15110         ("*movhi_insn"): Likewise.
15111         ("*movsi_insn"): Likewise.
15112         ("movsi_pic_gotdata_op"): Likewise.
15113         ("*movdi_insn_sp32"): Likewise.
15114         ("*movdi_insn_sp64"): Likewise.
15115         ("movdi_pic_gotdata_op"): Likewise.
15116         ("*movsf_insn"): Likewise.
15117         ("*movdf_insn_sp32"): Likewise.
15118         ("*movdf_insn_sp64"): Likewise.
15119         ("*zero_extendhisi2_insn"): Likewise.
15120         ("*zero_extendqihi2_insn"): Likewise.
15121         ("*zero_extendqisi2_insn"): Likewise.
15122         ("*zero_extendqidi2_insn"): Likewise.
15123         ("*zero_extendhidi2_insn"): Likewise.
15124         ("*zero_extendsidi2_insn_sp64"): Likewise.
15125         ("ldfsr"): Likewise.
15126         ("prefetch_64"): Likewise.
15127         ("prefetch_32"): Likewise.
15128         ("tie_ld32"): Likewise.
15129         ("tie_ld64"): Likewise.
15130         ("*tldo_ldub_sp32"): Likewise.
15131         ("*tldo_ldub1_sp32"): Likewise.
15132         ("*tldo_ldub2_sp32"): Likewise.
15133         ("*tldo_ldub_sp64"): Likewise.
15134         ("*tldo_ldub1_sp64"): Likewise.
15135         ("*tldo_ldub2_sp64"): Likewise.
15136         ("*tldo_ldub3_sp64"): Likewise.
15137         ("*tldo_lduh_sp32"): Likewise.
15138         ("*tldo_lduh1_sp32"): Likewise.
15139         ("*tldo_lduh_sp64"): Likewise.
15140         ("*tldo_lduh1_sp64"): Likewise.
15141         ("*tldo_lduh2_sp64"): Likewise.
15142         ("*tldo_lduw_sp32"): Likewise.
15143         ("*tldo_lduw_sp64"): Likewise.
15144         ("*tldo_lduw1_sp64"): Likewise.
15145         ("*tldo_ldx_sp64"): Likewise.
15146         ("*mov<VM32:mode>_insn"): Likewise.
15147         ("*mov<VM64:mode>_insn_sp64"): Likewise.
15148         ("*mov<VM64:mode>_insn_sp32"): Likewise.
15150 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
15152         * config/sparc/sparc.md ("type"): New insn type viscmp.
15153         ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Set insn type to
15154         viscmp.
15155         ("fpcmp<gcond:code>8<P:mode>_vis"): Likewise.
15156         ("fucmp<gcond:code>8<P:mode>_vis"): Likewise.
15157         ("fpcmpu<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise.
15158         * config/sparc/niagara7.md ("n7_vis_logical_v3pipe"): Handle
15159         viscmp.
15160         ("n7_vis_logical_11cycle"): Likewise.
15161         * config/sparc/niagara4.md ("n4_vis_logical"): Likewise.
15162         * config/sparc/niagara2.md ("niag3_vis": Likewise.
15163         * config/sparc/niagara.md ("niag_vis"): Likewise.
15164         * config/sparc/ultra3.md ("us3_fga"): Likewise.
15165         * config/sparc/ultra1_2.md ("us1_fga_double"): Likewise.
15167 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
15169         * config/sparc/sparc.md: New instruction type `bmask'.
15170         (bmaskdi_vis): Use the `bmask' type.
15171         (bmasksi_vis): Likewise.
15172         * config/sparc/ultra3.md (us3_array): Likewise.
15173         * config/sparc/niagara7.md (n7_array): Likewise.
15174         * config/sparc/niagara4.md (n4_array): Likewise.
15175         * config/sparc/niagara2.md (niag2_vis): Likewise.
15176         (niag3_vis): Likewise.
15177         * config/sparc/niagara.md (niag_vis): Likewise.
15179 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
15181         * ipa-comdats.c: Remove optimize check from gate.
15182         * ipa-fnsummary.c (ipa_fn_summary_generate): do not generate summary
15183         for functions not optimized.
15184         (ipa_fn_summary_read): Skip optimize check.
15185         (ipa_fn_summary_write): Likewise.
15186         * ipa-inline-analysis.c (do_estimate_growth_1): Check that caller
15187         is optimized.
15188         * ipa-inline.c (can_inline_edge_p): Not optimized functions are
15189         uninlinable.
15190         (can_inline_edge_p): Check flag_pcc_struct_return for match.
15191         (check_callers): Give up on caller which is not optimized.
15192         (inline_small_functions): Likewise.
15193         (ipa_inline): Do not give up when not optimizing.
15194         * ipa-visbility.c (function_and_variable_visibility): Do not optimize
15195         away unoptimizes cdtors.
15196         (whole_program_function_and_variable_visibility): Do
15197         ipa_discover_readonly_nonaddressable_vars in LTO mode.
15198         * ipa.c (process_references): Do not check optimize.
15199         (symbol_table::remove_unreachable_nodes): Update optimize check.
15200         (set_writeonly_bit): Update optimize check.
15201         (pass_ipa_cdtor_merge::gate): Do not check optimize.
15202         (pass_ipa_single_use::gate): Remove.
15204 2017-07-06  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15206         * config/rs6000/rs6000.c (union_defs, union_uses, insn_is_load_p,
15207         insn_is_store_p, insn_is_swap_p, const_load_sequence_p, v2df_reduction_p,
15208         rtx_is_swappable_p, insn_is_swappable_p, chain_contains_only_swaps,
15209         mark_swaps_for_removal, swap_const_vector_halves, adjust_subreg_index,
15210         permute_load, permute_store, adjust_extract, adjust_splat,
15211         adjust_xxpermdi, adjust_concat, adjust_vperm, handle_special_swappables,
15212         replace_swap_with_copy, dump_swap_insn_table,
15213         alignment_with_canonical_addr, alignment_mask, find_alignment_op,
15214         recombine_lvx_pattern, recombine_stvx_pattern,
15215         recombine_lvx_stvx_patterns, rs6000_analyze_swaps,
15216         make_pass_analyze_swaps): Move all code related to p8 swap optimizations
15217         to file rs6000-p8swap.c.
15218         * config/rs6000/rs6000-p8swap.c: New file.
15219         * config/rs6000/t-rs6000: Add rule to build rs6000-p8swap.o.
15220         * config.gcc: Add rs6000-p8swap.o to extra_objs for powerpc*-*-*
15221         and rs6000*-*-* targets.
15223 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
15225         * Makefile.in (selftest): Remove dependency on s-selftest-c++.
15227 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
15229         * lto-wrapper.c (merge_and_complain): Do not merge
15230         fexceptions, fnon_call_exceptions, ftrapv, ffp_contract_, fmath_errno,
15231         fsigned_zeros, ftrapping_math, fwrapv.
15232         (append_compiler_options): Do not track these options.
15233         (append_linker_options): Likewie
15235 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
15237         * cgraphunit.c (cgraph_node::finalize_function): When
15238         !flag_toplevel_reorde set no_reorder flag.
15239         (varpool_node::finalize_decl): Likewise.
15240         (symbol_table::compile): Drop no toplevel reorder path.
15242 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
15244         * bb-reorder.c (better_edge_p): Do not build traces across abnormal/eh
15245         edges; zero probability is not better than uninitialized.
15247 2017-07-06  Maxim Ostapenko  <m.ostapenko@samsung.com>
15249         * asan.h (asan_sanitize_allocas_p): Declare.
15250         * asan.c (asan_sanitize_allocas_p): New function.
15251         (handle_builtin_stack_restore): Bail out if !asan_sanitize_allocas_p.
15252         (handle_builtin_alloca): Likewise.
15253         * cfgexpand.c (expand_used_vars): Do not add allocas unpoisoning stuff
15254         if !asan_sanitize_allocas_p.
15255         * params.def (asan-instrument-allocas): Add new option.
15256         * params.h (ASAN_PROTECT_ALLOCAS): Define.
15257         * opts.c (common_handle_option): Disable allocas sanitization for
15258         KASan by default.
15260 2017-07-06  Maxim Ostapenko  <m.ostapenko@samsung.com>
15262         * asan.c: Include gimple-fold.h.
15263         (get_last_alloca_addr): New function.
15264         (handle_builtin_stackrestore): Likewise.
15265         (handle_builtin_alloca): Likewise.
15266         (asan_emit_allocas_unpoison): Likewise.
15267         (get_mem_refs_of_builtin_call): Add new parameter, remove const
15268         quallifier from first paramerer. Handle BUILT_IN_ALLOCA,
15269         BUILT_IN_ALLOCA_WITH_ALIGN and BUILT_IN_STACK_RESTORE builtins.
15270         (instrument_builtin_call): Pass gimple iterator to
15271         get_mem_refs_of_builtin_call.
15272         (last_alloca_addr): New global.
15273         * asan.h (asan_emit_allocas_unpoison): Declare.
15274         * builtins.c (expand_asan_emit_allocas_unpoison): New function.
15275         (expand_builtin): Handle BUILT_IN_ASAN_ALLOCAS_UNPOISON.
15276         * cfgexpand.c (expand_used_vars): Call asan_emit_allocas_unpoison
15277         if function calls alloca.
15278         * gimple-fold.c (replace_call_with_value): Remove static keyword.
15279         * gimple-fold.h (replace_call_with_value): Declare.
15280         * internal-fn.c: Include asan.h.
15281         * sanitizer.def (BUILT_IN_ASAN_ALLOCA_POISON,
15282         BUILT_IN_ASAN_ALLOCAS_UNPOISON): New builtins.
15284 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
15286         * Makefile.in (SELFTEST_FLAGS): Drop "-x c", moving it to...
15287         (C_SELFTEST_FLAGS): New.
15288         (CPP_SELFTEST_FLAGS): New.
15289         (SELFTEST_DEPS): New, from deps of s-selftest.
15290         (C_SELFTEST_DEPS): New, from deps of s-selftest.
15291         (CPP_SELFTEST_DEPS): New.
15292         (selftest): Add dependency on s-selftest-c++.
15293         (s-selftest): Rename to...
15294         (s-selftest-c): ...this, moving deps to SELFTEST_DEPS
15295         and C_SELFTEST_DEPS, and using C_SELFTEST_FLAGS rather
15296         than SELFTEST_FLAGS.
15297         (selftest-gdb): Rename to...
15298         (selftest-c-gdb): ...this, using C_SELFTEST_DEPS and
15299         C_SELFTEST_FLAGS.
15300         (selftest-gdb): Reintroduce as an alias for selftest-c-gdb.
15301         (selftest-valgrind): Rename to...
15302         (selftest-c-valgrind): ...this, using C_SELFTEST_DEPS and
15303         C_SELFTEST_FLAGS.
15304         (selftest-valgrind): Reintroduce as an alias for
15305         selftest-c-valgrind.
15306         (s-selftest-c++): New.
15307         (selftest-c++-gdb): New.
15308         (selftest-c++-valgrind): New.
15310 2017-07-06  Olivier Hainque  <hainque@adacore.com>
15312         * gcc.c (process_command): When deciding if undefined variables
15313         should be ignored when processing specs, accept "gcc -v" as well.
15315 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
15317         * auto-profile.c (afdo_set_bb_count, afdo_propagate_edge,
15318         afdo_annotate_cfg): Set counts/probabilities as determined by afdo.
15320 2017-07-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
15322         * config/arm/arm-cpus.in (armv8-r): Add new entry.
15323         * config/arm/arm-isa.h (ISA_ARMv8r): Define macro.
15324         * config/arm/arm-tables.opt: Regenerate.
15325         * config/arm/arm.h (enum base_architecture): Add BASE_ARCH_8R
15326         enumerator.
15327         * doc/invoke.texi: Mention -march=armv8-r and its extensions.
15329 2017-07-06  Carl Love  <cel@us.ibm.com>
15331         * ChangeLog: Clean up from mid air collision
15333 2017-07-06  Carl Love  <cel@us.ibm.com>
15335         * config/rs6000/rs6000-c.c: Add support for built-in functions
15336         vector signed int vec_subc (vector signed int, vector signed int);
15337         vector signed __int128 vec_subc (vector signed __int128,
15338                                          vector signed __int128);
15339         vector unsigned __int128 vec_subc (vector unsigned __int128,
15340                                            vector unsigned __int128);
15341         vector signed int vec_sube (vector signed int, vector signed int,
15342                                     vector signed int);
15343         vector unsigned int vec_sube (vector unsigned int,
15344                                       vector unsigned int,
15345                                       vector unsigned int);
15346         vector signed __int128 vec_sube (vector signed __int128,
15347                                          vector signed __int128,
15348                                          vector signed__int128);
15349         vector unsigned __int128 vec_sube (vector unsigned __int128,
15350                                            vector unsigned __int128,
15351                                            vector unsigned __int128);
15352         vector signed int vec_subec (vector signed int, vector signed int,
15353                                      vector signed int);
15354         vector unsigned int vec_subec (vector unsigned int,
15355                                        vector unsigned int,
15356                                        vector unsigned int);
15357         vector signed __int128 vec_subec (vector signed __int128,
15358                                           vector signed __int128,
15359                                           vector signed__int128);
15360         vector unsigned __int128 vec_subec (vector unsigned __int128,
15361                                             vector unsigned __int128,
15362                                             vector unsigned __int128);
15363         * config/rs6000/rs6000.c (ALTIVEC_BUILTIN_VEC_SUBE,
15364         ALTIVEC_BUILTIN_VEC_SUBEC): Add ef_builtins.
15365         * config/rs6000/rs6000-builtin.def (SUBE, SUBEC): Add
15366         BU_ALTIVEC_OVERLOAD_X definitions.
15367         * config/rs6000/altivec.h (vec_sube, vec_subec): Add builtin defines.
15368         * doc/extend.texi: Update the built-in documentation file for the new
15369         built-in functions.
15371 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
15373         PR c++/79300
15374         * diagnostic-show-locus.c (layout::layout): Use start and finish
15375         spelling location for the start and finish of each range.
15376         * genmatch.c (linemap_client_expand_location_to_spelling_point):
15377         Add unused aspect param.
15378         * input.c (expand_location_1): Add "aspect" param, and use it
15379         to access the correct part of the location.
15380         (expand_location): Pass LOCATION_ASPECT_CARET to new param of
15381         expand_location_1.
15382         (expand_location_to_spelling_point): Likewise.
15383         (linemap_client_expand_location_to_spelling_point): Add "aspect"
15384         param, and pass it to expand_location_1.
15386 2017-07-06  Sebastian Peryt  <sebastian.peryt@intel.com>
15388         * config/i386/avx512fintrin.h (_mm_mask_getexp_round_ss,
15389         _mm_maskz_getexp_round_ss, _mm_mask_getexp_round_sd,
15390         _mm_maskz_getexp_round_sd, _mm_mask_getmant_round_sd,
15391         _mm_maskz_getmant_round_sd, _mm_mask_getmant_round_ss,
15392         _mm_maskz_getmant_round_ss, _mm_mask_getexp_ss, _mm_maskz_getexp_ss,
15393         _mm_mask_getexp_sd, _mm_maskz_getexp_sd, _mm_mask_getmant_sd,
15394         _mm_maskz_getmant_sd, _mm_mask_getmant_ss,
15395         _mm_maskz_getmant_ss): New intrinsics.
15396         (__builtin_ia32_getexpss128_mask): Changed to ...
15397         __builtin_ia32_getexpss128_round ... this.
15398         (__builtin_ia32_getexpsd128_mask): Changed to ...
15399         __builtin_ia32_getexpsd128_round ... this.
15400         * config/i386/i386-builtin-types.def
15401         ((V2DF, V2DF, V2DF, INT, V2DF, UQI, INT),
15402         (V4SF, V4SF, V4SF, INT, V4SF, UQI, INT)): New function type aliases.
15403         * config/i386/i386-builtin.def (__builtin_ia32_getexpsd_mask_round,
15404         __builtin_ia32_getexpss_mask_round,     __builtin_ia32_getmantsd_mask_round,
15405         __builtin_ia32_getmantss_mask_round): New builtins.
15406         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_INT_V2DF_UQI_INT,
15407         V4SF_FTYPE_V4SF_V4SF_INT_V4SF_UQI_INT): Handle new types.
15408         (CODE_FOR_avx512f_vgetmantv2df_mask_round,
15409         CODE_FOR_avx512f_vgetmantv4sf_mask_round): New cases.
15410         * config/i386/sse.md
15411         (avx512f_sgetexp<mode><round_saeonly_name>): Changed to ...
15412         avx512f_sgetexp<mode><mask_scalar_name>
15413         <round_saeonly_scalar_name> ... this.
15414         (vgetexp<ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|
15415         %0, %1, %2<round_saeonly_op3>}): Changed to ...
15416         vgetexp<ssescalarmodesuffix>
15417         \t{<round_saeonly_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
15418         %0<mask_scalar_operand3>, %1, %2<round_saeonly_scalar_mask_op3>} ... this.
15419         (avx512f_vgetmant<mode><round_saeonly_name>): Changed to ...
15420         avx512f_vgetmant<mode><mask_scalar_name>
15421         <round_saeonly_scalar_name> ... this.
15422         (vgetmant<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
15423         %0, %1, %2<round_saeonly_op4>, %3}): Changed to ...
15424         vgetmant<ssescalarmodesuffix>
15425         \t{%3, <round_saeonly_scalar_mask_op4>%2, %1, %0<mask_scalar_operand4>|
15426         %0<mask_scalar_operand4>, %1, %2
15427         <round_saeonly_scalar_mask_op4>, %3} ... this.
15428         * config/i386/subst.md (mask_scalar_operand4,
15429         round_saeonly_scalar_mask_operand4,     round_saeonly_scalar_mask_op4,
15430         round_saeonly_scalar_nimm_predicate): New subst attributes.
15432 2017-07-06  Julia Koval  <julia.koval@intel.com>
15434         * config/i386/i386.c (ix86_erase_embedded_rounding):
15435         Remove code for old rounding pattern.
15437 2017-07-06  Richard Earnshaw  <rearnsha@arm.com>
15439         * config/arm/t-arm (GTM_H): Add arm-cpu.h.
15441 2017-07-06  Christophe Lyon  <christophe.lyon@linaro.org>
15443         * doc/sourcebuild.texi (Test Directives, Variants of
15444         dg-require-support): Add documentation for dg-require-stack-check.
15446 2017-07-05  Sebastian Peryt  <sebastian.peryt@intel.com>
15448         * config/i386/subst.md (mask_scalar, round_scalar,
15449         round_saeonly_scalar): New meta-templates.
15450         (mask_scalar_name, mask_scalar_operand3, round_scalar_name,
15451         round_scalar_mask_operand3, round_scalar_mask_op3,
15452         round_scalar_constraint, round_scalar_prefix, round_saeonly_scalar_name,
15453         round_saeonly_scalar_mask_operand3, round_saeonly_scalar_mask_op3,
15454         round_saeonly_scalar_constraint,
15455         round_saeonly_scalar_prefix): New subst attribute.
15456         * config/i386/sse.md
15457         (<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): Renamed to ...
15458         <sse>_vm<plusminus_insn><mode>3<mask_scalar_name>
15459         <round_scalar_name> ... this.
15460         (<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): Renamed to ...
15461         <sse>_vm<multdiv_mnemonic><mode>3<mask_scalar_name>
15462         <round_scalar_name> ... this.
15463         (<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): Renamed to ...
15464         <sse>_vm<code><mode>3<mask_scalar_name>
15465         <round_saeonly_scalar_name> ... this.
15466         (v<plusminus_mnemonic><ssescalarmodesuffix>
15467         \t{<round_mask_op3>%2, %1, %0<mask_operand3>|
15468         %0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}): Changed to ...
15469         v<plusminus_mnemonic><ssescalarmodesuffix>
15470         \t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
15471         %0<mask_scalar_operand3>, %1, %<iptr>2<round_scalar_mask_op3>} ... this.
15472         (v<multdiv_mnemonic><ssescalarmodesuffix>
15473         \t{<round_mask_op3>%2, %1, %0<mask_operand3>|
15474         %0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}): Changed to ...
15475         v<multdiv_mnemonic><ssescalarmodesuffix>
15476         \t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
15477         %0<mask_scalar_operand3>, %1, %<iptr>2<round_scalar_mask_op3>} ... this.
15478         (v<maxmin_float><ssescalarmodesuffix>
15479         \t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|
15480         %0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}): Changed to ...
15481         v<maxmin_float><ssescalarmodesuffix>
15482         \t{<round_saeonly_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
15483         %0<mask_scalar_operand3>, %1, %<iptr>2
15484         <round_saeonly_scalar_mask_op3>} ... this.
15486 2017-07-05  Richard Earnshaw  <rearnsha@arm.com>
15488         * config/arm/arm.c (arm_fixed_condition_code_regs): New function.
15489         (TARGET_FIXED_CONDITION_CODE_REGS): Redefine.
15491 2017-07-05  Richard Sandiford  <richard.sandiford@linaro.org>
15492             Alan Hayward  <alan.hayward@arm.com>
15493             David Sherwood  <david.sherwood@arm.com>
15495         * combine.c (simplify_if_then_else): Remove "enum" before
15496         "machine_mode".
15497         * compare-elim.c (can_eliminate_compare): Likewise.
15498         * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
15499         Likewise.
15500         (aarch64_lookup_simd_builtin_type): Likewise.
15501         (aarch64_simd_builtin_type): Likewise.
15502         (aarch64_init_simd_builtin_types): Likewise.
15503         (aarch64_simd_expand_args): Likewise.
15504         * config/aarch64/aarch64-protos.h (aarch64_simd_attr_length_rglist):
15505         Likewise.
15506         (aarch64_reverse_mask): Likewise.
15507         (aarch64_simd_emit_reg_reg_move): Likewise.
15508         (aarch64_gen_adjusted_ldpstp): Likewise.
15509         (aarch64_ccmp_mode_to_code): Likewise.
15510         (aarch64_operands_ok_for_ldpstp): Likewise.
15511         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
15512         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15513         Likewise.
15514         (aarch64_min_divisions_for_recip_mul): Likewise.
15515         (aarch64_reassociation_width): Likewise.
15516         (aarch64_get_condition_code_1): Likewise.
15517         (aarch64_simd_emit_reg_reg_move): Likewise.
15518         (aarch64_simd_attr_length_rglist): Likewise.
15519         (aarch64_reverse_mask): Likewise.
15520         (aarch64_operands_ok_for_ldpstp): Likewise.
15521         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
15522         (aarch64_gen_adjusted_ldpstp): Likewise.
15523         * config/aarch64/cortex-a57-fma-steering.c (fma_node::rename):
15524         Likewise.
15525         * config/arc/arc.c (legitimate_offset_address_p): Likewise.
15526         * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
15527         (arm_lookup_simd_builtin_type): Likewise.
15528         (arm_simd_builtin_type): Likewise.
15529         (arm_init_simd_builtin_types): Likewise.
15530         (arm_expand_builtin_args): Likewise.
15531         * config/arm/arm-protos.h (arm_expand_builtin): Likewise.
15532         * config/ft32/ft32.c (ft32_libcall_value): Likewise.
15533         (ft32_setup_incoming_varargs): Likewise.
15534         (ft32_function_arg): Likewise.
15535         (ft32_function_arg_advance): Likewise.
15536         (ft32_pass_by_reference): Likewise.
15537         (ft32_arg_partial_bytes): Likewise.
15538         (ft32_valid_pointer_mode): Likewise.
15539         (ft32_addr_space_pointer_mode): Likewise.
15540         (ft32_addr_space_legitimate_address_p): Likewise.
15541         * config/i386/i386-protos.h (ix86_operands_ok_for_move_multiple):
15542         Likewise.
15543         * config/i386/i386.c (ix86_setup_incoming_vararg_bounds): Likewise.
15544         (ix86_emit_outlined_ms2sysv_restore): Likewise.
15545         (iamcu_alignment): Likewise.
15546         (canonicalize_vector_int_perm): Likewise.
15547         (ix86_noce_conversion_profitable_p): Likewise.
15548         (ix86_mpx_bound_mode): Likewise.
15549         (ix86_operands_ok_for_move_multiple): Likewise.
15550         * config/microblaze/microblaze-protos.h
15551         (microblaze_expand_conditional_branch_reg): Likewise.
15552         * config/microblaze/microblaze.c
15553         (microblaze_expand_conditional_branch_reg): Likewise.
15554         * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
15555         Likewise.
15556         (rs6000_reassociation_width): Likewise.
15557         (rs6000_invalid_binary_op): Likewise.
15558         (fusion_p9_p): Likewise.
15559         (emit_fusion_p9_load): Likewise.
15560         (emit_fusion_p9_store): Likewise.
15561         * config/riscv/riscv-protos.h (riscv_regno_mode_ok_for_base_p):
15562         Likewise.
15563         (riscv_hard_regno_mode_ok_p): Likewise.
15564         (riscv_address_insns): Likewise.
15565         (riscv_split_symbol): Likewise.
15566         (riscv_legitimize_move): Likewise.
15567         (riscv_function_value): Likewise.
15568         (riscv_hard_regno_nregs): Likewise.
15569         (riscv_expand_builtin): Likewise.
15570         * config/riscv/riscv.c (riscv_build_integer_1): Likewise.
15571         (riscv_build_integer): Likewise.
15572         (riscv_split_integer): Likewise.
15573         (riscv_legitimate_constant_p): Likewise.
15574         (riscv_cannot_force_const_mem): Likewise.
15575         (riscv_regno_mode_ok_for_base_p): Likewise.
15576         (riscv_valid_base_register_p): Likewise.
15577         (riscv_valid_offset_p): Likewise.
15578         (riscv_valid_lo_sum_p): Likewise.
15579         (riscv_classify_address): Likewise.
15580         (riscv_legitimate_address_p): Likewise.
15581         (riscv_address_insns): Likewise.
15582         (riscv_load_store_insns): Likewise.
15583         (riscv_force_binary): Likewise.
15584         (riscv_split_symbol): Likewise.
15585         (riscv_force_address): Likewise.
15586         (riscv_legitimize_address): Likewise.
15587         (riscv_move_integer): Likewise.
15588         (riscv_legitimize_const_move): Likewise.
15589         (riscv_legitimize_move): Likewise.
15590         (riscv_address_cost): Likewise.
15591         (riscv_subword): Likewise.
15592         (riscv_output_move): Likewise.
15593         (riscv_canonicalize_int_order_test): Likewise.
15594         (riscv_emit_int_order_test): Likewise.
15595         (riscv_function_arg_boundary): Likewise.
15596         (riscv_pass_mode_in_fpr_p): Likewise.
15597         (riscv_pass_fpr_single): Likewise.
15598         (riscv_pass_fpr_pair): Likewise.
15599         (riscv_get_arg_info): Likewise.
15600         (riscv_function_arg): Likewise.
15601         (riscv_function_arg_advance): Likewise.
15602         (riscv_arg_partial_bytes): Likewise.
15603         (riscv_function_value): Likewise.
15604         (riscv_pass_by_reference): Likewise.
15605         (riscv_setup_incoming_varargs): Likewise.
15606         (riscv_print_operand): Likewise.
15607         (riscv_elf_select_rtx_section): Likewise.
15608         (riscv_save_restore_reg): Likewise.
15609         (riscv_for_each_saved_reg): Likewise.
15610         (riscv_register_move_cost): Likewise.
15611         (riscv_hard_regno_mode_ok_p): Likewise.
15612         (riscv_hard_regno_nregs): Likewise.
15613         (riscv_class_max_nregs): Likewise.
15614         (riscv_memory_move_cost): Likewise.
15615         * config/rl78/rl78-protos.h (rl78_split_movsi): Likewise.
15616         * config/rl78/rl78.c (rl78_split_movsi): Likewise.
15617         (rl78_addr_space_address_mode): Likewise.
15618         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
15619         Likewise.
15620         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
15621         (rs6000_reassociation_width): Likewise.
15622         (rs6000_invalid_binary_op): Likewise.
15623         (fusion_p9_p): Likewise.
15624         (emit_fusion_p9_load): Likewise.
15625         (emit_fusion_p9_store): Likewise.
15626         * config/visium/visium-protos.h (prepare_move_operands): Likewise.
15627         (ok_for_simple_move_operands): Likewise.
15628         (ok_for_simple_move_strict_operands): Likewise.
15629         (ok_for_simple_arith_logic_operands): Likewise.
15630         (visium_legitimize_reload_address): Likewise.
15631         (visium_select_cc_mode): Likewise.
15632         (output_cbranch): Likewise.
15633         (visium_split_double_move): Likewise.
15634         (visium_expand_copysign): Likewise.
15635         (visium_expand_int_cstore): Likewise.
15636         (visium_expand_fp_cstore): Likewise.
15637         * config/visium/visium.c (visium_pass_by_reference): Likewise.
15638         (visium_function_arg): Likewise.
15639         (visium_function_arg_advance): Likewise.
15640         (visium_libcall_value): Likewise.
15641         (visium_setup_incoming_varargs): Likewise.
15642         (visium_legitimate_constant_p): Likewise.
15643         (visium_legitimate_address_p): Likewise.
15644         (visium_legitimize_address): Likewise.
15645         (visium_secondary_reload): Likewise.
15646         (visium_register_move_cost): Likewise.
15647         (visium_memory_move_cost): Likewise.
15648         (prepare_move_operands): Likewise.
15649         (ok_for_simple_move_operands): Likewise.
15650         (ok_for_simple_move_strict_operands): Likewise.
15651         (ok_for_simple_arith_logic_operands): Likewise.
15652         (visium_function_value_1): Likewise.
15653         (rtx_ok_for_offset_p): Likewise.
15654         (visium_legitimize_reload_address): Likewise.
15655         (visium_split_double_move): Likewise.
15656         (visium_expand_copysign): Likewise.
15657         (visium_expand_int_cstore): Likewise.
15658         (visium_expand_fp_cstore): Likewise.
15659         (visium_split_cstore): Likewise.
15660         (visium_select_cc_mode): Likewise.
15661         (visium_split_cbranch): Likewise.
15662         (output_cbranch): Likewise.
15663         (visium_print_operand_address): Likewise.
15664         * expmed.c (flip_storage_order): Likewise.
15665         * expmed.h (emit_cstore): Likewise.
15666         (flip_storage_order): Likewise.
15667         * genrecog.c (validate_pattern): Likewise.
15668         * hsa-gen.c (gen_hsa_addr): Likewise.
15669         * internal-fn.c (expand_arith_overflow): Likewise.
15670         * ira-color.c (allocno_copy_cost_saving): Likewise.
15671         * lra-assigns.c (find_hard_regno_for_1): Likewise.
15672         * lra-constraints.c (prohibited_class_reg_set_mode_p): Likewise.
15673         (process_invariant_for_inheritance): Likewise.
15674         * lra-eliminations.c (move_plus_up): Likewise.
15675         * omp-low.c (lower_oacc_reductions): Likewise.
15676         * simplify-rtx.c (simplify_subreg): Likewise.
15677         * target.def (TARGET_SETUP_INCOMING_VARARG_BOUNDS): Likewise.
15678         (TARGET_CHKP_BOUND_MODE): Likewise..
15679         * targhooks.c (default_chkp_bound_mode): Likewise.
15680         (default_setup_incoming_vararg_bounds): Likewise.
15681         * targhooks.h (default_chkp_bound_mode): Likewise.
15682         (default_setup_incoming_vararg_bounds): Likewise.
15683         * tree-ssa-math-opts.c (divmod_candidate_p): Likewise.
15684         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
15685         (have_whole_vector_shift): Likewise.
15686         * tree-vect-stmts.c (vectorizable_load): Likewise.
15687         * doc/tm.texi: Regenerate.
15689 2017-07-05  Georg-Johann Lay  <avr@gjlay.de>
15691         Graceful degrade if Binutils PR21472 is not available.
15693         PR target/81072
15694         * configure.ac [target=avr]: WARN instead of ERROR if avrxmega3
15695         .rodata in flash test fails.
15696         (HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH): Define it if test passes.
15697         * confgure: Regenerate.
15698         * config.in: Regenerate.
15699         * config/avr/avr.c (avr_asm_named_section)
15700         [HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH]: Only trigger
15701         __do_copy_data for stuff in .rodata if flash_pm_offset = 0.
15702         (avr_asm_init_sections): Same.
15704 2017-07-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
15706         * config/arm/neon.md (fma<VCVTF:mode>4): Remove %?.
15707         (fma<VH:mode>4_intrinsic): Likewise.
15708         (*fmsub<VCVTF:mode>4): Likewise.
15709         (*fmsub<VH:mode>4_intrinsic): Likewise.
15711 2017-07-05  Georg-Johann Lay  <avr@gjlay.de>
15713         PR target/81305
15714         * config/avr/avr.c (avr_out_movhi_mr_r_xmega) [CONSTANT_ADDRESS_P]:
15715         Don't depend on "optimize > 0".
15716         (out_movhi_r_mr, out_movqi_mr_r): Same.
15717         (out_movhi_mr_r, out_movqi_r_mr): Same.
15718         (avr_address_cost) [CONSTANT_ADDRESS_P]: Don't depend cost for
15719         io_address_operand on "optimize > 0".
15721 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
15723         * tree-loop-distribution.c: Add general explanantion on the pass.
15724         (generate_loops_for_partition): Mark distributed loop.
15725         (pg_add_dependence_edges): New parameter.  Handle alias data
15726         dependence specially and record it in the parameter if asked.
15727         (struct pg_vdata, pg_edata, pg_edge_callback_data): New structs.
15728         (init_partition_graph_vertices, add_partition_graph_edge): New.
15729         (pg_skip_alias_edge, free_partition_graph_edata_cb): New.
15730         (free_partition_graph_vdata, build_partition_graph): New.
15731         (sort_partitions_by_post_order, merge_dep_scc_partitions): New.
15732         (pg_collect_alias_ddrs, break_alias_scc_partitions): New.
15733         (data_ref_segment_size, latch_dominated_by_data_ref): New.
15734         (compute_alias_check_pairs, version_loop_by_alias_check): New.
15735         (version_for_distribution_p, finalize_partitions): New.
15736         (distribute_loop): Handle alias data dependence specially.  Factor
15737         out loop fusion code as functions and call these functions.
15739 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
15741         * tree-loop-distribution.c (classify_partition): New parameter and
15742         better handle reduction statement.
15743         (rdg_build_partitions): Revise comment.
15744         (distribute_loop): Compute statements in all partitions and pass it
15745         to classify_partition.
15747 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
15749         * tree-loop-distribution.c (enum partition_type): New.
15750         (struct partition): New field type.
15751         (partition_merge_into): Add parameter.  Update partition type.
15752         (data_dep_in_cycle_p, update_type_for_merge): New functions.
15753         (build_rdg_partition_for_vertex): Compute partition type.
15754         (rdg_build_partitions): Dump partition type.
15755         (distribute_loop): Update calls to partition_merge_into.
15757 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
15759         * tree-loop-distribution.c (struct ddr_hasher): New.
15760         (ddr_hasher::hash, ::equal, get_data_dependence): New function.
15761         (ddrs_table): New.
15762         (classify_partition): Call get_data_dependence.
15763         (pg_add_dependence_edges): Ditto.
15764         (distribute_loop): Release data dependence hash table.
15766 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
15768         * tree-loop-distribution.c (ref_base_address): Delete.
15769         (similar_memory_accesses): Rename ...
15770         (share_memory_accesses): ... to this.  Check if partitions access
15771         the same memory reference.
15772         (distribute_loop): Call share_memory_accesses.
15774 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
15776         * tree-loop-distribution.c (struct partition): New field recording
15777         its data reference.
15778         (partition_alloc, partition_free): Init and release data refs.
15779         (partition_merge_into): Merge data refs.
15780         (build_rdg_partition_for_vertex): Collect data refs for partition.
15781         (pg_add_dependence_edges): Change parameters from vector to bitmap.
15782         Update uses.
15783         (distribute_loop): Remve data refs from vertice data of partition
15784         graph.
15786 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
15788         * tree-loop-distribution.c (params.h): Include header file.
15789         (MAX_DATAREFS_NUM, DR_INDEX): New macro.
15790         (datarefs_vec): New global var.
15791         (create_rdg_vertices): Use datarefs_vec directly.
15792         (free_rdg): Don't free data references.
15793         (build_rdg): Update use.  Don't free data references.
15794         (distribute_loop): Compute global variable for data references.
15795         Bail out if there are too many data references.
15797 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
15799         * tree-loop-distribution.c (loop_nest): New global var.
15800         (build_rdg): Use loop directly, rather than loop nest.
15801         (pg_add_dependence_edges): Remove loop nest parameter.  Use global
15802         variable directly.
15803         (distribute_loop): Compute global variable loop nest.  Update use.
15805 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
15807         * tree-loop-distribution.c (enum fuse_type, fuse_message): New.
15808         (partition_merge_into): New parameter.  Dump reason for fusion.
15809         (distribute_loop): Update use of partition_merge_into.
15811 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
15813         * tree-loop-distribution.c (bb_top_order_index): New.
15814         (bb_top_order_index_size, bb_top_order_cmp): New.
15815         (stmts_from_loop): Use topological order.
15816         (pass_loop_distribution::execute): Compute and release topological
15817         order for basic blocks.
15819 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
15821         * tree-loop-distribution.c (pass_loop_distribution::execute): Skip
15822         if no loops.
15824 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
15826         * cfgloop.h (struct loop): Add comment.  New field orig_loop_num.
15827         * cfgloopmanip.c (lv_adjust_loop_entry_edge): Comment change.
15828         * internal-fn.c (expand_LOOP_DIST_ALIAS): New function.
15829         * internal-fn.def (LOOP_DIST_ALIAS): New.
15830         * tree-vectorizer.c (fold_loop_vectorized_call): Rename to ...
15831         (fold_loop_internal_call): ... this.
15832         (vect_loop_dist_alias_call): New function.
15833         (set_uid_loop_bbs): Call fold_loop_internal_call.
15834         (vectorize_loops): Fold IFN_LOOP_VECTORIZED and IFN_LOOP_DIST_ALIAS
15835         internal calls.
15837 2017-07-04  Uros Bizjak  <ubizjak@gmail.com>
15839         PR target/81300
15840         * config/i386/i386.md (setcc + movzbl/and to xor + setcc peepholes):
15841         Require dead FLAGS_REG at the beginning of a peephole.
15843 2017-07-04  Uros Bizjak  <ubizjak@gmail.com>
15845         PR target/81294
15846         * config/i386/adxintrin.h (_subborrow_u32): Swap _X and _Y
15847         arguments in the call to __builtin_ia32_sbb_u32.
15848         (_subborrow_u64): Swap _X and _Y arguments in the call to
15849         __builtin_ia32_sbb_u64.
15851 2017-07-04  Jakub Jelinek  <jakub@redhat.com>
15853         PR debug/81278
15854         * tree-vrp.c (compare_assert_loc): Turn into a function template
15855         with stable template parameter.  Only test if a->e is NULL,
15856         !a->e == !b->e has been verified already.  Use e == NULL or
15857         e != NULL instead of e or ! e tests.  If stable is true, don't use
15858         iterative_hash_expr, on the other side allow a or b or both NULL
15859         and sort the NULLs last.
15860         (process_assert_insertions): Sort using compare_assert_loc<false>
15861         instead of compare_assert_loc, later sort using
15862         compare_assert_loc<true> before calling process_assert_insertions_for
15863         in a loop.  Use break instead of continue once seen NULL pointer.
15865 2017-07-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
15867         * config/arm/driver-arm.c (arm_cpu_table): Add entry for ARM
15868         Cortex-R7 and Cortex-R8 processors.
15870 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
15872         * ipa-utils.c (ipa_merge_profiles): Fix merging when dst is
15873         uninitialized while src is not.
15875 2017-07-04  Richard Earnshaw  <rearnsha@arm.com>
15877         * common/config/arm/arm-common.c: Adjust include path for
15878         arm-cpu-cdata.h
15879         * config/arm/t-arm (TM_H): Adjust path for arm-cpu.h.
15880         (arm-cpu.h): Create in build directory.  Adjust dependency rules.
15881         (arm-cpu-data.h): Likewise.
15882         (arm-cpu-cdata.h): Likewise.
15883         * config/arm/arm-cpu.h: Delete.
15884         * config/arm/arm-cpu-cdata.h: Delete.
15885         * config/arm/arm-cpu-data.h: Delete.
15887 2017-07-04  James Greenhalgh  <james.greenhalgh@arm.com>
15889         * config/arm/arm-cpus.in (cortex-a55): New.
15890         (cortex-a75): Likewise.
15891         (cortex-a75.cortex-a55): Likewise.
15892         * config/arm/driver-arm.c (arm_cpu_table): Add cortex-a55 and
15893         cortex-a75.
15894         * doc/invoke.texi (-mcpu): Document cortex-a55 and cortex-a75.
15895         * config/arm/arm-cpu-cdata.h: Regenerate.
15896         * config/arm/arm-cpu-data.h: Regenerate.
15897         * config/arm/arm-cpu.h: Regenerate.
15898         * config/arm/arm-tables.opt: Regenerate.
15899         * config/arm/arm-tune.md: Regenerate.
15901 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
15903         * haifa-sched.c (sched_create_recovery_edges): Update profile.
15905 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
15907         * bb-reorder.c (better_edge_p): Fix handling of uninitialized
15908         probability.
15910 2017-07-04  Richard Sandiford  <richard.sandiford@linaro.org>
15912         PR tree-optimization/81292
15913         * tree-ssa-strlen.c (handle_builtin_strlen): When setting
15914         full_string_p, also call adjust_related_strinfos if the adjustment
15915         is simple, otherwise invalidate related strinfos.
15917 2017-07-04  Martin Liska  <mliska@suse.cz>
15919         PR sanitizer/81040
15920         * sanopt.c (sanitize_rewrite_addressable_params): Mark the
15921         newly created variable as DECL_IGNORED_P.
15923 2017-07-04  Martin Liska  <mliska@suse.cz>
15925         PR ipa/81293
15926         * ipa-inline.c (inline_small_functions):
15927         Use xstrdup_for_dump.
15929 2017-07-04  Tom de Vries  <tom@codesourcery.com>
15931         * graph.c (draw_cfg_edges): Save and restore EDGE_DFS_BACK.
15933 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
15935         PR target/81033
15936         * config/darwin.c (darwin_function_switched_text_sections):
15937         Fix spaces.
15939 2017-07-03  Jan Hubicka  <hubicka@ucw.cz>
15941         * tree-vect-loop-manip.c (vect_do_peeling): Fix scaling up.
15943 2017-07-03  Richard Earnshaw  <rearnsha@arm.com>
15945         * doc/invoke.texi (ARM Options): Add -mbe8 and -mbe32 to option summary.
15947 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
15949         * tree-vect-loop.c (vect_analyze_loop_2): Treat min_scalar_loop_bound,
15950         min_profitable_iters, and th as inclusive lower bounds.
15951         Fix LOOP_VINFO_PEELING_FOR_GAPS condition.
15952         (vect_estimate_min_profitable_iters): Return inclusive lower bounds
15953         for min_profitable_iters and min_profitable_estimate.
15954         (vect_transform_loop): Treat th as an inclusive lower bound.
15955         * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
15957 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
15959         PR target/81033
15960         * config/darwin.c (darwin_function_switched_text_sections):
15961         Replace DECL_NAME with DECL_ASSEMBLER_NAME, split assemble_name_raw
15962         in two pieces, and suppress the use of buf.
15964 2017-07-03  Nathan Sidwell  <nathan@acm.org>
15966         * hash-table.h (hash_table_mod1): Fix indentation.
15968 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
15970         PR middle-end/81290
15971         * predict.c (force_edge_cold): Be more careful about propagation
15972         backward.
15973         * profile-count.h (profile_probability::guessed,
15974         profile_probability::fdo, profile_count::guessed, profile_count::fdo):
15975         New.
15976         * tree-ssa-threadupdate.c (recompute_probabilities): Result is guessed.
15978 2017-07-03  James Greenhalgh  <james.greenhalgh@arm.com>
15980         * doc/invoke.texi (rcpc architecture extension): Document it.
15982 2017-07-03  Richard Biener  <rguenther@suse.de>
15984         PR tree-optimization/60510
15985         * tree-vect-loop.c (vect_create_epilog_for_reduction): Pass in
15986         the scalar reduction PHI and use it.
15987         (vectorizable_reduction): Properly guard the single_defuse_cycle
15988         path for non-SLP reduction chains where we cannot use it.
15989         Rework reduc_def/index and vector type deduction.  Rework
15990         vector operand gathering during reduction op code-gen.
15991         * tree-vect-slp.c (vect_analyze_slp): For failed SLP reduction
15992         chains dissolve the chain and leave it to non-SLP reduction
15993         handling.
15995 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
15997         * tree-data-ref.h (dr_alignment): Declare.
15998         * tree-data-ref.c (dr_alignment): New function.
15999         * tree-vectorizer.h (dataref_aux): Remove base_element_aligned.
16000         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
16001         set it.
16002         * tree-vect-stmts.c (vectorizable_store): Use dr_alignment.
16004 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
16006         * tree-data-ref.h (innermost_loop_behavior): Add base_alignment
16007         and base_misalignment fields.
16008         (DR_BASE_ALIGNMENT, DR_BASE_MISALIGNMENT): New macros.
16009         * tree-data-ref.c: Include builtins.h.
16010         (dr_analyze_innermost): Set up the new innmost_loop_behavior fields.
16011         * tree-vectorizer.h (STMT_VINFO_DR_BASE_ALIGNMENT): New macro.
16012         (STMT_VINFO_DR_BASE_MISALIGNMENT): Likewise.
16013         * tree-vect-data-refs.c: Include tree-cfg.h.
16014         (vect_compute_data_ref_alignment): Use the new innermost_loop_behavior
16015         fields instead of calculating an alignment here.
16016         (vect_analyze_data_refs): Use dr_analyze_innermost.  Dump the new
16017         innermost_loop_behavior fields.
16019 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
16021         * tree-data-ref.h (innermost_loop_behavior): Add a step_alignment
16022         field.
16023         (DR_STEP_ALIGNMENT): New macro.
16024         * tree-vectorizer.h (STMT_VINFO_DR_STEP_ALIGNMENT): Likewise.
16025         * tree-data-ref.c (dr_analyze_innermost): Initalize step_alignment.
16026         (create_data_ref): Print it.
16027         * tree-vect-stmts.c (vectorizable_load): Use the step alignment
16028         to tell whether the step preserves vector (mis)alignment.
16029         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
16030         Move the check for an integer step and generalise to all INTEGER_CST.
16031         (vect_analyze_data_refs): Set DR_STEP_ALIGNMENT when setting DR_STEP.
16032         Print the outer step alignment.
16034 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
16036         * tree-data-ref.h (innermost_loop_behavior): Replace aligned_to
16037         with offset_alignment.
16038         (DR_ALIGNED_TO): Delete.
16039         (DR_OFFSET_ALIGNMENT): New macro.
16040         * tree-vectorizer.h (STMT_VINFO_DR_ALIGNED_TO): Delete.
16041         (STMT_VINFO_DR_OFFSET_ALIGNMENT): New macro.
16042         * tree-data-ref.c (dr_analyze_innermost): Update after above changes.
16043         (create_data_ref): Likewise.
16044         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
16045         (vect_analyze_data_refs): Likewise.
16046         * tree-if-conv.c (if_convertible_loop_p_1): Use memset before
16047         creating dummy innermost behavior.
16049 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
16051         * tree-data-ref.h (dr_analyze_innermost): Replace the dr argument
16052         with a "innermost_loop_behavior *" and refeence tree.
16053         * tree-data-ref.c (dr_analyze_innermost): Likewise.
16054         (create_data_ref): Update call accordingly.
16055         * tree-predcom.c (find_looparound_phi): Likewise.
16057 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
16059         * tree-vectorizer.h (_stmt_vec_info): Replace individual dr_*
16060         fields with dr_wrt_vec_loop.
16061         (STMT_VINFO_DR_BASE_ADDRESS, STMT_VINFO_DR_INIT, STMT_VINFO_DR_OFFSET)
16062         (STMT_VINFO_DR_STEP, STMT_VINFO_DR_ALIGNED_TO): Update accordingly.
16063         (STMT_VINFO_DR_WRT_VEC_LOOP): New macro.
16064         (vect_dr_behavior): New function.
16065         (vect_create_addr_base_for_vector_ref): Remove loop parameter.
16066         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
16067         vect_dr_behavior.  Use a step_preserves_misalignment_p boolean to
16068         track whether the step preserves the misalignment.
16069         (vect_create_addr_base_for_vector_ref): Remove loop parameter.
16070         Use vect_dr_behavior.
16071         (vect_setup_realignment): Update call accordingly.
16072         (vect_create_data_ref_ptr): Likewise.  Use vect_dr_behavior.
16073         * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Update
16074         call to vect_create_addr_base_for_vector_ref.
16075         (vect_create_cond_for_align_checks): Likewise.
16076         * tree-vect-patterns.c (vect_recog_bool_pattern): Copy
16077         STMT_VINFO_DR_WRT_VEC_LOOP as a block.
16078         (vect_recog_mask_conversion_pattern): Likewise.
16079         * tree-vect-stmts.c (compare_step_with_zero): Use vect_dr_behavior.
16080         (new_stmt_vec_info): Remove redundant zeroing.
16082 2017-07-03  Richard Earnshaw  <rearnsha@arm.com>
16084         * common/config/arm/arm-common.c (arm_be8_option): New function.
16085         * config/arm/arm-isa.h (isa_feature): Add new feature bit isa_bit_be8.
16086         (ISA_ARMv6): Add isa_bit_be8.
16087         * config/arm/arm.h (arm_be8_option): Add prototype.
16088         (BE8_SPEC_FUNCTION): New define.
16089         (EXTRA_SPEC_FUNCTIONS): Add BE8_SPEC_FUNCTION.
16090         * config/arm/arm.opt (mbig-endian): Mark as Negative of mlittle-endian.
16091         (mlittle-endian): Similarly.
16092         (mbe8, mbe32): New options.
16093         * config/arm/bpabi.h (BE8_LINK_SPEC): Call arm_be8_option.
16094         * doc/invoke.texi (ARM Options): Document -mbe8 and -mbe32.
16096 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
16098         * tree-cfg.c (gimple_find_sub_bbs): Fix profile updating.
16100 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
16102         * tree-cfgcleanup.c (want_merge_blocks_p): New function.
16103         (cleanup_tree_cfg_bb): Use it.
16104         * profile-count.h (profile_count::of_for_merging, profile_count::merge):
16105         New functions.
16106         * tree-cfg.c (gimple_merge_blocks): Use profile_count::merge.
16108 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
16110         PR bootstrap/81285
16111         * loop-doloop.c (add_test): Update profile.
16113 2017-07-03  Martin Liska  <mliska@suse.cz>
16115         PR sanitize/81040
16116         * sanopt.c (rewrite_usage_of_param): New function.
16117         (sanitize_rewrite_addressable_params): Likewise.
16118         (pass_sanopt::execute): Call rewrite_usage_of_param.
16120 2017-07-03  Richard Biener  <rguenther@suse.de>
16122         * tree-vect-loop.c (vect_create_epilog_for_reduction): Revert
16123         back to using VIEW_CONVERT_EXPR.
16125 2017-07-03  Martin Liska  <mliska@suse.cz>
16127         PR other/78366
16128         * doc/extend.texi: Document when a resolver function is
16129         generated for target_clones.
16131 2017-07-03  Martin Liska  <mliska@suse.cz>
16133         * asan.c (asan_emit_stack_protection): Unpoison just red zones
16134         and shadow memory of auto variables which are subject of
16135         use-after-scope sanitization.
16136         (asan_expand_mark_ifn): Add do set only when is_poison.
16138 2016-07-03  Richard Biener  <rguenther@suse.de>
16140         * tree-vect-loop.c (vect_analyze_loop_operations): Also analyze
16141         reduction PHIs.
16142         (vect_force_simple_reduction): Record reduction def -> phi mapping.
16143         (vectorizable_reduction): Perform reduction PHI creation when
16144         visiting a reduction PHI and adjust and simplify code generation
16145         phase of the reduction op.  Cache dts, use fold_binary, not fold_build2.
16146         (vect_transform_loop): Visit reduction PHIs.
16147         * tree-vect-slp.c (vect_get_and_check_slp_defs): Record reduction
16148         defs into the SLP tree.
16149         (vect_build_slp_tree): Reduction defs terminate the recursion.
16150         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Allow lookup
16151         of reduction defs.
16152         (vect_get_vec_defs_for_stmt_copy): Export.
16153         (vect_get_vec_defs): Likewise.
16154         * tree-vectorizer.h (struct _stmt_vec_info): Amend reduc_def
16155         purpose.
16156         (vect_get_vec_defs_for_stmt_copy): Declare.
16157         (vect_get_vec_defs): Likewise.
16159 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
16161         * tree-data-ref.c (dr_analyze_innermost): Replace the "nest"
16162         parameter with a "loop" parameter and use it instead of the
16163         loop containing DR_STMT.  Don't check simple_iv when doing
16164         BB analysis.  Describe the two analysis modes in the comment.
16166 2017-07-03  Tom de Vries  <tom@codesourcery.com>
16168         PR tree-optimization/69468
16169         * tree-ssa-tail-merge.c (ignore_edge_flags): New constant.
16170         (find_same_succ_bb): Handle ignore_edge_flags.
16172 2017-07-03  Tom de Vries  <tom@codesourcery.com>
16174         PR tree-optimization/81192
16175         * tree-ssa-tail-merge.c (same_succ_hash): Use bb->loop_father->num in
16176         hash.
16177         (same_succ::equal): Don't find bbs to be equal if bb->loop_father
16178         differs.
16179         (find_same_succ_bb): Remove obsolete test on bb->loop_father->latch.
16181 2017-07-03  Tom de Vries  <tom@codesourcery.com>
16183         PR tree-optimization/81192
16184         * tree-ssa-tail-merge.c (same_succ_flush_bb): Handle
16185         BB_SAME_SUCC (bb) == NULL.
16187 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
16189         * cfgrtl.c (rtl_verify_edges): Enable checking of profile_probability
16190         consistency.
16192 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
16194         * dumpfile.c: Include profile-count.h
16195         * tree-cfg.c (gimple_duplicate_sese_tail): Drop UNUSED attributes;
16196         update profile.
16197         (insert_cond_bb): Update profile.
16198         * tree-cfg.h (insert_cond_bb): Update prototype.
16199         * tree-chkp-opt.c (chkp_optimize_string_function_calls): Update.
16200         * tree-dump.c: Do not include tree-cfg.
16202 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
16204         * bb-reorder.c (fix_up_crossing_landing_pad): Update profile.
16206 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
16208         * expect.c (dw2_build_landing_pads): Update profile of the landing pad
16209         bb.
16211 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
16213         * tree-complex.c (expand_complex_div_wide): update profile.
16215 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
16216             Alan Hayward  <alan.hayward@arm.com>
16217             David Sherwood  <david.sherwood@arm.com>
16219         * Makefile.in (MACHMODE_H): Remove insn-modes.h
16220         (CORETYPES_H): New define.
16221         (MOSTLYCLEANFILES): Add insn-modes-inline.h.
16222         (insn-modes-inline.h, s-modes-inline-h): New rules.
16223         (generated_files): Add insn-modes-inline.h.
16224         (RTL_BASE_H, TREE_CORE_H): Use CORETYPES_H instead of coretypes.h.
16225         (build/gensupport.o, build/ggc-none.o, build/print-rtl.o): Likewise.
16226         (build/read-md.o, build/read-rtl.o, build/rtl.o): Likewise.
16227         (build/vec.o, build/hash-table.o, build/inchash.o): Likewise.
16228         (build/gencondmd.o, build/genattr.o, build/genattr-common.o): Likewise.
16229         (build/genattrtab.o, build/genautomata.o, build/gencheck.o): Likewise.
16230         (build/gencodes.o, build/genconditions.o): Likewise.
16231         (build/genconfig.o, build/genconstants.o, build/genemit.o): Likewise.
16232         (build/genenums.o, build/genextract.o, build/genflags.o): Likewise.
16233         (build/gentarget-def.o, build/genmddeps.o, build/genopinit.o)
16234         (build/genoutput.o, build/genpeep.o, build/genpreds.o): Likewise.
16235         (build/genrecog.o, build/genmddump.o, build/genmatch.o): Likewise.
16236         (build/gencfn-macros.o, build/gcov-iov.o): Likewise.
16237         * coretypes.h: Include everything up to real.h for generators.
16238         Include insn-modes.h first.  Include wide-int-print.h after
16239         wide-int.h.  Include insn-modes-inline.h and then machmode.h.
16240         * machmode.h: Don't include insn-modes.h here.
16241         * function-tests.c: Remove includes of signop.h, machmode.h,
16242         double-int.h and wide-int.h.
16243         * rtl.h: Likewise.
16244         * gcc-rich-location.c: Remove includes of machmode.h, double-int.h
16245         and wide-int.h.
16246         * optc-save-gen.awk: Likewise.
16247         * gencheck.c (BITS_PER_UNIT): Delete dummy definition.
16248         * godump.c: Remove include of wide-int-print.h.
16249         * pretty-print.h: Likewise.
16250         * wide-int-print.cc: Likewise.
16251         * wide-int.cc: Likewise.
16252         * hash-map-tests.c: Remove include of signop.h.
16253         * hash-set-tests.c: Likewise.
16254         * rtl-tests.c: Likewise.
16255         * mkconfig.sh: Remove include of machmode.h.
16256         * genmodes.c (emit_insn_modes_h): Split emission of inline functions
16257         into...
16258         (emit_insn_modes_inline_h): ...this new function.  Emit the code
16259         into an insn-modes-inline.h header file, adding appropriate
16260         include guards and end comments.
16261         (emit_insn_modes_c_header): Remove include of machmode.h.
16262         (emit_min_insn_modes_c_header): Include coretypes.h rather than
16263         machmode.h.
16264         (main): Handle -i flag and call emit_insn_modes_inline_h when
16265         it is passed.
16267 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
16269         * tree-ssa-strlen.c (strinfo): Rename the length field to
16270         nonzero_chars.  Add a full_string_p field.
16271         (compare_nonzero_chars, zero_length_string_p): New functions.
16272         (get_addr_stridx): Add an offset_out parameter.
16273         Use compare_nonzero_chars.
16274         (get_stridx): Update accordingly.  Use compare_nonzero_chars.
16275         (new_strinfo): Update after above changes to strinfo.
16276         (set_endptr_and_length): Set full_string_p.
16277         (get_string_length): Update after above changes to strinfo.
16278         (unshare_strinfo): Update call to new_strinfo.
16279         (maybe_invalidate): Likewise.
16280         (get_stridx_plus_constant): Change off to unsigned HOST_WIDE_INT.
16281         Use compare_nonzero_chars and zero_string_p.  Treat nonzero_chars
16282         as a uhwi instead of an shwi.  Update after above changes to
16283         strinfo and new_strinfo.
16284         (zero_length_string): Assert that chainsi contains full strings.
16285         Use zero_length_string_p.  Update call to new_strinfo.
16286         (adjust_related_strinfos): Update after above changes to strinfo.
16287         Copy full_string_p from origsi.
16288         (adjust_last_stmt): Use zero_length_string_p.
16289         (handle_builtin_strlen): Update after above changes to strinfo and
16290         new_strinfo.  Install the lhs as the string length if the previous
16291         entry didn't describe a full string.
16292         (handle_builtin_strchr): Update after above changes to strinfo
16293         and new_strinfo.
16294         (handle_builtin_strcpy): Likewise.
16295         (handle_builtin_strcat): Likewise.
16296         (handle_builtin_malloc): Likewise.
16297         (handle_pointer_plus): Likewise.
16298         (handle_builtin_memcpy): Likewise.  Track nonzero characters
16299         that aren't necessarily followed by a nul terminator.
16300         (handle_char_store): Likewise.
16302 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
16304         PR tree-optimization/80769
16305         * tree-ssa-strlen.c (strinfo): Document that "stmt" is also used
16306         for malloc and calloc.  Document the new invariant that all related
16307         strinfos have delayed lengths or none do.
16308         (verify_related_strinfos): Move earlier in file.
16309         (set_endptr_and_length): New function, split out from...
16310         (get_string_length): ...here.  Also set the lengths of related
16311         strinfos.
16312         (zero_length_string): Assert that chainsi has known (rather than
16313         delayed) lengths.
16314         (adjust_related_strinfos): Likewise.
16316 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
16318         PR tree-optimization/81136
16319         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Only
16320         assert that two references with the same misalignment have the same
16321         compile-time misalignment if those compile-time misalignments
16322         are known.
16324 2017-07-01  Andi Kleen  <ak@linux.intel.com>
16326         * print-tree.c (print_node): Print all attributes.
16328 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
16330         * cfg.c (scale_bbs_frequencies): New function.
16331         * cfg.h (scale_bbs_frequencies): Declare it.
16332         * cfgloopanal.c (single_likely_exit): Cleanup.
16333         * cfgloopmanip.c (scale_loop_frequencies): Take profile_probability
16334         as parameter.
16335         (scale_loop_profile): Likewise.
16336         (loop_version): Likewise.
16337         (create_empty_loop_on_edge): Update.
16338         * cfgloopmanip.h (scale_loop_frequencies, scale_loop_profile,
16339         scale_loop_frequencies, scale_loop_profile, loopify,
16340         loop_version): Update prototypes.
16341         * modulo-sched.c (sms_schedule): Update.
16342         * predict.c (unlikely_executed_edge_p): Also check probability.
16343         (probably_never_executed_edge_p): Fix typo.
16344         * tree-if-conv.c (version_loop_for_if_conversion): Update.
16345         * tree-parloops.c (gen_parallel_loop): Update.
16346         * tree-ssa-loop-ivcanon.c (try_peel_loop): Update.
16347         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
16348         * tree-ssa-loop-split.c (split_loop): Update.
16349         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
16350         * tree-vect-loop-manip.c (vect_do_peeling): Update.
16351         (vect_loop_versioning): Update.
16352         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
16354 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
16356         * trans-mem.c (split_bb_make_tm_edge): Update profile.
16358 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
16360         * tree-if-conv.c (combine_blocks): Use make_single_succ_edge
16361         to keep profile consistent.
16363 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
16365         * cfgrtl.c (rtl_flow_call_edges_add): Update profile.
16366         * tree-cfg.c (gimple_flow_call_edges_add): Likewise.
16367         * profile-count.h (max_safe_multiplier): Make unsigned.
16368         (profile_count::guessed_zero): New.
16370 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
16372         * bb-reorder.c (fix_up_crossing_landing_pad,
16373         fix_crossing_conditional_branches): Use make_single_succ_edge
16374         to keep profile consistent.
16376 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
16378         * tree-vect-loop.c (optimize_mask_stores): Use make_single_succ_edge
16379         to update profile.
16381 2017-07-01  Jakub Jelinek  <jakub@redhat.com>
16383         PR sanitizer/81262
16384         * bb-reorder.c (fix_up_fall_thru_edges): Move variable declarations to
16385         the right scopes, make sure cond_jump isn't preserved between multiple
16386         iterations.  Search for fallthru edge whenever there are 3+ edges and
16387         use find_fallthru_edge for it.
16389 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
16391         Patch by Alexander Monakov <amonakov@ispras.ru>
16392         * sel-sched-ir.c (compute_succs_info): Handle uninitialized
16393         probabilities consistently.
16395 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
16397         * pa.c (pa_expand_compare_and_swap_loop): Update call of
16398         emit_cmp_and_jump_insns.
16400 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
16402         PR ipa/81261
16403         * tree-inline.c (expand_call_inline): Combine profile statuses.
16405 2017-06-30  Andrew Pinski  <apinski@cavium.com>
16407         * tree-if-conv.c (predicate_scalar_phi): Update new_stmt if
16408         fold_stmt returned true.
16410 2017-06-30  Nathan Sidwell  <nathan@acm.org>
16412         * ggc.h (empty_string): Delete.
16413         * cfgexpand.c (expand_asm_stmt): Use plain "".
16414         * optabs.c (expand_asm_memory_barrier): Likewise.
16415         * stringpool.c (empty_string): Delete.
16416         (digit_vector, digit_string): Delete.
16417         (ggc_alloc_string): Use plain "", don't optimize single digit
16418         strings.  Use ggc_alloc_atomic.
16420 2017-06-30  Richard Earnshaw  <rearnsha@arm.com>
16422         * rtlanal.c (insn_rtx_cost): If a parallel contains exactly one
16423         comparison set and one other set, use the cost of the non-comparison
16424         set.
16426 2017-06-30  Nathan Sidwell  <nathan@acm.org>
16428         * ggc.h: Replace all 'static inline' with plain 'inline'.  Fix
16429         some formatting.
16431 2017-06-30  Peter Bergner  <bergner@vnet.ibm.com>
16433         * tree-cfg.c (group_case_labels_stmt): Merge scanning and compressing
16434         loops.  Remove now unneeded calls to gimple_switch_set_label() that
16435         just set removed labels to NULL_TREE.
16437 2017-06-30  Aldy Hernandez  <aldyh@redhat.com>
16439         * tree-ssanames.c (set_range_info_raw): Abstract from ...
16440         (set_range_info): ...here.  Only call set_range_info_raw if domain
16441         is useful.
16442         (set_nonzero_bits): Call set_range_info_raw.
16443         * tree-ssanames.h (set_range_info_raw): New.
16445 2017-06-30  Jakub Jelinek  <jakub@redhat.com>
16447         PR target/81225
16448         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): For V8FI,
16449         V16FI and VI8F_256 iterators, use <store_mask_predicate> instead
16450         of nonimmediate_operand and <store_mask_constraint> instead of m
16451         for the input operand.  For V8FI iterator, always split if input
16452         is a MEM.  For V16FI and V8SF_256 iterators, don't test if both
16453         operands are MEM if <mask_applied>.  For VI4F_256 iterator, use
16454         <store_mask_predicate> instead of register_operand and
16455         <store_mask_constraint> instead of v for the input operand.  Make
16456         sure both operands aren't MEMs for if not <mask_applied>.
16458 2017-06-30  Sylvestre Ledru  <sylvestre@debian.org>
16460         * lto-wrapper.c (copy_file) Close both file descriptors before
16461         exiting normally.
16463 2017-06-30  Martin Liska  <mliska@suse.cz>
16465         PR ipa/81214
16466         * multiple_target.c (create_dispatcher_calls): Make ifunc
16467         also for function that don't have calls or are not referenced.
16469 2017-06-30  Richard Biener  <rguenther@suse.de>
16471         * tree-vect-slp.c (vect_slp_analyze_node_operations): Only
16472         analyze the first scalar stmt.  Move vector type computation
16473         for the BB case here from ...
16474         * tree-vect-stmts.c (vect_analyze_stmt): ... here.  Guard
16475         live operation processing in the SLP case properly.
16477 2017-06-30  Richard Biener  <rguenther@suse.de>
16479         * graph.c (draw_cfg_node_succ_edges): Fix broken dot syntax.
16481 2017-06-30  Martin Liska  <mliska@suse.cz>
16483         PR sanitizer/81021
16484         * tree-eh.c (lower_resx): Call BUILT_IN_ASAN_HANDLE_NO_RETURN
16485         before BUILT_IN_UNWIND_RESUME when ASAN is used.
16487 2017-06-30  Yvan Roux  <yvan.roux@linaro.org>
16489         * doc/invoke.texi (AArch64): Add missing options and remove redundant
16490         ones.
16492 2017-06-30  Richard Biener  <rguenther@suse.de>
16494         PR tree-optimization/81249
16495         * tree-vect-loop.c (vect_create_epilog_for_reduction): Convert
16496         condition reduction result to original scalar type.
16498 2017-06-30  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16500         * profile-count.h (enum profile_quality): Fix typos and whitespace
16501         issues.
16503 2017-06-30  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
16505         * config/s390/s390.c (s390_expand_setmem): Adjust to the new data
16506         type for branch probabilities.
16508 2017-06-29  Julian Brown  <julian@codesourcery.com>
16509             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
16511         * config/aarch64/aarch64-fusion-pairs.def: Add ALU_BRANCH entry.
16512         * config/aarch64/aarch64.c (AARCH64_FUSE_ALU_BRANCH): New fusion type.
16513         (thunderx2t99_tunings): Set AARCH64_FUSE_ALU_BRANCH flag.
16514         (aarch_macro_fusion_pair_p): Add support for AARCH64_FUSE_ALU_BRANCH.
16516 2017-06-29  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
16518         * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Push the
16519         check for CC usage into AARCH64_FUSE_CMP_BRANCH.
16520         * config/i386/i386.c (ix86_macro_fusion_pair_p): Push the check for
16521         CC usage from generic code to here.
16522         * sched-deps.c (sched_macro_fuse_insns): Move the condition for
16523         CC usage into the target macros.
16525 2017-06-29  Maya Rashish  <coypu@sdf.org>
16527         * config/netbsd.h (NETBSD_LIB_SPEC): Add -lc when creating shared
16528         objects.
16530 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
16532         * arm/arm-builtins.c: Include profile-count.h
16533         * except.c (sjlj_emit_function_enter): Use
16534         profile_probability::unlikely.
16536 2017-06-29  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16538         * config/rs6000/rs6000.c (toc_relative_expr_p): Make tocrel_base
16539         and tocrel_offset be pointer args rather than implicitly using
16540         static versions.
16541         (legitimate_constant_pool_address_p, rs6000_emit_move,
16542         const_load_sequence_p, adjust_vperm): Add local tocrel_base and
16543         tocrel_offset and use in toc_relative_expr_p call.
16544         (print_operand, print_operand_address): Use static tocrel_base_oac
16545         and tocrel_offset_oac.
16546         (rs6000_output_addr_const_extra): Use static tocrel_base_oac and
16547         tocrel_offset_oac.
16549 2017-06-29  Maya Rashish  <coypu@sdf.org>
16551         * config/vax/builtins.md (ffssi2_internal): Correct constraint.
16553 2017-06-29  Eric Botcazou  <ebotcazou@adacore.com>
16555         * expr.c (expand_expr) <normal_inner_ref>: When testing for unaligned
16556         objects, take into account only the alignment of 'op0' and 'mode1' if
16557         'op0' is a MEM.
16559 2017-06-29  Steve Ellcey  <sellcey@cavium.com>
16561         * ccmp.c (ccmp_tree_comparison_p): New function.
16562         (ccmp_candidate_p): Update to use above function.
16563         (get_compare_parts): New function.
16564         (expand_ccmp_next): Update to use new functions.
16565         (expand_ccmp_expr_1): Take tree arg instead of gimple, update to use
16566         new functions.
16567         (expand_ccmp_expr): Pass tree instead of gimple to expand_ccmp_expr_1,
16568         take mode as argument.
16569         * ccmp.h (expand_ccmp_expr): Add mode as argument.
16570         * expr.c (expand_expr_real_1): Pass mode as argument.
16572 2017-06-29  Segher Boessenkool  <segher@kernel.crashing.org>
16574         * combine.c (combine_instructions): Print insns to dump_file, together
16575         with their costs.
16577 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
16579         * asan.c (asan_emit_stack_protection): Update.
16580         (create_cond_insert_point): Update.
16581         * auto-profile.c (afdo_propagate_circuit): Update.
16582         * basic-block.h (struct edge_def): Turn probability to
16583         profile_probability.
16584         (EDGE_FREQUENCY): Update.
16585         * bb-reorder.c (find_traces_1_round): Update.
16586         (better_edge_p): Update.
16587         (sanitize_hot_paths): Update.
16588         * cfg.c (unchecked_make_edge): Initialize probability to uninitialized.
16589         (make_single_succ_edge): Update.
16590         (check_bb_profile): Update.
16591         (dump_edge_info): Update.
16592         (update_bb_profile_for_threading): Update.
16593         * cfganal.c (connect_infinite_loops_to_exit): Initialize new edge
16594         probabilitycount to 0.
16595         * cfgbuild.c (compute_outgoing_frequencies): Update.
16596         * cfgcleanup.c (try_forward_edges): Update.
16597         (outgoing_edges_match): Update.
16598         (try_crossjump_to_edge): Update.
16599         * cfgexpand.c (expand_gimple_cond): Update make_single_succ_edge.
16600         (expand_gimple_tailcall): Update.
16601         (construct_init_block): Use make_single_succ_edge.
16602         (construct_exit_block): Use make_single_succ_edge.
16603         * cfghooks.c (verify_flow_info): Update.
16604         (redirect_edge_succ_nodup): Update.
16605         (split_edge): Update.
16606         (account_profile_record): Update.
16607         * cfgloopanal.c (single_likely_exit): Update.
16608         * cfgloopmanip.c (scale_loop_profile): Update.
16609         (set_zero_probability): Remove.
16610         (duplicate_loop_to_header_edge): Update.
16611         * cfgloopmanip.h (loop_version): Update prototype.
16612         * cfgrtl.c (try_redirect_by_replacing_jump): Update.
16613         (force_nonfallthru_and_redirect): Update.
16614         (update_br_prob_note): Update.
16615         (rtl_verify_edges): Update.
16616         (purge_dead_edges): Update.
16617         (rtl_lv_add_condition_to_bb): Update.
16618         * cgraph.c: (cgraph_edge::redirect_call_stmt_to_calle): Update.
16619         * cgraphunit.c (init_lowered_empty_function): Update.
16620         (cgraph_node::expand_thunk): Update.
16621         * cilk-common.c: Include profile-count.h
16622         * dojump.c (inv): Remove.
16623         (jumpifnot): Update.
16624         (jumpifnot_1): Update.
16625         (do_jump_1): Update.
16626         (do_jump): Update.
16627         (do_jump_by_parts_greater_rtx): Update.
16628         (do_compare_rtx_and_jump): Update.
16629         * dojump.h (jumpifnot, jumpifnot_1, jumpif_1, jumpif, do_jump,
16630         do_jump_1. do_compare_rtx_and_jump): Update prototype.
16631         * dwarf2cfi.c: Include profile-count.h
16632         * except.c (dw2_build_landing_pads): Use make_single_succ_edge.
16633         (sjlj_emit_dispatch_table): Likewise.
16634         * explow.c: Include profile-count.h
16635         * expmed.c (emit_store_flag_force): Update.
16636         (do_cmp_and_jump): Update.
16637         * expr.c (compare_by_pieces_d::generate): Update.
16638         (compare_by_pieces_d::finish_mode): Update.
16639         (emit_block_move_via_loop): Update.
16640         (store_expr_with_bounds): Update.
16641         (store_constructor): Update.
16642         (expand_expr_real_2): Update.
16643         (expand_expr_real_1): Update.
16644         * expr.h (try_casesi, try_tablejump): Update prototypes.
16645         * gimple-pretty-print.c (dump_probability): Update.
16646         (dump_profile): New.
16647         (dump_gimple_label): Update.
16648         (dump_gimple_bb_header): Update.
16649         * graph.c (draw_cfg_node_succ_edges): Update.
16650         * hsa-gen.c (convert_switch_statements): Update.
16651         * ifcvt.c (cheap_bb_rtx_cost_p): Update.
16652         (find_if_case_1): Update.
16653         (find_if_case_2): Update.
16654         * internal-fn.c (expand_arith_overflow_result_store): Update.
16655         (expand_addsub_overflow): Update.
16656         (expand_neg_overflow): Update.
16657         (expand_mul_overflow): Update.
16658         (expand_vector_ubsan_overflow): Update.
16659         * ipa-cp.c (good_cloning_opportunity_p): Update.
16660         * ipa-split.c (split_function): Use make_single_succ_edge.
16661         * ipa-utils.c (ipa_merge_profiles): Update.
16662         * loop-doloop.c (add_test): Update.
16663         (doloop_modify): Update.
16664         * loop-unroll.c (compare_and_jump_seq): Update.
16665         (unroll_loop_runtime_iterations): Update.
16666         * lra-constraints.c (lra_inheritance): Update.
16667         * lto-streamer-in.c (input_cfg): Update.
16668         * lto-streamer-out.c (output_cfg): Update.
16669         * mcf.c (adjust_cfg_counts): Update.
16670         * modulo-sched.c (sms_schedule): Update.
16671         * omp-expand.c (expand_omp_for_init_counts): Update.
16672         (extract_omp_for_update_vars): Update.
16673         (expand_omp_ordered_sink): Update.
16674         (expand_omp_for_ordered_loops): Update.
16675         (expand_omp_for_generic): Update.
16676         (expand_omp_for_static_nochunk): Update.
16677         (expand_omp_for_static_chunk): Update.
16678         (expand_cilk_for): Update.
16679         (expand_omp_simd): Update.
16680         (expand_omp_taskloop_for_outer): Update.
16681         (expand_omp_taskloop_for_inner): Update.
16682         * omp-simd-clone.c (simd_clone_adjust): Update.
16683         * optabs.c (expand_doubleword_shift): Update.
16684         (expand_abs): Update.
16685         (emit_cmp_and_jump_insn_1): Update.
16686         (expand_compare_and_swap_loop): Update.
16687         * optabs.h (emit_cmp_and_jump_insns): Update prototype.
16688         * predict.c (predictable_edge_p): Update.
16689         (edge_probability_reliable_p): Update.
16690         (set_even_probabilities): Update.
16691         (combine_predictions_for_insn): Update.
16692         (combine_predictions_for_bb): Update.
16693         (propagate_freq): Update.
16694         (estimate_bb_frequencies): Update.
16695         (force_edge_cold): Update.
16696         * profile-count.c (profile_count::dump): Add missing space into dump.
16697         (profile_count::debug): Add newline.
16698         (profile_count::differs_from_p): Explicitly convert to unsigned.
16699         (profile_count::stream_in): Update.
16700         (profile_probability::dump): New member function.
16701         (profile_probability::debug): New member function.
16702         (profile_probability::differs_from_p): New member function.
16703         (profile_probability::differs_lot_from_p): New member function.
16704         (profile_probability::stream_in): New member function.
16705         (profile_probability::stream_out): New member function.
16706         * profile-count.h (profile_count_quality): Rename to ...
16707         (profile_quality): ... this one.
16708         (profile_probability): New.
16709         (profile_count): Update.
16710         * profile.c (compute_branch_probabilities): Update.
16711         * recog.c (peep2_attempt): Update.
16712         * sched-ebb.c (schedule_ebbs): Update.
16713         * sched-rgn.c (find_single_block_region): Update.
16714         (compute_dom_prob_ps): Update.
16715         (schedule_region): Update.
16716         * sel-sched-ir.c (compute_succs_info): Update.
16717         * stmt.c (struct case_node): Update.
16718         (do_jump_if_equal): Update.
16719         (get_outgoing_edge_probs): Update.
16720         (conditional_probability): Update.
16721         (emit_case_dispatch_table): Update.
16722         (expand_case): Update.
16723         (expand_sjlj_dispatch_table): Update.
16724         (emit_case_nodes): Update.
16725         * targhooks.c: Update.
16726         * tracer.c (better_p): Update.
16727         (find_best_successor): Update.
16728         * trans-mem.c (expand_transaction): Update.
16729         * tree-call-cdce.c: Update.
16730         * tree-cfg.c (gimple_split_edge): Upate.
16731         (move_sese_region_to_fn): Upate.
16732         * tree-cfgcleanup.c (cleanup_control_expr_graph): Upate.
16733         * tree-eh.c (lower_resx): Upate.
16734         (cleanup_empty_eh_move_lp): Upate.
16735         * tree-if-conv.c (version_loop_for_if_conversion): Update.
16736         * tree-inline.c (copy_edges_for_bb): Update.
16737         (copy_cfg_body): Update.
16738         * tree-parloops.c (gen_parallel_loop): Update.
16739         * tree-profile.c (gimple_gen_ic_func_profiler): Update.
16740         (gimple_gen_time_profiler): Update.
16741         * tree-ssa-dce.c (remove_dead_stmt): Update.
16742         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
16743         * tree-ssa-loop-im.c (execute_sm_if_changed): Update.
16744         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
16745         (unloop_loops): Update.
16746         (try_peel_loop): Update.
16747         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
16748         * tree-ssa-loop-split.c (connect_loops): Update.
16749         (split_loop): Update.
16750         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
16751         (hoist_guard): Update.
16752         * tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
16753         * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
16754         (value_replacement): Update.
16755         * tree-ssa-reassoc.c (branch_fixup): Update.
16756         * tree-ssa-tail-merge.c (replace_block_by): Update.
16757         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
16758         (create_edge_and_update_destination_phis): Update.
16759         (compute_path_counts): Update.
16760         (recompute_probabilities): Update.
16761         (update_joiner_offpath_counts): Update.
16762         (freqs_to_counts_path): Update.
16763         (duplicate_thread_path): Update.
16764         * tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
16765         (struct switch_conv_info): Update.
16766         (gen_inbound_check): Update.
16767         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
16768         (vect_do_peeling): Update.
16769         (vect_loop_versioning): Update.
16770         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
16771         (optimize_mask_stores): Update.
16772         * ubsan.c (ubsan_expand_null_ifn): Update.
16773         * value-prof.c (gimple_divmod_fixed_value): Update.
16774         (gimple_divmod_fixed_value_transform): Update.
16775         (gimple_mod_pow2): Update.
16776         (gimple_mod_pow2_value_transform): Update.
16777         (gimple_mod_subtract): Update.
16778         (gimple_mod_subtract_transform): Update.
16779         (gimple_ic): Update.
16780         (gimple_stringop_fixed_value): Update.
16781         (gimple_stringops_transform): Update.
16782         * value-prof.h: Update.
16784 2017-06-29  Carl Love  <cel@us.ibm.com>
16786         * config/rs6000/rs6000-c.c: Add support for built-in functions
16787         vector signed int vec_signed (vector float);
16788         vector signed long long vec_signed (vector double);
16789         vector signed int vec_signed2 (vector double, vector double);
16790         vector signed int vec_signede (vector double);
16791         vector signed int vec_signedo (vector double);
16792         * config/rs6000/rs6000.c (rs6000_generate_vsigned2_code): Add
16793         instruction generator.
16794         * config/rs6000/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
16795         UNSPEC_VSX_VSIGNED2): Add UNSPECS.
16796         (vsx_xvcvspsxws, vsx_xvcvdpuxds_scale, vsx_xvcvspuxws, vsigned2_v2df):
16797         Add define_insn.
16798         (vsignedo_v2df, vsignede_v2df, vunsigned2_v2df, vunsignedo_v2df,
16799         vunsignede_v2df): Add define_expands.
16800         * config/rs6000/rs6000-builtin.def (VEC_SIGNED, VEC_UNSIGNED,
16801         VEC_SIGNED2, VEC_UNSIGNED2, VEC_SIGNEDE, VEC_UNSIGNEDE, VEC_SIGNEDO,
16802         VEC_UNSIGNEDO): Add definitions.
16803         * config/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
16804         UNSPEC_VSX_VSIGNED2): Add UNSPECs.
16805         (vsx_xvcvspsxws, vsx_xvcvspuxws): Add define_insn.
16806         (vsigned2_v2df, vsigendo_v2df, vsignede_v2df,
16807         vunsigned2_v2df, vunsignedo_v2df, vunsignede_v2df): Add define_expands.
16808         * config/rs6000/altivec.h (vec_signed, vec_signed2,
16809         vec_signede and vec_signedo, vec_unsigned, vec_unsigned2,
16810         vec_unsignede, vec_unsignedo): Add builtin defines.
16811         * config/rs6000-protos.h (rs6000_generate_vsigned2_code): Add extern
16812         declaration.
16813         * doc/extend.texi: Update the built-in documentation file for the
16814         new built-in functions.
16816 2017-06-29  Richard Biener  <rguenther@suse.de>
16818         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Do not add
16819         reduction chains to LOOP_VINFO_REDUCTIONS.
16820         * tree-vect-slp.c (vect_analyze_slp): Continue looking for
16821         SLP reductions after processing reduction chains.
16823 2017-06-29  Nathan Sidwell  <nathan@acm.org>
16825         * builtins.c (fold_builtin_FUNCTION): Use
16826         lang_hooks.decl_printable_name.
16828 2017-06-29  Peter Bergner  <bergner@vnet.ibm.com>
16830         PR middle-end/81194
16831         * cfgexpand.c (expand_gimple_stmt_1): Handle switch statements
16832         with only one label.
16833         * stmt.c (expand_case): Assert NCASES is greater than one.
16835 2017-06-29  Richard Biener  <rguenther@suse.de>
16837         * tree-cfg.c (group_case_labels_stmt): Return whether we changed
16838         anything.
16839         (group_case_labels): Likewise.
16840         (find_taken_edge): Push sanity checking on val to workers...
16841         (find_taken_edge_cond_expr): ... here
16842         (find_taken_edge_switch_expr): ... and here, handle cases
16843         with just a default label.
16844         * tree-cfg.h (group_case_labels_stmt): Adjust prototype.
16845         (group_case_labels): Likewise.
16846         * tree-cfgcleanup.c (execute_cleanup_cfg_post_optimizing): When
16847         group_case_labels does anything cleanup the CFG again.
16849 2017-06-29  Bin Cheng  <bin.cheng@arm.com>
16851         PR tree-optimization/81196
16852         * tree-ssa-loop-niter.c (number_of_iterations_cond): Handle loop
16853         exit condition comparing two IVs.
16855 2017-06-29  Richard Earnshaw  <rearnsha@arm.com>
16857         * config/arm/parsecpu.awk (gen_comm_data): Add initializer for
16858         profile to the dummy entry at the end of the list of architectures.
16859         * config/arm/arm-cpu-cdata.h: Regenerated.
16861 2017-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16862             Michael Collison <michael.collison@arm.com>
16864         PR target/70119
16865         * config/aarch64/aarch64.md (*aarch64_<optab>_reg_<mode>3_mask1):
16866         New pattern.
16867         (*aarch64_reg_<mode>3_neg_mask2): New pattern.
16868         (*aarch64_reg_<mode>3_minus_mask): New pattern.
16869         (*aarch64_<optab>_reg_di3_mask2): New pattern.
16870         * config/aarch64/aarch64.c (aarch64_rtx_costs): Account for cost
16871         of shift when the shift amount is masked with constant equal to
16872         the size of the mode.
16873         * config/aarch64/predicates.md (subreg_lowpart_operator): New
16874         predicate.
16876 2017-06-29  Martin Liska  <mliska@suse.cz>
16878         * config/i386/i386.opt: Change range from [1,5] to [0,5].
16880 2017-06-29  Yury Gribov  <tetra2005@gmail.com>
16882         PR bootstrap/80565
16883         * ipa-cp.c (allocate_and_init_ipcp_value): Add initialization
16884         code.
16885         * ipa-inline.h
16886         (edge_growth_cache_entry::edge_growth_cache_entry): New
16887         function.
16888         (reset_edge_growth_cache): Update to use constructor.
16890 2017-06-28  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16892         * config/aarch64/aarch64.h (AARCH64_EXPAND_ALIGNMENT): New.
16893         (DATA_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
16894         (LOCAL_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
16896 2017-06-28  Sebastian Peryt  <sebastian.peryt@intel.com>
16898         * config/i386/avx512vlintrin.h (_mm256_permutexvar_epi64)
16899         (_mm256_permutexvar_epi32, _mm256_permutex_epi64): New intrinsics.
16901 2017-06-28  Szabolcs Nagy  <szabolcs.nagy@arm.com>
16903         * config.gcc (*-linux-musl*): Add t-musl tmake_file.
16904         (*-linux-uclibc*): Add t-uclibc tmake_file.
16905         * config/t-musl: New.
16906         * config/t-uclibc: New.
16908 2017-06-28  Richard Earnshaw  <rearnsha@arm.com>
16910         * config/arm/parsecpu.awk (profile): Parse new keyword in an arch
16911         context.
16912         (gen_comm_data): Emit architectural setting of arch_prof.
16913         * config/arm/arm-cpus.in (armv6-m, armv6s-m, armv7-a, armv7ve): Set the
16914         profile.
16915         (armv7-r, armv7-m, armv7e-m, armv8-a, armv8.1-a, armv8.2-a): Likewise.
16916         (armv8-m.base, armv8-m.main): Likewise.
16917         * arm-protos.h (arm_build_target): Add profile field.
16918         (arch_option): Likewise.
16919         * config/arm/arm.c (arm_configure_build_target): Copy the profile to
16920         the active target.
16921         * config/arm/arm.h (TARGET_ARM_ARCH_PROFILE): Use
16922         arm_active_target.profile.
16924 2017-06-28  Richard Biener  <rguenther@suse.de>
16926         PR middle-end/81227
16927         * fold-const.c (negate_expr_p): Use TYPE_UNSIGNED, not
16928         TYPE_OVERFLOW_WRAPS.
16929         * match.pd (negate_expr_p): Likewise.
16930         * tree-ssa-reassoc.c (optimize_range_tests_diff): Use
16931         fold_build2, not fold_binary.
16933 2017-06-28  Wilco Dijkstra  <wdijkstr@arm.com>
16935         * config/aarch64/aarch64 (aarch64_expand_mov_immediate):
16936         Convert memory address to Pmode.
16937         (aarch64_print_operand): Assert MEM operands are always Pmode.
16939 2017-06-28  Wilco Dijkstra  <wdijkstr@arm.com>
16941         PR target/79665
16942         * config/arm/aarch-common.c (arm_no_early_alu_shift_dep):
16943         Remove redundant if.
16944         (aarch_forward_to_shift_is_not_shifted_reg): Remove.
16945         * config/arm/aarch-common-protos.h
16946         (aarch_forward_to_shift_is_not_shifted_re): Remove.
16947         * config/arm/cortex-a53.md: Use arm_no_early_alu_shift_dep in bypass.
16949 2017-06-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
16951         PR ipa/81238
16952         * multiple_target.c (create_dispatcher_calls): Set the default
16953         clone to be static, not public.
16955 2017-06-28  Richard Biener  <rguenther@suse.de>
16957         * tree-vect-loop.c (vectorizable_reduction): Move special
16958         cond reduction IV var creation ...
16959         (vect_create_epilog_for_reduction): ... here.  Remove induction_index
16960         parameter.  Use STMT_VINFO_VECTYPE.
16961         * tree-vect-slp.c (vect_get_constant_vectors): Properly reset
16962         constant_p.
16964 2017-06-28  Martin Liska  <mliska@suse.cz>
16966         PR ipa/81128
16967         * ipa-visibility.c (non_local_p): Handle visibility.
16969 2017-06-28  Martin Liska  <mliska@suse.cz>
16971         PR driver/79659
16972         * common.opt: Add IntegerRange to various options.
16973         * opt-functions.awk (integer_range_info): New function.
16974         * optc-gen.awk: Add integer_range_info to cl_options struct.
16975         * opts-common.c (decode_cmdline_option): Handle
16976         CL_ERR_INT_RANGE_ARG.
16977         (cmdline_handle_error): Likewise.
16978         * opts.c (print_filtered_help): Show valid interval in
16979         when --help is provided.
16980         * opts.h (struct cl_option): Add range_min and range_max fields.
16981         * config/i386/i386.opt: Add IntegerRange for -mbranch-cost.
16983 2017-06-28  Marc Glisse  <marc.glisse@inria.fr>
16985         * match.pd ((X & ~Y) | (~X & Y)): Generalize to + and ^.
16986         (x * C EQ/NE y * C): New transformation.
16988 2017-06-28  Christophe Lyon  <christophe.lyon@linaro.org>
16990         * genmultilib (combination_space): Accept '+' in option names.
16992 2017-06-28  Martin Liska  <mliska@suse.cz>
16994         PR sanitizer/81224
16995         * asan.c (instrument_derefs): Bail out inner references
16996         that are hard register variables.
16998 2017-06-28  Jakub Jelinek  <jakub@redhat.com>
17000         PR target/81175
17001         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Use def_builtin
17002         rather than def_builtin_pure for __builtin_ia32_gatherpf*.
17004 2017-06-28  Richard Biener  <rguenther@suse.de>
17006         * tree-vectorizer.h (vect_get_vec_defs): Remove.
17007         (vect_get_slp_defs): Adjust.
17008         * tree-vect-loop.c (get_initial_defs_for_reduction): Split
17009         out from ...
17010         * tree-vect-slp.c (vect_get_constant_vectors): ... here and
17011         simplify.
17012         * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
17013         get_initial_defs_for_reduction instead of vect_get_vec_defs.
17014         (vectorizable_reduction): Adjust.
17015         * tree-vect-slp.c (vect_get_constant_vectors): Remove reduction
17016         handling.
17017         (vect_get_slp_defs): Likewise.
17018         * tree-vect-stmts.c (vect_get_vec_defs): Make static and adjust.
17019         (vectorizable_bswap): Adjust.
17020         (vectorizable_call): Likewise.
17021         (vectorizable_conversion): Likewise.
17022         (vectorizable_assignment): Likewise.
17023         (vectorizable_shift): Likewise.
17024         (vectorizable_operation): Likewise.
17025         (vectorizable_store): Likewise.
17026         (vectorizable_condition): Likewise.
17027         (vectorizable_comparison): Likewise.
17029 2017-06-28  Michael Collison  <michael.collison@arm.com>
17031         PR target/68535
17032         * config/arm/arm.c (gen_ldm_seq): Remove last unnecessary
17033         set of base_reg
17034         (arm_gen_movmemqi): Removed unused variable 'i'.
17035         Convert 'for' loop into 'while' loop.
17036         (arm_expand_prologue): Remove last unnecessary set of insn.
17037         (thumb_pop): Remove unused variable 'pushed_words'.
17038         (thumb_exit): Remove last unnecessary set of regs_to_pop.
17040 2017-06-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17042         * config/s390/predicates.md: Use s390_rel_address_ok_p.
17043         * config/s390/s390-protos.h: Add prototype of
17044         s390_rel_address_ok_p.
17045         * config/s390/s390.c (s390_got_symbol): New function.
17046         (s390_rel_address_ok_p): New function.
17047         (legitimize_pic_address): Use s390_rel_address_ok_p.
17048         (s390_load_got): Use s390_got_symbol.
17049         (s390_option_override): Issue error if
17050         -mno-pic-data-is-text-relative is used without -fpic/-fPIC.
17051         * config/s390/s390.h (TARGET_DEFAULT_PIC_DATA_IS_TEXT_RELATIVE):
17052         New macro.
17053         * config/s390/s390.opt: New option mpic-data-is-text-relative.
17055 2017-06-27  Andrew Pinski  <apinski@cavium.com>
17057         * match.pd (X >/>=/</<= 0 ? 1.0 : -1.0): New patterns.
17058         (X * copysign (1.0, X)): New pattern.
17059         (X * copysign (1.0, -X)): New pattern.
17060         (copysign (-1.0, CST)): New pattern.
17062 2017-06-27  Joseph Myers  <joseph@codesourcery.com>
17064         * genmultilib (combination_space): Remove variable.
17065         Validate reuse rules against regular expression for any sequence
17066         of multilib options in any order.
17068 2017-06-27  Michael Collison  <michael.collison@arm.com>
17070         * config/aarch64/aarch64-simd.md (aarch64_combine<mode>): Directly
17071         call aarch64_split_simd_combine.
17072         * (aarch64_combine_internal<mode>): Delete pattern.
17073         * config/aarch64/aarch64.c (aarch64_split_simd_combine):
17074         Allow register and subreg operands.
17076 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
17078         * config/i386/vxworks.h (ASM_SPEC): Remove definition. No target
17079         specific need, just fallback on defaults.
17080         (ASM_OUTPUT_ALIGNED_BSS): Add #undef before #define.
17082 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
17083             Olivier Hainque  <hainque@adacore.com>
17085         * config/i386/vxworks.h (DBX_REGISTER_NUMBER): Pick distinct
17086         map for 64bits.
17087         (TARGET_OS_CPP_BUILTINS): builtin_define CPU to X86_64 for 64bit
17088         targets. Pick a default if no particular attempt applied.
17089         (STACK_CHECK_PROTECT): Double for 64bit targets, which have
17090         larger contexts.
17092 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
17094         * config.gcc (i*86-wrs-vxworks7): Handle new acceptable triplet.
17095         (x86_64-wrs-vxworks7): Likewise.
17097 2017-06-27  Marek Polacek  <polacek@redhat.com>
17099         PR sanitizer/81223
17100         * ubsan.c (instrument_null): Check get_base_address's result for null.
17102 2017-06-27  Marc Glisse  <marc.glisse@inria.fr>
17104         * match.pd ((A+-B)+(C-A), (A+B)-(A-C)): New transformations.
17106 2017-06-27  Marc Glisse  <marc.glisse@inria.fr>
17108         * builtin-types.def (BT_FENV_T_PTR, BT_CONST_FENV_T_PTR,
17109         BT_FEXCEPT_T_PTR, BT_CONST_FEXCEPT_T_PTR): New primitive types.
17110         (BT_FN_INT_FENV_T_PTR, BT_FN_INT_CONST_FENV_T_PTR,
17111         BT_FN_INT_FEXCEPT_T_PTR_INT, BT_FN_INT_CONST_FEXCEPT_T_PTR_INT):
17112         New function types.
17113         * builtins.def (BUILT_IN_FECLEAREXCEPT, BUILT_IN_FEGETENV,
17114         BUILT_IN_FEGETEXCEPTFLAG, BUILT_IN_FEGETROUND,
17115         BUILT_IN_FEHOLDEXCEPT, BUILT_IN_FERAISEEXCEPT,
17116         BUILT_IN_FESETENV, BUILT_IN_FESETEXCEPTFLAG,
17117         BUILT_IN_FESETROUND, BUILT_IN_FETESTEXCEPT,
17118         BUILT_IN_FEUPDATEENV): New builtins.
17119         * tree-core.h (TI_FENV_T_PTR_TYPE, TI_CONST_FENV_T_PTR_TYPE,
17120         TI_FEXCEPT_T_PTR_TYPE, TI_CONST_FEXCEPT_T_PTR_TYPE): New entries.
17121         * tree.h (fenv_t_ptr_type_node, const_fenv_t_ptr_type_node,
17122         fexcept_t_ptr_type_node, const_fexcept_t_ptr_type_node): New
17123         macros.
17124         (builtin_structptr_types): Adjust size.
17125         * tree.c (builtin_structptr_types): Add four entries.
17127 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
17128             Olivier Hainque  <hainque@adacore.com>
17130         * config/vxworks.h (VXWORKS_LIB_SPEC): Incorporate ...
17131         (TLS_SYM): New local macro, forcing reference to __tls__ on
17132         link command lines for VxWorks 7 RTPs, triggering initialization
17133         of tlsLib.
17134         (VXWORKS_HAVE_TLS): New macro. State whether the target VxWorks
17135         OS features TLS support, true for RTPs on VxWorks 7.
17136         * config/vxworks.c (vxworks_override_options): Setup emutls
17137         accordingly.
17139 2017-06-27  Jakub Jelinek  <jakub@redhat.com>
17141         * predict.c (test_prediction_value_range): Use -1U instead of -1
17142         to avoid narrowing conversion warning.
17143         * dumpfile.c (dump_options): Wrap all value into dump_flags_t cast
17144         to avoid narrowing conversion warning.
17145         * opt-functions.awk (var_ref): Return (unsigned short) -1 instead of
17146         -1.
17147         * optc-gen.awk (END): Expect (unsigned short) -1 instead of -1.
17149 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
17151         * config/vxworks.h (VXWORKS_LIBS_RTP): Alternative definition for
17152         64bit configurations.
17153         (PTR_DIFF_TYPE): Alternative definition for TARGET_LP64.
17154         (SIZE_TYPE): Likewise.
17155         * config/vxworks.c (vxworks_emutls_var_fields): Use
17156         long_unsigned_type_node instead of unsigned_type_node as the offset
17157         field type, which is "pointer" mode in emutls.c.
17159 2017-06-27  Jakub Jelinek  <jakub@redhat.com>
17161         PR sanitizer/81209
17162         * ubsan.c (ubsan_encode_value): Initialize DECL_CONTEXT on var.
17164         PR middle-end/81207
17165         * gimple-fold.c (replace_call_with_call_and_fold): Handle
17166         gimple_vuse copying separately from gimple_vdef copying.
17168 2017-06-27  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17170         * value-prof.c (free_hist): Remove call to memset and the enclosing if
17171         condition.
17173 2017-06-26  Jerome Lambourg  <lambourg@adacore.com>
17174             Olivier Hainque  <hainque@adacore.com>
17176         * config.gcc (*-*-vxworks*): Add TARGET_VXWORKS7=1 to tm_defines
17177         for all vxworks7 targets.
17178         * config/vxworks.h (TARGET_VXWORKS7): If not defined, define to 0.
17179         (VXWORKS_ADDITIONAL_CPP_SPEC): Alternative definition for VXWORKS7.
17180         (VXWORKS_LIBS_RTP, VXWORKS_LIBS_RTP_DIR): New macros, allowing
17181         variations for VX6/VX7 and 32/64bits later on in ...
17182         (VXWORKS_LIB_SPEC): Leverage new macros.
17183         (VXWORKS_OS_CPP_BUILTINS): Define _VSB_CONFIG_FILE for VXWORKS7,
17184         as well as _ALLOW_KEYWORD_MACROS when "inline" is not a keyword.
17186 2017-06-26  Jerome Lambourg  <lambourg@adacore.com>
17188         * config/vxworks.h (VXWORKS_OS_CPP_BUILTINS): builtin_define
17189         _VX_TOOL_FAMILY and _VX_TOOL to gnu.
17191 2017-06-26  Carl Love  <cel@us.ibm.com>
17193         * config/rs6000/rs6000-c.c: Add support for built-in functions
17194         vector bool char vec_reve (vector bool char);
17195         vector signed char vec_reve (vector signed char);
17196         vector unsigned char vec_reve (vector unsigned char);
17197         vector bool int vec_reve (vector bool int);
17198         vector signed int vec_reve (vector signed int);
17199         vector unsigned int vec_reve (vector unsigned int);
17200         vector bool long long vec_reve (vector bool long long);
17201         vector signed long long vec_reve (vector signed long long);
17202         vector unsigned long long vec_reve (vector unsigned long long);
17203         vector bool short vec_reve (vector bool short);
17204         vector signed short vec_reve (vector signed short);
17205         vector double vec_reve (vector double);
17206         vector float vec_reve (vector float);
17207         * config/rs6000/rs6000-builtin.def (VREVE_V2DI, VREVE_V4SI,
17208         VREVE_V8HI, VREVE_V16QI, VREVE_V2DF, VREVE_V4SF, VREVE): New builtin.
17209         * config/rs6000/altivec.md (UNSPEC_VREVEV): New UNSPEC.
17210         (altivec_vreve): New pattern.
17211         * config/rs6000/altivec.h (vec_reve): New define.
17212         * doc/extend.texi (vec_rev): Update the built-in documentation file
17213         for the new built-in functions.
17215 2016-06-26  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17217         PR tree-optimization/71815
17218         * gimple-ssa-strength-reduction.c (uses_consumed_by_stmt): New
17219         function.
17220         (find_basis_for_candidate): Call uses_consumed_by_stmt rather than
17221         has_single_use.
17222         (slsr_process_phi): Likewise.
17223         (replace_uncond_cands_and_profitable_phis): Don't replace a
17224         multiply candidate with a stride of 1 (copy or cast).
17225         (phi_incr_cost): Call uses_consumed_by_stmt rather than
17226         has_single_use.
17227         (lowest_cost_path): Likewise.
17228         (total_savings): Likewise.
17230 2017-06-26  Richard Biener  <rguenther@suse.de>
17232         PR target/81175
17233         * config/i386/i386.c (ix86_init_mmx_sse_builtins):
17234         Use def_builtin_pure for all gather builtins.
17236 2017-06-26  Richard Biener  <rguenther@suse.de>
17238         PR tree-optimization/81203
17239         * tree-tailcall.c (find_tail_calls): Do not move stmts into
17240         non-dominating BBs.
17242 2017-06-26  Marek Polacek  <polacek@redhat.com>
17244         PR c/80116
17245         * doc/invoke.texi: Document -Wmultistatement-macros.
17247 2017-06-26  Christophe Lyon  <christophe.lyon@linaro.org>
17249         * doc/sourcebuild.texi (ARM-specific attributes): Document new
17250         arm_neon_ok_no_float_abi effective target.
17252 2017-06-26  Richard Biener  <rguenther@suse.de>
17254         PR tree-optimization/80928
17255         * cfghooks.c (duplicate_block): Do not copy BB_DUPLICATED flag.
17256         (copy_bbs): Set BB_DUPLICATED flag early.
17257         (execute_on_growing_pred): Do not execute for BB_DUPLICATED
17258         marked blocks.
17259         (execute_on_shrinking_pred): Likewise.
17260         * tree-ssa.c (ssa_redirect_edge): Do not look for PHI args in
17261         BB_DUPLICATED blocks.
17262         * tree-ssa-phionlycoprop.c (eliminate_degenerate_phis_1): Properly
17263         iterate over all PHIs considering removal of *gsi.
17265 2017-06-23  Jim Wilson  <jim.wilson@linaro.org>
17267         * doc/invoke.texi (AArch64 Options, -mtune): Re-add falkor and
17268         qdf24xx.
17270 2017-06-23  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17272         * config/rs6000/rs6000-string.c: (expand_block_clear,
17273         do_load_for_compare, select_block_compare_mode,
17274         compute_current_alignment, expand_block_compare,
17275         expand_strncmp_align_check, expand_strn_compare,
17276         expand_block_move, rs6000_output_load_multiple)
17277         Move functions related to string/block move/compare
17278         to a separate file.
17279         * config/rs6000/rs6000.c: Move above functions to rs6000-string.c.
17280         * config/rs6000/rs6000-protos.h (rs6000_emit_dot_insn): Add prototype
17281         for this function which is now used in two files.
17282         * config/rs6000/t-rs6000: Add rule to compile rs6000-string.o.
17283         * config.gcc: Add rs6000-string.o to extra_objs for
17284         targets powerpc*-*-* and rs6000*-*-*.
17286 2017-06-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
17288         PR target/80510
17289         * config/rs6000/rs6000.md (ALTIVEC_DFORM): Do not allow DImode in
17290         32-bit, since indexed is not valid for DImode.
17291         (mov<mode>_hardfloat32): Reorder ISA 2.07 load/stores before ISA
17292         3.0 d-form load/stores to be the same as mov<mode>_hardfloat64.
17293         (define_peephole2 for Altivec d-form load): Add 32-bit support.
17294         (define_peephole2 for Altivec d-form store): Likewise.
17296         PR ipa/81185
17297         * multiple_target.c (create_dispatcher_calls): Only create the
17298         dispatcher call if the function is the default clone of a
17299         versioned function.
17301 2017-06-23  Segher Boessenkool  <segher@kernel.crashing.org>
17303         PR middle-end/80902
17304         * builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
17305         a call, force the call to not be a tail call.
17307 2017-06-23  Jeff Law  <law@redhat.com>
17309         * doc/contrib.texi: Add entry for Steven Pemberton's work on
17310         enquire.
17312 2017-06-23  Will Schmidt  <will_schmidt@vnet.ibm.com>
17314         * config/rs6000/rs6000.c: Add include of ssa-propagate.h for
17315         update_call_from_tree().  (rs6000_gimple_fold_builtin): Add
17316         handling for early expansion of vector shifts (sl,sr,sra,rl).
17317         (builtin_function_type): Add vector shift right instructions
17318         to the unsigned argument list.
17320 2017-06-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
17322         rtl-optimizatoin/79286
17323         * ira.c (update_equiv_regs): Revert to using may_trap_or_fault_p again.
17324         * rtlanal.c (rtx_addr_can_trap_p_1): SYMBOL_REF_FUNCTION_P can never
17325         trap.  PIC register plus a const unspec without offset can never trap.
17327 2017-06-23  Marc Glisse  <marc.glisse@inria.fr>
17329         * tree.h (builtin_structptr_type): New type.
17330         (builtin_structptr_types): Declare new array.
17331         * tree.c (builtin_structptr_types): New array.
17332         (free_lang_data, build_common_tree_nodes): Use it.
17334 2017-06-23  Jonathan Wakely  <jwakely@redhat.com>
17336         PR c++/81187
17337         * doc/invoke.texi (-Wnoexcept-type): Fix name of option, from
17338         -Wnoexcept.
17340 2017-06-22  Matt Turner  <mattst88@gmail.com>
17342         * config/i386/driver-i386.c (host_detect_local_cpu): Add Kaby
17343         Lake models to skylake case.  Assume skylake for unknown
17344         models with clflushopt.
17346 2017-06-22  Jeff Law  <law@redhat.com>
17348         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Handle
17349         frame sizes that do not satisfy aarch64_uimm12_shift.
17351 2017-06-22  Jan Hubicka <hubicka@ucw.cz>
17353         * profile-count.h (apply_probability,
17354         apply_scale, probability_in): Fix checks for zero.
17356 2017-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17358         * incpath.c (add_sysroot_to_chain): Allow for $SYSROOT prefix.
17359         * doc/cppdiropts.texi (-I @var{dir}): Document it.
17361 2016-06-22  Richard Biener  <rguenther@suse.de>
17363         * tree-vect-loop.c (vect_model_reduction_cost): Handle
17364         COND_REDUCTION and INTEGER_INDUC_COND_REDUCTION without
17365         REDUC_MAX_EXPR support.
17366         (vectorizable_reduction): Likewise.
17367         (vect_create_epilog_for_reduction): Likewise.
17369 2017-06-22  James Greenhalgh  <james.greenhalgh@arm.com>
17371         * match.pd (A / (1 << B) -> A >> B): New.
17372         * generic-match-head.c: Include optabs-tree.h.
17373         * gimple-match-head.c: Likewise.
17374         * optabs-tree.h (target_supports_op_p): New.
17375         * optabs-tree.c (target_supports_op_p): New.
17377 2017-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17379         * configure.ac (gcc_cv_ld_static_dynamic): Also check stderr for
17380         $gcc_cv_ld --help output.
17381         (gcc_cv_ld_demangle): Likewise.
17382         (gcc_cv_ld_eh_frame_hdr): Likewise.
17383         (gcc_cv_ld_pie): Likewise.
17384         (gcc_cv_ld_as_needed): Likewise.  Prefer native forms unless $gnu_ld.
17385         (gcc_cv_ld_buildid): Likewise.
17386         (gcc_cv_ld_sysroot): Likewise.
17387         (ld_bndplt_support): Likewise.
17388         (ld_pushpopstate_support): Likewise.
17389         * configure: Regenerate.
17390         * config/sol2.h [!USE_GLD] (SYSROOT_SPEC): Define.
17392 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
17394         PR target/81151
17395         * config/i386/sse.md (round<mode>2): Renumber match_dup and
17396         operands indexes to avoid gap between operands and match_dups.
17398 2017-06-21  Andrew Pinski  <apinski@cavium.com>
17400         * config/aarch64/aarch64-cost-tables.h (thunderx_extra_costs):
17401         Increment Arith_shift and Arith_shift_reg by 1.
17402         * config/aarch64/aarch64-tuning-flags.def (cheap_shift_extend):
17403         New tuning flag.
17404         * config/aarch64/aarch64.c (thunderx_tunings): Enable
17405         AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND.
17406         (aarch64_strip_extend): Add new argument and test for it.
17407         (aarch64_cheap_mult_shift_p): New function.
17408         (aarch64_rtx_mult_cost): Call aarch64_cheap_mult_shift_p and don't
17409         add a cost if it is true.
17410         Update calls to aarch64_strip_extend.
17411         (aarch64_rtx_costs): Update calls to aarch64_strip_extend.
17413 2017-06-21  Andrew Pinski  <apinski@cavium.com>
17415         * config/aarch64/aarch64-cores.def (thunderxt88p1): Use thunderxt88
17416         tunings.
17417         (thunderxt88): Likewise.
17418         * config/aarch64/aarch64.c (thunderxt88_prefetch_tune): New variable.
17419         (thunderx_prefetch_tune): New variable.
17420         (thunderx2t99_prefetch_tune): Update for the correct values.
17421         (thunderxt88_tunings): New variable.
17422         (thunderx_tunings): Use thunderx_prefetch_tune instead of
17423         generic_prefetch_tune.
17424         (thunderx2t99_tunings): Use AUTOPREFETCHER_WEAK.
17426 2017-06-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17428         * config/aarch64/atomics.md (aarch64_compare_and_swap<mode>_lse,
17429         SHORT): Relax operand 3 to aarch64_reg_or_zero and constraint to Z.
17430         (aarch64_compare_and_swap<mode>_lse, GPI): Likewise.
17431         (aarch64_atomic_cas<mode>, SHORT): Likewise for operand 2.
17432         (aarch64_atomic_cas<mode>, GPI): Likewise.
17434 2017-06-21  Martin Liska  <mliska@suse.cz>
17436         * gimplify.c (gimplify_label_expr): Insert GIMPLE_PREDICT
17437         statements on cold and hot labels.
17438         * predict.c (tree_estimate_probability_bb): Remove the
17439         prediction from this place.
17441 2017-06-21  Martin Liska  <mliska@suse.cz>
17443         PR tree-optimization/79489
17444         * gimplify.c (maybe_add_early_return_predict_stmt): New
17445         function.
17446         (gimplify_return_expr): Call the function.
17447         * predict.c (tree_estimate_probability_bb): Remove handling
17448         of early return.
17449         * predict.def: Update comment about early return predictor.
17450         * gimple-predict.h (is_gimple_predict): New function.
17451         * predict.def: Change default value of early return to 66.
17452         * tree-tailcall.c (find_tail_calls): Skip GIMPLE_PREDICT
17453         statements.
17454         * passes.def: Put pass_strip_predict_hints to the beginning of
17455         IPA passes.
17457 2017-06-21  Pierre-Marie de Rodat  <derodat@adacore.com>
17459         * dwarf2out.c (gen_decl_die): Remove the guard to skip file-scope
17460         FUNCTION_DECL declarations.
17461         (dwarf2out_early_global_decl): Remove the guard to skip FUNCTION_DECL
17462         declarations.
17463         (dwaf2out_decl): Likewise.
17464         * godump.c (go_early_global_decl): Skip call to the real debug hook
17465         for FUNCTION_DECL declarations.
17466         * passes.c (rest_of_decl_compilation): Skip call to the
17467         early_global_decl debug hook for FUNCTION_DECL declarations, unless
17468         -fdump-go-spec is passed.
17470 2017-06-21  Marc Glisse  <marc.glisse@inria.fr>
17472         * config/i386/i386.c (struct builtin_isa): New field pure_p.
17473         Reorder for compactness.
17474         (def_builtin, def_builtin2, ix86_add_new_builtins): Handle pure_p.
17475         (def_builtin_pure, def_builtin_pure2): New functions.
17476         (ix86_init_mmx_sse_builtins) [__builtin_ia32_stmxcsr]: Mark as pure.
17478 2017-06-21  Marc Glisse  <marc.glisse@inria.fr>
17480         * match.pd (nop_convert): New predicate.
17481         ((A +- CST1) +- CST2): Allow some NOP conversions.
17483 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
17485         PR c++/81130
17486         * gimplify.c (omp_add_variable): Don't force GOVD_SEEN for types
17487         with ctors/dtors if GOVD_SHARED is set.
17489 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
17491         * config/aarch64/aarch64.md (movti_aarch64):
17492         Emit mov rather than orr.
17493         (movtf_aarch64): Likewise.
17494         * config/aarch64/aarch64-simd.md (aarch64_simd_mov):
17495         Emit mov rather than orr.
17497 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
17499         * config/aarch64/aarch64-simd.md (aarch64_simd_dup):
17500         Swap alternatives, make integer dup more expensive.
17502 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
17504         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
17505         Return true for non-tls symbols.
17507 2017-06-21  James Greenhalgh  <james.greenhalgh@arm.com>
17509         * config/aarch64/aarch64-cores.def (cortex-a55): New.
17510         (cortex-a75): Likewise.
17511         (cortex-a75.cortex-a55): Likewise.
17512         * config/aarch64/aarch64-tune.md: Regenerate.
17513         * doc/invoke.texi (-mtune): Document new values for -mtune.
17515 2017-06-21  Tom de Vries  <tom@codesourcery.com>
17517         * doc/sourcebuild.texi (Add Options, Features for dg-add-options): Add
17518         stack_size feature.
17519         (Effective-Target Keywords, Other attributes): Suggest using
17520         dg-add-options stack_size feature to get stack limit in stack_size
17521         effective target documentation.
17523 2017-06-21  Julian Brown  <julian@codesourcery.com>
17524             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
17526         * config/aarch64/aarch64-simd.md (aarch64_crypto_pmulldi)
17527         (aarch64_crypto_pmullv2di): Change type attribute to crypto_pmull.
17528         * config/aarch64/thunderx2t99.md (thunderx2t99_pmull): New
17529         reservation.
17530         * config/arm/cortex-a53.md (cortex_a53_advsimd_type): Add crypto_pmull to
17531         attribute type list for neon_multiply.
17532         * config/arm/cortex-a57.md (cortex_a57_neon_type): Add crypto_pmull to
17533         attribute type list for neon_multiply.
17534         * config/arm/crypto.md (crypto_vmullp64): Change type to crypto_pmull.
17535         * config/arm/exynos-m1.md (exynos_m1_neon_type): Add crypto_pmull to
17536         attribute type list for neon_multiply.
17537         * config/arm/types.md (crypto_pmull): Add.
17538         * config/arm/xgene1.md (xgene1_neon_pmull): Add crypto_pmull to
17539         attribute type list.
17541 2017-06-20  Andreas Tobler  <andreast@gcc.gnu.org>
17543         * config.gcc (armv6*-*-freebsd*): Change the target_cpu_cname to
17544         arm1176jzf-s.
17546 2017-06-20  Jakub Jelinek  <jakub@redhat.com>
17548         * ira-costs.c (find_costs_and_classes): Initialize cost_classes later
17549         to make sure not to dereference a NULL cost_classes_ptr pointer.
17551 2017-06-20  Carl Love  <cel@us.ibm.com>
17553         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
17554         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
17555         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
17556         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
17557         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
17558         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
17559         VMULOSW): New enum "unspec" values.
17560         (vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
17561         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
17562         altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
17563         altivec_vmulosw): New patterns.
17564         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
17565         VMULOSW): Add definitions.
17567 2017-06-20  Julia Koval  <julia.koval@intel.com>
17569         * config/i386/i386.c: Fix rounding expand for new pattern.
17570         * config/i386/subst.md: Fix pattern (parallel -> unspec).
17572 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
17574         * config/aarch64/aarch64-option-extensions.def (rcpc): New.
17575         * config/aarch64/aarch64.h (AARCH64_FL_RCPC): New.
17577 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
17579         * config/aarch64/aarch64-option-extensions.def (fp16): Fix expected
17580         feature string.
17582 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
17584         * config/aarch64/aarch64-cores.def: Rearrange to sort by
17585         architecture, then by implementer ID.
17586         * config/aarch64/aarch64-tune.md: Regenerate.
17588 2017-06-20  Richard Biener  <rguenther@suse.de>
17590         PR middle-end/81097
17591         * fold-const.c (split_tree): Fold to type before negating.
17593 2017-06-20  David Malcolm  <dmalcolm@redhat.com>
17595         * diagnostic-show-locus.c
17596         (selftest::test_fixit_deletion_affecting_newline): New function.
17597         (selftest::diagnostic_show_locus_c_tests): Call it.
17599 2017-06-20  Andreas Schwab  <schwab@suse.de>
17601         PR target/80970
17602         * config/m68k/m68k.md (bsetdreg, bchgdreg, bclrdreg): Use "=d"
17603         instead of "+d".
17605 2017-06-20  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
17607         * config/arm/arm-c.c (arm_cpu_builtins): New block to define
17608         __ARM_FEATURE_COPROC according to support.
17610 2017-06-20  Jakub Jelinek  <jakub@redhat.com>
17612         * tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
17613         Rewritten to avoid overflow for > 32-bit pointers.
17615         PR sanitizer/81125
17616         * ubsan.h (ubsan_encode_value): Workaround buggy clang++ parser
17617         by removing enum keyword.
17618         (ubsan_type_descriptor): Likewise.  Formatting fix.
17620         PR target/81121
17621         * config/i386/i386.md (TARGET_USE_VECTOR_CONVERTS float si->{sf,df}
17622         splitter): Require TARGET_SSE2 in the condition.
17624 2017-06-20  Michael Meissner  <meissner@linux.vnet.ibm.com>
17626         PR target/79799
17627         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Add support
17628         for doing vector set of SFmode on ISA 3.0.
17629         * config/rs6000/vsx.md (vsx_set_v4sf_p9): Likewise.
17630         (vsx_set_v4sf_p9_zero): Special case setting 0.0f to a V4SF
17631         element.
17632         (vsx_insert_extract_v4sf_p9): Add an optimization for inserting a
17633         SFmode value into a V4SF variable that was extracted from another
17634         V4SF variable without converting the element to double precision
17635         and back to single precision vector format.
17636         (vsx_insert_extract_v4sf_p9_2): Likewise.
17638 2017-06-19  Jakub Jelinek  <jakub@redhat.com>
17640         * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Multiply
17641         in UWHI to avoid undefined overflow.
17643         PR sanitizer/81125
17644         * ubsan.h (enum ubsan_encode_value_phase): New.
17645         (ubsan_encode_value): Change second argument to
17646         enum ubsan_encode_value_phase with default value of
17647         UBSAN_ENCODE_VALUE_GENERIC.
17648         * ubsan.c (ubsan_encode_value): Change second argument to
17649         enum ubsan_encode_value_phase PHASE from bool IN_EXPAND_P,
17650         adjust uses, for UBSAN_ENCODE_VALUE_GENERIC use just
17651         create_tmp_var_raw instead of create_tmp_var and use a
17652         TARGET_EXPR.
17653         (ubsan_expand_bounds_ifn, ubsan_build_overflow_builtin,
17654         instrument_bool_enum_load, ubsan_instrument_float_cast): Adjust
17655         ubsan_encode_value callers.
17657         PR sanitizer/81111
17658         * ubsan.c (ubsan_encode_value): If current_function_decl is NULL,
17659         use create_tmp_var_raw instead of create_tmp_var, mark it addressable
17660         just by setting TREE_ADDRESSABLE on the result and use a TARGET_EXPR.
17662 2017-06-19  Richard Biener  <rguenther@suse.de>
17664         PR middle-end/81118
17665         * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Clear niter
17666         estimates if we changed anything.
17668 2017-06-19  Richard Biener  <rguenther@suse.de>
17670         PR tree-optimization/80887
17671         * tree-ssa-sccvn.c (mprts_hook_cnt): New global.
17672         (vn_lookup_simplify_result): Allow only mprts_hook_cnt succesful
17673         simplified lookups, then reset mprts_hook.
17674         (vn_nary_build_or_lookup_1): Set mprts_hook_cnt to 9 before
17675         simplifying.
17676         (try_to_simplify): Likewise.
17678 2017-06-19  Martin Liska  <mliska@suse.cz>
17680         PR sanitizer/80879
17681         * gimplify.c (gimplify_switch_expr):
17682         Initialize live_switch_vars for SWITCH_BODY == STATEMENT_LIST.
17684 2017-06-19  Martin Liska  <mliska@suse.cz>
17686         * doc/install.texi: Document that PGO runs in 4 stages.
17688 2017-06-19  Martin Liska  <mliska@suse.cz>
17690         PR ipa/80732
17691         * attribs.c (make_dispatcher_decl): Do not append '.ifunc'
17692         to dispatcher function name.
17693         * multiple_target.c (replace_function_decl): New function.
17694         (create_dispatcher_calls): Redirect both edges and references.
17696 2017-06-19  Jan Hubicka <hubicka@ucw.cz>
17698         * profile-count.c (profile_count::dump): Dump quality.
17699         (profile_count::differs_from_p): Update for unsigned val.
17700         * profile-count.h (profile_count_quality): New enum.
17701         (profile_count): Turn m_val to 62bit unsigned, add quality tracking.
17703 2017-06-19  Richard Biener  <rguenther@suse.de>
17705         * tree-ssa-loop-niter.h (estimate_numbers_of_iterations): Take
17706         struct function as arg.
17707         (estimate_numbers_of_iterations): Export overload with loop arg.
17708         (free_numbers_of_iterations_estimates_loop): Use an overload of
17709         free_numbers_of_iterations_estimates instead.
17710         * tree-cfg.c (remove_bb): Adjust.
17711         * tree-cfgcleanup.c (remove_forwarder_block_with_phi): Likewise.
17712         * tree-parloops.c (gen_parallel_loop): Likewise.
17713         * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables):
17714         Likewise.
17715         (tree_unroll_loops_completely): Likewise.
17716         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop):
17717         Use an overload instead and export.
17718         (estimated_loop_iterations): Adjust.
17719         (max_loop_iterations): Likewise.
17720         (likely_max_loop_iterations): Likewise.
17721         (estimate_numbers_of_iterations): Take struct function as arg
17722         and adjust.
17723         (loop_exits_before_overflow): Adjust.
17724         (free_numbers_of_iterations_estimates_loop): Use an overload.
17725         * tree-vect-loop.c (vect_analyze_loop_form): Adjust.
17726         * tree-vectorizer.c (vect_free_loop_info_assumptions): Likewise.
17728 2017-06-19  Richard Biener  <rguenther@suse.de>
17730         PR ipa/81112
17731         * ipa-prop.c (find_constructor_constant_at_offset): Handle
17732         RANGE_EXPR conservatively.
17734 2017-06-16  Carl Love  <cel@us.ibm.com>
17736         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
17737         definitions for vec_float, vec_float2, vec_floato,
17738         vec_floate built-ins.
17739         * config/rs6000/vsx.md (define_c_enum "unspec"): Add RTL code
17740         for instructions vsx_xvcvsxws vsx_xvcvuxwsp, float2, floato and
17741         floate.
17742         * config/rs6000/rs6000-builtin.def (FLOAT2_V2DI, FLOATE_V2DF,
17743         FLOATE_2DI, FLOATO_V2DF, FLOATEE_V2DI, XVCVSXWSP_V4SF,
17744         UNS_FLOATO_V2DI, UNS_FLOATE_V2DI): Add definitions.
17745         * config/altivec.md (define_insn "p8_vmrgew_<mode>",
17746         define_mode_attr VF_sxddp): Add V4SF type to p8_vmrgew.
17747         * config/rs6000/altivec.h (vec_float, vec_float2, vec_floate,
17748         vec_floato): Add builtin defines.
17749         * doc/extend.texi (vec_float, vec_float2, vec_floate, vec_floato):
17750         Update the built-in documentation file for the new built-in
17751         functions.
17753 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17755         * config/arm/arm.opt (marm): Mark as the negative of of -mthumb.
17756         (mthumb): Mark as the negative of -marm.
17758 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17760         * doc/invoke.texi (ARM Options, -mcpu): Document supported
17761         extension options.
17762         (ARM Options, -mtune): Document that this accepts the same
17763         extension options as -mcpu.
17764         (ARM Options, -mfpu): Document addition of -mfpu=auto.
17766 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17768         * doc/invoke.texi (ARM Options, -march=): Document new syntax and
17769         permitted extensions.
17771 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17773         * config/arm/arm-cpus.in (armv7): Add extension +nofp.
17774         (armv7-r): Add aliases vfpv3xd and vfpv3-d16.
17775         (armv8-m.main): Add option +nodsp.
17776         * config/arm/arm-cpu-cdata.h: Regenerated.
17778 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17780         * config/arm/t-fuchsia: New file.
17781         * config.gcc (arm*-*-fuchsia*): Use it.
17783 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17785         * config/arm/t-symbian: Rewrite for new option infrastructure.
17787 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17789         * config/arm/t-phoenix (MULTILIB_REUSE): Clear variable.
17790         (MULTILIB_REQUIRED): Likewise.
17792 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17794         * config/arm/t-linux-eabi (MULTILIB_EXCEPTIONS): Set to empty.
17795         (MULTILIB_RESUE): Likewise.
17796         (MULTILIB_MATCHES): Likewise.
17797         (MULTLIB_REQUIRED): Likewise.
17799 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17801         * config/arm/t-rtems: Rewrite for new option framework.
17803 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17805         * config/arm/t-aprofile (v7_a_nosimd_variants, v7_a_simd_variants)
17806         (v7ve_nosimd_variatns, v7ve_vfpv3_simd_variants)
17807         (v7ve_vfpv4_simd_variants, v8_a_nosimd_variants, v8_a_simd_variants)
17808         (v8_1_a_simd_variants, v8_2_a_simd_variants): Move to ...
17809         * config/arm/t-multilib: ... here.
17810         (MULTILIB_OPTIONS): Add armv7 and armv7+fp architectures.
17811         (MULTILIB_MATCHES): Use armv7 libraries for armv7-r.  Also use for
17812         armv7-a and armv8*-a when A-profile libraries have not been built.
17813         * config/arm/t-rmprofile: Rewrite.
17815 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17817         * genmultilib (multilib_reuse): Allow an explicit period to be escaped
17818         with a backslash.  Remove the backslash after substituting unescaped
17819         periods.
17820         * doc/fragments.texi (MULTILIB_REUSE): Document it.
17822 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17824         * config.gcc: (arm*-*-*): When building a-profile libraries, force
17825         the driver to pass through the default setting of -mfloat-abi.
17826         * common/config/arm/arm-common.c (arm_target_thumb_only): Return -marm
17827         rather than NULL.
17828         * config/arm/t-multilib (MULTILIB_REUSE): Initialize to empty.
17829         (all_feat_combs): New rule.
17830         (MULTILIB_OPTIONS): Use explicit ARM and Thumb directories.  Rework
17831         default libraries.
17832         * config/arm/t-aprofile: Rewrite.
17834 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17836         * config/arm/arm.h (FPUTYPE_AUTO): Define.
17837         * config/arm/arm.c (arm_option_override): Use FPUTYPE_AUTO if the
17838         fpu is not specified by the user/command-line.
17839         * config/arm/bpabi.h (FPUTYPE_DEFAULT): Delete.
17840         * config/arm/netbsd-elf.h (FPUTYPE_DEFAULT): Delete.
17841         * config/arm/linux-elf.h (FPUTYPE_DEFAULT): Delete.
17842         * config/arm/vxworks.h (FPUTYPE_DEFAULT): Delete.
17843         * common/config/arm/arm-common.c (arm_canon_arch_option): Use
17844         FPUTYPE_AUTO insted of FPUTYPE_DEFAULT.
17846 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17848         * config/arm/elf.h (MULTILIB_DEFAULTS): Delete.
17849         * config/arm/t-arm-elf: Rewritten.
17851 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17853         * config/arm/arm.h (TARGET_HARD_FLOAT): Also check that we
17854         have some floating-point instructions.
17855         (TARGET_SOFT_FLOAT): Define as inverse of TARGET_HARD_FLOAT.
17856         (TARGET_MAYBE_HARD_FLOAT): New macro.
17857         * config/arm/arm-builtins.c (arm_init_builtins): Use
17858         TARGET_MAYBE_HARD_FLOAT.
17859         * config/arm/arm.c (arm_option_override): Use TARGET_HARD_FLOAT_ABI.
17861 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17863         * common/config/arm/arm-common.c: Define INCLUDE_LIST.
17864         (configargs.h): Include it.
17865         (arm_print_hint_for_fpu_option): New function.
17866         (arm_parse_fpu_option): New function.
17867         (candidate_extension): New class.
17868         (arm_canon_for_multilib): New function.
17869         * config/arm/arm.h (CANON_ARCH_SPEC_FUNCTION): New macro.
17870         (EXTRA_SPEC_FUNCTIONS): Add CANON_ARCH_SPEC_FUNCTION.
17871         (ARCH_CANONICAL_SPECS): New macro.
17872         (DRIVER_SELF_SPECS): Add ARCH_CANONICAL_SPECS.
17874 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17876         * config.gcc (arm*-*-*): Ensure both target_cpu_cname and with_cpu
17877         are set after handling multilib fragments.  Set target_cpu_default2
17878         from with_cpu.
17880 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17882         * config.gcc (arm*-*-fucshia*): Set target_cpu_cname to the real
17883         cpu name.
17884         (arm*-*-*): Set target_cpu_default2 to a quoted string.
17885         * config/arm/parsecpu.awk (check_cpu): Validate any extension
17886         options.
17887         (check_arch): Likewise.
17888         * config/arm/arm.c (arm_configure_build_target): Handle
17889         TARGET_CPU_DEFAULT being a string constant.  Scan any feature
17890         options in the default.
17892 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17894         * config/arm/arm-protos.h (cpu_arch_extension): Add field to record
17895         when an option is an alias of another.
17896         * config/arm/parsecpu.awk (optalias): New parser token.
17897         (gen_comm_data): Mark non-alias options as such.  Emit entries
17898         for extension aliases.
17899         * config/arm/arm-cpus.in (armv5e): Make vfpv2 an alias.
17900         (armv5te, armv5tej, armv6, armv6j, armv6k, armv6z): Likewise.
17901         (armv6kz, armv6zk, armv6t2): Likewise.
17902         (armv7): Make vfpv3-d16 an alias.
17903         (armv7-a): Make vfpv3-d16, neon and neon-vfpv3 aliases.  Sort in
17904         canonical order.
17905         (armv7ve): Make vfpv4-d16, neon-vfpv3 and neon-vfpv4 aliases.
17906         Sort in canonical order.
17907         (armv8-a): Sort in canonical order.
17908         (armv8.1-a, armv8.2-a):  Likewise.
17909         (generic-armv7-a): Make neon and neon-vfpv3 aliases.  Sort in
17910         canonical order.
17911         (cortex-a9): Sort in canonical order.
17912         * config/arm/arm.c (selftests.h): Include it.
17913         (arm_test_cpu_arch_data): New function.
17914         (arm_run_self_tests): New function.
17915         (TARGET_RUN_TARGET_SELFTESTS): Redefine.
17916         (targetm): Move declaration to the end of the file.
17917         * arm-cpu-cdata.h: Regenerated.
17919 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17921         * config/arm/arm.h (TARGET_MODE_SPECS): Add additional parameter to
17922         call to target_mode_check describing the type of option passed.
17923         * common/config/arm/arm-common.c (arm_arch_core_flag): Delete.
17924         (arm_target_thumb_only): Use arm_parse_arch_option_name or
17925         arm_parse_cpu_option_name to match parameters against list of
17926         available targets.
17927         * config/arm/parsecpu.awk (gen_comm_data): Don't generate
17928         arm_arch_core_flags data structure.
17929         * config/arm/arm-cpu_cdata.h: Regenerated.
17931 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17933         * common/config/arm/arm-common.c (arm_initialize_isa): Moved here from
17934         config/arm/arm.c.
17935         (arm_print_hint_for_cpu_option): Likewise.
17936         (arm_print_hint_for_arch_option): Likewise.
17937         (arm_parse_cpu_option_name): Likewise.
17938         (arm_parse_arch_option_name): Likewise.
17939         * config/arm/arm.c (arm_identify_fpu_from_isa): Use the computed number
17940         of entries in the all_fpus list.
17941         * config/arm/arm-protos.h (all_architectures, all_cores): Declare.
17942         (arm_parse_cpu_option_name): Declare.
17943         (arm_parse_arch_option_name): Declare.
17944         (arm_parse_option_features): Declare.
17945         (arm_intialize_isa): Declare.
17946         * config/arm/parsecpu.awk (gen_data): Move CPU and architecture
17947         data tables to ...
17948         (gen_comm_data): ... here.  Make definitions non-static.
17949         * config/arm/arm-cpu-data.h: Regenerated.
17950         * config/arm/arm-cpu-cdata.h: Regenerated.
17952 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17954         * config/arm/arm-protos.h (arm_build_target): Remove arch_core.
17955         (cpu_arch_extension): New structure.
17956         (cpu_arch_option, arch_option, cpu_option): New structures.
17957         * config/arm/parsecpu.awk (gen_headers): Build an enumeration of
17958         architecture types.
17959         (gen_data): Generate new format data tables.
17960         * config/arm/arm.c (cpu_tune): New structure.
17961         (cpu_option, processors): Delete.
17962         (arm_print_hint_for_core_or_arch): Delete.  Replace with ...
17963         (arm_print_hint_for_cpu_option): ... this and ...
17964         (arm_print_hint_for_arch_option): ... this.
17965         (arm_parse_arch_cpu_name): Delete.  Replace with ...
17966         (arm_parse_cpu_option_name): ... this and ...
17967         (arm_parse_arch_option_name): ... this.
17968         (arm_unrecognized_feature): Change type of target parameter to
17969         cpu_arch_option.
17970         (arm_parse_arch_cpu_features): Delete.  Replace with ...
17971         (arm_parse_option_features): ... this.
17972         (arm_configure_build_target): Rework to use new configuration data
17973         tables.
17974         (arm_print_tune_info): Rework for new configuration data tables.
17975         * config/arm/arm-cpu-data.h: Regenerated.
17976         * config/arm/arm-cpu.h: Regenerated.
17978 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17980         * Makefile.in (OBJS): Move sbitmap.o from here ...
17981         (OBJS-libcommon): ... to here.
17983 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
17985         * config/arm/arm-isa.h (ISA_ALL_FPU_INTERNAL): Renamed from ISA_ALL_FPU.
17986         (ISA_ALL_CRYPTO): New macro.
17987         (ISA_ALL_SIMD): New macro
17988         (ISA_ALL_FP): New macro.
17989         * config/arm/arm.c (fpu_bitlist): Update initializer.
17990         * config/arm/arm-cpus.in: Use new ISA_ALL macros to disable crypto,
17991         simd or fp.
17992         (arm9e): Add fpu.  Add option for nofp
17993         (arm946e-s, arm966e-s, arm968e-s, arm10e, arm1020e, arm1022e): Likewise.
17994         (arm926ej-s, arm1026ej-s): Likewise.
17995         (generic-armv7-a): Add fpu.  Add options for simd, vfpv3, vfpv3-d16,
17996         vfpv3-fp16, vfpv3-d16-fp16, vfpv4, vfpv4-d16, neon, neon-vfp3,
17997         neon-fp16, neon-vfpv4, nofp and nosimd.
17998         (cortex-a5, cortex-a7): Add fpu.  Add options for nosimd and nofp.
17999         (cortex-a8): Add fpu.  Add option for nofp.
18000         (cortex-a9): Add fpu.  Add options for nosimd and nofp.
18001         (cortex-a12, cortex-a15, cortex-a17): Add fpu.  Add option for nofp.
18002         (cortex-r4f): Add fpu.
18003         (cortex-r5): Add fpu.  Add options for nofp.dp and nofp.
18004         (cortex-r7): Use idiv option from architecture.  Add fpu.  Add option
18005         for nofp.
18006         (cortex-r8): Likewise.
18007         (cortex-m4): Add fpu.  Add option for nofp.
18008         (cortex-a15.cortex-a7): Add fpu.  Add option for nofp.
18009         (cortex-a17.cortex-a7): Likewise.
18010         (cortex-a32): Add fpu.  Add options for crypto and nofp.
18011         (cortex-a35, cortex-a53): Likewise.
18012         (cortex-a57): Add fpu.  Add option for crypto.
18013         (cortex-a72, cortex-a73): Likewise.
18014         (exynos-m1): Likewise.
18015         (cortex-a57.cortex-a53, cortex-a72.cortex-a53): Likewise.
18016         (cortex-a73.cortex-a35, cortex-a73.cortex-a53): Likewise.
18017         (cortex-m33): Add fpu.  Add option for nofp.
18018         * config/arm/arm-cpu-cdata.h: Regenerated
18019         * config/arm/arm-cpu-data.h: Regenerated.
18021 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
18023         * arm-cpus.in (armv5e): Add options fp, vfpv2 and nofp.
18024         (armv5te, armv5tej): Likewise.
18025         (armv6, armv6j, armv6k, armv6z, armv6kz, armv6zk, armv6t2): Likewise.
18026         (armv7): Add options fp and vfpv3-d16.
18027         (armv7-a): Add options fp, simd, vfpv3, vfpv3-d16, vfpv3-d16-fp16,
18028         vfpv3-fp16, vfpv4, vfpv4-d16, neon, neon-vfpv3, neon-fp16, neon-vfpv4,
18029         nofp and nosimd.
18030         (armv7ve): Likewise.
18031         (armv7-r): Add options fp, fp.sp, idiv, nofp and noidiv.
18032         (armv7e-m): Add options fp, fpv5, fp.dp and nofp.
18033         (armv8-a): Add nocrypto option.
18034         (armv8.1-a, armv8.2-a): Likewise.
18035         (armv8-m.main): add options fp, fp.dp and nofp.
18037 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
18039         * config/arm/arm-cpus.in (armv8-a): Add options crc, simd crypto and
18040         nofp.
18041         (armv8-a+crc): Delete.
18042         (armv8.1-a): Add options simd, crypto and nofp.
18043         (armv8.2-a): Add options fp16, simd, crypto and nofp.
18044         (armv8.2-a+fp16): Delete.
18045         (armv8-m.main): Add option dsp.
18046         (armv8-m.main+dsp): Delete.
18047         (cortex-a8): Add fpu.  Add nofp option.
18048         (cortex-a9): Add fpu.  Add nofp and nosimd options.
18049         * config/arm/parsecpu.awk (gen_data): Generate option tables and
18050         link to main cpu and architecture data structures.
18051         (gen_comm_data): Only put isa attributes from the main architecture
18052         in common tables.
18053         (option): New statement for architecture and CPU entries.
18054         * arm.c (struct cpu_option): New structure.
18055         (struct processors): Add entry for options.
18056         (arm_unrecognized_feature): New function.
18057         (arm_parse_arch_cpu_name): Ignore any characters after the first
18058         '+' character.
18059         (arm_parse_arch_cpu_feature): New function.
18060         (arm_configure_build_target): Separate out any CPU and architecture
18061         features and parse separately.  Don't error out if -mfpu=auto is
18062         used with only an architecture string.
18063         (arm_print_asm_arch_directives): New function.
18064         (arm_file_start): Call it.
18065         * config/arm/arm-cpu-cdata.h: Regenerated.
18066         * config/arm/arm-cpu-data.h: Likewise.
18067         * config/arm/arm-tables.opt: Likewise.
18069 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
18071         * config/arm/elf.h (ASM_SPEC): Only pass -mfpu through to the
18072         assembler when it is not -mfpu=auto.
18074 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
18076         * config/arm/arm.h (BIG_LITTLE_SPEC): Delete macro.
18077         (ASM_REWRITE_SPEC_FUNCTIONS): New macro.
18078         (BIG_LITTLE_CPU_SPEC_FUNCTIONS): Delete macro.
18079         (ASM_CPU_SPEC): Rewrite.
18080         (MCPU_MTUNE_NATIVE_FUNCTIONS): New macro.
18081         (EXTRA_SPEC_FUNCTIONS): Move outside of ifdef.  Use
18082         MCPU_MTUNE_NATIVE_FUNCTIONS and ASM_REWRITE_SPEC_FUNCTIONS.  Remove
18083         reference to BIG_LITTLE_CPU_SPEC_FUNCTIONS.
18084         * common/config/arm/arm-common.c (arm_rewrite_selected_cpu): Ensure
18085         copied string is NUL-terminated.  Also strip any characters prefixed
18086         by '+'.
18087         (arm_rewrite_selected_arch): New function.
18088         (arm_rewrite_march): New function.
18090 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
18092         * config/arm/arm.opt (x_arm_arch_string): New TargetSave option.
18093         (x_arm_cpu_string, x_arm_tune_string): Likewise.
18094         (march, mcpu, mtune): Convert to string-based options.
18095         * config/arm/arm.c (arm_print_hint_for_core_or_arch): New function.
18096         (arm_parse_arch_cpu_name): New function.
18097         (arm_configure_build_target): Use arm_parse_arch_cpu_name to
18098         identify selected architecture or CPU.
18099         (arm_option_save): New function.
18100         (TARGET_OPTION_SAVE): Redefine.
18101         (arm_option_restore): Restore string options.
18102         (arm_option_print): Print string options.
18104 2017-06-16  Martin Sebor  <msebor@redhat.com>
18106         PR tree-optimization/80933
18107         PR tree-optimization/80934
18108         * builtins.c (fold_builtin_3): Do not handle bcmp here.
18109         * gimple-fold.c (gimple_fold_builtin_bcmp): New function.
18110         (gimple_fold_builtin_bcopy, gimple_fold_builtin_bzero): Likewise.
18111         (gimple_fold_builtin): Call them.
18113 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
18115         * gimple-ssa-isolate-paths.c (isolate_path): Set edge leading to path
18116         as unlikely; update profile.
18118 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
18120         * predict.c (force_edge_cold): Handle declaring edges impossible
18121         more aggresively.
18123 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
18125         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update
18126         profile.
18127         (try_unroll_loop_completely): Fix reporting.
18129 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
18131         * tree-ssa-tail-merge.c (replace_block_by): Fix profile updating.
18133 2017-06-16  James Greenhalgh  <james.greenhalgh@arm.com>
18135         PR target/71778
18136         * config/arm/arm-builtins.c (arm_expand_builtin_args): Return TARGET
18137         if given a non-constant argument for an intrinsic which requires a
18138         constant.
18140 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
18142         * profile.c (compare_freqs): New function.
18143         (branch_prob): Sort edge list.
18144         (find_spanning_tree): Assume that the list is priority sorted.
18146 2017-06-16  Richard Biener  <rguenther@suse.de>
18148         PR tree-optimization/81090
18149         * passes.def (pass_record_bounds): Remove.
18150         * tree-pass.h (make_pass_record_bounds): Likewise.
18151         * tree-ssa-loop.c (pass_data_record_bounds, pass_record_bounds,
18152         make_pass_record_bounds): Likewise.
18153         * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables): Do
18154         not free niter estimates at the beginning but at the end.
18155         * tree-scalar-evolution.c (scev_finalize): Free niter estimates.
18157 2017-06-16  Richard Biener  <rguenther@suse.de>
18159         * tree-switch-conversion.c (emit_case_bit_tests): Adjust
18160         initializer to workaround ICE in host GCC 4.8.
18162 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
18164         * ipa-inline-transform.c (update_noncloned_frequencies): Update also
18165         counts.
18166         (clone_inlined_nodes): Update.
18168 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
18170         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune): Update
18171         prefetch settings, and enable prefetching by default at -O3.
18173 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
18175         * config/aarch64/aarch64.c (aarch64_override_options_internal):
18176         Set flag_prefetch_loop_arrays according to tuning data.
18178 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
18180         * config/aarch64/aarch64-protos.h (struct cpu_prefetch_tune):
18181         New tune structure.
18182         (struct tune_params): Use cpu_prefetch_tune instead of cache_line_size.
18183         [Unrelated to main purpose of the patch] Place the pointer field last
18184         to enable type checking errors when tune structure are wrongly merged.
18185         * config/aarch64/aarch64.c (generic_prefetch_tune,)
18186         (exynosm1_prefetch_tune, qdf24xx_prefetch_tune,)
18187         (thunderx2t99_prefetch_tune): New tune constants.
18188         (tune_params *_tunings): Update all tunings (no functional change).
18189         (aarch64_override_options_internal): Set PARAM_SIMULTANEOUS_PREFETCHES,
18190         PARAM_L1_CACHE_SIZE, PARAM_L1_CACHE_LINE_SIZE, and PARAM_L2_CACHE_SIZE
18191         from tunings structures.
18193 2017-06-16  Jakub Jelinek  <jakub@redhat.com>
18195         PR sanitizer/81094
18196         * ubsan.c (instrument_null): Add T argument, use it instead
18197         of computing it based on IS_LHS.
18198         (instrument_object_size): Likewise.
18199         (pass_ubsan::execute): Adjust instrument_null and
18200         instrument_object_size callers to pass gimple_get_lhs or
18201         gimple_assign_rhs1 result to it.  Use instrument_null instead of
18202         calling get_base_address and instrument_mem_ref.  Handle
18203         aggregate call arguments for object-size sanitization.
18205 2017-06-16  Yury Gribov  <tetra2005@gmail.com>
18207         PR tree-optimization/81089
18208         * tree-vrp.c (is_masked_range_test): Validate operands of
18209         subexpression.
18211 2017-06-15  Martin Sebor  <msebor@redhat.com>
18213         PR c++/80560
18214         * dumpfile.c (dump_register): Avoid calling memset to initialize
18215         a class with a default ctor.
18216         * gcc.c (struct compiler): Remove const qualification.
18217         * genattrtab.c (gen_insn_reserv): Replace memset with initialization.
18218         * hash-table.h: Ditto.
18219         * ipa-cp.c (allocate_and_init_ipcp_value): Replace memset with
18220           assignment.
18221         * ipa-prop.c (ipa_free_edge_args_substructures): Ditto.
18222         * omp-low.c (lower_omp_ordered_clauses): Replace memset with
18223         default ctor.
18224         * params.h (struct param_info): Make struct members non-const.
18225         * tree-switch-conversion.c (emit_case_bit_tests): Replace memset
18226         with default initialization.
18227         * vec.h (vec_copy_construct, vec_default_construct): New helper
18228         functions.
18229         (vec<T>::copy, vec<T>::splice, vec<T>::reserve): Replace memcpy
18230         with vec_copy_construct.
18231         (vect<T>::quick_grow_cleared): Replace memset with default ctor.
18232         (vect<T>::vec_safe_grow_cleared, vec_safe_grow_cleared): Same.
18233         * doc/invoke.texi (-Wclass-memaccess): Document.
18235 2017-06-15  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
18237         * emit-rtl.h (is_leaf): Update comment about local
18238         register allocator.
18240 2017-06-15  Jozef Lawrynowicz   <jozef.l@somniumtech.com>
18242         PR target/78818
18243         * config/msp430/msp430.c (msp430_data_attr): Check that it's possible
18244         for a variable to have a section before checking if the section has a
18245         name.
18246         Set section to.persistent if persistent attribute is set.
18247         Warn if .persistent attribute is used on an automatic variable.
18249 2017-06-15  Eric Botcazou  <ebotcazou@adacore.com>
18251         PR rtl-optimization/80474
18252         * reorg.c (update_block): Do not ignore instructions in a delay slot.
18254 2017-06-15  Segher Boessenkool  <segher@kernel.crashing.org>
18256         * config/rs6000/rs6000.md (add<mode>3): Use reg_or_subregno instead
18257         of REGNO.
18259 2017-06-14  Maciej W. Rozycki  <macro@imgtec.com>
18261         * config/mips/mips.md (MIPS16_T_REGNUM): Remove constant.
18262         (casesi): Emit bounds checking as RTL.
18263         (casesi_internal_mips16_<mode>): Remove bounds checking.
18265 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
18267         * config/xtensa/xtensa.c (xtensa_option_override): Append
18268         MASK_CONST16 to target_flags in the absence of TARGET_L32R.
18269         (hwloop_optimize, hwloop_fail, hwloop_pattern_reg,
18270          xtensa_doloop_hooks): Define unconditionally.
18271         (xtensa_reorg_loops): Only call reorg_loops in the presence of
18272         TARGET_LOOPS.
18273         * config/xtensa/xtensa.h (TARGET_L32R): New definition.
18274         (TARGET_DEFAULT): Remove XCHAL_HAVE_L32R condition and account
18275         for it in xtensa_option_override.
18276         (HARD_FRAME_POINTER_IS_FRAME_POINTER,
18277          HARD_FRAME_POINTER_IS_ARG_POINTER): New definitions.
18279 2017-06-14  Boris Kolpackov  <boris@codesynthesis.com>
18281         * doc/cppopts.texi: Document '-' special value to -MF.
18283 2017-06-14  Wilco Dijkstra  <wdijkstr@arm.com>
18285         * config/arm/cortex-a53.md (cortex_a53_fpalu) Adjust latency.
18286         (cortex_a53_fconst): Likewise.
18287         (cortex_a53_fpmul): Likewise.
18288         (cortex_a53_f_load_64): Likewise.
18289         (cortex_a53_f_load_many): Likewise.
18290         (cortex_a53_advsimd_alu): Likewise.
18291         (cortex_a53_advsimd_alu_q): Likewise.
18292         (cortex_a53_advsimd_mul): Likewise.
18293         (cortex_a53_advsimd_mul_q): Likewise.
18294         (fpmac bypass): Add new bypass for fpmac-fpmac case.
18295         Add missing fmul, r2f_cvt and fconst cases.
18297 2017-06-14  Richard Biener  <rguenther@suse.de>
18299         PR middle-end/81088
18300         * fold-const.c (split_tree): Drop TREE_OVERFLOW flag from
18301         literal constants.
18302         (fold_binary_loc): When associating do not treat pre-existing
18303         TREE_OVERFLOW on literal constants as a reason to allow
18304         TREE_OVERFLOW on associated literal constants.
18306 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
18308         * config/sparc/sparc.h (MASK_ISA): Add MASK_LEON and MASK_LEON3.
18309         (MASK_FEATURES): New macro.
18310         * config/sparc/sparc.c (sparc_option_override): Remove the special
18311         handling of -mfpu and generalize it to all MASK_FEATURES switches.
18313 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
18315         * simplify-rtx.c (simplify_binary_operation_1) <UDIV>: Do not simplify
18316         a division of 0 if non-call exceptions are enabled.
18318 2017-06-14  Andrew Pinski  <apinski@cavium.com>
18319             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
18321         PR target/71663
18322         * config/aarch64/aarch64.c (aarch64_expand_vector_init):
18323         Improve vector initialization code gen for only variable case.
18325 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
18327         * config/sparc/driver-sparc.c (cpu_names): Add SPARC-T5 entry.
18329 2017-06-14  Richard Biener  <rguenther@suse.de>
18331         PR tree-optimization/81083
18332         * tree-ssa-sccvn.c (vn_reference_lookup_3): Do not use abnormals
18333         as values.
18335 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
18337         * config/rs6000/rs6000.c: Update all comments that mentioned SPE.
18338         (rs6000_expand_builtin): Remove RS6000_BTC_EVSEL.
18339         * config/rs6000/rs6000.h (RS6000_BTC_EVSEL): Delete.
18340         * config/rs6000/vxworks.h (VXCPU_FOR_8548): Delete.  Adjust former use.
18341         * config/rs6000/vxworksae.h (VXCPU_FOR_8548): Delete.
18342         * config/rs6000/vxworksmils.h (VXCPU_FOR_8548): Delete.
18344 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
18346         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete VECTOR_SPE.
18347         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete VECTOR_SPE.
18349 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
18351         * config/rs6000/rs6000.h (FIXED_SCRATCH): Delete.
18353 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
18355         * config/rs6000/t-rtems: Don't handle SPE.
18357 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
18359         * config/rs6000/t-linux: Don't handle SPE.
18361 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
18363         * config/rs6000/eabispe.h: Delete file.
18365 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
18367         * config/rs6000/t-spe: Delete file.
18369 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
18371         * config/rs6000/rs6000.c (SPE_CONST_OFFSET_OK): Delete.
18372         (rs6000_legitimate_offset_address_p): Return false for anything in
18373         V2SImode or V2SFmode.
18375 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
18377         * config/rs6000/rs6000-modes.def: Remove all 8-byte vector modes
18378         except V2SF and V2SI.  Rearrange the vector modes, and add comments.
18379         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove V8QImode
18380         and V4HImode.
18381         (reg_offset_addressing_ok_p): Remove V4HImode and V1DImode.
18382         (rs6000_legitimate_offset_address_p): Ditto.
18383         (rs6000_emit_move): Ditto.
18384         (rs6000_init_builtins): Remove V4HI_type_node.
18386 2017-06-13  Martin Liska  <mliska@suse.cz>
18388         PR sanitize/78204
18389         * asan.c (asan_sanitize_stack_p): Use sanitize_flags_p.
18390         (gate_asan): Likewise.
18391         * asan.h (asan_no_sanitize_address_p): Remove the function.
18392         (sanitize_flags_p): New function.
18393         * builtins.def: Fix coding style.
18394         * common.opt: Use renamed enum value.
18395         * convert.c (convert_to_integer_1): Use sanitize_flags_p.
18396         * doc/extend.texi: Document no_sanitize attribute.
18397         * flag-types.h (enum sanitize_code): Rename SANITIZE_NONDEFAULT
18398         to SANITIZE_UNDEFINED_NONDEFAULT.
18399         * gcc.c (sanitize_spec_function): Use the renamed enum value.
18400         * gimple-fold.c (optimize_atomic_compare_exchange_p):
18401         Use sanitize_flags_p.
18402         * gimplify.c (gimplify_function_tree): Likewise.
18403         * ipa-inline.c (sanitize_attrs_match_for_inline_p): Likewise.
18404         * opts.c (parse_no_sanitize_attribute): New function.
18405         (common_handle_option): Use renamed enum value.
18406         * opts.h (parse_no_sanitize_attribute): Declare.
18407         * tree.c (sanitize_flags_p): New function.
18408         * tree.h: Declared here.
18409         * tsan.c: Use sanitize_flags_p.
18410         * ubsan.c (ubsan_expand_null_ifn): Likewise.
18411         (instrument_mem_ref): Likewise.
18412         (instrument_bool_enum_load): Likewise.
18413         (do_ubsan_in_current_function): Remove the function.
18414         (pass_ubsan::execute): Use sanitize_flags_p.
18415         * ubsan.h: Remove do_ubsan_in_current_function
18416         * tree-cfg.c (print_no_sanitize_attr_value): New function.
18417         (dump_function_to_file): Use it here.
18419 2017-06-13  Martin Jambor  <mjambor@suse.cz>
18421         PR tree-optimization/80803
18422         PR tree-optimization/81063
18423         * tree-sra.c (subtree_mark_written_and_enqueue): Move up in the file.
18424         (propagate_subaccesses_across_link): Enqueue subtree whenever
18425         necessary instead of relying on the caller.
18427 2017-06-13  Martin Jambor  <mjambor@suse.cz>
18429         * tree-sra.c (add_access_to_work_queue): Only enqueue accesses
18430         that have a first_link.
18431         (sort_and_splice_var_accesses): Do not check first_link before
18432         enquing.
18433         (subtree_mark_written_and_enqueue): Likewise.
18434         (propagate_all_subaccesses): Likewise and do not stop at first
18435         parent with a first_link.
18437 2017-06-13  Martin Jambor  <mjambor@suse.cz>
18439         * tree-sra.c (dump_access_tree_1): Fix accidental dumping to stderr
18440         instead of f.
18442 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
18444         * match.pd: New pattern.
18446 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
18448         * tree-vrp.c (is_masked_range_test): New function.
18449         (register_edge_assert_for): Determine ranges for
18450         some bit tests.
18452 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
18454         PR tree-optimization/67328
18455         * fold-const.c (maskable_range_p): New function.
18456         (build_range_check): Generate bittests if possible.
18458 2017-06-13  Martin Liska  <mliska@suse.cz>
18460         * gimple-pretty-print.c (dump_probability): Add new argument.
18461         (dump_edge_probability): Dump both probability and count.
18462         (dump_gimple_label): Likewise.
18463         (dump_gimple_bb_header): Likewise.
18465 2017-06-13  Georg-Johann Lay  <avr@gjlay.de>
18467         PR target/81072
18468         * config/avr/avr-devices.c: Fix indentation.
18469         * config/avr/gen-avr-mmcu-specs.c: Dito.
18471 2017-06-13  Richard Biener  <rguenther@suse.de>
18473         * tree-vect-loop.c (vect_model_reduction_cost): Do not fail,
18474         instead get vector type from stmt_info.
18475         (vectorizable_reduction): Adjust.  Remove dead code.
18477 2017-06-13  Richard Biener  <rguenther@suse.de>
18479         PR middle-end/81065
18480         * fold-const.c (extract_muldiv_1): Remove bogus distribution
18481         case of C * (x * C2 + C3).
18482         (fold_addr_of_array_ref_difference): Properly fold index difference.
18484 2017-06-12  David S. Miller  <davem@davemloft.net>
18486         PR target/80968
18487         * config/sparc/sparc.md (return expander): Emit frame blockage if
18488         function uses alloca.
18490 2017-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
18492         * combine.c (make_field_assignment): Check len rather than the mode
18493         precision when calling force_to_mode.
18495 2017-06-12  Georg-Johann Lay  <avr@gjlay.de>
18497         Support multilibs and devices that see flash in RAM address range.
18499         PR target/81072
18500         * config/avr/avr-arch.h (avr_arch_id) <ARCH_AVRXMEGA3>: New enum.
18501         (avr_mcu_t) <flash_pm_offset>: New field.
18502         (avr_device_specific_features) <AVR_ISA_RCALL>: New enum.
18503         * config/avr/avr.h (AVR_SHORT_CALLS): New define.
18504         (AVR_HAVE_JMP_CALL): Don't set if AVR_SHORT_CALLS.
18505         (AVR_TINY_PM_OFFSET): Remove macro.
18506         * config/avr/avr.opt (-mshort-calls): New option.
18507         * config/avr/gen-avr-mmcu-specs.c (print_mcu)
18508         [*self_spec]: Add / remove -mshort-calls depending on AVR_ISA_RCALL.
18509         * config/avr/avr-c.c (avr_cpu_cpp_builtins)
18510         <__AVR_SHORT_CALLS__>: Built-in define if AVR_SHORT_CALLS.
18511         <__AVR_HAVE_JMP_CALL__>: Use AVR_HAVE_JMP_CALL as condition
18512         instead of avr_arch->have_jmp_call.
18513         <__AVR_PM_BASE_ADDRESS__>: Built-in define if avr_arch->flash_pm_offset.
18514         [AVR_TINY] <__AVR_TINY_PM_BASE_ADDRESS__>: Use
18515         avr_arch->flash_pm_offset to define.
18516         * config/avr/avr-devices.c (avr_arch_types): Add initializers for
18517         new field flash_pm_offset.  Add entry for avrxmega3.
18518         (avr_texinfo): Add entry for avrxmega3.
18519         * config/avr/avr-mcus.def: Add entries for: avrxmega3,
18520         attiny212, attiny214,
18521         attiny412, attiny414, attiny416, attiny417,
18522         attiny814, attiny816, attiny817,
18523         attiny1614, attiny1616, attiny1617,
18524         attiny3214, attiny3216, attiny3217.
18525         * config/avr/avr.c (avr_assemble_integer)[AVR_TINY]: Use
18526         avr_arch->flash_pm_offset instead of AVR_TINY_PM_OFFSET.
18527         (avr_print_operand_address) [AVR_TINY]: Same.
18528         (avr_asm_init_sections) <readonly_data_section>: Only patch
18529         callback if avr_arch->flash_pm_offset = 0.
18530         (avr_asm_named_section) <avr_need_copy_data_p>: Skip setting it
18531         for rodata if avr_arch->flash_pm_offset != 0.
18532         (avr_encode_section_info) [AVR_TINY]: Adjust comment.
18533         * config/avr/genmultilib.awk (dir_rcall, opt_rcall): New vars.
18534         (opts) [AVR_ISA_RCALL]: Append opt_rcall.
18535         (m_options): Append opt_rcall.
18536         (m_dirnames): Append dir_rcall.
18537         * config/avr/t-multilib: Regenerate.
18539         * configure.ac [target=avr]: Check whether avrxmega3 default
18540         linker description file works as needed.
18541         * configure: Regenerate.
18542         * doc/avr-mmcu.texi: Regenerate.
18543         * doc/invoke.texi (AVR Options) <-mshort-calls>: Document it.
18544         <__AVR_ARCH__>: Document avrxmega3 and 103.
18545         <__AVR_HAVE_JMP_CALL__>: Adjust documentation.
18546         <__AVR_SHORT_CALLS__>: Document it.
18547         <__AVR_PM_BASE_ADDRESS__>: Document it.
18548         * doc/extend.texi (AVR Options) <-mshort-calls>: Document it.
18549         (AVR Variable Attributes) <progmem>: Document this is
18550         not needed for avrxmega3.
18551         (AVR Named Address Spaces) <__flash>: Dito.
18553 2017-06-12  Jan Hubicka  <hubicka@ucw.cz>
18555         * cgraph.c (cgraph_node::dump): Complain about profile insanities.
18557 2017-06-12  Doug Rupp  <rupp@adacore.com>
18559         * config.gcc (*-*-vxworks*): Set use_gcc_stdint to "provide".
18560         Append vxworks-stdint.h to the tm_file list.
18561         * config/vxworks-stdint.h: New file.
18563 2017-06-12  Martin Liska  <mliska@suse.cz>
18565         PR tree-optimization/81041
18566         * tree-profile.c (gimple_gen_ic_func_profiler):
18567         Create an extra BB in profile-generate
18568         (gimple_gen_time_profiler): Likewise.
18570 2017-06-12  Jakub Jelinek  <jakub@redhat.com>
18572         PR tree-optimization/81003
18573         * tree-ssa-reassoc.c (force_into_ssa_name): New function.
18574         (update_range_test): Use it instead of force_gimple_operand_gsi.
18576 2017-06-12  Richard Biener  <rguenther@suse.de>
18578         PR tree-optimization/81053
18579         * tree-vect-loop.c (vect_is_simple_reduction): Handle PHI
18580         with backedge value not defined in loop.  Simplify def stmt
18581         compute.
18583 2017-06-11  Tom de Vries  <tom@codesourcery.com>
18585         PR target/79939
18586         * config/nvptx/nvptx.c (nvptx_cannot_force_const_mem): New function.
18587         Return true.
18588         (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to
18589         nvptx_cannot_force_const_mem.
18591 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
18593         * opts.c (finish_options): Move test for flag_split_stack after
18594         it has been initialized.
18596 2017-06-11  Jason Merrill  <jason@redhat.com>
18598         * tree.h (id_equal): New.
18599         * dwarf2out.c, hsa-gen.c, ipa-devirt.c, omp-expand.c,
18600         omp-simd-clone.c, read-rtl-function.c, tree-chkp.c, tree.c: Use it
18601         instead of strcmp of IDENTIFIER_POINTER.
18603 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
18605         * ipa-inline-transform.c: Include function.h, cfg.h and basic-block.h
18606         (mark_all_inlined_calls_cdtor): Fix formating.
18607         (inline_transform): Rescale profile before inlining.
18609 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
18611         * cgraph.h (cgraph_edge::clone): Update prototype.
18612         * cgraphclones.c (cgraph_edge::clone): Update profile scaling.
18613         (cgraph_node::create_clone): Update.
18614         (cgraph_node::create_version_clone): Update.
18615         * tree-inline.c (copy_bb): Update.
18616         (expand_call_inline): Update.
18618 2017-06-10  Segher Boessenkool  <segher@kernel.crashing.org>
18620         * config/rs6000/rs6000.c (emit_vrsave_prologue): New function,
18621         factored out from ...
18622         (rs6000_emit_prologue): ... here.
18624 2017-06-10  Segher Boessenkool  <segher@kernel.crashing.org>
18626         * config/rs6000/rs6000.c (emit_split_stack_prologue): New function,
18627         factored out from ...
18628         (rs6000_emit_prologue): ... here.
18630 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
18632         * predict.c (drop_profile): Also drop individual bb/edge and cgraph
18633         edge counts.
18634         (handle_missing_profiles): Fix computation of tp_first_run.
18635         (counts_to_freqs): Do not touch freqs when count is 0.
18637 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
18639         * cgraphbuild.c (cgraph_edge::rebuild_references): Do not touch
18640         profile.
18642 2017-06-10  Tom de Vries  <tom@codesourcery.com>
18644         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
18645         attributes): Document signal effective target.
18647 2017-06-10  Tom de Vries  <tom@codesourcery.com>
18649         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
18650         Document effective target stack_size.
18652 2017-06-09  David Malcolm  <dmalcolm@redhat.com>
18654         * diagnostic.c (diagnostic_report_diagnostic): Only add fixits
18655         to the edit_context if they can be auto-applied.
18657 2017-06-9  Ian Lance Taylor  <iant@golang.org>
18659         * opts.c (finish_options): If -fsplit-stack, disable implicit
18660         -forder-blocks-and-partition.
18661         * doc/invoke.texi (Optimize Options): Document that when using
18662         -fsplit-stack -forder-blocks-and-partition is not implicitly
18663         enabled.
18665 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
18667         * builtin-attrs.def (ATTR_NORETURN_NOTHROW_LEAF_COLD_LIST,
18668         ATTR_CONST_NORETURN_NOTHROW_LEAF_COLD_LIST,
18669         ATTR_TMPURE_NORETURN_NOTHROW_LEAF_COLD_LIST): New.
18670         * builtins.def (abort, trap, unreachable): Declare cold.
18671         * calls.c (flags_from_decl_or_type): Lookup ECF_COLD.
18672         * tree-core.h (ECF_COLD): New.
18673         * tree.c (set_call_expr_flags): Handle ECF_COLD.
18674         (build_common_builtin_nodes): Mark unreachable and abort as cold.
18676 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
18678         * predict.c (unlikely_executed_stmt_p): Cleanup.
18680 2017-06-09  Richard Biener  <rguenther@suse.de>
18682         * tree-ssa-loop-im.c (execute_sm): Do not force multi-threaded
18683         model if the ref is always written to.
18685 2017-06-09  Tamar Christina  <tamar.christina@arm.com>
18687         * config/aarch64/aarch64.md (lrint<GPF:mode><GPI:mode>2): New.
18689 2017-06-09  Tamar Christina  <tamar.christina@arm.com>
18691         * config/arm/arm.c (arm_rtx_costs_internal): Make sdiv more expensive
18692         than udiv.
18694 2017-06-09  Tom de Vries  <tom@codesourcery.com>
18696         PR target/80855
18697         * config/nvptx/nvptx.md (define_expand "mov<QHSDISDFM>"): Error out with
18698         "target cannot support label values" when encountering LABEL_REF.
18700 2017-06-09  Martin Liska  <mliska@suse.cz>
18702         * tree-profile.c (gimple_gen_ic_profiler): Update comment.
18703         (gimple_gen_ic_func_profiler): Emit direct comparison
18704         of __gcov_indirect_call_callee with NULL.
18705         (gimple_gen_time_profiler): Change probability from
18706         PROB_VERY_UNLIKELY to PROB_UNLIKELY.
18708 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
18710         * profile.c (edge_gcov_counts): Turn to pointer.
18711         (compute_branch_probabilities, compute_branch_probabilities): Update.
18712         (branch_prob): Do not clear edge_gcov_count.
18713         * profile.h (edge_gcov_counts): Turn to pointer.
18714         (edge_gcov_count): Update.
18716 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
18718         * gimple.h (gimple_check_failed): Mark cold.
18720 2017-06-09  Richard Biener  <rguenther@suse.de>
18722         PR tree-optimization/66623
18723         * tree-vect-loop.c (vect_is_simple_reduction): Cleanup,
18724         refactor check_reduction into two parts, properly computing
18725         whether we have to check reduction validity for outer loop
18726         vectorization.
18728 2017-06-09  Richard Biener  <rguenther@suse.de>
18730         PR tree-optimization/79483
18731         * graphite-scop-detection.c (order): New global.
18732         (get_order): Compute bb to order mapping that satisfies code
18733         generation constraints.
18734         (cmp_pbbs): New helper.
18735         (build_scops): Start domwalk at entry block, sort generated
18736         pbbs.
18738 2017-06-09  Richard Biener  <rguenther@suse.de>
18740         PR middle-end/81007
18741         * ipa-polymorphic-call.c
18742         (ipa_polymorphic_call_context::restrict_to_inner_class):
18743         Skip FIELD_DECLs with error_mark_node type.
18744         * passes.def (all_lowering_passes): Run pass_build_cgraph_edges
18745         last again.
18747 2017-06-09  Martin Liska  <mliska@suse.cz>
18749         * predict.c (struct branch_predictor): New struct.
18750         (test_prediction_value_range): New test.
18751         (predict_c_tests): New function.
18752         * selftest-run-tests.c (selftest::run_tests): Run the function.
18753         * selftest.h: Declare new tests.
18755 2017-06-09  Segher Boessenkool  <segher@kernel.crashing.org>
18757         PR target/80966
18758         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
18759         gen_add3_insn did not fail.
18760         * config/rs6000/rs6000.md (add<mode>3): If asked to add a constant to
18761         r0, construct that number in a temporary reg and add that reg to r0.
18762         If asked to put the result in r0 as well, fail.
18764 2017-06-08  Will Schmidt  <will_schmidt@vnet.ibm.com>
18766         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
18767         for early expansion of vec_eqv.
18769 2017-06-08  Jakub Jelinek  <jakub@redhat.com>
18771         PR middle-end/81005
18772         * ubsan.c (instrument_null): Avoid pointless code temporary.
18773         (pass_ubsan::execute): Instrument aggregate arguments of calls.
18775 2017-06-08  Uros Bizjak  <ubizjak@gmail.com>
18777         PR target/81015
18778         Revert:
18779         2016-12-14  Uros Bizjak  <ubizjak@gmail.com>
18781         PR target/59874
18782         * config/i386/i386.md (*ctzhi2): New insn_and_split pattern.
18783         (*clzhi2): Ditto.
18785 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
18787         * predict.c (unlikely_executed_edge_p): Move ahead.
18788         (probably_never_executed_edge_p): Use it.
18790 2017-06-08  Alexander Ivchenko  <alexander.ivchenko@intel.com>
18792         PR middle-end/79988
18793         * tree-chkp.c (chkp_gimple_call_builtin_p): Remove
18794         gimple_call_builtin_p call.
18796 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
18798         * system.h (fancy_abort): Annotate by ATTRIBUTE_COLD.
18799         * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1,
18800         rtl_check_failed_type2, rtl_check_failed_code1,
18801         rtl_check_failed_code2, rtl_check_failed_code_mode,
18802         rtl_check_failed_block_symbol, cwi_check_failed_bounds,
18803         rtvec_check_failed_bounds, rtl_check_failed_flag,
18804         _fatal_insn_not_found, _fatal_insn): Likewise.
18805         * tree.h (tree_contains_struct_check_failed,
18806         tree_check_failed, tree_not_check_failed,
18807         tree_class_check_failed, tree_range_check_failed,
18808         tree_not_class_check_failed, tree_int_cst_elt_check_failed,
18809         tree_vec_elt_check_failed, phi_node_elt_check_failed,
18810         tree_operand_check_failed, omp_clause_check_failed,
18811         omp_clause_operand_check_failed, omp_clause_range_check_failed):
18812         Likewise.
18814 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
18816         * cgraph.c (cgraph_edge::maybe_hot_p): Do not check
18817         flag_branch_probabilities.
18818         * ipa-inline.c (edge_badness): Likewise.
18819         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
18820         * postreload-gcse.c (eliminate_partially_redundant_load): Likewise.
18821         * predict.c (maybe_hot_frequency_p): Likewise.
18822         (probably_never_executed): Likewise.
18823         * sched-ebb.c (schedule_ebbs): Likewise.
18824         * sched-rgn.c (find_single_block_region): Likewise.
18825         * tracer.c (tail_duplicate): Likewise.
18827 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
18829         * opts.c (finish_options): x_flag_reorder_blocks_and_partition no
18830         longer requires x_flag_profile_use.
18832 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
18834         * cfgrtl.c (cfg_layout_initialize): Check crtl->has_bb_partition
18835         instead of flag_reorder_blocks_and_partition.
18836         * dbxout.c (dbxout_function_end): Likewise.
18837         * dwarf2out.c (gen_subprogram_die): Likewise.
18838         * haifa-sched.c (sched_create_recovery_edges): Likewise.
18839         * hw-doloop.c (reorg_loops): Likewise.
18840         * varasm.c (assemble_start_function,
18841         assemble_end_function): Likewise.
18842         (decide_function_section): Do not check for
18843         flag_reorder_blocks_and_partition.
18845 2017-06-08  Alexander Ivchenko  <alexander.ivchenko@intel.com>
18847         * tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
18848         New function.
18849         (chkp_get_hard_register_fake_addr_expr): Ditto.
18850         (chkp_build_addr_expr): Add check for hard reg case.
18851         (chkp_parse_array_and_component_ref): Ditto.
18852         (chkp_find_bounds_1): Ditto.
18853         (chkp_process_stmt): Don't generate bounds store for
18854         hard reg case.
18856 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
18858         * predict.c (maybe_hot_bb_p): Do not check profile status.
18859         (maybe_hot_edge_p): Likewise.
18860         (probably_never_executed): Check for zero counts even if profile
18861         is not read.
18862         (unlikely_executed_edge_p): New function.
18863         (unlikely_executed_stmt_p): New function.
18864         (unlikely_executed_bb_p): New function.
18865         (set_even_probabilities): Use unlikely predicates.
18866         (combine_predictions_for_bb): Likewise.
18867         (predict_paths_for_bb): Likewise.
18868         (predict_paths_leading_to_edge): Likewise.
18869         (determine_unlikely_bbs): New function.
18870         (estimate_bb_frequencies): Use it.
18871         (compute_function_frequency): Use zero counts even if profile is
18872         not read.
18873         * profile-count.h: Fix typo.
18875 2017-08-08  Julia Koval  <julia.koval@intel.com>
18877         * config/i386/avx512bwintrin.h (_mm512_mask_cvtepi16_storeu_epi8,
18878         _mm512_mask_cvtsepi16_storeu_epi8,
18879         _mm512_mask_cvtusepi16_storeu_epi8): New intrinsics.
18880         * config/i386/avx512vlbwintrin.h (_mm256_mask_cvtepi16_storeu_epi8,
18881         _mm_mask_cvtsepi16_storeu_epi8, _mm256_mask_cvtsepi16_storeu_epi8,
18882         _mm_mask_cvtusepi16_storeu_epi8, _mm256_mask_cvtusepi16_storeu_epi8,
18883         _mm_mask_cvtepi16_storeu_epi8): New intrinsics.
18884         * config/i386/i386-builtin-types.def (PV8Q, V8QI): New pointer type.
18885         (VOID_FTYPE_PV32QI_V32HI_USI, VOID_FTYPE_PV8QI_V8HI_UQI,
18886         VOID_FTYPE_PV16QI_V16HI_UHI): New function types.
18887         * config/i386/i386-builtin.def (__builtin_ia32_pmovwb128mem_mask,
18888         __builtin_ia32_pmovwb256mem_mask, __builtin_ia32_pmovswb128mem_mask,
18889         __builtin_ia32_pmovswb256mem_mask, __builtin_ia32_pmovuswb128mem_mask,
18890         __builtin_ia32_pmovuswb256mem_mask,
18891         __builtin_ia32_pmovuswb512mem_mask, __builtin_ia32_pmovswb512mem_mask)
18892         __builtin_ia32_pmovwb512mem_mask): New builtins.
18894 2017-08-08  Julia Koval  <julia.koval@intel.com>
18896         PR target/73350,80862
18897         * config/i386/subst.md (round): Fix round pattern.
18898         * config/i386/i386.c (ix86_erase_embedded_rounding):
18899         Fix erasing rounding for the fixed pattern.
18901 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
18903         * cfgbuild.c (find_many_sub_basic_blocks): Fix thinko.
18905 2017-06-08  Martin Liska  <mliska@suse.cz>
18907         PR gcov-profile/80911
18908         * gcov.c (block_info::block_info): New constructor.
18910 2017-06-07  Carl Love  <cel@us.ibm.com>
18912         * config/rs6000/rs6000-c: The return type of the following
18913         built-in functions was implemented as int not long long.  Fix sign
18914         of return value for the unsigned version of vec_mulo and vec_mule.
18915         vector unsigned long long vec_bperm (vector unsigned long long,
18916                                              vector unsigned char)
18917         vector signed long long vec_mule (vector signed int,
18918                                           vector signed int)
18919         vector unsigned long long vec_mule (vector unsigned int,
18920                                             vector unsigned int)
18921         vector signed long long vec_mulo (vector signed int,
18922                                           vector signed int)
18923         vector unsigned long long vec_mulo (vector unsigned int,
18924                                             vector unsigned int)
18925         * doc/extend.texi: Fix the documentation for the built-in
18926         functions.
18928 2017-06-07  Carl Love  <cel@us.ibm.com>
18930         PR target/80982
18931         * config/rs6000/altivec.md (double<mode>2): Fix the implementation of
18932         for BE.
18934 2017-06-07  Carl Love  <cel@us.ibm.com>
18936         * config/rs6000/altivec.md: Fix argument swizzle in vec_doublel
18937         support, Generate       doublehv for signed int/float for BE case only.
18939 2017-06-07  Alexander Monakov  <amonakov@ispras.ru>
18941         * doc/invoke.texi (mcx16): Rewrite.
18943 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
18945         * config/rs6000/predicates.md (rs6000_nonimmediate_operand): Delete.
18946         * config/rs6000/rs6000.md (*movsi_internal1, movsi_from_sf,
18947         *mov<mode>_softfloat, and an anonymous splitter): Use
18948         nonimmediate_operand instead of rs6000_nonimmediate_operand.
18950 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
18952         * config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE_ACC and
18953         SPEFSCR registers.
18954         * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
18955         (enum rs6000_reg_type): Delete SPE_ACC_TYPE and SPEFSCR_REG_TYPE.
18956         (rs6000_debug_reg_global): Adjust.
18957         (rs6000_init_hard_regno_mode_ok): Adjust.
18958         (rs6000_dbx_register_number): Adjust.
18959         * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change to 115.
18960         (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
18961         Remove SPE_ACC and SPEFSCR.
18962         (REG_ALLOC_ORDER): Ditto.
18963         (FRAME_POINTER_REGNUM): Change to 111.
18964         (enum reg_class): Remove the SPE_ACC and SPEFSCR registers.
18965         (REG_CLASS_NAMES): Ditto.
18966         (REG_CLASS_CONTENTS): Delete the SPE_ACC and SPEFSCR registers.
18967         (REGISTER_NAMES): Ditto.
18968         (ADDITIONAL_REG_NAMES): Ditto.
18969         (rs6000_reg_names): Ditto.
18970         * config/rs6000/rs6000.md: Renumber some register number
18971         define_constants.
18973 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
18975         * config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE high
18976         registers.
18977         * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
18978         * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change from 149
18979         to 117.
18980         (DWARF_REG_TO_UNWIND_COLUMN): Do not define.
18981         (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
18982         Delete the SPE high registers.
18983         (REG_ALLOC_ORDER): Ditto.
18984         (enum reg_class): Remove SPE_HIGH_REGS.
18985         (REG_CLASS_NAMES): Ditto.
18986         (REG_CLASS_CONTENTS): Delete the SPE high registers.
18987         (REGISTER_NAMES): Ditto.
18988         (rs6000_reg_names): Ditto.
18989         * doc/tm.texi.in: Remove SPE as example.
18990         * doc/tm.texi: Regenerate.
18992 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
18994         * config/rs6000/8540.md (ppc8540_brinc): Delete.
18995         * config/rs6000/e500mc.md (e500mc_brinc): Delete.
18996         * config/rs6000/e500mc64.md (e500mc64_brinc): Delete.
18997         * config/rs6000/rs6000.md (type): Remove "brinc".
18999 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
19001         * config.gcc (powerpc*-*-*): Don't add spe.h to extra_headers.
19002         (powerpc*-linux*spe*): Use ${cpu_type} instead of rs6000.
19003         * config/rs6000/linuxspe.h: Delete file.
19004         * config/rs6000/rs6000.md: Don't include spe.md.
19005         * config/rs6000/spe.h: Delete file.
19006         * config/rs6000/spe.md: Delete file.
19007         * config/rs6000/t-rs6000: Remove spe.md.
19009 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
19011         * config/rs6000/predicates.md (reg_or_mem_operand): Reformat.
19012         (reg_or_none500mem_operand): Delete.
19013         * config/rs6000/rs6000.md (extendsfdf2): Use reg_or_mem_operand
19014         instead of reg_or_none500mem_operand.
19016 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
19018         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
19019         handling of SPE flags.
19020         * config/rs6000/rs6000.opt (-mspe, -mspe=no, -mspe=yes): Delete.
19022 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
19024         * config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
19025         SPE ABI handling.
19026         * config/rs6000/paired.md (paired_negv2sf2): Rename to negv2sf2.
19027         (paired_absv2sf2, paired_addv2sf3, paired_subv2sf3, paired_mulv2sf3,
19028         paired_divv2sf3): Similar.
19029         * config/rs6000/predicates.md: Replace TARGET_SPE, TARGET_SPE_ABI,
19030         SPE_VECTOR_MODE and SPE_HIGH_REGNO_P by 0; simplify.
19031         * config/rs6000/rs6000-builtin.def: Delete RS6000_BUILTIN_E and
19032         RS6000_BUILTIN_S.
19033         Delete BU_SPE_1, BU_SPE_2, BU_SPE_3, BU_SPE_E, BU_SPE_P, and BU_SPE_X.
19034         Rename the paired_* instruction patterns.
19035         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Do not
19036         define __SPE__.
19037         * config/rs6000/rs6000-protos.h (invalid_e500_subreg): Delete.
19038         * config/rs6000/rs6000.c: Delete RS6000_BUILTIN_E and RS6000_BUILTIN_S.
19039         (struct rs6000_stack): Delete fields spe_gp_save_offset, spe_gp_size,
19040         spe_padding_size, and spe_64bit_regs_used.  Replace TARGET_SPE and
19041         TARGET_SPE_ABI with 0, simplify.  Replace SPE_VECTOR_MODE with
19042         PAIRED_VECTOR_MODE.
19043         (struct machine_function): Delete field spe_insn_chain_scanned_p.
19044         (spe_func_has_64bit_regs_p): Delete.
19045         (spe_expand_predicate_builtin): Delete.
19046         (spe_expand_evsel_builtin): Delete.
19047         (TARGET_DWARF_REGISTER_SPAN): Do not define.
19048         (TARGET_MEMBER_TYPE_FORCES_BLK): Do not define.
19049         (invalid_e500_subreg): Delete.
19050         (rs6000_legitimize_address): Always force_reg op2 as well, for
19051         paired single memory accesses.
19052         (rs6000_member_type_forces_blk): Delete.
19053         (rs6000_spe_function_arg): Delete.
19054         (rs6000_expand_unop_builtin): Delete SPE handling.
19055         (rs6000_expand_binop_builtin): Ditto.
19056         (spe_expand_stv_builtin): Delete.
19057         (bdesc_2arg_spe): Delete.
19058         (spe_expand_builtin): Delete.
19059         (spe_expand_predicate_builtin): Delete.
19060         (spe_expand_evsel_builtin): Delete.
19061         (rs6000_invalid_builtin): Remove RS6000_BTM_SPE handling.
19062         (spe_init_builtins): Delete.
19063         (spe_func_has_64bit_regs_p): Delete.
19064         (savres_routine_name): Delete "info" parameter.  Adjust callers.
19065         (rs6000_emit_stack_reset): Ditto.
19066         (rs6000_dwarf_register_span): Delete.
19067         * config/rs6000/rs6000.h (TARGET_SPE_ABI, TARGET_SPE,
19068         UNITS_PER_SPE_WORD, SPE_HIGH_REGNO_P, SPE_SIMD_REGNO_P,
19069         SPE_VECTOR_MODE, RS6000_BTM_SPE, RS6000_BUILTIN_E, RS6000_BUILTIN_S):
19070         Delete.
19071         * config/rs6000/rs6000.md (FIRST_SPE_HIGH_REGNO, LAST_SPE_HIGH_REGNO):
19072         Delete.
19073         * config/rs6000/rs6000.opt (-mabi=spe, -mabi=no-spe): Delete.
19074         * config/rs6000/spe.md: Delete every pattern that uses TARGET_SPE.
19075         * config/rs6000/vector.md (absv2sf2, negv2sf2, addv2sf3, subv2sf3,
19076         mulv2sf3, divv2sf3): Delete expanders.
19078 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
19080         config/rs6000/rs6000.md (UNSPEC_MV_CR_GT): Delete.
19082 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
19084         * config/rs6000/rs6000-protos.h (output_e500_flip_gt_bit): Delete.
19085         * config/rs6000/rs6000.c: Ditto.
19087 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
19089         * config/rs6000/predicated.md (rs6000_cbranch_operator): Delete.
19090         * config/rs6000/rs6000.md: Replace rs6000_cbranch_operator by
19091         comparison_operator.
19093 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
19095         * config/rs6000/rs6000.c: Remove everything related to -mfloat-gprs.
19096         * config/rs6000/rs6000.opt: Ditto.
19097         * config/rs6000/t-rtems: Ditto.
19099 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
19101         * config/rs6000/predicates.md: Replace TARGET_E500_DOUBLE and
19102         TARGET_E500_SINGLE by 0, simplify.
19103         * config/rs6000/rs6000.c: Ditto.
19104         (rs6000_option_override_internal): Delete CHECK_E500_OPTIONS.
19105         (spe_build_register_parallel): Delete.
19106         * config/rs6000/rs6000.h: Delete TARGET_E500_SINGLE,
19107         TARGET_E500_DOUBLE, and CHECK_E500_OPTIONS.
19108         * config/rs6000/rs6000.md: Replace TARGET_E500_DOUBLE,
19109         TARGET_E500_SINGLE, and <E500_CONVERT> by 0, simplify.
19110         (E500_CONVERT): Delete.
19111         * config/rs6000/spe.md: Remove many patterns and all define_constants.
19113 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
19115         * config/rs6000/darwin.md: Replace TARGET_FPRS by 1 and simplify.
19116         * config/rs6000/dfp.md: Ditto.
19117         (negdd2, *negdd2_fpr): Merge.
19118         (absdd2, *absdd2_fpr): Merge.
19119         (negtd2, *negtd2_fpr): Merge.
19120         (abstd2, *abstd2_fpr): Merge.
19121         * config/rs6000/e500.h: Delete file.
19122         * config/rs6000/predicates.md (rs6000_cbranch_operator): Replace
19123         TARGET_FPRS by 1 and simplify.
19124         * config/rs6000/rs6000-c.c: Ditto.
19125         * config/rs6000/rs6000.c: Ditto.  Also replace TARGET_SF_SPE and
19126         TARGET_DF_SPE by 0.
19127         * config/rs6000/rs6000.h: Ditto.  Delete TARGET_SF_SPE and
19128         TARGET_DF_SPE.
19129         * config/rs6000/rs6000.md: Ditto.
19130         (floatdidf2, *floatdidf2_fpr): Merge.
19131         (move_from_CR_gt_bit): Delete.
19132         * config/rs6000/spe.md: Replace TARGET_FPRS by 1 and simplify.
19133         (E500_CR_IOR_COMPARE): Delete.
19134         (All patterns that require !TARGET_FPRS): Delete.
19135         * config/rs6000/vsx.md: Replace TARGET_FPRS by 1 and simplify.
19137 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
19139         * passes.def (pass_iv_canon): Move before pass_loop_distribution.
19141 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
19143         * graphds.c (add_edge): Intitialize edge's attached data.
19144         (foll_in_subgraph, dfs_fst_edge, dfs_next_edge): New function
19145         pointer parameter.  Call pointed function on each edge during
19146         graph traversing.  Skip traversing the edge when the function
19147         returns true.
19148         (graphds_dfs, graphds_scc): Ditto.
19149         (for_each_edge): New parameter.  Pass the new parameter to callback
19150         function.
19151         * graphds.h (skip_edge_callback): New function pointer type.
19152         (graphds_dfs, graphds_scc): New function pointer parameter.
19153         (graphds_edge_callback, for_each_edge): New parameter.
19155 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
19157         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test): Factor
19158         out code checking if runtime alias check is possible to below ...
19159         Call the new function.
19160         * tree-data-ref.c (runtime_alias_check_p): ... to new function.
19161         * tree-data-ref.h (runtime_alias_check_p): New decalaration.
19163 2017-06-07  Marek Polacek  <polacek@redhat.com>
19165         PR sanitizer/80932
19166         * fold-const.c (extract_muldiv_1) <case MINUS_EXPR>: Add
19167         TYPE_OVERFLOW_WRAPS check.
19169 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
19171         * tree-vect-loop-manip.c (vect_do_peeling): Don't skip vector loop
19172         if versioning is required.
19173         * tree-vect-loop.c (vect_analyze_loop_2): Merge niter check for loop
19174         peeling with the check for versioning.
19176 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
19178         * tree-vectorizer.h (vect_build_loop_niters): New parameter.
19179         * tree-vect-loop-manip.c (vect_build_loop_niters): New parameter.
19180         Set true to new parameter if new ssa variable is defined.
19181         (vect_gen_vector_loop_niters): Refactor.  Set range information
19182         for the new vector loop bound variable.
19183         (vect_do_peeling): Ditto.
19185 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
19187         * tree-affine.c (ssa.h): Include header file.
19188         (tree_to_aff_combination): Handle (T1)(X - CST) when inner type
19189         has wrapping overflow behavior.
19191 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
19193         * tree-affine.c (tree_to_aff_combination): Handle (T1)(X + X).
19195 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
19197         (aff_combination_expand): Move (T1)(X *+- CST) simplification to ...
19198         (tree_to_aff_combination): ... here.
19200 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
19202         * tree-ssa-loop-ivopts.c (ivopts_estimate_reg_pressure): New
19203         reg_pressure model function.
19204         (ivopts_global_cost_for_size): Delete.
19205         (determine_set_costs, iv_ca_recount_cost): Call new model function
19206         ivopts_estimate_reg_pressure.
19208 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
19210         * config/aarch64/aarch64.c (aarch64_rtx_costs): Make sdiv more
19211         expensive than udiv.  Remove floating point cases from mod.
19213 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
19215         * config/arm/aarch-cost-tables.h (cortexa53_extra_cost):
19216         Increase idiv cost.
19218 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
19220         * config/aarch64/aarch64.md
19221         (copysignsf3): Fix mask generation.
19223 2017-06-07  Jakub Jelinek  <jakub@redhat.com>
19225         * dumpfile.h (enum tree_dump_index): Rename TDI_generic to
19226         TDI_gimple.
19227         (class dump_manager): Add register_dumps method.
19228         * dumpfile.c: Include langhooks.h.
19229         (dump_files): Use 0 instead of 3/4/5 for TDI_{original,gimple,nested}.
19230         (FIRST_AUTO_NUMBERED_DUMP): Decrease to 1.
19231         (FIRST_ME_AUTO_NUMBERED_DUMP): Define.
19232         (dump_manager::dump_register): Start with 512 entries instead of 32.
19233         (dump_manager::register_dumps): New method.
19234         * toplev.c (general_init): Instead of invoking register_dumps
19235         langhook, invoke register_dumps method on the dump manager.
19236         * gimplify.c (gimplify_function_tree): Use TDI_gimple instead of
19237         TDI_generic.
19239 2017-06-07  Richard Sandiford  <richard.sandiford@linaro.org>
19241         * doc/md.texi: Clarify the restrictions on a define_insn condition.
19242         Say that # requires an associated define_split to exist, and that
19243         the define_split must be suitable for use after register allocation.
19245 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
19247         * cfgbuild.c (find_bb_boundaries): Initialize profile of split blocks.
19248         (compute_outgoing_frequencies): Also initialize zero counts.
19249         (find_many_sub_basic_blocks): Do not produce uninitialized profile
19250         around loops; preserve more of profile when nothing changes.
19252 2017-06-06  Jim Wilson  <jim.wilson@linaro.org>
19254         * config/aarch64/aarch64-cost-tables.h (qdf24xx_extra_costs): Move to
19255         here.
19256         * config/arm/aarch-cost-tables.h (qdf24xx_extra_costs): From here.
19257         * config/arm/arm-cpu-cdata.h: Regenerate.
19258         * config/arm/arm-cpu-data.h, config/arm/arm-cpu.h: Likewise.
19259         * config/arm/arm-tables.opt, config/arm/arm-tune.md: Likewise.
19260         * config/arm/arm-cpus.in: Delete falkor and qdf24xx entries.
19261         * config/arm/arm.c (arm_qdf24xx_tune): Delete.
19262         * config/arm/bpabi.h (BE8_LINK_SPEC): Delete falkor and qdf24xx
19263         support.
19264         * config/arm/t-aprofile (MULTILIB_MATCHES): Delete falkor and qdf24xx
19265         support.
19266         * config/arm/t-rmprofile: Likewise.
19267         * doc/invoke.texi (ARM Options): Drop falkor and qdf24xx support.
19269 2017-06-06  David S. Miller  <davem@davemloft.net>
19271         PR target/80968
19272         * config/sparc/sparc.c (sparc_expand_prologue): Emit frame
19273         blockage if function uses alloca.
19275 2017-06-06  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
19277         * tree-ssa-loop-prefetch.c (struct mem_ref_group, struct mem_ref):
19278         New "uid" fields to hold pretty-print IDs of group and ref.
19279         Memory references are now identified as <group_id>:<ref_id>
19280         instead of using [random] addresses.
19281         (dump_mem_details): Simplify, no functional change.
19282         (dump_mem_ref): Simplify and make output more concise.
19283         Replace couple of fprintf's throughout code with calls to dump_mem_ref.
19284         (find_or_create_group): Initialize group uid.
19285         (record_ref): Initialize ref uid.  Improve debug output.
19286         (prune_group_by_reuse, should_issue_prefetch_p,)
19287         (should_issue_prefetch_p, schedule_prefetches, issue_prefetch_ref,)
19288         (mark_nontemporal_store, determine_loop_nest_reuse):
19289         Improve debug output.
19291 2017-06-06  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
19293         * dbgcnt.def (prefetch): New debug counter.
19294         * tree-ssa-loop-prefetch.c (dbgcnt.h): New include.
19295         (schedule_prefetches): Stop issueing prefetches if debug counter
19296         tripped.
19298 2017-06-06  Tom de Vries  <tom@codesourcery.com>
19300         * doc/sourcebuild.texi (Testsuites, C Language Testsuites,
19301         gcc.c-torture/compile): Remove mention of NO_LABEL_VALUES in fixme.
19303 2017-06-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19305         * config/aarch64/atomics.md (atomic_compare_and_swap<mode> expander):
19306         Use aarch64_reg_or_zero predicate for operand 4.
19307         (aarch64_compare_and_swap<mode> define_insn_and_split):
19308         Use aarch64_reg_or_zero predicate for operand 3.  Add 'Z' constraint.
19309         (aarch64_store_exclusive<mode>): Likewise for operand 2.
19311 2017-06-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19313         * config/arm/arm.c (arm_compute_save_reg_mask): Rename into ...
19314         (arm_compute_save_core_reg_mask): This.
19315         (thumb1_compute_save_reg_mask): Rename into ...
19316         (thumb1_compute_save_core_reg_mask): This.
19317         (arm_compute_save_reg0_reg12_mask): Adapt comment.
19318         (arm_compute_frame_layout): Likewise.
19320 2017-06-06  Richard Biener  <rguenther@suse.de>
19322         PR tree-optimization/80974
19323         * tree-ssa-sccvn.c (set_ssa_val_to): Do not change but only
19324         keep or clear leaders SSA info.
19326 2017-06-06  Tom de Vries  <tom@codesourcery.com>
19328         * config/nvptx/nvptx.c (split_mode_p): New function.
19329         (nvptx_declare_function_name, nvptx_print_operand): Use split_mode_p.
19331 2017-06-06  Tom de Vries  <tom@codesourcery.com>
19333         * config/nvptx/nvptx.c (nvptx_print_operand): Use maybe_split_mode.
19335 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
19337         PR bootstrap/80978
19338         * tree-cfg.c (execute_fixup_cfg): Fix condition on when to rescale
19339         profile.
19341 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
19343         * shrink-wrap.c (handle_simple_exit): Update profile.
19344         (try_shrink_wrapping): Upate profile.
19346 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
19348         * predict.c (tree_estimate_probability_bb): Add LOCAL_ONLY.
19349         (tree_guess_outgoing_edge_probabilities): New.
19350         * predict.h (tree_guess_outgoing_edge_probabilities): Declare.
19351         * tree-cfg.c (gimple_find_sub_bbs): Propagate profile.
19353 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
19355         * ipa-split.c (split_function): Initialize return bb profile.
19357 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
19359         * profile.c (compute_branch_probabilities): Also initialize
19360         EXIT_BLOCK profile.
19362 2017-06-06  Richard Biener  <rguenther@suse.de>
19364         PR tree-optimization/80928
19365         * tree-vect-loop.c (vect_update_vf_for_slp): Amend dumps.
19366         (vect_analyze_loop_operations): Properly guard analysis for
19367         pure SLP case.
19368         (vect_transform_loop): Likewise.
19369         (vect_analyze_loop_2): Also reset SLP type on PHIs.
19370         (vect_model_induction_cost): Do not cost for pure SLP.
19371         (vectorizable_induction): Pass in SLP node, implement SLP vectorization
19372         of induction in inner loop vectorization.
19373         * tree-vect-slp.c (vect_create_new_slp_node): Handle PHIs.
19374         (vect_get_and_check_slp_defs): Handle vect_induction_def.
19375         (vect_build_slp_tree): Likewise.  Handle PHIs as terminating the
19376         recursion.
19377         (vect_analyze_slp_cost_1): Cost induction.
19378         (vect_detect_hybrid_slp_stmts): Handle PHIs.
19379         (vect_get_slp_vect_defs): Likewise.
19380         * tree-vect-stmts.c (vect_analyze_stmt): Handle induction.
19381         (vect_transform_stmt): Handle SLP reductions.
19382         * tree-vectorizer.h (vectorizable_induction): Adjust.
19384 2017-06-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
19386         * config/rs6000/rs6000.c (make_resolver_func): Update
19387         init_lowered_empty_function call.
19389 2017-06-05  Bernd Edlinger  <bernd.edlinger@hotmail.de>
19391         * doc/invoke.texi: Document the -fprofile-abs-path option.
19392         * common.opt (fprofile-abs-path): New option.
19393         * gcov-io.h (gcov_write_filename): Declare.
19394         * gcov-io.c (gcov_write_filename): New function.
19395         * coverage.c (coverage_begin_function): Use gcov_write_filename.
19396         * profile.c (output_location): Likewise.
19398 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
19400         * shring-wrap.c: Revert accidental commit.
19402 2017-06-05  Volker Reichelt  <v.reichelt@netcologne.de>
19404         * doc/invoke.texi (-Wduplicated-branches): Add to warning list.
19406 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
19408         * cfgexpand.c (expand_gimple_tailcall): Initialize profile of
19409         new edge.
19410         * ipa-inline.c (want_inline_self_recursive_call_p): Watch for missing
19411         profile in callgraph edge.
19412         * profile-count.h (apply_probability): If THIS is 0, then result is 0
19413         (apply_scale): Likewise.
19414         * tree-inline.c (copy_bb, copy_edges_for_bb, copy_cfg_body):
19415         Also scale profile when inlining function with zero profile.
19416         (initialize_cfun): Update exit block profile even when it is zero.
19417         * tree-ssa-threadupdate.c (clear_counts_path): Handle correctly case
19418         when profile is read.
19420 2017-06-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
19422         * config/rs6000/rs6000.c (toplevel): Include attribs.h.
19423         (CLONE_*): New constants to define the processors we can generate
19424         code for with the target_clone attribute.
19425         (rs6000_clone_map): New array to identify which clone processors
19426         the current program is running on.
19427         (TARGET_COMPARE_VERSION_PRIORITY): Define to enable the
19428         target_clone attribute.
19429         (TARGET_GENERATE_VERSION_DISPATCHER_BODY): Likewise.
19430         (TARGET_GET_FUNCTION_VERSIONS_DISPATCHER): Likewise.
19431         (TARGET_OPTION_FUNCTION_VERSIONS): Likewise.
19432         (cpu_expand_builtin): Add support for target_clone attribute.
19433         (rs6000_valid_attribute_p): Allow "default" attribute.
19434         (get_decl_name): New debug function to simplify printing the
19435         current function name in debugging statements.
19436         (rs6000_clone_priority): New functions to support the target_clone
19437         attribute, and be able to generate code to switch between ISA 2.05
19438         through ISA 3.0 (power6 through power9).
19439         (rs6000_compare_version_priority): Likewise.
19440         (rs6000_get_function_versions_dispatcher): Likewise.
19441         (make_resolver_func): Likewise.
19442         (add_condition_to_bb): Likewise.
19443         (dispatch_function_versions): Likewise.
19444         (rs6000_generate_version_dispatcher_body): Likewise.
19445         (rs6000_can_inline_p): Call get_decl_name for debugging usage.
19446         (fusion_gpr_load_p): Fix a spacing issue.
19447         * doc/extend.texi (Common Function Attributes): Document that the
19448         PowerPC supports the target_clone attribute.
19450 2017-06-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19452         * config/arm/arm.h: explain F symbol found in description of ARM
19453         register allocation in its legend.
19455 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
19457         * config/mips/frame-header-opt.c: Include profile-count.h.
19458         * config/riscv/riscv.c: Include profile-count.h
19460 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
19462         * tree-ssa-loop-im.c (execute_sm_if_changed): Add FLAG_BBS parameter;
19463         update profile.
19464         (sm_set_flag_if_changed): Add bbs field.
19465         (execute_sm_if_changed_flag_set): Pass BBS.
19466         (execute_sm): Update.
19468 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19470         * config/aarch64/aarch64-simd.md (aarch64_store_lane0<mode>):
19471         New pattern.
19473 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19475         * config/aarch64/aarch64.md (sub<mode>3_compare1_imm): New define_insn.
19476         (peephole2): New peephole2 to emit the above.
19477         * config/aarch64/predicates.md (aarch64_sub_immediate): New predicate.
19479 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19481         * config/aarch64/aarch64.c (define_peephole2 above
19482         *sub_<shift>_<mode>): New peephole.
19484 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
19486         * config/i386/i386.c (make_resolver_func): Update.
19487         * Makefile.in: Add profile-count.h and profile-count.o
19488         * auto-profile.c (afdo_indirect_call): Update to new API.
19489         (afdo_set_bb_count): Update.
19490         (afdo_propagate_edge): Update.
19491         (afdo_propagate_circuit): Update.
19492         (afdo_calculate_branch_prob): Update.
19493         (afdo_annotate_cfg): Update.
19494         * basic-block.h: Include profile-count.h
19495         (struct edge_def): Turn count to profile_count.
19496         (struct basic_block_def): Likewie.
19497         (REG_BR_PROB_BASE): Move to profile-count.h
19498         (RDIV): Move to profile-count.h
19499         * bb-reorder.c (max_entry_count): Turn to profile_count.
19500         (find_traces): Update.
19501         (rotate_loop):Update.
19502         (connect_traces):Update.
19503         (sanitize_hot_paths):Update.
19504         * bt-load.c (migrate_btr_defs): Update.
19505         * cfg.c (RDIV): Remove.
19506         (init_flow): Use alloc_block.
19507         (alloc_block): Uninitialize count.
19508         (unchecked_make_edge): Uninitialize count.
19509         (check_bb_profile): Update.
19510         (dump_edge_info): Update.
19511         (dump_bb_info): Update.
19512         (update_bb_profile_for_threading): Update.
19513         (scale_bbs_frequencies_int): Update.
19514         (scale_bbs_frequencies_gcov_type): Update.
19515         (scale_bbs_frequencies_profile_count): New.
19516         * cfg.h (update_bb_profile_for_threading): Update.
19517         (scale_bbs_frequencies_profile_count): Declare.
19518         * cfgbuild.c (compute_outgoing_frequencies): Update.
19519         (find_many_sub_basic_blocks): Update.
19520         * cfgcleanup.c (try_forward_edges): Update.
19521         (try_crossjump_to_edge): Update.
19522         * cfgexpand.c (expand_gimple_tailcall): Update.
19523         (construct_exit_block): Update.
19524         * cfghooks.c (verify_flow_info): Update.
19525         (dump_bb_for_graph): Update.
19526         (split_edge): Update.
19527         (make_forwarder_block): Update.
19528         (duplicate_block): Update.
19529         (account_profile_record): Update.
19530         * cfgloop.c (find_subloop_latch_edge_by_profile): Update.
19531         (get_estimated_loop_iterations): Update.
19532         * cfgloopanal.c (expected_loop_iterations_unbounded): Update.
19533         (single_likely_exit): Update.
19534         * cfgloopmanip.c (scale_loop_profile): Update.
19535         (loopify): Update.
19536         (set_zero_probability): Update.
19537         (lv_adjust_loop_entry_edge): Update.
19538         * cfgrtl.c (force_nonfallthru_and_redirect): Update.
19539         (purge_dead_edges): Update.
19540         (rtl_account_profile_record): Update.
19541         * cgraph.c (cgraph_node::create): Uninitialize count.
19542         (symbol_table::create_edge): Uninitialize count.
19543         (cgraph_update_edges_for_call_stmt_node): Update.
19544         (cgraph_edge::dump_edge_flags): Update.
19545         (cgraph_node::dump): Update.
19546         (cgraph_edge::maybe_hot_p): Update.
19547         * cgraph.h: Include profile-count.h
19548         (create_clone), create_edge, create_indirect_edge): Update.
19549         (cgraph_node): Turn count to profile_count.
19550         (cgraph_edge0: Likewise.
19551         (make_speculative, clone): Update.
19552         (create_edge): Update.
19553         (init_lowered_empty_function): Update.
19554         * cgraphclones.c (cgraph_edge::clone): Update.
19555         (duplicate_thunk_for_node): Update.
19556         (cgraph_node::create_clone): Update.
19557         * cgraphunit.c (cgraph_node::analyze): Update.
19558         (cgraph_node::expand_thunk): Update.
19559         * final.c (dump_basic_block_info): Update.
19560         * gimple-streamer-in.c (input_bb): Update.
19561         * gimple-streamer-out.c (output_bb): Update.
19562         * graphite.c (print_global_statistics): Update.
19563         (print_graphite_scop_statistics): Update.
19564         * hsa-brig.c: Include basic-block.h.
19565         * hsa-dump.c: Include basic-block.h.
19566         * hsa-gen.c (T sum_slice): Update.
19567         (convert_switch_statements):Update.
19568         * hsa-regalloc.c: Include basic-block.h.
19569         * ipa-chkp.c (chkp_produce_thunks): Update.
19570         * ipa-cp.c (struct caller_statistics): Update.
19571         (init_caller_stats): Update.
19572         (gather_caller_stats): Update.
19573         (ipcp_cloning_candidate_p): Update.
19574         (good_cloning_opportunity_p): Update.
19575         (get_info_about_necessary_edges): Update.
19576         (dump_profile_updates): Update.
19577         (update_profiling_info): Update.
19578         (update_specialized_profile): Update.
19579         (perhaps_add_new_callers): Update.
19580         (decide_about_value): Update.
19581         (ipa_cp_c_finalize): Update.
19582         * ipa-devirt.c (struct odr_type_warn_count): Update.
19583         (struct decl_warn_count): Update.
19584         (struct final_warning_record): Update.
19585         (possible_polymorphic_call_targets): Update.
19586         (ipa_devirt): Update.
19587         * ipa-fnsummary.c (redirect_to_unreachable): Update.
19588         * ipa-icf.c (sem_function::merge): Update.
19589         * ipa-inline-analysis.c (do_estimate_edge_time): Update.
19590         * ipa-inline.c (compute_uninlined_call_time): Update.
19591         (compute_inlined_call_time): Update.
19592         (want_inline_small_function_p): Update.
19593         (want_inline_self_recursive_call_p): Update.
19594         (edge_badness): Update.
19595         (lookup_recursive_calls): Update.
19596         (recursive_inlining): Update.
19597         (inline_small_functions): Update.
19598         (dump_overall_stats): Update.
19599         (dump_inline_stats): Update.
19600         * ipa-profile.c (ipa_profile_generate_summary): Update.
19601         (ipa_propagate_frequency): Update.
19602         (ipa_profile): Update.
19603         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
19604         * ipa-utils.c (ipa_merge_profiles): Update.
19605         * loop-doloop.c (doloop_modify): Update.
19606         * loop-unroll.c (report_unroll): Update.
19607         (unroll_loop_runtime_iterations): Update.
19608         * lto-cgraph.c (lto_output_edge): Update.
19609         (lto_output_node): Update.
19610         (input_node): Update.
19611         (input_edge): Update.
19612         (merge_profile_summaries): Update.
19613         * lto-streamer-in.c (input_cfg): Update.
19614         * lto-streamer-out.c (output_cfg): Update.
19615         * mcf.c (create_fixup_graph): Update.
19616         (adjust_cfg_counts): Update.
19617         (sum_edge_counts): Update.
19618         * modulo-sched.c (sms_schedule): Update.
19619         * postreload-gcse.c (eliminate_partially_redundant_load): Update.
19620         * predict.c (maybe_hot_count_p): Update.
19621         (probably_never_executed): Update.
19622         (dump_prediction): Update.
19623         (combine_predictions_for_bb): Update.
19624         (propagate_freq): Update.
19625         (handle_missing_profiles): Update.
19626         (counts_to_freqs): Update.
19627         (rebuild_frequencies): Update.
19628         (force_edge_cold): Update.
19629         * predict.h: Include profile-count.h
19630         (maybe_hot_count_p, counts_to_freqs): UPdate.
19631         * print-rtl-function.c: Do not include cfg.h
19632         * print-rtl.c: Include basic-block.h
19633         * profile-count.c: New file.
19634         * profile-count.h: New file.
19635         * profile.c (is_edge_inconsistent): Update.
19636         (correct_negative_edge_counts): Update.
19637         (is_inconsistent): Update.
19638         (set_bb_counts): Update.
19639         (read_profile_edge_counts): Update.
19640         (compute_frequency_overlap): Update.
19641         (compute_branch_probabilities): Update; Initialize and deinitialize
19642         gcov_count tables.
19643         (branch_prob): Update.
19644         * profile.h (bb_gcov_counts, edge_gcov_counts): New.
19645         (edge_gcov_count): New.
19646         (bb_gcov_count): New.
19647         * shrink-wrap.c (try_shrink_wrapping): Update.
19648         * tracer.c (better_p): Update.
19649         * trans-mem.c (expand_transaction): Update.
19650         (ipa_tm_insert_irr_call): Update.
19651         (ipa_tm_insert_gettmclone_call): Update.
19652         * tree-call-cdce.c: Update.
19653         * tree-cfg.c (gimple_duplicate_sese_region): Update.
19654         (gimple_duplicate_sese_tail): Update.
19655         (gimple_account_profile_record): Update.
19656         (execute_fixup_cfg): Update.
19657         * tree-inline.c (copy_bb): Update.
19658         (copy_edges_for_bb): Update.
19659         (initialize_cfun): Update.
19660         (freqs_to_counts): Update.
19661         (copy_cfg_body): Update.
19662         (expand_call_inline): Update.
19663         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
19664         * tree-ssa-loop-ivcanon.c (unloop_loops): Update.
19665         (try_unroll_loop_completely): Update.
19666         (try_peel_loop): Update.
19667         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
19668         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop): Update.
19669         * tree-ssa-loop-split.c (connect_loops): Update.
19670         * tree-ssa-loop-unswitch.c (hoist_guard): Update.
19671         * tree-ssa-reassoc.c (branch_fixup): Update.
19672         * tree-ssa-tail-merge.c (replace_block_by): Update.
19673         * tree-ssa-threadupdate.c (create_block_for_threading): Update.
19674         (compute_path_counts): Update.
19675         (update_profile): Update.
19676         (recompute_probabilities): Update.
19677         (update_joiner_offpath_counts): Update.
19678         (estimated_freqs_path): Update.
19679         (freqs_to_counts_path): Update.
19680         (clear_counts_path): Update.
19681         (ssa_fix_duplicate_block_edges): Update.
19682         (duplicate_thread_path): Update.
19683         * tree-switch-conversion.c (case_bit_test_cmp): Update.
19684         (struct switch_conv_info): Update.
19685         * tree-tailcall.c (decrease_profile): Update.
19686         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
19687         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
19688         * value-prof.c (check_counter): Update.
19689         (gimple_divmod_fixed_value): Update.
19690         (gimple_mod_pow2): Update.
19691         (gimple_mod_subtract): Update.
19692         (gimple_ic_transform): Update.
19693         (gimple_stringop_fixed_value): Update.
19694         * value-prof.h (gimple_ic): Update.
19696 2017-06-02  Carl Love  <cel@us.ibm.com>
19698         * config/rs6000/rs6000-c: Add support for built-in functions
19699         vector double vec_doublee (vector signed int);
19700         vector double vec_doublee (vector unsigned int);
19701         vector double vec_doublee (vector float);
19702         vector double vec_doubleh (vector signed int);
19703         vector double vec_doubleh (vector unsigned int);
19704         vector double vec_doubleh (vector float);
19705         vector double vec_doublel (vector signed int);
19706         vector double vec_doublel (vector unsigned int);
19707         vector double vec_doublel (vector float);
19708         vector double vec_doubleo (vector signed int);
19709         vector double vec_doubleo (vector unsigned int);
19710         vector double vec_doubleo (vector float);.
19711         * config/rs6000/rs6000-builtin.def: Add definitions for DOUBLEE,
19712         DOUBLEO, DOUBLEH, DOUBLEL, UNS_DOUBLEO, UNS_DOUBLEE, UNS_DOUBLEH,
19713         UNS_DOUBLEL.
19714         * config/rs6000/altivec.md: Add code generator for doublee<mode>2,
19715         unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2, doubleh<mode>2,
19716         unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2, add mode attribute
19717         VS_sxwsp.
19718         * config/rs6000/altivec.h: Add define for vec_doublee, vec_doubleo,
19719         vec_doublel, vec_doubleh.
19720         * doc/extend.texi: Update the built-in documentation file for the
19721         new built-in functions.
19723 2017-06-02  David Malcolm  <dmalcolm@redhat.com>
19725         PR jit/80954
19726         * ipa-inline-analysis.c (free_growth_caches): Set
19727         edge_removal_hook_holder to NULL after removing it.
19729 2017-06-02  Sudakshina Das  <sudi.das@arm.com>
19731         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Return CC_SWP for
19732         comparision with zero.
19734 2017-06-02  Will Schmidt  <will_schmidt@vnet.ibm.com>
19735         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
19736         for early expansion of vec_min and vec_max builtins.
19737         (builtin_function_type): Add min/max unsigned variants to those
19738         identified as having unsigned arguments.
19740 2017-06-02  Olivier Hainque  <hainque@adacore.com>
19742         * config/vx-common.h (DWARF_UNWIND_INFO): Switch #define to 1.
19744 2017-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19746         * config/aarch64/aarch64-simd.md (*aarch64_simd_vec_copy_lane<mode>):
19747         Use VALL_F16 iterator rather than VALL.
19749 2017-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19751         * config/aarch64/aarch64.c (aarch64_split_compare_and_swap):
19752         Emit CBNZ inside loop when doing a strong exchange and comparing
19753         against zero.  Generate the CC flags after the loop.
19755 2017-06-02  David Edelsohn  <dje.gcc@gmail.com>
19757         * dwarf2out.c (DWARF_INITIAL_LENGTH_SIZE_STR): New.
19758         (dl_section_ref): New.
19759         (dwarf2out_finish): Copy debug_line_section_label to dl_section_ref.
19760         On AIX, append an expression to subtract the size of the
19761         section length to dl_section_ref.
19763 2017-06-02  Will Schmidt  <will_schmidt@vnet.ibm.com>
19765         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
19766         for early expansion of vector absolute builtins.
19768 2017-06-02  Richard Biener  <rguenther@suse.de>
19770         * tree-vect-slp.c (vect_detect_hybrid_slp_2): Match up
19771         what we consider a relevant use stmt with vect_detect_hybrid_slp_stmts.
19773 2017-06-02  Richard Biener  <rguenther@suse.de>
19775         PR tree-optimization/80948
19776         * tree-tailcall.c (find_tail_calls): Track stmts to move in
19777         stmt order as well.
19779 2017-06-02  Richard Biener  <rguenther@suse.de>
19781         * tree-vect-loop.c (vect_analyze_loop_operations): Not relevant
19782         PHIs are ok.
19783         * tree-vect-stmts.c (process_use): Do not mark backedge defs
19784         for inductions as relevant.
19786 2017-06-02  Richard Biener  <rguenther@suse.de>
19788         * tree-vect-loop.c (get_initial_def_for_induction): Inline into ...
19789         (vectorizable_induction): ... this.  Remove dead code.
19791 2017-06-02  Eric Botcazou  <ebotcazou@adacore.com>
19793         * builtins. (expand_builtin_alloca): Remove second parameter and
19794         infer its value from the first parameter instead.
19795         (expand_builtin) <BUILT_IN_ALLOCA>: Adjust call to above.
19797 2017-06-02  Jakub Jelinek  <jakub@redhat.com>
19799         PR rtl-optimization/80903
19800         * loop-doloop.c (add_test): Unshare sequence.
19802 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
19804         * doc/invoke.texi: Document the -Wsizeof-pointer-div warning.
19806 2017-06-01  Bernd Edlinger  <bernd.edlinger@hotmail.de>
19808         * config/i386/i386.c (x86_64_ms_sysv_extra_clobbered_registers): Make
19809         static.
19810         (xlogue_layout::get_stack_space_used, xlogue_layout::s_instances,
19811         xlogue_layout::get_instance, logue_layout::xlogue_layout,
19812         sp_valid_at, fp_valid_at, choose_basereg): Formatting.
19813         (xlogue_layout::get_stub_rtx): Make static.
19814         (xlogue_layout::get_stub_name): Avoid const-cast, make static.
19815         (xlogue_layout::compute_stub_managed_regs): Rename to...
19816         (xlogue_layout::count_stub_managed_regs): ...this.
19817         (xlogue_layout::is_stub_managed_reg): New function.
19818         (xlogue_layout::m_stub_names): Rename to...
19819         (xlogue_layout::s_stub_names): ...this, make static.
19820         (xlogue_layout::STUB_INDEX_OFFSET, xlogue_layout::MIN_REGS,
19821         xlogue_layout::MAX_REGS, xlogue_layout::MAX_EXTRA_REGS,
19822         xlogue_layout::VARIANT_COUNT, xlogue_layout::STUB_NAME_MAX_LEN,
19823         xlogue_layout::s_stub_names): Instantiate statics.
19824         (stub_managed_regs): Remove.
19825         (ix86_save_reg): Use xlogue_layout::compute_stub_managed_regs.
19826         (disable_call_ms2sysv_xlogues): Rename to...
19827         (warn_once_call_ms2sysv_xlogues): ...this, and warn only once.
19828         (ix86_initial_elimination_offset, ix86_expand_call): Fix call_ms2sysv
19829         warning logic.
19830         (ix86_static_chain): Make sure that ix86_static_chain_on_stack can't
19831         change after reload_completed.
19832         (ix86_can_use_return_insn_p): Use the ix86_frame data structure
19833         directly.
19834         (ix86_expand_prologue): Likewise.
19835         (ix86_expand_epilogue): Likewise.
19836         (ix86_expand_split_stack_prologue): Likewise.
19837         (ix86_compute_frame_layout): Remove frame parameter ...
19838         (TARGET_COMPUTE_FRAME_LAYOUT): ... and export it as a target hook.
19839         (ix86_finalize_stack_realign_flags): Call ix86_compute_frame_layout
19840         only if necessary.
19841         (ix86_init_machine_status): Don't set use_fast_prologue_epilogue_nregs.
19842         (ix86_frame): Move from here ...
19843         * config/i386/i386.h (ix86_frame): ... to here.
19844         (machine_function): Remove use_fast_prologue_epilogue_nregs, cache the
19845         complete ix86_frame data structure instead.  Remove some_ld_name.
19847 2017-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
19849         * dwarf2out.c (dwarf2out_late_global_decl): Add locations for
19850         symbols that hold a DECL_VALUE_EXPR.
19852 2017-06-01  Martin Jambor  <mjambor@suse.cz>
19854         PR tree-optimization/80898
19855         * tree-sra.c (process_subtree_disqualification): Removed.
19856         (disqualify_candidate): Do not acll
19857         process_subtree_disqualification.
19858         (subtree_mark_written_and_enqueue): New function.
19859         (propagate_all_subaccesses): Set grp_write of LHS subtree if the
19860         RHS has been disqualified and re-queue LHS if necessary.  Apart
19861         from that, ignore disqualified RHS.
19863 2017-06-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
19865         * config/s390/s390.c (s390_emit_epilogue): Disable early return
19866         address fetch for z10 or later.
19868 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
19870         * config/arc/arc.md (tst_movb): Add guard when splitting.
19872 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
19874         * config/arc/arc.c (arc_can_eliminate): Test against
19875         arc_frame_pointer_needed.
19877 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
19879         * config/arc/arc.c (arc_expand_prologue): Emit a special barrier
19880         to prevent store reordering.
19881         * config/arc/arc.md (UNSPEC_ARC_STKTIE): Define.
19882         (type): Add block type.
19883         (stack_tie): Define special instruction to be used in
19884         expand_prologue.
19886 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
19888         * config/arc/arc.md (commutative_binary_comparison): Remove 'I'
19889         constraint. It is not valid for the pattern.
19890         (noncommutative_binary_comparison): Likewise.
19892 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
19894         * config/arc/simdext.md (movv2hi_insn): Change predicate to avoid
19895         scaled addresses.
19897 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
19899         * config/arc/arc.c (arc_conditional_register_usage): Allow r30 to
19900         be used by the reg-alloc.
19902 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
19904         * config/arc/arc.md (mulsi3): Avoid use of hard registers before
19905         reg-alloc when having mul64 or mul32x16 instructions.
19906         (mulsidi3): Likewise.
19907         (umulsidi3): Likewise.
19908         (mulsi32x16): New pattern.
19909         (mulsi64): Likewise.
19910         (mulsidi64): Likewise.
19911         (umulsidi64): Likewise.
19912         (MUL32x16_REG): Define.
19913         (mul64_600): Use MUL32x16_REG.
19914         (mac64_600): Likewise.
19915         (umul64_600): Likewise.
19916         (umac64_600): Likewise.
19918 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
19920         * config/arc/arc.md (mulsi3_700): Make it commutative.
19922 2017-06-01  Jose E. Marchesi  <jose.marchesi@oracle.com>
19924         * config/sparc/sparc.md (*zero_extendsidi2_insn_sp64): Set insn
19925         type for movstouw.
19926         (*sign_extendsidi2_insn): Likewise for movstosw.
19928 2017-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
19930         * dwarf2out.c (get_discr_value): Call the get_debug_type hook on
19931         the type of the input discriminant value.  Convert the
19932         discriminant value of signedness vary.
19934 2017-06-01  Volker Reichelt  <v.reichelt@netcologne.de>
19936         * doc/invoke.texi (-Wcatch-value): Document new shortcut.
19937         Add to -Wall section.
19939 2017-06-01  Richard Biener  <rguenther@suse.de>
19941         PR middle-end/66313
19942         * fold-const.c (fold_plusminus_mult_expr): If the factored
19943         factor may be zero use a wrapping type for the inner operation.
19944         * tree-tailcall.c (independent_of_stmt_p): Pass in to_move bitmap
19945         and handle moved defs.
19946         (process_assignment): Properly guard the unary op case.  Return a
19947         tri-state indicating that moving the stmt before the call may allow
19948         to continue.  Pass through to_move.
19949         (find_tail_calls): Handle moving unrelated defs before
19950         the call.
19952 2017-05-31  Segher Boessenkool  <segher@kernel.crashing.org>
19954         PR target/80618
19955         * config/rs6000/vector.md (*vector_uneq<mode>): Write the nor in the
19956         splitter result in the canonical way.
19958 2017-05-31  Uros Bizjak  <ubizjak@gmail.com>
19960         * config/i386/i386.md (*zero_extendsidi2): Enable alternative (?r, *Yj)
19961         also for 32bit target.  Update insn attributes.
19962         (zero-extendsidi2 splitter): Allow all registers for operand 1.
19964 2017-05-31  Sebastian Peryt  <sebastian.peryt@intel.com>
19966         * config/i386/avx512fintrin.h (_mm_mask_max_sd)
19967         (_mm_maskz_max_sd, _mm_mask_max_ss, _mm_maskz_max_ss)
19968         (_mm_mask_min_sd, _mm_maskz_min_sd, _mm_mask_min_ss)
19969         (_mm_maskz_min_ss): New intrinsics.
19971 2017-05-31  Martin Liska  <mliska@suse.cz>
19973         * tree-vect-loop.c (vect_create_epilog_for_reduction):
19974         Change comment style to one we normally use.
19975         (vectorizable_reduction): Likewise.
19976         (vectorizable_induction): Likewise.
19977         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
19978         (vectorizable_call): Likewise.
19979         (vectorizable_simd_clone_call): Likewise.
19980         (vectorizable_conversion): Likewise.
19981         (vectorizable_assignment): Likewise.
19982         (vectorizable_shift): Likewise.
19983         (vectorizable_operation): Likewise.
19984         (vectorizable_store): Likewise.
19985         (vectorizable_load): Likewise.
19986         * tree-vectorizer.h: Likewise.
19988 2017-05-31  Alexander Monakov  <amonakov@ispras.ru>
19990         * passes.c (emergency_dump_function): New.
19991         * tree-pass.h (emergency_dump_function): Declare.
19992         * plugin.c (plugins_internal_error_function): Remove.
19993         * plugin.h (plugins_internal_error_function): Remove declaration.
19994         * toplev.c (internal_error_function): New static function.  Use it...
19995         (general_init): ...here.
19997 2017-05-31  Graham Markall  <graham.markall@embecosm.com>
19999         * config/arc/arc.c (arc_print_operand): Handle constant operands.
20000         (arc_rtx_costs): Add costs for new patterns.
20001         * config/arc/arc.md: Additional *add_n and *sub_n patterns.
20002         * config/arc/predicates.md: Add _1_2_3_operand predicate.
20004 2017-05-31  Richard Sandiford  <richard.sandiford@linaro.org>
20006         * tree-ssa-strlen.c (get_next_strinfo): New function.
20007         (get_stridx_plus_constant): Use it.
20008         (zero_length_string): Likewise.
20009         (adjust_related_strinfos): Likewise.
20010         (adjust_last_stmt): Likewise.
20012 2017-05-31  Richard Biener  <rguenther@suse.de>
20014         PR target/80880
20015         * config/i386/i386.c (ix86_expand_builtin): Remove assert
20016         for arg being an SSA name when expanding IX86_BUILTIN_BNDRET.
20018 2017-05-31  Richard Sandiford  <richard.sandiford@linaro.org>
20020         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Remove
20021         loop_vinfo argument and use of dependence distance vectors.
20022         Check instead whether the two references differ only in their
20023         initial value and assume that they have the same alignment if the
20024         difference is a multiple of the vector alignment.
20025         (vect_analyze_data_refs_alignment): Update call accordingly.
20027 2017-05-31  Martin Liska  <mliska@suse.cz>
20029         PR target/79155
20030         * config/i386/cpuid.h: Fix typo in a comment in cpuid.h.
20032 2017-05-31  Bin Cheng  <bin.cheng@arm.com>
20034         * tree-vect-loop-manip.c (create_intersect_range_checks_index)
20035         (create_intersect_range_checks): Move from ...
20036         * tree-data-ref.c (create_intersect_range_checks_index)
20037         (create_intersect_range_checks): ... to here.
20038         (create_runtime_alias_checks): New function factored from ...
20039         * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): ...
20040         here.  Call above function.
20041         * tree-data-ref.h (create_runtime_alias_checks): New function.
20043 2017-05-31  Bin Cheng  <bin.cheng@arm.com>
20045         * tree-data-ref.c (prune_runtime_alias_test_list): Relax minimal
20046         segment length for dr_b and compute it in wide_int.
20048 2017-05-31  Richard Biener  <rguenther@suse.de>
20050         PR tree-optimization/80906
20051         * graphite-isl-ast-to-gimple.c (copy_loop_close_phi_nodes): Get
20052         and pass through iv_map.
20053         (copy_bb_and_scalar_dependences): Adjust.
20054         (translate_pending_phi_nodes): Likewise.
20055         (copy_loop_close_phi_args): Handle code-generating IVs instead
20056         of ICEing.
20058 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
20060         * diagnostic-color.c (color_dict): Add "type-diff".
20061         (parse_gcc_colors): Update comment.
20062         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
20063         -fdiagnostics-show-template-tree and -fno-elide-type.
20064         (GCC_COLORS): Add type-diff to example.
20065         (type-diff=): New.
20066         (-fdiagnostics-show-template-tree): New.
20067         (-fno-elide-type): New.
20068         * pretty-print.c (pp_format): Pass quote and formatters[argno] to
20069         the pp_format_decoder callback.  Call any m_format_postprocessor's
20070         "handle" method.
20071         (pretty_printer::pretty_printer): Initialize
20072         m_format_postprocessor.
20073         (pretty_printer::~pretty_printer): Delete any
20074         m_format_postprocessor.
20075         * pretty-print.h (printer_fn): Add bool and const char ** parameters.
20076         (class format_postprocessor): New class.
20077         (struct pretty_printer::format_decoder): Document the new parameters.
20078         (struct pretty_printer::m_format_postprocessor): New field.
20079         * tree-diagnostic.c (default_tree_printer): Update for new
20080         bool and const char ** params.
20081         * tree-diagnostic.h (default_tree_printer): Likewise.
20083 2017-05-30  Segher Boessenkool  <segher@kernel.crashing.org>
20085         * config/rs6000/predicates.md (cc_reg_not_micro_cr0_operand): Delete.
20086         (lwa_operand): Delete rs6000_gen_cell_microcode test.
20087         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
20088         rs6000_gen_cell_microcode code.
20089         (rs6000_final_prescan_insn): Delete.
20090         (rs6000_opt_vars): Delete the "gen-cell-microcode" and
20091         "warn-cell-microcode" entries.
20092         * config/rs6000/rs6000.h (FINAL_PRESCAN_INSN): Delete.
20093         * config/rs6000/rs6000.md: Delete rs6000_gen_cell_microcode tests
20094         throughout.  Change cc_reg_not_micro_cr0_operand to
20095         cc_reg_not_cr0_operand throughout.
20096         (*extendhi<mode>2_noload): Delete.
20097         * config/rs6000/rs6000.opt (mgen-cell-microcode): Replace by stub.
20098         (mwarn-cell-microcode): Delete.
20099         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete
20100         -mgen-cell-microcode and -mwarn-cell-microcode.
20102 2017-05-30  Uros Bizjak  <ubizjak@gmail.com>
20104         PR target/80833
20105         * config/i386/constraints.md (Yd): New constraint.
20106         (Ye): Ditto.
20107         * config/i386/i386.md (*movti_internal): Add (?r, Ye)
20108         and (?Yd, r) alternatives.  Update insn attributes.
20109         * config/i386/i386.md (*movti_internal): Add (?r, *Ye)
20110         and (?*Yd, r) alternatives.  Update insn attributes.
20111         (double-mode inter-unit splitters): Add new GR<->XMM splitters.
20113 2017-05-30  Pierre-Marie de Rodat  <derodat@adacore.com>
20115         * gimplify.c (gimplify_modify_expr): Don't create a
20116         DECL_DEBUG_EXPR link if *FROM_P does not belong to the current
20117         function.
20119 2017-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
20121         * config/arm/arm-builtins.c (arm_expand_builtin): Remove const.
20123 2017-05-30  Richard Biener  <rguenther@suse.de>
20125         * tree-vectorizer.h (struct _stmt_vec_info): Add reduc_type
20126         and reduc_def fields.
20127         (STMT_VINFO_REDUC_TYPE): New define.
20128         (STMT_VINFO_REDUC_DEF): Likewise.
20129         (vect_force_simple_reduction): Adjust prototype.
20130         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Adjust.
20131         (vect_is_simple_reduction): Remove check_reduction argument.
20132         (vect_force_simple_reduction): Adjust and set
20133         STMT_VINFO_REDUC_TYPE and STMT_VINFO_REDUC_DEF.
20134         (vectorizable_reduction): Do not re-do reduction analysis
20135         but use STMT_VINFO_REDUC_TYPE and STMT_VINFO_REDUC_DEF.
20136         * tree-parloops.c (gather_scalar_reductions): Adjust.
20138 2017-05-30  Richard Biener  <rguenther@suse.de>
20140         PR middle-end/80901
20141         * cfgexpand.c (expand_gimple_cond): Match up loop fixup with
20142         split_edge code.
20144 2017-05-24  Robin Dapp  <rdapp@linux.vnet.ibm.com>
20146         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs):
20147         Introduce unknown_misalignment parameter and remove vf.
20148         (vect_peeling_hash_get_lowest_cost):
20149         Pass unknown_misalignment parameter.
20150         (vect_enhance_data_refs_alignment):
20151         Fix unsupportable data ref treatment.
20153 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
20155         * tree-vect-data-refs.c (vect_get_data_access_cost):
20156         Workaround for SLP handling.
20157         (vect_enhance_data_refs_alignment):
20158         Compute costs for doing no peeling at all, compare to the best
20159         peeling costs so far and avoid peeling if cheaper.
20161 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
20163         * tree-vect-data-refs.c (vect_peeling_hash_choose_best_peeling):
20164         Return peeling info and set costs to zero for unlimited cost
20165         model.
20166         (vect_enhance_data_refs_alignment): Also inspect all datarefs
20167         with unknown misalignment. Compute and costs for unknown
20168         misalignment, compare them to the costs for known misalignment
20169         and choose the cheapest for peeling.
20171 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
20173         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Rename.
20174         (vect_get_peeling_costs_all_drs): Create function.
20175         (vect_peeling_hash_get_lowest_cost):
20176         Use vect_get_peeling_costs_all_drs.
20177         (vect_peeling_supportable): Create function.
20178         (vect_enhance_data_refs_alignment): Use vect_peeling_supportable.
20180 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
20182         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Create
20183         DR_HAS_NEGATIVE_STEP.
20184         (vect_update_misalignment_for_peel): Define DR_MISALIGNMENT.
20185         (vect_enhance_data_refs_alignment): Use.
20186         (vect_duplicate_ssa_name_ptr_info): Use.
20187         * tree-vectorizer.h (dr_misalignment): Use.
20188         (known_alignment_for_access_p): Use.
20190 2017-05-30  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
20192         PR target/78838
20193         * config/msp430/msp430.c (gen_prefix): Return NULL when section name is
20194         .lowtext.
20195         (has_section_name): New function.
20197 2017-05-30  Martin Liska  <mliska@suse.cz>
20199         PR other/80909
20200         * auto-profile.c (get_function_decl_from_block): Fix
20201         parenthesis.
20203 2017-05-30  Richard Biener  <rguenther@suse.de>
20205         PR middle-end/80876
20206         * cfgexpand.c (expand_gimple_cond): Fixup preserving loops again.
20208 2017-05-30  Martin Liska  <mliska@suse.cz>
20210         * dumpfile.c: Use newly added macro DUMP_FILE_INFO.
20211         * dumpfile.h (struct dump_file_info): Remove ctors.
20213 2017-05-30  Martin Liska  <mliska@suse.cz>
20215         * predict.def: Fix GNU coding style.
20217 2017-05-29  Max Filippov  <jcmvbkbc@gmail.com>
20219         * config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
20220         Mark 'to' argument with ATTRIBUTE_UNUSED.
20222 2017-05-29  Max Filippov  <jcmvbkbc@gmail.com>
20224         * config/xtensa/xtensa.c (xtensa_emit_call): Use
20225         HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string.
20226         (print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld
20227         format string.
20229 2017-05-29  Eric Botcazou  <ebotcazou@adacore.com>
20231         * doc/install.texi (Options specification): Restore entry of
20232         --enable-sjlj-exceptions.
20234 2017-05-27  Michael Eager  <eager@eagercon.com>
20236         Revert:
20237         2016-01-21  Ajit Agarwal  <ajitkum@xilinx.com>
20239         See https://gcc.gnu.org/ml/gcc/2017-05/msg00221.html.
20241         * config/microblaze/microblaze.h
20242         (FIXED_REGISTERS): Update in macro.
20243         (CALL_USED_REGISTERS): Update in macro.
20245 2017-05-27  François-Xavier Coudett  <fxcoudert@gcc.gnu.org>
20247         * doc/install.texi: Add links to macOS binary distributions.
20249 2017-05-27  Jakub Jelinek  <jakub@redhat.com>
20251         PR bootstrap/80887
20252         Revert:
20253         2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
20255         * match.pd ((A +- CST1) +- CST2): Allow some conversions.
20257 2017-05-26  Martin Liska  <mliska@suse.cz>
20259         * dumpfile.h (enum dump_kind): Renumber TDF_* flags to be contiguous.
20261 2017-05-26  Martin Liska  <mliska@suse.cz>
20263         * cfg.c (check_bb_profile): Do not use TDF_COMMENT and print
20264         always leading ';; '.
20265         (dump_bb_info): Likewise.
20266         (brief_dump_cfg): Likewise.
20267         * cfgrtl.c (print_rtl_with_bb): Do not use TDF_COMMENT.
20268         * dumpfile.c: Remove usage of TDF_VERBOSE.
20269         * dumpfile.h (enum dump_kind): Likewise.
20270         (dump_gimple_bb_header): Do not use TDF_COMMENT.
20271         * print-tree.c (debug_verbose): Remove.
20272         * tree-cfg.c (gimple_dump_cfg): Do not use TDF_COMMENT.
20273         (dump_function_to_file): Remove dumps guarded with TDF_VERBOSE.
20274         * tree-diagnostic.c (default_tree_printer): Replace
20275         TDF_DIAGNOSTIC with TDF_SLIM.
20277 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
20279         * tree-vect-loop-manip.c (create_intersect_range_checks_index): Pass
20280         in parameter loop, rather than loop_vinfo.
20281         (create_intersect_range_checks): Ditto.
20282         (vect_create_cond_for_alias_checks): Update call to above functions.
20284 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
20286         PR tree-optimization/80815
20287         * tree-data-ref.c (prune_runtime_alias_test_list): Simplify condition
20288         for merging runtime alias checks.  Handle negative DR_STEPs.
20290 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
20292         * tree-vect-data-refs.c (Operator==, comp_dr_with_seg_len_pair):
20293         Move from ...
20294         * tree-data-ref.c (Operator==, comp_dr_with_seg_len_pair): To here.
20295         * tree-vect-data-refs.c (vect_prune_runtime_alias_test_list): Factor
20296         out code pruning runtime alias checks.
20297         * tree-data-ref.c (prune_runtime_alias_test_list): New function
20298         factored out from above.
20299         * tree-vectorizer.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
20300         Move from ...
20301         * tree-data-ref.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
20302         ... to here.
20303         (prune_runtime_alias_test_list): New decalaration.
20305 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
20307         * tree-vect-data-refs.c (compare_tree): Rename and move ...
20308         * tree-data-ref.c (data_ref_compare_tree): ... to here.
20309         * tree-data-ref.h (data_ref_compare_tree): New decalaration.
20310         * tree-vect-data-refs.c (dr_group_sort_cmp): Update uses.
20311         (operator==, comp_dr_with_seg_len_pair): Ditto.
20312         (vect_prune_runtime_alias_test_list): Ditto.
20314 2017-05-26  Martin Liska  <mliska@suse.cz>
20316         PR ipa/80663
20317         * params.def: Bound partial-inlining-entry-probability param.
20319 2017-05-26  Marek Polacek  <polacek@redhat.com>
20321         PR sanitizer/80875
20322         * fold-const.c (fold_binary_loc) <case MULT_EXPR>: Check if OP1
20323         can be negated.
20325 2017-05-26  Richard Biener  <rguenther@suse.de>
20327         PR tree-optimization/80842
20328         * tree-ssa-ccp.c (set_lattice_value): Always meet with the old
20329         value.
20331 2017-05-26  Richard Biener  <rguenther@suse.de>
20333         PR tree-optimization/80844
20334         * tree-vectorizer.c (adjust_simduid_builtins): Propagate results.
20336 2017-05-25  Sebastian Peryt  <sebastian.peryt@intel.com>
20338         * doc/md.texi (Machine Constraints): Update x86 family
20339         machine constraints section to match 'config/i386/constraints.md'.
20341 2017-05-25  Volker Reichelt  <v.reichelt@netcologne.de>
20343         * doc/invoke.texi (-Wcatch-value=): Document new warning option.
20345 2017-05-25  Nathan Sidwell  <nathan@acm.org>
20347         * doc/invoke.texi (--enable-languages): Update documentation.
20349 2017-05-25  Martin Liska  <mliska@suse.cz>
20351         * dumpfile.c: Add TDF_FOLDING.
20352         * dumpfile.h (enum dump_kind): Likewise.
20353         * genmatch.c (dt_simplify::gen_1): Use it.
20355 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
20357         * match.pd (view_convert (convert@0 @1)): Handle zero-extension.
20359 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
20361         * match.pd ((A +- CST1) +- CST2): Allow some conversions.
20362         * tree.c (drop_tree_overflow): Handle COMPLEX_CST and VECTOR_CST.
20364 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
20366         * fold-const.c (fold_binary_loc) [(A & C) == D]: Remove transformation.
20367         * match.pd (X == C): Rewrite it here.
20368         (with_possible_nonzero_bits, with_possible_nonzero_bits2,
20369         with_certain_nonzero_bits2): New predicates.
20370         * tree-ssanames.c (get_nonzero_bits): Handle INTEGER_CST.
20372 2017-05-24  Nathan Sidwell  <nathan@acm.org>
20374         * lto-streamer-in.c (lto_input_data_block): Adjust T const cast to
20375         avoid warning.
20377         * auto-profile.c (afdo_propagate): Adjust T const cast to avoid
20378         warning.
20380 2017-05-24  Segher Boessenkool  <segher@kernel.crashing.org>
20382         * config/powerpcspe: New port.  Files are copied from the rs6000
20383         port, with "rs6000" in filenames replaced by "powerpcspe".
20385 2017-05-24  Wilco Dijkstra  <wdijkstr@arm.com>
20387         PR rtl-optimization/80754
20388         * lra-remat.c (do_remat): Add overlap checks for dst_regno.
20390 2017-05-24  Sheldon Lobo  <smlobo@sheldon.us.oracle.com>
20392         * config/sparc/sparc.md (length): Return the correct value for -mflat
20393         sibcalls to match output_sibcall.
20395 2017-05-24  Segher Boessenkool  <segher@kernel.crashing.org>
20397         PR bootstrap/80860
20398         PR bootstrap/80843
20399         * config/rs6000/rs6000.c (struct machine_function): Add new field
20400         n_components.
20401         (rs6000_get_separate_components): Init that field, use it.
20402         (rs6000_components_for_bb): Use the field.
20404 2017-05-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>
20406         * config/arm/arm.c (arm_expand_prologue): Fix typo in comment.
20408 2017-05-24  Peter Bergner  <bergner@vnet.ibm.com>
20410         PR middle-end/80823
20411         * tree-cfg.c (group_case_labels_stmt): Delete increment of "i";
20413 2017-05-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20415         PR target/80725
20416         * config/s390/s390.c (s390_check_qrst_address): Check incoming
20417         address against address_operand predicate.
20418         * config/s390/s390.md ("*indirect_jump"): Swap alternatives.
20420 2017-05-24  Eric Botcazou  <ebotcazou@adacore.com>
20422         * var-tracking.c (track_expr_p): Do not return 0 for tracked record
20423         parameters passed indirectly.
20425 2017-05-23  Uros Bizjak  <ubizjak@gmail.com>
20427         * config/i386/i386.md (*movdi_internal): Remove SSE4
20428         alternative 18 (?r, *v).  Update insn attributes.
20429         (*movsi_internal): Remove SSE4 alternative 13 (?r, *v).
20430         Update insn attributes.
20431         (*zero_extendsidi2): Remove SSE4 alternative (?r, *x).
20432         Update insn attributes.
20433         * config/i386/sse.md (vec_extract<ssevecmodelower>_0): Remove SSE4
20434         alternative 1 (r, v). Remove isa attribute.
20435         * config/i386/i386.c (dimode_scalar_chain::make_vector_copies):
20436         Always move value through stack for !TARGET_INTER_UNIT_MOVES_TO_VEC
20437         and !TARGET_INTER_UNIT_MOVES_TO_VEC targets.
20439 2017-05-23  Tom de Vries  <tom@codesourcery.com>
20441         * doc/sourcebuild.texi (Directives, Verify compiler message): Document
20442         dg-line directive.
20444 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
20446         * cgraphunit.c (symbol_table::process_new_functions): Update.
20447         * ipa-fnsummary.c (pass_data_inline_parameters): Remove.
20448         (inline_generate_summary): Rename to ...
20449         (ipa_fn_summary_generate): ... this one.
20450         (inline_read_summary): Rename to ...
20451         (ipa_fn_summary_read): ... this one.
20452         (inline_write_summary): Rename to ...
20453         (ipa_fn_summary_write): ... this one.
20454         (inline_free_summary): Rename to ...
20455         (ipa_free_fn_summary): ... this one.
20456         (pass_data_local_fn_summary, pass_local_fn_summary,
20457         make_pass_local_fn_summary, pass_data_ipa_free_fn_summary,
20458         pass_ipa_free_fn_summary, make_pass_ipa_free_fn_summary,
20459         pass_data_ipa_fn_summary, pass_ipa_fn_summary,
20460         make_pass_ipa_fn_summary): New.
20461         * ipa-fnsummary.h (inline_generate_summary, inline_read_summary,
20462         inline_write_summary, inline_free_summary): Remove.
20463         (ipa_free_fn_summary) : New.
20464         * ipa-inline.c (ipa_inline): Update.
20465         (pass_ipa_inline): Do not generate summaries.
20466         * ipa.c (pass_data_ipa_free_fn_summary, pass_ipa_free_fn_summary):
20467         Remove.
20468         * passes.def: Replace pass_inline_parameters by pass_local_fn_summary
20469         and add pass_ipa_fn_summary.
20470         * tree-pass.h (make_pass_ipa_fn_summary, make_pass_local_fn_summary):
20471         New.
20472         (make_pass_inline_parameters): Remove.
20474 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
20476         * omp-low.c (struct omp_context): Remove "default_kind" member.
20477         Adjust all users.
20479         * omp-offload.c (execute_oacc_device_lower): Remove the
20480         parallelism dimensions function attributes for unparallelized
20481         OpenACC kernels constructs.
20483 2017-05-23  Martin Liska  <mliska@suse.cz>
20485         * cgraph.c (cgraph_node::get_create): Use symtab_node::dump_{asm_,}name
20486         functions.
20487         (cgraph_edge::make_speculative): Likewise.
20488         (cgraph_edge::resolve_speculation): Likewise.
20489         (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
20490         (cgraph_node::dump): Likewise.
20491         * cgraph.h: Likewise.
20492         * cgraphunit.c (analyze_functions): Likewise.
20493         (symbol_table::compile): Likewise.
20494         * ipa-cp.c (print_all_lattices): Likewise.
20495         (determine_versionability): Likewise.
20496         (initialize_node_lattices): Likewise.
20497         (ipcp_verify_propagated_values): Likewise.
20498         (estimate_local_effects): Likewise.
20499         (update_profiling_info): Likewise.
20500         (create_specialized_node): Likewise.
20501         (perhaps_add_new_callers): Likewise.
20502         (decide_about_value): Likewise.
20503         (decide_whether_version_node): Likewise.
20504         (identify_dead_nodes): Likewise.
20505         (ipcp_store_bits_results): Likewise.
20506         * ipa-devirt.c (dump_targets): Likewise.
20507         (ipa_devirt): Likewise.
20508         * ipa-icf.c (sem_item::dump): Likewise.
20509         (sem_function::equals): Likewise.
20510         (sem_variable::equals): Likewise.
20511         (sem_item_optimizer::read_section): Likewise.
20512         (sem_item_optimizer::execute): Likewise.
20513         (congruence_class::dump): Likewise.
20514         * ipa-inline-analysis.c (dump_ipa_call_summary): Likewise.
20515         (dump_inline_summary): Likewise.
20516         (estimate_node_size_and_time): Likewise.
20517         (inline_analyze_function): Likewise.
20518         * ipa-inline-transform.c (inline_call): Likewise.
20519         * ipa-inline.c (report_inline_failed_reason): Likewise.
20520         (want_early_inline_function_p): Likewise.
20521         (edge_badness): Likewise.
20522         (update_edge_key): Likewise.
20523         (inline_small_functions): Likewise.
20524         * ipa-profile.c (ipa_profile): Likewise.
20525         * ipa-prop.c (ipa_print_node_jump_functions): Likewise.
20526         (ipa_make_edge_direct_to_target): Likewise.
20527         (remove_described_reference): Likewise.
20528         (ipa_impossible_devirt_target): Likewise.
20529         (propagate_controlled_uses): Likewise.
20530         (ipa_print_node_params): Likewise.
20531         (ipcp_transform_function): Likewise.
20532         * ipa-pure-const.c (pure_const_read_summary): Likewise.
20533         (propagate_pure_const): Likewise.
20534         * ipa-reference.c (generate_summary): Likewise.
20535         (read_write_all_from_decl): Likewise.
20536         (propagate): Likewise.
20537         (ipa_reference_read_optimization_summary): Likewise.
20538         * ipa-utils.c (ipa_merge_profiles): Likewise.
20539         * ipa.c (walk_polymorphic_call_targets): Likewise.
20540         (symbol_table::remove_unreachable_nodes): Likewise.
20541         (ipa_single_use): Likewise.
20542         * passes.c (execute_todo): Likewise.
20543         * predict.c (drop_profile): Likewise.
20544         * symtab.c (symtab_node::get_dump_name): New function.
20545         (symtab_node::dump_name): Likewise.
20546         (symtab_node::dump_asm_name): Likewise.
20547         (symtab_node::dump_references): Likewise.
20548         (symtab_node::dump_referring): Likewise.
20549         (symtab_node::dump_base): Likewise.
20550         (symtab_node::debug_symtab): Likewise.
20551         * tree-sra.c (convert_callers_for_node): Likewise.
20552         * tree-ssa-structalias.c (ipa_pta_execute): Likewise.
20553         * value-prof.c (init_node_map): Likewise.
20555 2017-05-23  Martin Liska  <mliska@suse.cz>
20557         * cgraph.h: Move symtab_node::dump_table to symbol_table::dump
20558         and symtab_node::debug_symtab to symbol_table::debug.
20559         * cgraphunit.c (analyze_functions): Use the renamed function.
20560         (symbol_table::compile): Likewise.
20561         * ipa-cp.c (ipcp_verify_propagated_values): Likewise.
20562         * ipa-icf.c (sem_item_optimizer::execute): Likewise.
20563         * passes.c (execute_todo): Likewise.
20564         * symtab.c (symbol_table::dump): New function.
20565         * tree-ssa-structalias.c (ipa_pta_execute): Use the renamed function.
20567 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
20569         * ipa-fnsummary.c (estimate_node_size_and_time): Do not sanity check
20570         that nonconst implies exec.
20572 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
20574         * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
20575         inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
20576         (inline_edge_summary_vec): Turn into ...
20577         (ipa_call_summaries): ... this one.
20578         (redirect_to_unreachable, edge_set_predicate,
20579         evaluate_properties_for_edge, inline_summary_alloc,
20580         reset_ipa_call_summary, reset_inline_summary,
20581         inline_summary_t::duplicate): Update.
20582         (inline_edge_duplication_hook): Turn to ...
20583         (ipa_call_summary_t::duplicate): ... this one.
20584         (inline_edge_removal_hook): Turn to ...
20585         (ipa_call_summary_t::remove): ... this one.
20586         (dump_inline_edge_summary): Turn to ...
20587         (dump_ipa_call_summary): ... this one.
20588         (estimate_function_body_sizes): Update.
20589         (inline_update_callee_summaries): Update.
20590         (remap_edge_change_prob): Update.
20591         (remap_edge_summaries): Update.
20592         (inline_merge_summary): Update.
20593         (do_estimate_edge_time): Update.
20594         (inline_generate_summary): Update.
20595         (inline_read_section): Update.
20596         (inline_read_summary): Update.
20597         (inline_free_summary): Update.
20598         * ipa-inline.c (can_inline_edge_p): Update.
20599         (compute_inlined_call_time): Update.
20600         (want_inline_small_function_p): Update.
20601         (edge_badness): Update.
20602         (early_inliner): Update.
20603         * ipa-inline.h (inline_edge_summary): Turn to ...
20604         (ipa_call_summary): ... this one.
20605         (ipa_call_summary_t): New class.
20606         (inline_edge_summary_t, inline_edge_summary_vec): Remove.
20607         (ipa_call_summaries): New.
20608         (inline_edge_summary): Remove.
20609         (estimate_edge_growth): Update.
20610         * ipa-profile.c (ipa_propagate_frequency_1): Update.
20611         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
20612         * ipa-split.c (execute_split_functions): Update.
20613         * ipa.c (symbol_table::remove_unreachable_nodes): Update.
20615 2017-05-23  Tom de Vries  <tom@codesourcery.com>
20617         * doc/sourcebuild.texi (Effective-Target Keywords, Other hardware
20618         attributes): Document rdrand effective target.
20620 2017-05-23  Tom de Vries  <tom@codesourcery.com>
20622         * doc/sourcebuild.texi (Effective-Target Keywords, Other hardware
20623         attributes): Sort alphabetically.
20625 2017-05-23  Georg-Johann Lay  <avr@gjlay.de>
20627         * config/avr/genmultilib.awk: Use gsub instead of gensub.
20629 2017-05-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
20631         PR target/80718
20632         * config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Split
20633         V2DF/V2DI splat into two separate patterns, one that handles
20634         registers, and the other that only handles memory.  Drop support
20635         for splatting from a GPR on ISA 2.07 and then splitting the
20636         splat into direct move and splat.
20637         (vsx_splat_<mode>_reg): Likewise.
20638         (vsx_splat_<mode>_mem): Likewise.
20640 2017-05-22  Segher Boessenkool  <segher@kernel.crashing.org>
20642         * cfgcleanup.c (bb_is_just_return): Allow CLOBBERs.
20644 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
20646         PR middle-end/80809
20647         * omp-low.c (finish_taskreg_remap): New function.
20648         (finish_taskreg_scan): If unit size of ctx->record_type
20649         is non-constant, unshare the size expression and replace
20650         decls in it with possible outer var refs.
20652         PR middle-end/80809
20653         * gimplify.c (omp_add_variable): For GOVD_DEBUG_PRIVATE use
20654         GOVD_SHARED rather than GOVD_PRIVATE with it.
20655         (gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Expect
20656         GOVD_SHARED rather than GOVD_PRIVATE with GOVD_DEBUG_PRIVATE.
20658         PR middle-end/80853
20659         * omp-low.c (lower_reduction_clauses): Pass OMP_CLAUSE_PRIVATE
20660         as last argument to build_outer_var_ref for pointer bases of array
20661         section reductions.
20663 2017-05-19  Martin Sebor  <msebor@redhat.com>
20665         * print-tree.c (print_node): Print DECL_READ_P flag.
20667 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
20669         * Makefile.in: Add ipa-fnsummary.o and ipa-fnsummary.h
20670         * auto-profile.c: Replace ipa-inline.h by ipa-fnsummary.h
20671         * cgraph.c: Likewise.
20672         * cgraphunit.c: Likewise.
20673         * gengtype.c: Likewise.
20674         * ipa-cp.c: Likewise.
20675         * ipa-devirt.c: Likewise.
20676         * ipa-icf.c: Likewise.
20677         * ipa-predicate.c: Likewise.
20678         * ipa-profile.c: Likewise.
20679         * ipa-prop.c: Likewise.
20680         * ipa-split.c: Likewise.
20681         * ipa.c: Likewise.
20682         * ipa-inline-analysis.c (inline_summaries, ipa_call_summaries,
20683         edge_predicate_pool, dump_inline_hints,
20684         inline_summary::account_size_time, redirect_to_unreachable,
20685         edge_set_predicate, set_hint_predicate,
20686         evaluate_conditions_for_known_args, evaluate_properties_for_edge,
20687         inline_summary_alloc, ipa_call_summary::reset, inline_summary::reset,
20688         inline_summary_t::remove, remap_hint_predicate_after_duplication,
20689         inline_summary_t::duplicate, ipa_call_summary_t::duplicate,
20690         ipa_call_summary_t::remove, initialize_growth_caches,
20691         free_growth_caches, dump_ipa_call_summary, dump_inline_summary,
20692         debug_inline_summary, dump_inline_summaries, initialize_inline_failed,
20693         mark_modified, unmodified_parm_1, unmodified_parm,
20694         unmodified_parm_or_parm_agg_item, eliminated_by_inlining_prob,
20695         set_cond_stmt_execution_predicate, set_switch_stmt_execution_predicate,
20696         compute_bb_predicates, will_be_nonconstant_expr_predicate,
20697         will_be_nonconstant_predicate, record_modified_bb_info,
20698         get_minimal_bb, record_modified, param_change_prob,
20699         phi_result_unknown_predicate, predicate_for_phi_result,
20700         array_index_predicate, clobber_only_eh_bb_p, fp_expression_p,
20701         estimate_function_body_sizes, compute_inline_parameters,
20702         compute_inline_parameters_for_curren, pass_data_inline_parameters,
20703         estimate_node_size_and_time, estimate_ipcp_clone_size_and_time,
20704         inline_update_callee_summaries, remap_edge_change_prob,
20705         remap_edge_summaries, remap_hint_predicate, inline_merge_summary,
20706         inline_update_overall_summary, inline_indirect_intraprocedural_analysis,
20707         inline_analyze_function, inline_summary_t::insert,
20708         inline_generate_summary, read_ipa_call_summary, inline_read_section,
20709         inline_read_summary, write_ipa_call_summary, inline_write_summary,
20710         inline_free_summary): Move to ipa-fnsummary.h
20711         (predicate_t): Remove.
20712         * ipa-fnsummary.c: New file.
20713         * ipa-inline.h:  Do not include sreal.h and ipa-predicate.h
20714         (enum inline_hints_vals, inline_hints, agg_position_info,
20715         INLINE_SIZE_SCALE, size_time_entry, inline_summary, inline_summary_t,
20716         inline_summaries, ipa_call_summary, ipa_call_summary_t,
20717         ipa_call_summaries, debug_inline_summary, dump_inline_summaries,
20718         dump_inline_summary, dump_inline_hints, inline_generate_summary,
20719         inline_read_summary, inline_write_summary, inline_free_summary,
20720         inline_analyze_function, initialize_inline_failed,
20721         inline_merge_summary, inline_update_overall_summary,
20722         compute_inline_parameters): Move to ipa-fnsummary.h
20723         * ipa-fnsummary.h: New file.
20724         * ipa-inline-transform.h: Include ipa-inline.h.
20725         * ipa-inline.c: LIkewise.
20727 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
20729         * ipa-inline.c (edge_badness): Use inlined_time instead of
20730         inline_summaries->get.
20732 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
20734         * ipa-inline.c (edge_badness): Use estimate_size_after_inlining.
20736 2017-05-22  Nathan Sidwell  <nathan@acm.org>
20738         * doc/invoke.texi (fdump-translation-unit): Delete documentation.
20739         (fdump-lang): Document 'raw' option.
20740         * dumpfile.h (TDI_tu): Delete.
20741         * dumpfile.c (dump_files): Remove translation-unit.
20742         (FIRST_AUTO_NUMBERED_DUMP): Decrement.
20744 2017-05-22  Georg-Johann Lay  <avr@gjlay.de>
20746         * config/avr/t-avr (AWK) [t-multilib]: Remove "-v FORMAT=Makefile"
20747         command option from $(AWK) call.
20748         * config/avr/genmultilib.awk: Simplify and rewrite so that it
20749         generates MULTILIB_REQUIRED instead of MULTILIB_EXCEPTIONS.
20750         [FORMAT]: Remove handling of variable.
20751         * config/avr/t-multilib: Regenerate.
20753 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
20755         * ipa-inline-analysis.c (inline_summary::reset): Do not reset
20756         self_time.
20757         (dump_inline_summary): Do not print self_time.
20758         (estimate_function_body_sizes): Do not set self_time.
20759         (compute_inline_parameters): Likewise.
20760         (inline_read_section, inline_write_summary): Do not stream self_time.
20761         * ipa-inline.h (inline_summary): Drop self_time.
20763 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
20765         * ipa-inline-analysis.c (account_size_time): Rename to ...
20766         (inline_summary::account_size_time): ... this one.
20767         (reset_ipa_call_summary): Turn to ...
20768         (ipa_call_summary::reset): ... this one.
20769         (reset_inline_summary): Turn to ...
20770         (inline_summary::reset): ... this one.
20771         (inline_summary_t::remove): Update.
20772         (inline_summary_t::duplicate): Update.
20773         (ipa_call_summary_t::remove): Update.
20774         (dump_inline_summary): Update.
20775         (estimate_function_body_sizes): Update.
20776         (compute_inline_parameters): Update.
20777         (estimate_node_size_and_time): Update.
20778         (inline_merge_summary): Update.
20779         (inline_update_overall_summary): Update.
20780         (inline_read_section): Update.
20781         (inline_write_summary): Update.
20782         * ipa-inline.h (inline_summary): Rename entry to size_time_table;
20783         add account_size_time and reset member functions.
20784         (ipa_call_summary): Add reset function.
20785         * ipa-predicate.h (predicate::operator &): Constify.
20787 2017-05-22  Richard Biener  <rguenther@suse.de>
20789         * df-scan.c (df_insn_refs_verify): Speedup when not verifying.
20791 2017-05-19  Jason Merrill  <jason@redhat.com>
20793         * tree.c (make_tree_vec_stat, grow_tree_vec_stat): Use size_t.
20795 2017-05-19  Marek Polacek  <polacek@redhat.com>
20797         PR sanitizer/80800
20798         * fold-const.c (extract_muldiv_1) <case TRUNC_DIV_EXPR>: Add
20799         TYPE_OVERFLOW_WRAPS checks.
20801 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
20803         * tree-core.h (enum omp_clause_default_kind): Add
20804         "OMP_CLAUSE_DEFAULT_PRESENT".
20805         * tree-pretty-print.c (dump_omp_clause): Handle it.
20806         * gimplify.c (enum gimplify_omp_var_data): Add
20807         "GOVD_MAP_FORCE_PRESENT".
20808         (gimplify_adjust_omp_clauses_1): Map it to
20809         "GOMP_MAP_FORCE_PRESENT".
20810         (oacc_default_clause): Handle "OMP_CLAUSE_DEFAULT_PRESENT".
20812         * gimplify.c (oacc_default_clause): Clarify.
20814 2017-05-19  Nathan Sidwell  <nathan@acm.org>
20816         LANG_HOOK_REGISTER_DUMPS
20817         * toplev.c (general_init): Call register dump lang hook.
20818         * doc/invoke.texi: Document -fdump-lang option family.
20819         * dumpfile.c (dump_files): Remove class dump here.
20820         (FIRST_AUTO_NUMBERED_DUMP): Adjust.
20821         * dumpfile.h (tree_dump_index): Remove TDI_class.
20822         * langhooks-def.h (lhd_register_dumps): Declare.
20823         (LANG_HOOKS_REGISTER_DUMPS): Define.
20824         (LANG_HOOKS_INITIALIZER): Add it.
20825         * langhooks.c (lhd_register_dumps): Define.
20826         * langhooks.h (struct lang_hooks): Add register_dumps.
20828 2017-05-19  Nathan Sidwell  <nathan@acm.org>
20830         * context.h (context::set_passes): New.
20831         * context.c (context::context): Do not create pass manager.
20832         * toplev.c (general_init): Create pass manager here.
20834 2017-05-19  Segher Boessenkool  <segher@kernel.crashing.org>
20836         * config/rs6000/rs6000.md (splitter to load of -1 and mask): Don't
20837         use this splitter if two add or or instructions would also work for
20838         the constant we want to generate.
20840 2017-05-19  Richard Biener  <rguenther@suse.de>
20842         PR build/80821
20843         * genmatch.c (dt_node::gen_kids_1): Add missing scope around
20844         predicate evaluation.
20846 2017-05-19  Jan Hubicka  <hubicka@ucw.cz>
20848         * ipa-inline.h (ipa_call_summary): Turn sizes into signed;
20849         add ctor.
20850         * ipa-inline.c (want_inline_small_function_p): Do not cast to
20851         unsigned.
20853 2017-05-19  Jan Hubicka  <hubicka@ucw.cz>
20855         * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
20856         inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
20857         (inline_edge_summary_vec): Turn into ...
20858         (ipa_call_summaries): ... this one.
20859         (redirect_to_unreachable, edge_set_predicate,
20860         evaluate_properties_for_edge, inline_summary_alloc,
20861         reset_ipa_call_summary, reset_inline_summary,
20862         inline_summary_t::duplicate): Update.
20863         (inline_edge_duplication_hook): Turn to ...
20864         (ipa_call_summary_t::duplicate): ... this one.
20865         (inline_edge_removal_hook): Turn to ...
20866         (ipa_call_summary_t::remove): ... this one.
20867         (dump_inline_edge_summary): Turn to ...
20868         (dump_ipa_call_summary): ... this one.
20869         (estimate_function_body_sizes): Update.
20870         (inline_update_callee_summaries): Update.
20871         (remap_edge_change_prob): Update.
20872         (remap_edge_summaries): Update.
20873         (inline_merge_summary): Update.
20874         (do_estimate_edge_time): Update.
20875         (inline_generate_summary): Update.
20876         (inline_read_section): Update.
20877         (inline_read_summary): Update.
20878         (inline_free_summary): Update.
20879         * ipa-inline.c (can_inline_edge_p): Update.
20880         (compute_inlined_call_time): Update.
20881         (want_inline_small_function_p): Update.
20882         (edge_badness): Update.
20883         (early_inliner): Update.
20884         * ipa-inline.h (inline_edge_summary): Turn to ...
20885         (ipa_call_summary): ... this one.
20886         (ipa_call_summary_t): New class.
20887         (inline_edge_summary_t, inline_edge_summary_vec): Remove.
20888         (ipa_call_summaries): New.
20889         (inline_edge_summary): Remove.
20890         (estimate_edge_growth): Update.
20891         * ipa-profile.c (ipa_propagate_frequency_1): Update.
20892         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
20893         * ipa-split.c (execute_split_functions): Update.
20894         * ipa.c (symbol_table::remove_unreachable_nodes): Update.
20896 2017-05-19  Richard Biener  <rguenther@suse.de>
20898         PR middle-end/80764
20899         * cfgexpand.c (expand_gimple_cond): Fix loop fixup.
20901 2017-05-18  Segher Boessenkool  <segher@kernel.crashing.org>
20903         * config/rs6000/rs6000.c (struct machine_function): Add field
20904         fpr_is_wrapped_separately.
20905         (rs6000_get_separate_components): Use 64 components.  Handle the
20906         new FPR components.
20907         (rs6000_components_for_bb): Handle the FPR components.
20908         (rs6000_emit_prologue_components): Handle the FPR components.
20909         (rs6000_emit_epilogue_components): Handle the FPR components.
20910         (rs6000_set_handled_components): Handle the FPR components.
20911         (rs6000_emit_prologue): Don't output prologue code for those FPRs
20912         that are already separately shrink-wrapped.
20913         (rs6000_emit_epilogue): Don't output epilogue code for those FPRs
20914         that are already separately shrink-wrapped.
20916 2017-05-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
20918         PR target/80510
20919         * config/rs6000/predicates.md (simple_offsettable_mem_operand):
20920         New predicate.
20922         * config/rs6000/rs6000.md (ALTIVEC_DFORM): New iterator.
20923         (define_peephole2 for Altivec d-form load): Add peepholes to catch
20924         cases where the register allocator uses a move and an offsettable
20925         memory operation to/from a FPR register on ISA 2.06/2.07.
20926         (define_peephole2 for Altivec d-form store): Likewise.
20928 2017-05-18  Uros Bizjak  <ubizjak@gmail.com>
20930         PR target/80799
20931         * config/i386/mmx.md (*mov<mode>_internal): Enable
20932         alternatives 11, 12, 13 and 14 also for 32bit targets.
20933         Remove alternatives 15, 16, 17 and 18.
20934         * config/i386/sse.md (vec_concatv2di): Change
20935         alternative (!x, *y) to (x, ?!*Yn).
20937 2017-05-18  Paolo Carlini  <paolo.carlini@oracle.com>
20939         * dumpfile.h (enum dump_kind): Remove stray comma.
20941 2017-05-18  Jan Hubicka  <hubicka@ucw.cz>
20943         * Makefile.in: Add ipa-predicate.o and ipa-predicate.h
20944         * ipa-inline-analysis.c (NUM_CONDITIONS): turn into
20945         predicate::num_conditions
20946         (IS_NOT_CONSTANT): turn into predicate::is_not_constant.
20947         (CHANGED): turn into predicate::changed.
20948         (agg_position_info): Move to ipa-predicate.h
20949         (add_condition, predicate::add_clause, predicate::operator &=,
20950         predicate::or_with, predicate::evaluate, predicate::probability,
20951         dump_condition, dump_clause, predicate::dump,
20952         predicate::remap_after_duplication, predicate::remap_after_inlining,
20953         predicate::stream_in, predicate::stream_out): Move to ipa-predicate.c
20954         (evaluate_conditions_for_known_args): Update.
20955         (set_cond_stmt_execution_predicate): Update.
20956         * ipa-inline.h: Include ipa-predicate.h
20957         (condition, inline_param_summary, conditions, agg_position_info,
20958         predicate): Move to ipa-predicate.h
20959         * ipa-predicate.c: New file.
20960         * ipa-predicate.h: New file.
20962 2017-05-18  Wilco Dijkstra  <wdijkstr@arm.com>
20964         * final.c (leaf_function_p): Check we are not in a sequence.
20966 2017-05-18  Martin Liska  <mliska@suse.cz>
20968         * cfgrtl.c (rtl_verify_edges): Remove usage of TDF_RTL.
20969         * dumpfile.c (dump_register): Use new enum dump_kind.
20970         (get_dump_file_name): Likewise.
20971         (dump_enable_all): Likewise.
20972         (dump_switch_p_1): Likewise.
20973         (enable_rtl_dump_file): Remove usage of TDF_RTL.
20974         * dumpfile.h (enum dump_kind): New enum type.
20975         (struct dump_file_info): Create constructor and
20976         format fields and comments.
20977         * passes.c (pass_manager::register_one_dump_file):
20978         Use num dump_kind.
20979         * statistics.c (statistics_early_init): Likewise.
20980         * tree-ssa-loop-prefetch.c (dump_mem_details): Replace
20981         TDF_TREE with TDF_SLIM.
20982         (gather_memory_references_ref): Likewise.
20984 2017-05-18  Martin Liska  <mliska@suse.cz>
20986         * vec.h (struct vnull): Use it.
20988 2017-05-18  Jan Hubicka  <hubicka@ucw.cz>
20990         * ipa-inline-analysis.c (predicate_conditions): Move to ipa-inline.h
20991         (true_predicate, false_predicate, true_predicate_p,
20992         false_predicate_p): Remove.
20993         (single_cond_predicate, not_inlined_predicate): Turn to member function
20994         in ipa-inline.h
20995         (add_condition): Update.
20996         (add_clause): Turn to...
20997         (predicate::add_clause): ... this one; update; allow passing NULL
20998         as parameter.
20999         (and_predicates): Turn to ...
21000         (predicate::operator &=): ... this one.
21001         (predicates_equal_p): Move to predicate::operator == in ipa-inline.h
21002         (or_predicates): Turn to ...
21003         (predicate::or_with): ... this one.
21004         (evaluate_predicate): Turn to ...
21005         (predicate::evaluate): ... this one.
21006         (predicate_probability): Turn to ...
21007         (predicate::probability): ... this one.
21008         (dump_condition): Update.
21009         (dump_predicate): Turn to ...
21010         (predicate::dump): ... this one.
21011         (account_size_time): Update.
21012         (edge_set_predicate): Update.
21013         (set_hint_predicate): UPdate.
21014         (evaluate_conditions_for_known_args): Update.
21015         (evaluate_properties_for_edge): Update.
21016         (remap_predicate_after_duplication): Turn to...
21017         (predicate::remap_after_duplication): ... this one.
21018         (remap_hint_predicate_after_duplication): Update.
21019         (inline_summary_t::duplicate): UPdate.
21020         (dump_inline_edge_summary): Update.
21021         (dump_inline_summary): Update.
21022         (set_cond_stmt_execution_predicate): Update.
21023         (set_switch_stmt_execution_predicate): Update.
21024         (compute_bb_predicates): Update.
21025         (will_be_nonconstant_expr_predicate): Update.
21026         (will_be_nonconstant_predicate): Update.
21027         (phi_result_unknown_predicate): Update.
21028         (predicate_for_phi_result): Update.
21029         (array_index_predicate): Update.
21030         (estimate_function_body_sizes): Update.
21031         (estimate_node_size_and_time): Update.
21032         (estimate_ipcp_clone_size_and_time): Update.
21033         (remap_predicate): Rename to ...
21034         (predicate::remap_after_inlining): ... this one.
21035         (remap_hint_predicate): Update.
21036         (inline_merge_summary): Update.
21037         (inline_update_overall_summary): Update.
21038         (estimate_size_after_inlining): Update.
21039         (read_predicate): Rename to ...
21040         (predicate::stream_in): ... this one.
21041         (read_inline_edge_summary): Update.
21042         (write_predicate): Rename to ...
21043         (predicate::stream_out): ... this one.
21044         (write_inline_edge_summary): Update.
21045         * ipa-inline.h (MAX_CLAUSES): Turn to predicate::max_clauses.
21046         (clause_t): Turn to uint32_t
21047         (predicate): Turn to class; implement constructor and operators
21048         ==, !=, &
21049         (size_time_entry): Update.
21050         (inline_summary): Update.
21051         (inline_edge_summary): Update.
21053 2017-05-18  Marc Glisse  <marc.glisse@inria.fr>
21055         * fold-const.c (fold_binary_loc): Move transformation...
21056         * match.pd (C - X CMP X): ... here.
21058 2017-05-18  Sheldon Lobo  <sheldon.lobo@oracle.com>
21060         * config/sparc/sparc.c (sparc_option_override): Set function
21061         alignment for -mcpu=niagara7 to 64 to match the I$ line.
21062         * config/sparc/sparc.h (BRANCH_COST): Set the SPARC M7 branch
21063         latency to 1.
21064         * config/sparc/sparc.h (BRANCH_COST): Set the SPARC T4 branch
21065         latency to 2.
21066         * config/sparc/sol2.h: Fix a ASM_CPU32_DEFAULT_SPEC typo.
21068 2017-05-18  Marek Polacek  <polacek@redhat.com>
21070         PR sanitizer/80797
21071         * ubsan.c (instrument_null): Unwrap ADDR_EXPRs.
21072         (pass_ubsan::execute): Call gimple_assign_single_p instead of
21073         gimple_assign_load_p.
21075 2017-05-17  Segher Boessenkool  <segher@kernel.crashing.org>
21077         PR middle-end/80692
21078         * real.c (do_compare): Give decimal_do_compare preference over
21079         comparing just the signs.
21081 2017-05-17  Uros Bizjak  <ubizjak@gmail.com>
21083         * doc/md.texi (Canonicalization of Instructions): Describe the
21084         canonical form of instructions that inherently set a condition
21085         code register.
21087 2017-05-17  Peter Bergner  <bergner@vnet.ibm.com>
21089         PR middle-end/80775
21090         * tree-cfg.c: Move deletion of unreachable case statements to after
21091         the merging of consecutive case labels.
21093 2017-05-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21095         * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Refer
21096         readers to __gnu_cmse_nonsecure_call libcall for saving, clearing and
21097         restoring of callee-saved registers.
21099 2017-05-17  Eric Botcazou  <ebotcazou@adacore.com>
21101         * compare-elim.c (equivalent_reg_at_start): Adjust outdated comment.
21102         * config/visium/visium.c (single_set_and_flags): Likewise.
21103         * config/visium/visium.md (Substitutions): Likewise.
21105 2017-05-17  Martin Liska  <mliska@suse.cz>
21107         * cfg.c: Introduce dump_flags_t type and
21108         use it instead of int type.
21109         * cfg.h: Likewise.
21110         * cfghooks.c: Likewise.
21111         * cfghooks.h (struct cfg_hooks): Likewise.
21112         * cfgrtl.c: Likewise.
21113         * cfgrtl.h: Likewise.
21114         * cgraph.c (cgraph_node::get_body): Likewise.
21115         * coretypes.h: Likewise.
21116         * domwalk.c: Likewise.
21117         * domwalk.h: Likewise.
21118         * dumpfile.c (struct dump_option_value_info): Likewise.
21119         (dump_enable_all): Likewise.
21120         (dump_switch_p_1): Likewise.
21121         (opt_info_switch_p): Likewise.
21122         * dumpfile.h (enum tree_dump_index): Likewise.
21123         (struct dump_file_info): Likewise.
21124         * genemit.c: Likewise.
21125         * generic-match-head.c: Likewise.
21126         * gengtype.c (open_base_files): Likewise.
21127         * gimple-pretty-print.c: Likewise.
21128         * gimple-pretty-print.h: Likewise.
21129         * graph.c (print_graph_cfg): Likewise.
21130         * graphite-scop-detection.c (dot_all_sese): Likewise.
21131         * ipa-devirt.c (build_type_inheritance_graph): Likewise.
21132         * loop-unroll.c (report_unroll): Likewise.
21133         * passes.c (pass_manager::register_one_dump_file): Likewise.
21134         * print-tree.c: Likewise.
21135         * statistics.c: Likewise.
21136         * tree-cfg.c: Likewise.
21137         * tree-cfg.h: Likewise.
21138         * tree-dfa.c: Likewise.
21139         * tree-dfa.h: Likewise.
21140         * tree-dump.c (dump_function): Likewise.
21141         * tree-dump.h (struct dump_info): Likewise.
21142         * tree-pretty-print.c: Likewise.
21143         * tree-pretty-print.h: Likewise.
21144         * tree-ssa-live.c: Likewise.
21145         * tree-ssa-live.h: Likewise.
21146         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Likewise.
21147         * tree-vect-loop.c: Likewise.
21148         * tree-vect-slp.c: Likewise.
21150 2017-05-16  James Greenhalgh  <james.greenhalgh@arm.com>
21151             Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21153         PR tree-optimization/80457
21154         * tree-vect-stmts.c (vect_model_simple_cost): Model the cost
21155         of all arguments to a statement as scalar_to_vec operations.
21156         (vectorizable_call): Adjust call to vect_model_simple_cost for
21157         new parameter.
21158         (vectorizable_conversion): Likewise.
21159         (vectorizable_assignment): Likewise.
21160         (vectorizable_shift): Likewise.
21161         (vectorizable_operation): Likewise.
21162         (vectorizable_comparison): Likewise.
21163         (vect_is_simple_cond): Record the def types for operands.
21164         (vectorizable_condition): Likewise, call vect_model_simple_cost.
21165         * tree-vectorizer.h (vect_model_simple_cost): Add new parameter
21166         for statement argument count.
21168 2017-05-16  Carl Love  <cel@us.ibm.com>
21170         * config/rs6000/rs6000-c: Add support for built-in functions
21171         vector unsigned long long vec_bperm (vector unsigned long long,
21172                                              vector unsigned char)
21173         vector signed long long vec_mule (vector signed int,
21174                                           vector signed int)
21175         vector unsigned long long vec_mule (vector unsigned int,
21176                                             vector unsigned int)
21177         vector signed long long vec_mulo (vector signed int,
21178                                           vector signed int)
21179         vector unsigned long long vec_mulo (vector unsigned int,
21180                                             vector unsigned int)
21181         vector signed char vec_sldw (vector signed char,
21182                                      vector signed char,
21183                                      const int)
21184         vector unsigned char vec_sldw (vector unsigned char,
21185                                        vector unsigned char,
21186                                        const int)
21187         vector signed short vec_sldw (vector signed short,
21188                                       vector signed short,
21189                                       const int)
21190         vector unsigned short vec_sldw (vector unsigned short,
21191                                         vector unsigned short,
21192                                         const int)
21193         vector signed int vec_sldw (vector signed int,
21194                                     vector signed int,
21195                                     const int)
21196         vector unsigned int vec_sldw (vector unsigned int,
21197                                       vector unsigned int,
21198                                       const int)
21199         vector signed long long vec_sldw (vector signed long long,
21200                                           vector signed long long,
21201                                           const int)
21202         vector unsigned long long vec_sldw (vector unsigned long long,
21203                                             vector unsigned long long,
21204                                             const int)
21205         * config/rs6000/rs6000-c: Add support for built-in functions
21206         * config/rs6000/rs6000-builtin.def: Add definition for SLDW.
21207         * config/rs6000/altivec.h: Add defintion for vec_sldw.
21208         * doc/extend.texi: Update the built-in documentation for the
21209         new built-in functions.
21211 2017-05-16  Marek Polacek  <polacek@redhat.com>
21213         PR sanitizer/80536
21214         PR sanitizer/80386
21215         * tree.c (save_expr): Don't fold the expression.
21217 2017-05-16  Uros Bizjak  <ubizjak@gmail.com>
21219         * config/i386/i386.md (*movsi_internal): Split (?rm,*y) alternative
21220         to (?r,*Yn) and (?m,*y) alternatives, and (?*y,rm) to (?*Ym,r)
21221         and (?*y,m).  Update insn attributes.
21223 2017-05-16  Martin Liska  <mliska@suse.cz>
21225         * cgraph.c (cgraph_edge::resolve_speculation): Add default value for
21226         flags argument of print_gimple_stmt, print_gimple_expr,
21227         print_generic_stmt and print_generic_expr.
21228         * cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
21229         * coretypes.h: Likewise.
21230         * except.c (dump_eh_tree): Likewise.
21231         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
21232         * gimple-pretty-print.h: Likewise.
21233         * gimple-ssa-backprop.c (dump_usage_prefix): Likewise.
21234         (backprop::push_to_worklist): Likewise.
21235         (backprop::pop_from_worklist): Likewise.
21236         (backprop::process_use): Likewise.
21237         (backprop::intersect_uses): Likewise.
21238         (note_replacement): Likewise.
21239         * gimple-ssa-store-merging.c
21240         (pass_store_merging::terminate_all_aliasing_chains): Likewise.
21241         (imm_store_chain_info::coalesce_immediate_stores): Likewise.
21242         (pass_store_merging::execute): Likewise.
21243         * gimple-ssa-strength-reduction.c (dump_candidate): Likewise.
21244         (ssa_base_cand_dump_callback): Likewise.
21245         (dump_incr_vec): Likewise.
21246         (replace_refs): Likewise.
21247         (replace_mult_candidate): Likewise.
21248         (create_add_on_incoming_edge): Likewise.
21249         (create_phi_basis): Likewise.
21250         (insert_initializers): Likewise.
21251         (all_phi_incrs_profitable): Likewise.
21252         (introduce_cast_before_cand): Likewise.
21253         (replace_one_candidate): Likewise.
21254         * gimplify.c (gimplify_expr): Likewise.
21255         * graphite-isl-ast-to-gimple.c (is_valid_rename): Likewise.
21256         (set_rename): Likewise.
21257         (rename_uses): Likewise.
21258         (copy_loop_phi_nodes): Likewise.
21259         (add_close_phis_to_merge_points): Likewise.
21260         (copy_loop_close_phi_args): Likewise.
21261         (copy_cond_phi_args): Likewise.
21262         (graphite_copy_stmts_from_block): Likewise.
21263         (translate_pending_phi_nodes): Likewise.
21264         * graphite-poly.c (print_pdr): Likewise.
21265         (dump_gbb_cases): Likewise.
21266         (dump_gbb_conditions): Likewise.
21267         (print_scop_params): Likewise.
21268         * graphite-scop-detection.c (build_cross_bb_scalars_def): Likewise.
21269         (build_cross_bb_scalars_use): Likewise.
21270         (gather_bbs::before_dom_children): Likewise.
21271         * hsa-dump.c (dump_hsa_immed): Likewise.
21272         * ipa-cp.c (print_ipcp_constant_value): Likewise.
21273         (get_replacement_map): Likewise.
21274         * ipa-inline-analysis.c (dump_condition): Likewise.
21275         (estimate_function_body_sizes): Likewise.
21276         * ipa-polymorphic-call.c (check_stmt_for_type_change): Likewise.
21277         (ipa_polymorphic_call_context::get_dynamic_type): Likewise.
21278         * ipa-prop.c (ipa_dump_param): Likewise.
21279         (ipa_print_node_jump_functions_for_edge): Likewise.
21280         (ipa_modify_call_arguments): Likewise.
21281         (ipa_modify_expr): Likewise.
21282         (ipa_dump_param_adjustments): Likewise.
21283         (ipa_dump_agg_replacement_values): Likewise.
21284         (ipcp_modif_dom_walker::before_dom_children): Likewise.
21285         * ipa-pure-const.c (check_stmt): Likewise.
21286         (pass_nothrow::execute): Likewise.
21287         * ipa-split.c (execute_split_functions): Likewise.
21288         * omp-offload.c (dump_oacc_loop_part): Likewise.
21289         (dump_oacc_loop): Likewise.
21290         * trans-mem.c (tm_log_emit): Likewise.
21291         (tm_memopt_accumulate_memops): Likewise.
21292         (dump_tm_memopt_set): Likewise.
21293         (dump_tm_memopt_transform): Likewise.
21294         * tree-cfg.c (gimple_verify_flow_info): Likewise.
21295         (print_loop): Likewise.
21296         * tree-chkp-opt.c (chkp_print_addr): Likewise.
21297         (chkp_gather_checks_info): Likewise.
21298         (chkp_get_check_result): Likewise.
21299         (chkp_remove_check_if_pass): Likewise.
21300         (chkp_use_outer_bounds_if_possible): Likewise.
21301         (chkp_reduce_bounds_lifetime): Likewise.
21302         * tree-chkp.c (chkp_register_addr_bounds): Likewise.
21303         (chkp_mark_completed_bounds): Likewise.
21304         (chkp_register_incomplete_bounds): Likewise.
21305         (chkp_mark_invalid_bounds): Likewise.
21306         (chkp_maybe_copy_and_register_bounds): Likewise.
21307         (chkp_build_returned_bound): Likewise.
21308         (chkp_get_bound_for_parm): Likewise.
21309         (chkp_build_bndldx): Likewise.
21310         (chkp_get_bounds_by_definition): Likewise.
21311         (chkp_generate_extern_var_bounds): Likewise.
21312         (chkp_get_bounds_for_decl_addr): Likewise.
21313         * tree-chrec.c (chrec_apply): Likewise.
21314         * tree-data-ref.c (dump_data_reference): Likewise.
21315         (dump_subscript): Likewise.
21316         (dump_data_dependence_relation): Likewise.
21317         (analyze_overlapping_iterations): Likewise.
21318         * tree-inline.c (expand_call_inline): Likewise.
21319         (tree_function_versioning): Likewise.
21320         * tree-into-ssa.c (dump_defs_stack): Likewise.
21321         (dump_currdefs): Likewise.
21322         (dump_names_replaced_by): Likewise.
21323         (dump_update_ssa): Likewise.
21324         (update_ssa): Likewise.
21325         * tree-object-size.c (pass_object_sizes::execute): Likewise.
21326         * tree-parloops.c (build_new_reduction): Likewise.
21327         (try_create_reduction_list): Likewise.
21328         (ref_conflicts_with_region): Likewise.
21329         (oacc_entry_exit_ok_1): Likewise.
21330         (oacc_entry_exit_single_gang): Likewise.
21331         * tree-pretty-print.h: Likewise.
21332         * tree-scalar-evolution.c (set_scalar_evolution): Likewise.
21333         (get_scalar_evolution): Likewise.
21334         (add_to_evolution): Likewise.
21335         (get_loop_exit_condition): Likewise.
21336         (analyze_evolution_in_loop): Likewise.
21337         (analyze_initial_condition): Likewise.
21338         (analyze_scalar_evolution): Likewise.
21339         (instantiate_scev): Likewise.
21340         (number_of_latch_executions): Likewise.
21341         (gather_chrec_stats): Likewise.
21342         (final_value_replacement_loop): Likewise.
21343         (scev_const_prop): Likewise.
21344         * tree-sra.c (dump_access): Likewise.
21345         (disqualify_candidate): Likewise.
21346         (create_access): Likewise.
21347         (reject): Likewise.
21348         (maybe_add_sra_candidate): Likewise.
21349         (create_access_replacement): Likewise.
21350         (analyze_access_subtree): Likewise.
21351         (analyze_all_variable_accesses): Likewise.
21352         (sra_modify_assign): Likewise.
21353         (initialize_constant_pool_replacements): Likewise.
21354         (find_param_candidates): Likewise.
21355         (decide_one_param_reduction): Likewise.
21356         (replace_removed_params_ssa_names): Likewise.
21357         * tree-ssa-ccp.c (ccp_fold_stmt): Likewise.
21358         * tree-ssa-copy.c (dump_copy_of): Likewise.
21359         (copy_prop_visit_cond_stmt): Likewise.
21360         * tree-ssa-dce.c (mark_operand_necessary): Likewise.
21361         * tree-ssa-dom.c (pass_dominator::execute): Likewise.
21362         (record_equivalences_from_stmt): Likewise.
21363         * tree-ssa-dse.c (compute_trims): Likewise.
21364         (delete_dead_call): Likewise.
21365         (delete_dead_assignment): Likewise.
21366         * tree-ssa-forwprop.c (forward_propagate_into_gimple_cond): Likewise.
21367         (forward_propagate_into_cond): Likewise.
21368         (pass_forwprop::execute): Likewise.
21369         * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
21370         * tree-ssa-loop-im.c (invariantness_dom_walker::before_dom_children):
21371         Likewise.
21372         (move_computations_worker): Likewise.
21373         (execute_sm): Likewise.
21374         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Likewise.
21375         (remove_exits_and_undefined_stmts): Likewise.
21376         (remove_redundant_iv_tests): Likewise.
21377         * tree-ssa-loop-ivopts.c (dump_use): Likewise.
21378         (adjust_iv_update_pos): Likewise.
21379         * tree-ssa-math-opts.c (bswap_replace): Likewise.
21380         * tree-ssa-phiopt.c (factor_out_conditional_conversion): Likewise.
21381         (value_replacement): Likewise.
21382         * tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
21383         * tree-ssa-pre.c (print_pre_expr): Likewise.
21384         (get_representative_for): Likewise.
21385         (create_expression_by_pieces): Likewise.
21386         (insert_into_preds_of_block): Likewise.
21387         (eliminate_insert): Likewise.
21388         (eliminate_dom_walker::before_dom_children): Likewise.
21389         (eliminate): Likewise.
21390         (remove_dead_inserted_code): Likewise.
21391         * tree-ssa-propagate.c (substitute_and_fold): Likewise.
21392         * tree-ssa-reassoc.c (get_rank): Likewise.
21393         (eliminate_duplicate_pair): Likewise.
21394         (eliminate_plus_minus_pair): Likewise.
21395         (eliminate_not_pairs): Likewise.
21396         (undistribute_ops_list): Likewise.
21397         (eliminate_redundant_comparison): Likewise.
21398         (update_range_test): Likewise.
21399         (optimize_range_tests_var_bound): Likewise.
21400         (optimize_vec_cond_expr): Likewise.
21401         (rewrite_expr_tree): Likewise.
21402         (rewrite_expr_tree_parallel): Likewise.
21403         (linearize_expr): Likewise.
21404         (break_up_subtract): Likewise.
21405         (linearize_expr_tree): Likewise.
21406         (attempt_builtin_powi): Likewise.
21407         (attempt_builtin_copysign): Likewise.
21408         (transform_stmt_to_copy): Likewise.
21409         (transform_stmt_to_multiply): Likewise.
21410         (dump_ops_vector): Likewise.
21411         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Likewise.
21412         (print_scc): Likewise.
21413         (set_ssa_val_to): Likewise.
21414         (visit_reference_op_store): Likewise.
21415         (visit_use): Likewise.
21416         (sccvn_dom_walker::before_dom_children): Likewise.
21417         (run_scc_vn): Likewise.
21418         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
21419         Likewise.
21420         (expr_hash_elt::print): Likewise.
21421         (const_and_copies::pop_to_marker): Likewise.
21422         (const_and_copies::record_const_or_copy_raw): Likewise.
21423         * tree-ssa-structalias.c (compute_dependence_clique): Likewise.
21424         * tree-ssa-uninit.c (collect_phi_def_edges): Likewise.
21425         (dump_predicates): Likewise.
21426         (find_uninit_use): Likewise.
21427         (warn_uninitialized_phi): Likewise.
21428         (pass_late_warn_uninitialized::execute): Likewise.
21429         * tree-ssa.c (verify_vssa): Likewise.
21430         (verify_ssa): Likewise.
21431         (maybe_optimize_var): Likewise.
21432         * tree-vrp.c (dump_value_range): Likewise.
21433         (dump_all_value_ranges): Likewise.
21434         (dump_asserts_for): Likewise.
21435         (register_edge_assert_for_2): Likewise.
21436         (vrp_visit_cond_stmt): Likewise.
21437         (vrp_visit_switch_stmt): Likewise.
21438         (vrp_visit_stmt): Likewise.
21439         (vrp_visit_phi_node): Likewise.
21440         (simplify_cond_using_ranges_1): Likewise.
21441         (fold_predicate_in): Likewise.
21442         (evrp_dom_walker::before_dom_children): Likewise.
21443         (evrp_dom_walker::push_value_range): Likewise.
21444         (evrp_dom_walker::pop_value_range): Likewise.
21445         (execute_early_vrp): Likewise.
21447 2017-05-16  Richard Biener  <rguenther@suse.de>
21449         * dwarf2out.c (loc_list_from_tree_1): Do not create
21450         DW_OP_GNU_variable_value for DECL_IGNORED_P decls.
21452 2017-05-16  Richard Biener  <rguenther@suse.de>
21454         * dwarf2out.c (resolve_variable_value_in_expr): Lookup DIE
21455         just generated.
21456         (note_variable_value_in_expr): If we resolved the decl ref
21457         do not push to the stack.
21459 2017-05-16  Matthew Wahab  <matthew.wahab@arm.com>
21461         * config/arm/arm_neon.h (vadd_f16): Use standard arithmetic
21462         operations in fast-math mode.
21463         (vaddq_f16): Likewise.
21464         (vmul_f16): Likewise.
21465         (vmulq_f16): Likewise.
21466         (vsub_f16): Likewise.
21467         (vsubq_f16): Likewise.
21468         * config/arm/neon.md (add<mode>3): New.
21469         (sub<mode>3): New.
21470         (fma:<VH:mode>3): New.  Also remove outdated comment.
21471         (mul<mode>3): New.
21473 2017-05-16  Martin Liska  <mliska@suse.cz>
21475         PR ipa/79849.
21476         PR ipa/79850.
21477         * ipa-devirt.c (warn_types_mismatch): Fix typo.
21478         (odr_types_equivalent_p): Likewise.
21480 2017-05-15  Sylvestre Ledru  <sylvestre@debian.org>
21482         * plugin.c (try_init_one_plugin): Fix ressource leaks (CID 726637).
21484 2017-05-15  Uros Bizjak  <ubizjak@gmail.com>
21486         PR target/80425
21487         * config/i386.i386.md (*zero_extendsidi2): Do not penalize
21488         non-interunit SSE move alternatives with '?'.
21489         (zero-extendsidi peephole2): New peephole to skip intermediate
21490         general register in SSE zero-extend sequence.
21492 2017-05-15  Jeff Law  <law@redhat.com>
21494         * reorg.c (relax_delay_slots): Create a new variable to hold
21495         the temporary target rather than clobbering TARGET_LABEL.
21497         * config/tilegx/tilegx.c (tilegx_expand_unaligned_load): Add
21498         missing argument to extract_bit_field call.
21499         * config/tilepro/tilepro.c (tilepro_expand_unaligned_load): Likewise.
21501 2017-05-15  Martin Liska  <mliska@suse.cz>
21503         PR driver/31468
21504         * gcc.c (process_command): Do not allow empty argument of -o option.
21506 2017-05-15  Renlin Li  <renlin.li@arm.com>
21508         * config/aarch64/aarch64-protos.h (aarch64_expand_call): Declare.
21509         * config/aarch64/aarch64.c (aarch64_expand_call): Define.
21510         * config/aarch64/constraints.md (Usf): Add long call check.
21511         * config/aarch64/aarch64.md (call): Use aarch64_expand_call.
21512         (call_value): Likewise.
21513         (sibcall): Likewise.
21514         (sibcall_value): Likewise.
21515         (call_insn): New.
21516         (call_value_insn): New.
21517         (sibcall_insn): Update rtx pattern.
21518         (sibcall_value_insn): Likewise.
21519         (call_internal): Remove.
21520         (call_value_internal): Likewise.
21521         (sibcall_internal): Likewise.
21522         (sibcall_value_internal): Likewise.
21523         (call_reg): Likewise.
21524         (call_symbol): Likewise.
21525         (call_value_reg): Likewise.
21526         (call_value_symbol): Likewise.
21528 2017-05-14  Krister Walfridsson  <krister.walfridsson@gmail.com>
21530         PR target/80600
21531         * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always add -lgcc.
21533 2017-05-14  Uros Bizjak  <ubizjak@gmail.com>
21535         * config/i386.i386.c (ix86_cc_modes_compatible): CCNOmode is
21536         compatible with CCGOCmode and with CCZmode.
21538 2017-05-14  Martin Sebor  <msebor@redhat.com>
21540         PR middle-end/77671
21541         * gimple-fold.c (gimple_fold_builtin_sprintf): Make extern.
21542         (gimple_fold_builtin_snprintf): Same.
21543         * gimple-fold.h (gimple_fold_builtin_sprintf): Declare.
21544         (gimple_fold_builtin_snprintf): Same.
21545         * gimple-ssa-sprintf.c (get_format_string): Correct the detection
21546         of character types.
21547         (is_call_safe): New function.
21548         (try_substitute_return_value): Call it.
21549         (try_simplify_call): New function.
21550         (pass_sprintf_length::handle_gimple_call): Call it.
21552 2017-05-14  Martin Sebor  <msebor@redhat.com>
21554         PR middle-end/80669
21555         * builtins.c (expand_builtin_stpncpy): Simplify.
21557 2017-05-14  Daniel Santos  <daniel.santos@pobox.com>
21559         * config/i386/i386.opt: Add option -mcall-ms2sysv-xlogues.
21560         * config/i386/i386.h
21561         (x86_64_ms_sysv_extra_clobbered_registers): Change type to unsigned.
21562         (NUM_X86_64_MS_CLOBBERED_REGS): New macro.
21563         (struct machine_function): Add new members call_ms2sysv,
21564         call_ms2sysv_pad_in, call_ms2sysv_pad_out and call_ms2sysv_extra_regs.
21565         (struct machine_frame_state): New fields sp_realigned and
21566         sp_realigned_offset.
21567         * config/i386/i386.c
21568         (enum xlogue_stub): New enum.
21569         (enum xlogue_stub_sets): New enum.
21570         (class xlogue_layout): New class.
21571         (struct ix86_frame): New fields stack_realign_allocate_offset,
21572         stack_realign_offset and outlined_save_offset.  Modify comments to
21573         detail stack layout when using out-of-line stubs.
21574         (ix86_target_string): Add -mcall-ms2sysv-xlogues option.
21575         (ix86_option_override_internal): Add sorry() for TARGET_SEH and
21576         -mcall-ms2sysv-xlogues.
21577         (stub_managed_regs): New static variable.
21578         (ix86_save_reg): Add new parameter ignore_outlined to optionally omit
21579         registers managed by out-of-line stub.
21580         (disable_call_ms2sysv_xlogues): New function.
21581         (ix86_compute_frame_layout): Modify re-alignment calculations, disable
21582         m->call_ms2sysv when appropriate and compute frame layout for
21583         out-of-line stubs.
21584         (sp_valid_at, fp_valid_at): New inline functions.
21585         (choose_basereg): New function.
21586         (choose_baseaddr): Add align parameter, use choose_basereg and modify
21587         all callers.
21588         (ix86_emit_save_reg_using_mov, ix86_emit_restore_sse_regs_using_mov):
21589         Use align parameter of choose_baseaddr to generated aligned SSE movs
21590         when possible.
21591         (pro_epilogue_adjust_stack): Modify to track
21592         machine_frame_state::sp_realigned.
21593         (ix86_nsaved_regs): Modify to accommodate changes to ix86_save_reg.
21594         (ix86_nsaved_sseregs): Likewise.
21595         (ix86_emit_save_regs): Likewise.
21596         (ix86_emit_save_regs_using_mov): Likewise.
21597         (ix86_emit_save_sse_regs_using_mov): Likewise.
21598         (get_scratch_register_on_entry): Likewise.
21599         (gen_frame_set): New function.
21600         (gen_frame_load): Likewise.
21601         (gen_frame_store): Likewise.
21602         (emit_outlined_ms2sysv_save): Likewise.
21603         (emit_outlined_ms2sysv_restore): Likewise.
21604         (ix86_expand_prologue): Modify stack re-alignment code and call
21605         emit_outlined_ms2sysv_save when appropriate.
21606         (ix86_emit_leave): Clear machine_frame_state::sp_realigned.  Add
21607         parameter rtx_insn *insn, which allows the function to be used to only
21608         generate the notes.
21609         (ix86_expand_epilogue): Modify validity checks of frame and stack
21610         pointers, and call emit_outlined_ms2sysv_restore when appropriate.
21611         (ix86_expand_call): Modify to enable m->call_ms2sysv when appropriate.
21612         * config/i386/predicates.md
21613         (save_multiple): New predicate.
21614         (restore_multiple): Likewise.
21615         * config/i386/sse.md
21616         (save_multiple<mode>): New pattern.
21617         (save_multiple_realign<mode>): Likewise.
21618         (restore_multiple<mode>): Likewise.
21619         (restore_multiple_and_return<mode>): Likewise.
21620         (restore_multiple_leave_return<mode>): Likewise.
21621         * Makefile.in: Export HOSTCXX and HOSTCXXFLAGS to site.exp
21623 2017-05-14  Julia Koval  <julia.koval@intel.com>
21625         * config/i386/i386-builtin-types.def (VOID_FTYPE_INT_INT64): New type.
21626         * config/i386/i386-builtin.def (__builtin_ia32_xgetbv)
21627         (__builtin_ia32_xsetbv): New builtins.
21628         * config/i386/i386.c (ix86_expand_special_args_builtin):
21629         Process new types.
21630         (ix86_expand_builtin): Special expand for new intrinsics.
21631         * config/i386/i386.md (UNSPECV_XGETBV, UNSPECV_XSETBV): New.
21632         (xsetbv, xsetbv_rex64, xgetbv, xgetbv_rex64): New insn patterns.
21633         * config/i386/xsaveintrin.h (_xsetbv, _getbv): New intrinsics.
21635 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21637         * cfganal.c (inverted_post_order_compute): Change argument type
21638         to vec *.
21639         * cfganal.h (inverted_post_order_compute): Adjust prototype.
21640         * df-core.c (rest_of_handle_df_initialize): Adjust.
21641         (rest_of_handle_df_finish): Likewise.
21642         (df_analyze_1): Likewise.
21643         (df_analyze): Likewise.
21644         (loop_inverted_post_order_compute): Change argument to be a vec *.
21645         (df_analyze_loop): Adjust.
21646         (df_get_n_blocks): Likewise.
21647         (df_get_postorder): Likewise.
21648         * df.h (struct df_d): Change field to be a vec.
21649         * lcm.c (compute_laterin): Adjust.
21650         (compute_available): Likewise.
21651         * lra-lives.c (lra_create_live_ranges_1): Likewise.
21652         * tree-ssa-dce.c (remove_dead_stmt): Likewise.
21653         * tree-ssa-pre.c (compute_antic): Likewise.
21655 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21657         * cfganal.c (connect_infinite_loops_to_exit): Adjust.
21658         (depth_first_search::depth_first_search): Change structure init
21659         function to this constructor.
21660         (depth_first_search::add_bb): Rename function to this member.
21661         (depth_first_search::execute): Likewise.
21662         (flow_dfs_compute_reverse_finish): Adjust.
21664 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21666         * ddg.c (find_nodes_on_paths): Use auto_sbitmap.
21667         (longest_simple_path): Likewise.
21668         * shrink-wrap.c (spread_components): Likewise.
21669         (disqualify_problematic_components): Likewise.
21670         (emit_common_heads_for_components): Likewise.
21671         (emit_common_tails_for_components): Likewise.
21672         (insert_prologue_epilogue_for_components): Likewise.
21674 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21676         * tree-ssa-dse.c (dse_dom_walker): Make m_live_byes a
21677         auto_sbitmap.
21679 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21681         * df-core.c (df_set_blocks): Start using auto_bitmap.
21682         (df_compact_blocks): Likewise.
21683         * df-problems.c (df_rd_confluence_n): Likewise.
21684         * df-scan.c (df_insn_rescan_all): Likewise.
21685         (df_process_deferred_rescans): Likewise.
21686         (df_update_entry_block_defs): Likewise.
21687         (df_update_exit_block_uses): Likewise.
21688         (df_entry_block_bitmap_verify): Likewise.
21689         (df_exit_block_bitmap_verify): Likewise.
21690         (df_scan_verify): Likewise.
21691         * lra-constraints.c (lra_constraints): Likewise.
21692         (undo_optional_reloads): Likewise.
21693         (lra_undo_inheritance): Likewise.
21694         * lra-remat.c (calculate_gen_cands): Likewise.
21695         (do_remat): Likewise.
21696         * lra-spills.c (assign_spill_hard_regs): Likewise.
21697         (spill_pseudos): Likewise.
21698         * tree-ssa-pre.c (bitmap_set_and): Likewise.
21699         (bitmap_set_subtract_values): Likewise.
21701 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21703         * haifa-sched.c (estimate_shadow_tick): Replace manual bitmap
21704         management with auto_bitmap.
21705         (fix_inter_tick): Likewise.
21706         (fix_recovery_deps): Likewise.
21707         * ira.c (add_store_equivs): Likewise.
21708         (find_moveable_pseudos): Likewise.
21709         (split_live_ranges_for_shrink_wrap): Likewise.
21710         * print-rtl.c (rtx_reuse_manager::rtx_reuse_manager): Likewise.
21711         (rtx_reuse_manager::seen_def_p): Likewise.
21712         (rtx_reuse_manager::set_seen_def): Likewise.
21713         * print-rtl.h (class rtx_reuse_manager): Likewise.
21715 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21717         * bt-load.c (combine_btr_defs): Use auto_bitmap to manage bitmap
21718         lifetime.
21719         (migrate_btr_def): Likewise.
21720         * cfgloop.c (get_loop_body_in_bfs_order): Likewise.
21721         * df-core.c (loop_post_order_compute): Likewise.
21722         (loop_inverted_post_order_compute): Likewise.
21723         * hsa-common.h: Likewise.
21724         * hsa-gen.c (hsa_bb::~hsa_bb): Likewise.
21725         * init-regs.c (initialize_uninitialized_regs): Likewise.
21726         * ipa-inline.c (resolve_noninline_speculation): Likewise.
21727         (inline_small_functions): Likewise.
21728         * ipa-reference.c (ipa_reference_write_optimization_summary): Likewise.
21729         * ira.c (combine_and_move_insns): Likewise.
21730         (build_insn_chain): Likewise.
21731         * loop-invariant.c (find_invariants): Likewise.
21732         * lower-subreg.c (propagate_pseudo_copies): Likewise.
21733         * predict.c (tree_predict_by_opcode): Likewise.
21734         (predict_paths_leading_to): Likewise.
21735         (predict_paths_leading_to_edge): Likewise.
21736         (estimate_loops_at_level): Likewise.
21737         (estimate_loops): Likewise.
21738         * shrink-wrap.c (try_shrink_wrapping): Likewise.
21739         (spread_components): Likewise.
21740         * tree-cfg.c (remove_edge_and_dominated_blocks): Likewise.
21741         * tree-loop-distribution.c (rdg_build_partitions): Likewise.
21742         * tree-predcom.c (tree_predictive_commoning_loop): Likewise.
21743         * tree-ssa-coalesce.c (coalesce_ssa_name): Likewise.
21744         * tree-ssa-phionlycprop.c (pass_phi_only_cprop::execute): Likewise.
21745         * tree-ssa-pre.c (remove_dead_inserted_code): Likewise.
21746         * tree-ssa-sink.c (nearest_common_dominator_of_uses): Likewise.
21747         * tree-ssa-threadupdate.c (compute_path_counts): Likewise.
21748         (mark_threaded_blocks): Likewise.
21749         (thread_through_all_blocks): Likewise.
21750         * tree-ssa.c (verify_ssa): Likewise.
21751         (execute_update_addresses_taken): Likewise.
21752         * tree-ssanames.c (verify_ssaname_freelists): Likewise.
21754 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21756         * cfganal.c (mark_dfs_back_edges): Replace manual stack with
21757         auto_vec.
21758         (post_order_compute): Likewise.
21759         (inverted_post_order_compute): Likewise.
21760         (pre_and_rev_post_order_compute_fn): Likewise.
21762 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21764         * genrecog.c (int_set::int_set): Explicitly construct our
21765         auto_vec base class.
21766         * vec.h (auto_vec::auto_vec): New constructor.
21768 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21770         * bitmap.h (class auto_bitmap): New constructor taking
21771         bitmap_obstack * argument.
21773 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
21775         * bitmap.h (class auto_bitmap): Change type of m_bits to
21776         bitmap_head, and adjust ctor / dtor and member operators.
21778 2017-05-13  Uros Bizjak  <ubizjak@gmail.com>
21780         * compare-elim.c (equivalent_reg_at_start): Return NULL_RTX
21781         when returned register mode doesn't match original mode.
21783 2017-05-12  Jeff Law  <law@redhat.com>
21784             Jakub Jelinek  <jakub@redhat.com>
21786         * config/mn10300/mn10300.c (mn10300_match_ccmode): Fix where
21787         we look for cc setter after the compare-elim changes.
21788         * config/mn10300/mn10300.md (addsi3_flags): Fix order of patterns
21789         within the vector to match what compare-elim now expects.
21790         (subsi3_flags, andsi3_flags, iorsi3_flags): Likewise.
21791         (xorsi3_flags, one_cmplsi2_flags): Likewise.
21793         * config/rx/rx.c (rx_match_ccmode): Fix where we look cc setter
21794         after the compare-elim changes.
21795         * config/rx/rx.md (abssi2_flags): Fix order of patterns within
21796         the vector to match what compare-elim now expects.
21797         (addsi3_flags, adc_flags, addsi3_flags peepholes): Likewise.
21798         (andsi3_flags, negsi2_flags, one_cmplsi2_flags): Likewise.
21799         (iorsi3_flags, rotlsi3_flags, rotrsi3_flags): Likewise.
21800         (ashrsi3_flags, lshrsi3_flags, ashlsi3_flags): Likewise.
21801         (ssaddsi3, subsi3_flags, sbb_flags, xorsi3_flags): Likewise.
21803         * config/visium/visium.c (single_set_and_flags): Fix where
21804         we look for cc setter after the compare-elim changes.
21805         * config/visium/visium.md (flags_subst_logic): Fix order of patterns
21806         with the vector to match what compare-elim now expects.
21807         (flags_subst_arith, add<mode>3_insn_set_carry): Likewise.
21808         (add<mode>3_insn_set_overflow, addsi3_insn_set_carry): Likewise.
21809         (addsi3_insn_set_overflow, sub<mode>3_insn_set_carry): Likewise.
21810         (sub<mode>3_insn_set_overflow, subsi3_insn_set_carry): Likewise.
21811         (subsi3_insn_set_overflow, negsi2_insn_set_carry): Likewise.
21812         (neg<mode>2_insn_set_overflow): Likewise.
21814 2017-05-12  Jim Wilson  <jim.wilson@linaro.org>
21816         PR middle-end/79794
21817         * expmed.c (extract_bit_field_1): Add alt_rtl argument.  Before
21818         maybe_expand_insn call, set ops[0].target.  If still set after call,
21819         set alt_rtl.  Add extra arg to recursive calls.
21820         (extract_bit_field): Add alt_rtl argument.  Pass to
21821         extract_bit_field.
21822         * expmed.h (extract_bit_field): Fix prototype.
21823         * expr.c (emit_group_load_1, copy_blkmode_from_reg)
21824         (copy_blkmode_to_reg, read_complex_part, store_field): Pass extra NULL
21825         to extract_bit_field_calls.
21826         (expand_expr_real_1): Pass alt_rtl to expand_expr_real instead of 0.
21827         Pass alt_rtl to extract_bit_field calls.
21828         * calls.c (store_unaligned_arguments_into_psuedos)
21829         load_register_parameters): Pass extra NULL to extract_bit_field calls.
21830         * optabs.c (maybe_legitimize_operand): Clear op->target when call
21831         gen_reg_rtx.
21832         * optabs.h (struct expand_operand): Add target bitfield.
21834 2017-05-12  Uros Bizjak  <ubizjak@gmail.com>
21836         * compare-elim.c (try_eliminate_compare): Canonicalize
21837         operation with embedded compare to
21838         [(set (reg:CCM) (compare:CCM (operation) (immediate)))
21839          (set (reg) (operation)].
21841         * config/i386/i386.c (TARGET_FLAGS_REGNUM): New define.
21843 2017-05-12  Uros Bizjak  <ubizjak@gmail.com>
21845         PR target/80723
21846         * config/i386/i386.c (ix86_rtx_cost) [case PLUS]: Ignore the
21847         cost of adding a carry flag for ADC instruction.
21848         [case MINUS]: Ignore the cost of subtracting a carry flag
21849         for SBB instruction.
21851 2017-05-12  Steven Munroe  <munroesj@gcc.gnu.org>
21853         * config.gcc (powerpc*-*-*): Add bmi2intrin.h, bmiintrin.h,
21854         and x86intrin.h
21855         * config/rs6000/bmiintrin.h: New file.
21856         * config/rs6000/bmi2intrin.h: New file.
21857         * config/rs6000/x86intrin.h: New file.
21859 2017-05-12  Jeff Law  <law@redhat.com>
21861         * tree-vrp.c (vrp_dom_walker::before_dom_children): Push unwinding
21862         markers.
21864 2017-05-12  Peter Bergner  <bergner@vnet.ibm.com>
21866         PR middle-end/80707
21867         * tree-cfg.c: Remove cfg edges of unreachable case statements.
21869 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
21871         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
21872         early expansion of vector divide builtins.
21873         (builtin_function_type): Add VSX_BUILTIN_UDIV_V2DI to the list of
21874         builtins identified as having unsigned arguments.
21876 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
21878         * config/rs6000/rs6000.c (gimple-fold.h): New #include.
21879         (rs6000_gimple_fold_builtin): Add handling for early GIMPLE
21880         expansion of vector logical operations (and, andc, or, xor,
21881         nor, orc, nand).
21883 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
21885         * gimple-fold.c (create_tmp_reg_or_ssa_name): Remove static declaration.
21886         * gimple-fold.h (create_tmp_reg_or_ssa_name): New prototype.
21888 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
21890         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
21891         early GIMPLE expansion of vector multiplies.
21893 2017-05-12  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
21895         * config/arm/arm.md (movsi): Add TARGET_32BIT in addition to the
21896         TARGET_HAVE_MOVT conditional.
21897         (movt splitter): Likewise.
21899 2017-05-12  Richard Biener  <rguenther@suse.de>
21901         * tree-ssa-sccvn.h (has_VN_INFO): Declare.
21902         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
21903         Fold all stmts not inplace.
21905 2017-05-12  Richard Biener  <rguenther@suse.de>
21907         PR tree-optimization/80713
21908         * tree-ssa-pre.c (remove_dead_inserted_code): Clear
21909         inserted_exprs bit for not removed stmts.
21911 2017-05-12  Thomas Schwinge  <thomas@codesourcery.com>
21913         PR middle-end/69921
21914         * tree-parloops.c (create_parallel_loop): Set "oacc kernels
21915         parallelized" attribute for parallelized OpenACC kernels.
21916         * omp-offload.c (execute_oacc_device_lower): Use it.
21918         * omp-expand.c (expand_omp_target) <GF_OMP_TARGET_KIND_OACC_KERNELS>:
21919         Set "oacc kernels" attribute.
21920         * omp-general.c (oacc_set_fn_attrib): Remove is_kernel formal
21921         parameter.  Adjust all users.
21922         (oacc_fn_attrib_kernels_p): Remove function.
21923         * omp-offload.c (execute_oacc_device_lower): Look for "oacc
21924         kernels" attribute instead of calling oacc_fn_attrib_kernels_p.
21925         * tree-ssa-loop.c (gate_oacc_kernels): Likewise.
21926         * tree-parloops.c (create_parallel_loop): If oacc_kernels_p,
21927         assert "oacc kernels" attribute is set.
21929 2017-05-11  Carl Love  <cel@us.ibm.com>
21931         * config/rs6000/rs6000-c: Add support for built-in functions
21932         vector unsigned char vec_popcnt (vector signed char)
21933         vector unsigned char vec_popcnt (vector unsigned char)
21934         vector unsigned short vec_popcnt (vector signed short)
21935         vector unsigned short vec_popcnt (vector unsigned short)
21936         vector unsigned int vec_popcnt (vector signed int)
21937         vector unsigned int vec_popcnt (vector unsigned int)
21938         vector unsigned long long vec_popcnt (vector signed long long)
21939         vector unsigned long long vec_popcnt (vector unsigned long long)
21940         vector signed long long vec_slo (vector signed long long,
21941                                          vector signed char)
21942         vector signed long long vec_slo (vector signed long long,
21943                                          vector unsigned char)
21944         vector unsigned long long vec_slo (vector unsigned long long,
21945                                            vector signed char)
21946         vector unsigned long long vec_slo (vector unsigned long long,
21947                                            vector unsigned char)
21948         * config/rs6000/rs6000-builtin.def: Add definitions for VPOPCNTUB,
21949         VPOPCNTUH, VPOPCNTUW, and VPOPCNTUD overloads.
21950         * config/rs6000/altivec.h: Add define for vec_popcnt, vec_popcntb,
21951         vec_popcnth, vec_popcntw and vec_popcntd built-in functions.
21952         * doc/extend.texi: Update the built-in documentation file for the
21953         new built-in functions.
21955 2017-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
21957         * attribs.h (sorted_attr_string): Move machine independent
21958         functions for target clone support from the i386 port to common
21959         code.  Rename ix86_function_versions to common_function_versions.
21960         Rename make_name to make_unique_name.
21961         (common_function_versions): Likewise.
21962         (make_unique_name): Likewise.
21963         (make_dispatcher_decl): Likewise.
21964         (is_function_default_version): Likewise.
21965         * attribs.c (attr_strcmp): Likewise.
21966         (sorted_attr_string): Likewise.
21967         (common_function_versions): Likewise.
21968         (make_unique_name): Likewise.
21969         (make_dispatcher_decl): Likewise.
21970         (is_function_default_version): Likewise.
21971         * config/i386/i386.c (attr_strcmp): Likewise.
21972         (sorted_attr_string): Likewise.
21973         (ix86_function_versions): Likewise.
21974         (make_name): Likewise.
21975         (make_dispatcher_decl): Likewise.
21976         (is_function_default_version): Likewise.
21977         (TARGET_OPTION_FUNCTION_VERSIONS): Update target function hook.
21979 2017-05-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21981         PR target/80695
21982         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
21983         Account for direct move costs for vec_construct of integer
21984         vectors.
21986 2017-05-11  Uros Bizjak  <ubizjak@gmail.com>
21988         PR target/80706
21989         * config/i386/sync.md (UNSPEC_LDX_ATOMIC): New unspec.
21990         (UNSPEC_STX_ATOMIC): Ditto.
21991         (loaddi_via_sse): New insn.
21992         (storedi_via_sse): Ditto.
21993         (atomic_loaddi_fpu): Emit loaddi_via_sse and storedi_via_sse.
21994         Update corresponding peephole2 patterns.
21995         (atomic_storedi_fpu): Ditto.
21997 2017-05-11  Julia Koval  <julia.koval@intel.com>
21999         * config/i386/avx512fintrin.h (_mm_mask_rsqrt14_sd)
22000         (_mm_maskz_rsqrt14_sd, _mm_mask_rsqrt14_ss, _mm_maskz_rsqrt14_ss):
22001         New intrinsics.
22002         * config/i386/i386-builtin.def (__builtin_ia32_rsqrt14sd_mask)
22003         (__builtin_ia32_rsqrt14ss_mask): New builtins.
22004         * config/i386/sse.md (rsqrt14_<mode>_mask): New pattern.
22006 2017-05-11  Nathan Sidwell  <nathan@acm.org>
22008         * graphite-poly.c: Include dumpfile.h.
22010         * dumpfle.h (dump_function): Declare here ...
22011         * tree-dump.h (dump_function): ... not here.
22012         * dumpfile.c: #include tree-cfg.h.
22013         (dump_function): Move here from ...
22014         * tree-dump.c (dump_function): ... here.
22015         * gimplify.c: #include splay-tree.h, not tree-dump.h.
22016         * graphite-poly.c: Don't include tree-dump.h.
22017         * cgraphclones.c: Include dumpfile.h not tree-dump.h.
22018         * print-tree.c: Likewise.
22019         * stor-layout.c: Likewise.
22020         * tree-nested.c: Likewise.
22022         * dumpfile.c (dump_start): Use TDF_FLAGS.
22023         (dump_enable_all): Fix TDF_KIND check thinko.
22025 2017-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22027         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
22028         array entries to represent two legal parameterizations of the
22029         overloaded __builtin_cmpb function, as represented by the
22030         P6_OV_BUILTIN_CMPB constant.
22031         (altivec_resolve_overloaded_builtin): Add special case handling
22032         for the __builtin_cmpb function, as represented by the
22033         P6_OV_BUILTIN_CMPB constant.
22034         * config/rs6000/rs6000-builtin.def (BU_P6_2): New macro.
22035         (BU_P6_64BIT_2): New macro.
22036         (BU_P6_OVERLOAD_2): New macro
22037         (CMPB_32): Add 32-bit compare-bytes support for 32-bit only targets.
22038         (CMPB): Add 64-bit compare-bytes support for 32-bit and 64-bit targets.
22039         (CMPB): Add overload support to represent both 32-bit and 64-bit
22040         compare-bytes function.
22041         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
22042         support for TARGET_CMPB.
22043         * config/rs6000/rs6000.h: Add support for RS6000_BTM_CMPB.
22044         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
22045         documentation of the __builtin_cmpb overloaded built-in function.
22047 2017-05-11  Richard Biener  <rguenther@suse.de>
22049         PR tree-optimization/80705
22050         * tree-vect-data-refs.c (vect_analyze_data_refs): DECL_NONALIASED
22051         bases are not vectorizable.
22053 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
22055         * tree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger
22056         when counting register pressure.
22058 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
22060         * tree-ssa-loop-ivopts.c (compare_cost_pair): New.
22061         (iv_ca_more_deps): Renamed to ...
22062         (iv_ca_compare_deps): ... this.
22063         (iv_ca_extend): Extend iv_ca if NEW_CP is cheaper than OLD_CP.
22065 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
22067         * tree-ssa-loop-ivopts.c (find_interesting_uses): Move inv vars dump
22068         to ...
22069         (determine_group_iv_costs): ... here.
22070         (find_inv_vars_cb): Record inv var if it's not recorded before.
22072 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
22074         * tree-ssa-loop-ivopts.c (allow_ip_end_pos_p): Refine comments.
22075         (get_shiftadd_cost): Ditto.
22077 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
22079         * tree-ssa-address.c: Include header file.
22080         (move_hint_to_base): Return TRUE if BASE_HINT is moved to memory
22081         address.
22082         (add_to_parts): Refactor.
22083         (addr_to_parts): New parameter.  Update use of move_hint_to_base.
22084         (create_mem_ref): Update use of addr_to_parts.  Re-associate addr
22085         in new order.
22087 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
22089         PR tree-optimization/53090
22090         * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New enum value
22091         COMP_IV_EXPR_2.
22092         (extract_cond_operands): Detect condition with IV on both sides
22093         and return COMP_IV_EXPR_2.
22094         (find_interesting_uses_cond): Add iv_use for both IVs in condition.
22095         (rewrite_use_compare): Simplify by removing call to function
22096         extract_cond_operands.
22098 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
22100         * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New.
22101         (extract_cond_operands): Detect condition comparing against non-
22102         invariant bound and return appropriate enum value.
22103         (find_interesting_uses_cond): Update use of extract_cond_operands.
22104         Handle its return value accordingly.
22105         (determine_group_iv_cost_cond, rewrite_use_compare): Ditto.
22107 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
22109         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Re-associate
22110         nonlinear iv_use computation in loop invariant sensitive way.
22112 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
22114         * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.
22115         (find_iv_candidates): Call relate_compare_use_with_all_cands.
22117 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
22119         * tree-ssa-loop-ivopts.c (struct iv_cand): New field inv_exprs.
22120         (dump_cand): Support iv_cand.inv_exprs.
22121         (add_candidate_1): Record invariant exprs in iv_cand.inv_exprs
22122         for candidates.
22123         (iv_ca_set_no_cp, iv_ca_set_cp, free_loop_data): Support
22124         iv_cand.inv_exprs.
22126 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
22128         * tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Move
22129         from ...
22130         * tree-ssa-address.c (multiplier_allowed_in_address_p): ... to here
22131         as local function.  Include necessary header files.
22132         * tree-ssa-loop-ivopts.h (multiplier_allowed_in_address_p): Delete.
22134 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
22136         * tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify.
22138 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
22140         * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Handle more
22141         operators: TRUNC_DIV_EXPR, BIT_AND_EXPR, BIT_IOR_EXPR, LSHIFT_EXPR,
22142         RSHIFT_EXPR and BIT_NOT_EXPR.
22144 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
22146         * tree-ssa-loop-ivopts.c (get_loop_invariant_expr): Simplify.
22147         (adjust_setup_cost): New parameter supporting round up adjustment.
22148         (struct address_cost_data): Delete.
22149         (force_expr_to_var_cost): Don't bound cost with spill_cost.
22150         (split_address_cost, ptr_difference_cost): Delete.
22151         (difference_cost, compare_aff_trees, record_inv_expr): Delete.
22152         (struct ainc_cost_data): New struct.
22153         (get_address_cost_ainc): New function.
22154         (get_address_cost, get_computation_cost): Reimplement.
22155         (determine_group_iv_cost_address): Record inv_expr for all uses of
22156         a group.
22157         (determine_group_iv_cost_cond): Call get_loop_invariant_expr.
22158         (iv_ca_has_deps): Reimplemented to ...
22159         (iv_ca_more_deps): ... this.  Check if NEW_CP introduces more deps
22160         than OLD_CP.
22161         (iv_ca_extend): Call iv_ca_more_deps.
22163 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
22165         * tree-ssa-address.c (struct mem_address): Move to header file.
22166         (valid_mem_ref_p, move_fixed_address_to_symbol): Make it global.
22167         * tree-ssa-address.h (struct mem_address): Move from C file.
22168         (valid_mem_ref_p, move_fixed_address_to_symbol): Declare.
22170 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
22172         * tree-affine.h (aff_combination_type): New interface.
22173         (aff_combination_zero_p): Remove static.
22174         (aff_combination_const_p): New interface.
22175         (aff_combination_singleton_var_p): New interfaces.
22177 2017-05-11  Richard Biener  <rguenther@suse.de>
22179         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
22180         Skip unreachable blocks and destinations.
22181         (eliminate): Move stmt removal and fixup ...
22182         (fini_eliminate): ... here.  Skip inserted exprs.
22183         (pass_pre::execute): Move fini_pre after fini_eliminate.
22184         * tree-ssa-tailmerge.c: Include tree-cfgcleanup.h.
22185         (tail_merge_optimize): Run cleanup_tree_cfg if requested by
22186         PRE to get rid of dead code that has invalid SSA form and
22187         split critical edges again.
22189 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
22191         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
22193 2017-05-11  Richard Biener  <rguenther@suse.de>
22195         * passes.c (execute_function_todo): Verify loops if they are
22196         said to be up-to-date.
22197         * cfgexpand.c (pass_expand::execute): Discard loops for -dx.
22198         * trans-mem.c (pass_tm_edges::execute): Mark loops for fixup.
22200 2017-05-10  John David Anglin  <danglin@gcc.gnu.org>
22202         PR target/80090
22203         * config/pa/pa.c (pa_assemble_integer): When outputting a SYMBOL_REF,
22204         handle calling assemble_external ourself.
22206         PR target/79027
22207         * config/pa/pa.c (pa_cannot_change_mode_class): Reject changes to/from
22208         modes with zero size.  Enhance comment.
22210 2017-05-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22212         * config/rs6000/rs6000.c (altivec_init_builtins): Define POWER8
22213         built-ins for vec_xl and vec_xst with short and char pointer
22214         arguments.
22216 2017-05-10  Sebastian Peryt  <sebastian.peryt@intel.com>
22218         * config/i386/avx512fintrin.h (_mm_mask_max_round_sd)
22219         (_mm_maskz_max_round_sd, _mm_mask_max_round_ss)
22220         (_mm_maskz_max_round_ss, _mm_mask_min_round_sd)
22221         (_mm_maskz_min_round_sd, _mm_mask_min_round_ss)
22222         (_mm_maskz_min_round_ss): New intrinsics.
22223         * config/i386/i386-builtin-types.def (V2DF, V2DF, V2DF, V2DF, UQI, INT)
22224         (V4SF, V4SF, V4SF, V4SF, UQI, INT): New function type aliases.
22225         * config/i386/i386-builtin.def (__builtin_ia32_maxsd_mask_round)
22226         (__builtin_ia32_maxss_mask_round, __builtin_ia32_minsd_mask_round)
22227         (__builtin_ia32_minss_mask_round): New builtins.
22228         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
22229         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
22230         * config/i386/sse.md (<sse>_vm<code><mode>3<round_saeonly_name>):
22231         Rename to ...
22232         (<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): ... this.
22233         (v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|%0, %1, %<iptr>2<round_saeonly_op3>}):
22234         Change to ...
22235         (v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}):
22236         ... this.
22238 2017-05-10  Sebastian Peryt  <sebastian.peryt@intel.com>
22240         * config/i386/avx512fintrin.h (_mm_mask_mul_round_sd)
22241         (_mm_maskz_mul_round_sd, _mm_mask_mul_round_ss)
22242         (_mm_maskz_mul_round_ss, _mm_mask_div_round_sd)
22243         (_mm_maskz_div_round_sd, _mm_mask_div_round_ss)
22244         (_mm_maskz_div_round_ss, _mm_mask_mul_sd, _mm_maskz_mul_sd)
22245         (_mm_mask_mul_ss, _mm_maskz_mul_ss, _mm_mask_div_sd)
22246         (_mm_maskz_div_sd, _mm_mask_div_ss, _mm_maskz_div_ss): New intrinsics.
22247         * config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
22248         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
22249         * config/i386/i386-builtin.def (__builtin_ia32_divsd_mask_round)
22250         (__builtin_ia32_divss_mask_round, __builtin_ia32_mulsd_mask_round)
22251         (__builtin_ia32_mulss_mask_round): New builtins.
22252         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
22253         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
22254         * config/i386/sse.md (<sse>_vm<multdiv_mnemonic><mode>3<round_name>):
22255         Rename to ...
22256         (<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): ... this.
22257         (v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
22258         Change to ...
22259         (v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
22260         ... this.
22262 2017-05-10  Julia Koval  <julia.koval@intel.com>
22264         * config/i386/avxintrin.h (_mm256_set_m128, _mm256_set_m128d)
22265         (_mm256_set_m128i, _mm256_setr_m128, _mm256_setr_m128d)
22266         (_mm256_setr_m128i): New intrinsics.
22268 2017-05-10  Julia Koval  <julia.koval@intel.com>
22270         * config/i386/avx512fintrin.h (_mm_mask_rcp14_sd)
22271         (_mm_maskz_rcp14_sd, _mm_mask_rcp14_ss)
22272         (_mm_maskz_rcp14_ss): New intrinsics.
22273         * config/i386/i386-builtin.def (__builtin_ia32_rcp14sd_mask)
22274         (__builtin_ia32_rcp14ss_mask): New builtins.
22275         * config/i386/sse.md (srcp14<mode>_mask): New pattern.
22277 2017-05-10  Peter Bergner  <bergner@vnet.ibm.com>
22279         PR tree-optimization/51513
22280         * tree-cfg.c (gimple_seq_unreachable_p): New function.
22281         (assert_unreachable_fallthru_edge_p): Use it.
22282         (group_case_labels_stmt): Likewise.
22283         * tree-cfg.h: Prototype it.
22284         * stmt.c: Include cfghooks.h and tree-cfg.h.
22285         (emit_case_dispatch_table) <gap_label>: New local variable.
22286         Use it to fill dispatch table gaps.
22287         Test for default_label before updating probabilities.
22288         (expand_case) <default_label>: Remove unneeded initialization.
22289         Test for unreachable default case statement and remove its edge.
22290         Set default_label accordingly.
22291         * tree-ssa-ccp.c (optimize_unreachable): Update comment.
22293 2017-05-10  Carl Love  <cel@us.ibm.com>
22295         * config/rs6000/rs6000-c: Add support for built-in functions
22296         vector signed char      vec_neg (vector signed char)
22297         vector signed short int vec_neg (vector short int)
22298         vector signed int       vec_neg (vector signed int)
22299         vector signed long long vec_neg (vector signed long long)
22300         vector float            vec_neg (vector float)
22301         vector double           vec_neg (vector double)
22302         * config/rs6000/rs6000-builtin.def: Add definitions for NEG function
22303         overload.
22304         * config/rs6000/altivec.h: Add define for vec_neg
22305         * doc/extend.texi: Update the built-in documentation for the
22306         new built-in functions.
22308 2017-05-10  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22310         PR tree-optimization/77644
22311         * match.pd (sqrt(x) cmp sqrt(y) -> x cmp y): New pattern.
22313 2017-05-10  Nathan Sidwell  <nathan@acm.org>
22315         * dumpfile.h (TDI_lang_all): New.
22316         (TDF_KIND): New. Renumber others
22317         (TDF_LANG, TDF_TREE, TDF_RTL, TDF_IPA): Enumerate value, rather
22318         than bits.
22319         * dumpfile.c (dump_files): Mark language dumps as TDF_LANG.  add
22320         lang-all.
22321         (get_dump_file_name): Adjust suffix generation.
22322         (dump_enable_all): Use TDF_KIND.
22323         * doc/invoke.texi (-fdump-lang-all): Document.
22325         * dumpfile.h: Tabify.
22327 2017-05-10  Wilco Dijkstra  <wdijkstr@arm.com>
22329         PR target/80671
22330         * config/aarch64/cortex-a57-fma-steering.c (merge_forest):
22331         Move member access before delete.
22333 2017-05-10  Alexandre Oliva <aoliva@redhat.com>
22335         * tree-inline.c (expand_call_inline): Split block at stmt
22336         before the call.
22338 2017-05-09  Michael Meissner  <meissner@linux.vnet.ibm.com>
22340         PR target/68163
22341         * config/rs6000/rs6000.md (f32_lr): Delete mode attributes that
22342         are now unused after splitting mov{sf,sd}_hardfloat.
22343         (f32_lr2): Likewise.
22344         (f32_lm): Likewise.
22345         (f32_lm2): Likewise.
22346         (f32_li): Likewise.
22347         (f32_li2): Likewise.
22348         (f32_lv): Likewise.
22349         (f32_sr): Likewise.
22350         (f32_sr2): Likewise.
22351         (f32_sm): Likewise.
22352         (f32_sm2): Likewise.
22353         (f32_si): Likewise.
22354         (f32_si2): Likewise.
22355         (f32_sv): Likewise.
22356         (f32_dm): Likewise.
22357         (f32_vsx): Likewise.
22358         (f32_av): Likewise.
22359         (mov<mode>_hardfloat): Split into separate movsf and movsd pieces.
22360         For movsf, order stores so the VSX stores occur before the GPR
22361         store which encourages the register allocator to use a traditional
22362         FPR instead of a GPR.  For movsd, order the stores so that the GPR
22363         store comes before the VSX stores to allow the power6 to work.
22364         This is due to the power6 not having a 32-bit integer store
22365         instruction from a FPR.
22366         (movsf_hardfloat): Likewise.
22367         (movsd_hardfloat): Likewise.
22369 2017-05-09  Martin Sebor  <msebor@redhat.com>
22371         PR translation/80280
22372         * config/sol2-c.c (cmn_err_flag_specs): Initialize new data member
22373         added in r247778.
22375         PR translation/80280
22376         * config/i386/msformat-c.c (ms_printf_flag_specs): Initialize new
22377         data member added in r247778.
22378         (ms_scanf_flag_specs, ms_strftime_flag_specs): Same.
22380 2017-05-09  Nathan Sidwell  <nathan@acm.org>
22382         * tree.h (tree_fits_shwi_p, tree_fits_uhwi_p): Unconditionally pure.
22384         * ipa-devirt.c (default_hash_traits<type_pair>): Skip struct-scope
22385         typedefs.
22387 2017-05-09  Marek Polacek  <polacek@redhat.com>
22389         * doc/invoke.texi: Fix typo.
22391 2017-05-09  Richard Biener  <rguenther@suse.de>
22393         * tree-vrp.c (vrp_val_is_max): Adjust comment.
22394         (vrp_val_is_min): Likewise.
22395         (set_value_range_to_value): Likewise.
22396         (set_value_range_to_nonnegative): Likewise.
22397         (gimple_assign_nonzero_p): Likewise.
22398         (gimple_stmt_nonzero_p): Likewise.
22399         (vrp_int_const_binop): Likewise.  Remove unreachable case.
22400         (adjust_range_with_scev): Adjust comments.
22401         (compare_range_with_value): Likewise.
22402         (extract_range_from_phi_node): Likewise.
22403         (test_for_singularity): Likewise.
22405 2017-05-09  Richard Biener  <rguenther@suse.de>
22407         * tree-vrp.c (get_single_symbol): Add assert that we don't
22408         get overflowed constants as invariant part.
22409         (compare_values_warnv): Add comment before the TREE_NO_WARNING
22410         checks.  Use wi::cmp instead of recursing for integer constants.
22411         (compare_values): Just ignore whether we assumed undefined
22412         overflow instead of failing the compare.
22413         (extract_range_for_var_from_comparison_expr): Add comment before the
22414         TREE_NO_WARNING sets.
22415         (test_for_singularity): Likewise.
22416         (extract_range_from_comparison): Do not disable optimization
22417         when we assumed undefined overflow.
22418         (extract_range_basic): Remove init of unused var.
22420 2017-05-09  Richard Biener  <rguenther@suse.de>
22422         * tree-vrp.c (vrp_int_const_binop): Use wide-ints and simplify.
22423         (extract_range_from_multiplicative_op_1): Adjust.
22424         (extract_range_from_binary_expr_1): Use int_const_binop.
22426 2017-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22428         PR target/80101
22429         * config/rs6000/power6.md: Replace store_data_bypass_p calls with
22430         rs6000_store_data_bypass_p in seven define_bypass directives and
22431         in several comments.
22432         * config/rs6000/rs6000-protos.h: Add prototype for
22433         rs6000_store_data_bypass_p function.
22434         * config/rs6000/rs6000.c (rs6000_store_data_bypass_p): New
22435         function implements slightly different (rs6000-specific) semantics
22436         than store_data_bypass_p, returning false rather than aborting
22437         with assertion error when arguments do not satisfy the
22438         requirements of store data bypass.
22439         (rs6000_adjust_cost): Replace six calls of store_data_bypass_p with
22440         rs6000_store_data_bypass_p.
22442 2017-05-08  Max Filippov  <jcmvbkbc@gmail.com>
22444         * config/xtensa/xtensa-protos.h
22445         (xtensa_initial_elimination_offset): New declaration.
22446         * config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
22447         New function. Move its body from the INITIAL_ELIMINATION_OFFSET
22448         macro definition, add case for FRAME_POINTER_REGNUM when
22449         FRAME_GROWS_DOWNWARD.
22450         * config/xtensa/xtensa.h (FRAME_GROWS_DOWNWARD): New macro definition.
22451         (INITIAL_ELIMINATION_OFFSET): Replace body with call to
22452         xtensa_initial_elimination_offset.
22454 2017-05-08  Nathan Sidwell  <nathan@acm.org>
22456         * doc/invoke.texi: Alphabetize -fdump options.
22458 2017-05-08  Martin Sebor  <msebor@redhat.com>
22460         PR translation/80280
22461         * config/sol2-c.c (solaris_pragma_align): Correct quoting.
22463 2017-05-08  Bernd Edlinger  <bernd.edlinger@hotmail.de>
22465         * target.def (compute_frame_layout): New optional target hook.
22466         * doc/tm.texi.in (TARGET_COMPUTE_FRAME_LAYOUT): Add hook.
22467         * doc/tm.texi (TARGET_COMPUTE_FRAME_LAYOUT): Add documentation.
22468         * lra-eliminations.c (update_reg_eliminate): Call compute_frame_layout
22469         target hook.
22470         * reload1.c (verify_initial_elim_offsets): Likewise.
22471         * config/arm/arm.c (TARGET_COMPUTE_FRAME_LAYOUT): Define.
22472         (use_simple_return_p): Call arm_compute_frame_layout if needed.
22473         (arm_get_frame_offsets): Split up into this ...
22474         (arm_compute_frame_layout): ... and this function.
22476 2017-05-08  Richard Sandiford  <richard.sandiford@arm.com>
22478         * config/aarch64/constraints.md (Usa): New constraint.
22479         * config/aarch64/aarch64.md (*movsi_aarch64, *movdi_aarch64): Use it.
22481 2017-05-08  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22483         * config.gcc (arm*-*-*): Set TM_MULTILIB_CONFIG from
22484         with_multilib_list after it has been checked.
22486 2017-05-08  Richard Biener  <rguenther@suse.de>
22488         * tree-ssa-pre.c (bitmap_set_and): Avoid bitmap copy.
22489         (bitmap_set_subtract_values): Likewise.
22491 2017-05-08  Richard Biener  <rguenther@suse.de>
22493         * tree-vrp.c (gimple_assign_nonzero_warnv_p): Rename to ...
22494         (gimple_assign_nonzero): ... this and remove strict_overflow_p
22495         argument.
22496         (gimple_stmt_nonzero_warnv_p): Rename to ...
22497         (gimple_stmt_nonzero_p): ... this and remove strict_overflow_p
22498         argument.
22499         (vrp_stmt_computes_nonzero): Remove strict_overflow_p argument.
22500         (extract_range_basic): Adjust, do not disable propagation on
22501         strict overflow sensitive simplification.
22502         (vrp_visit_cond_stmt): Likewise.
22504 2017-05-05  Jan Hubicka  <hubicka@ucw.cz>
22506         * ipa-inline-analysis.c (estimate_function_body_sizes): Recompute
22507         body size unconditionally.
22509 2017-05-07  Jeff Law  <law@redhat.com>
22511         Revert:
22512         2017-05-06  Jeff Law  <law@redhat.com>
22513         PR tree-optimization/78496
22514         * tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
22515         code.
22517         PR tree-optimization/78496
22518         * tree-vrp.c (simplify_assert_expr_using_ranges): New function.
22519         (simplify_stmt_using_ranges): Call it.
22520         (vrp_dom_walker::before_dom_children): Extract equivalences
22521         from an ASSERT_EXPR with an equality comparison against a
22522         constant.
22524 2017-05-06  Jeff Law  <law@redhat.com>
22526         PR tree-optimization/78496
22527         * tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
22528         code.
22530         PR tree-optimization/78496
22531         * tree-vrp.c (simplify_assert_expr_using_ranges): New function.
22532         (simplify_stmt_using_ranges): Call it.
22533         (vrp_dom_walker::before_dom_children): Extract equivalences
22534         from an ASSERT_EXPR with an equality comparison against a
22535         constant.
22537 2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
22539         * lra-constraints.c (lra_copy_reg_equiv): New function.
22540         (split_reg): Use it to copy equivalence information from the
22541         original register to the spill register.
22543 2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
22545         PR rtl-optimization/75964
22546         * simplify-rtx.c (simplify_const_relational_operation): Remove
22547         invalid handling of comparisons of integer ABS.
22549 2017-05-06  Uros Bizjak  <ubizjak@gmail.com>
22551         * config/i386/i386.c (ext_80387_constant_init): Do not explicitly
22552         initialize to zero.
22553         (init_regs): Remove declaration.
22554         (function_arg_advance_32): Initialize error_p as boolean variable.
22556 2017-05-05  Nathan Sidwell  <nathan@acm.org>
22558         * store-motion.c (remove_reachable_equiv_notes): Reformat long
22559         lines.  Use for (;;).
22561 2017-05-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22563         * config/rs6000/rs6000.c (rs6000_vect_nonmem): New static var.
22564         (rs6000_init_cost): Initialize rs6000_vect_nonmem.
22565         (rs6000_add_stmt_cost): Update rs6000_vect_nonmem.
22566         (rs6000_finish_cost): Avoid vectorizing simple copy loops with
22567         VF=2 that require versioning.
22569 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
22571         * diagnostic.h (CARET_LINE_MARGIN): Convert from macro to const
22572         int.
22574 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
22576         * diagnostic.h (diagnostic_override_option_index): Convert from
22577         macro to inline function.
22579 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
22581         * diagnostic.c (last_module_changed_p): New function.
22582         (set_last_module): New function.
22583         (diagnostic_report_current_module): Convert macro usage to
22584         the above functions.
22585         * diagnostic.h (diagnostic_context::last_module): Strengthen
22586         from const line_map * to const line_map_ordinary *.
22587         (diagnostic_last_module_changed): Delete macro.
22588         (diagnostic_set_last_module): Delete macro.
22590 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
22592         * diagnostic.c (diagnostic_impl): Replace report_diagnostic
22593         with diagnostic_report_diagnostic.
22594         (diagnostic_n_impl_richloc): Likewise.
22595         * diagnostic.h (report_diagnostic): Delete macro.
22596         * rtl-error.c (diagnostic_for_asm): Replace report_diagnostic
22597         with diagnostic_report_diagnostic.
22598         * substring-locations.c (format_warning_va): Likewise.
22600 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
22602         * diagnostic.c (diagnostic_report_diagnostic): Eliminate
22603         save/restor of format_spec.  Move option-printing code to...
22604         (print_option_information): ...this new function, and
22605         reimplement by simply printing to the pretty_printer,
22606         rather than appending to the format string.
22608 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
22610         * diagnostic.c (diagnostic_report_diagnostic): Split out pragma
22611         handling logic into...
22612         (update_effective_level_from_pragmas): ...this new function.
22614 2017-05-04  Andrew Waterman  <andrew@sifive.com>
22616         * config/riscv/riscv.opt (mstrict-align): New option.
22617         * config/riscv/riscv.h (STRICT_ALIGNMENT): Use it.  Update comment.
22618         (SLOW_UNALIGNED_ACCESS): Define.
22619         (riscv_slow_unaligned_access): Declare.
22620         * config/riscv/riscv.c (riscv_tune_info): Add slow_unaligned_access
22621         field.
22622         (riscv_slow_unaligned_access): New variable.
22623         (rocket_tune_info): Set slow_unaligned_access to true.
22624         (optimize_size_tune_info): Set slow_unaligned_access to false.
22625         (riscv_cpu_info_table): Add entry for optimize_size_tune_info.
22626         (riscv_valid_lo_sum_p): Use TARGET_STRICT_ALIGN.
22627         (riscv_option_override): Set riscv_slow_unaligned_access.
22628         * doc/invoke.texi: Add -mstrict-align to RISC-V.
22630 2017-05-04  Kito Cheng  <kito.cheng@gmail.com>
22632         * config/riscv/riscv.md: Unify indentation.
22634 2017-05-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
22636         PR target/79038
22637         PR target/79202
22638         PR target/79203
22639         * config/rs6000/rs6000.md (u code attribute): Add FIX and
22640         UNSIGNED_FIX.
22641         (extendsi<mode>2): Add support for doing sign extension via
22642         VUPKHSW and XXPERMDI if the value is in Altivec registers and we
22643         don't have ISA 3.0 instructions.
22644         (extendsi<mode>2 splitter): Likewise.
22645         (fix_trunc<mode>si2): If we are at ISA 2.07 (VSX small integer),
22646         generate the normal insns since SImode can now go in vector
22647         registers.  Disallow the special UNSPECs needed for previous
22648         machines to hide SImode being used.  Add new insns
22649         fctiw{,w}_<mode>_smallint if SImode can go in vector registers.
22650         (fix_trunc<mode>si2_stfiwx): Likewise.
22651         (fix_trunc<mode>si2_internal): Likewise.
22652         (fixuns_trunc<mode>si2): Likewise.
22653         (fixuns_trunc<mode>si2_stfiwx): Likewise.
22654         (fctiw<u>z_<mode>_smallint): Likewise.
22655         (fctiw<u>z_<mode>_mem): New combiner pattern to prevent conversion
22656         of floating point to 32-bit integer from doing a direct move to
22657         the GPR registers to do a store.
22658         (fctiwz_<mode>): Break long line.
22660 2017-05-05  Bin Cheng  <bin.cheng@arm.com>
22662         * Makefile.in (GTFILES): Add tree-ssa-loop-ivopts.c.
22663         * tree-ssa-loop-ivopts.c (compute_max_addr_offset): Delete.
22664         (addr_list, addr_offset_valid_p): New.
22665         (split_address_groups): Check offset validity with above function.
22666         (gt-tree-ssa-loop-ivopts.h): Include header file.
22668 2017-05-05  Nathan Sidwell  <nathan@acm.org>
22670         * config.gcc (arm*-*-*): Add missing 'fi'.
22672 2017-05-05  Steve Ellcey  <sellcey@cavium.com>
22674         * doc/invoke.texi (-fopt-info): Explicitly say order of options
22675         included in -fopt-info does not matter.
22676         * doc/optinfo.texi (-fopt-info): Fix description of default
22677         behavour. Explicitly say order of options included in -fopt-info
22678         does not matter.
22680 2017-05-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22682         * config.gcc: Allow combinations of aprofile and rmprofile values for
22683         --with-multilib-list.
22684         * config/arm/t-multilib: New file.
22685         * config/arm/t-aprofile: Remove initialization of MULTILIB_*
22686         variables.  Remove setting of ISA and floating-point ABI in
22687         MULTILIB_OPTIONS and MULTILIB_DIRNAMES.  Set architecture and FPU in
22688         MULTI_ARCH_OPTS_A and MULTI_ARCH_DIRS_A rather than MULTILIB_OPTIONS
22689         and MULTILIB_DIRNAMES respectively.  Add comment to introduce all
22690         matches.  Add architecture matches for marvel-pj4 and generic-armv7-a
22691         CPU options.
22692         * config/arm/t-rmprofile: Likewise except for the matches changes.
22693         * doc/install.texi (--with-multilib-list): Document the combination of
22694         aprofile and rmprofile values and warn about pitfalls in doing that.
22696 2017-05-05  Wilco Dijkstra  <wdijkstr@arm.com>
22698         * config/aarch64/aarch64.md (movsi_aarch64): Remove '*' from r=w.
22699         (movdi_aarch64): Likewise.
22701 2017-05-05  Jakub Jelinek  <jakub@redhat.com>
22703         PR tree-optimization/80632
22704         * tree-switch-conversion.c (struct switch_conv_info): Add target_vop
22705         field.
22706         (build_arrays): Initialize it for virtual phis.
22707         (fix_phi_nodes): Use it for virtual phis.
22709         PR tree-optimization/80558
22710         * tree-vrp.c (extract_range_from_binary_expr_1): Optimize
22711         [x, y] op z into [x op, y op z] for op & or | if conditions
22712         are met.
22714 2017-05-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
22715             Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
22717         PR target/71607
22718         * config/arm/arm.md (use_literal_pool): Remove.
22719         (64-bit immediate split): No longer takes cost into consideration
22720         if arm_disable_literal_pool is enabled.
22721         * config/arm/arm.c (arm_tls_referenced_p): Add diagnostic if TLS is
22722         used when arm_disable_literal_pool is enabled.
22723         (arm_max_const_double_inline_cost): Remove use of
22724         arm_disable_literal_pool.
22725         (push_minipool_fix): Add assert.
22726         (arm_reorg): Add return if arm_disable_literal_pool is enabled.
22727         * config/arm/vfp.md (no_literal_pool_df_immediate): New.
22728         (no_literal_pool_sf_immediate): New.
22730 2017-05-05  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22732         PR tree-optimization/80613
22733         * tree-ssa-dce.c (propagate_necessity): Remove cases for
22734         BUILT_IN_STRDUP and BUILT_IN_STRNDUP.
22736 2017-05-05  Richard Biener  <rguenther@suse.de>
22738         * tree-ssa-pre.c (get_or_alloc_expr_for): Simplify.
22740 2017-05-05  Georg-Johann Lay  <avr@gjlay.de>
22742         * config/avr/avr.md [flag_strict_overflow]: Remove any occurence
22743         of this flag from insn conditions due to removal from r247495.
22745 2017-05-05  Wilco Dijkstra  <wdijkstr@arm.com>
22747         * config/arm/aarch-common.c (arm_early_load_addr_dep_ptr):
22748         New function.
22749         (arm_early_store_addr_dep_ptr): Likewise.
22750         * config/arm/aarch-common-protos.h
22751         (arm_early_load_addr_dep_ptr): Add prototype.
22752         (arm_early_store_addr_dep_ptr): Likewise.
22753         * config/arm/cortex-a53.md: Add new bypasses.
22755 2017-05-05  Jakub Jelinek  <jakub@redhat.com>
22757         * tree.c (next_type_uid): Change type to unsigned.
22758         (type_hash_canon): Decrement back next_type_uid if
22759         freeing a type node with the highest TYPE_UID.  For INTEGER_TYPEs
22760         also ggc_free TYPE_MIN_VALUE, TYPE_MAX_VALUE and TYPE_CACHED_VALUES
22761         if possible.
22763 2017-05-04  Martin Sebor  <msebor@redhat.com>
22765         * builtins.c: Fix a trivial typo in a comment.
22767         PR middle-end/79234
22768         * builtins.c (check_sizes): Adjust to handle reading past the end.
22769         Avoid printing excessive upper bound of ranges.  Use %E to print
22770         tree nodes instead of converting them to %wu.
22771         (expand_builtin_memchr): New function.
22772         (compute_dest_size): Rename...
22773         (compute_objsize): ...to this.
22774         (expand_builtin_memcpy): Adjust.
22775         (expand_builtin_mempcpy): Adjust.
22776         (expand_builtin_strcat): Adjust.
22777         (expand_builtin_strcpy): Adjust.
22778         (check_strncat_sizes): Adjust.
22779         (expand_builtin_strncat): Adjust.
22780         (expand_builtin_strncpy): Adjust and simplify.
22781         (expand_builtin_memset): Adjust.
22782         (expand_builtin_bzero): Adjust.
22783         (expand_builtin_memcmp): Adjust.
22784         (expand_builtin): Handle memcmp.
22785         (maybe_emit_chk_warning): Check strncat just once.
22787 2017-05-04  Martin Sebor  <msebor@redhat.com>
22789         PR preprocessor/79214
22790         PR middle-end/79222
22791         PR middle-end/79223
22792         * builtins.c (check_sizes): Add inlining context and issue
22793         warnings even when -Wno-system-headers is set.
22794         (check_strncat_sizes): Same.
22795         (expand_builtin_strncat): Same.
22796         (expand_builtin_memmove): New function.
22797         (expand_builtin_stpncpy): Same.
22798         (expand_builtin): Handle memmove and stpncpy.
22800 2017-05-04  Bin Cheng  <bin.cheng@arm.com>
22802         * tree-ssa-loop-ivopts.c (struct cost_pair): Remove field inv_expr
22803         which is not used any more.
22805 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
22807         * config/aarch64/aarch64.c (generic_tunings): Update prefetch model.
22809 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
22811         * config/aarch64/aarch64.c (cortexa35_tunings): Set jump alignment to 4.
22812         (cortexa53_tunings): Likewise.
22813         (cortexa57_tunings): Likewise.
22814         (cortexa72_tunings): Likewise.
22815         (cortexa73_tunings): Likewise.
22817 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
22819         * config/aarch64/aarch64.c (generic_tunings): Set jump alignment to 4.
22820         Set loop alignment to 8.
22822 2017-05-04  Martin Sebor  <msebor@redhat.com>
22824         PR translation/80280
22825         * builtins.c (expand_builtin_object_size): Add missing quoting to
22826         %D and like directives.
22827         * hsa-gen.c (hsa_type_for_scalar_tree_type): Same.
22828         (hsa_type_for_tree_type): Same.
22829         (verify_function_arguments): Same.
22830         * symtab.c (symbol_table::change_decl_assembler_name): Same.
22831         * varasm.c (get_section): Same.
22832         (mark_weak): Same.
22834 2017-05-04  Martin Sebor  <msebor@redhat.com>
22836         PR translation/80280
22837         * config/i386/i386.c (ix86_function_versions): Quote a %D directive.
22839 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
22841         * config/aarch64/aarch64.c (generic_addrcost_table):
22842         Change HI/TI mode setting.
22844 2017-05-04  Martin Jambor  <mjambor@suse.cz>
22846         PR tree-optimization/80622
22847         * tree-sra.c (comes_initialized_p): New function.
22848         (build_accesses_from_assign): Only set write lazily when
22849         comes_initialized_p is false.
22850         (analyze_access_subtree): Use comes_initialized_p.
22851         (propagate_subaccesses_across_link): Assert !comes_initialized_p
22852         instead of testing for PARM_DECL.
22854 2017-05-04  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22856         * config/aarch64/aarch64.md (prefetch); Adjust predicate and
22857         constraint on operand 0 to allow more general addressing modes.
22858         Adjust output template.
22859         * config/aarch64/aarch64.c (aarch64_address_valid_for_prefetch_p):
22860         New function.
22861         * config/aarch64/aarch64-protos.h
22862         (aarch64_address_valid_for_prefetch_p): Declare prototype.
22863         * config/aarch64/constraints.md (Dp): New address constraint.
22864         * config/aarch64/predicates.md (aarch64_prefetch_operand): New
22865         predicate.
22867 2017-05-04  Jan Hubicka  <hubicka@ucw.cz>
22869         * ipa-cp.c (perform_estimation_of_a_value): Drop base_time parameter;
22870         update use of estimate_ipcp_clone_size_and_time.
22871         (estimate_local_effects): Update use of
22872         estimate_ipcp_clone_size_and_time and perform_estimation_of_a_value.
22873         * ipa-inline.h (estimate_ipcp_clone_size_and_time): Update prototype.
22874         * ipa-inline-analysis.c (estimate_ipcp_clone_size_and_time):
22875         Return nonspecialized time.
22877 2017-05-04  Richard Biener  <rguenther@suse.de>
22879         * tree-ssa-alias.c (get_continuation_for_phi): Improve looking
22880         for the last VUSE which def dominates the PHI.  Directly call
22881         maybe_skip_until.
22882         (get_continuation_for_phi_1): Remove.
22884 2017-05-04  Richard Sandiford  <richard.sandiford@linaro.org>
22886         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): Add commentary
22887         to explain the use of truncating division.  Cap the number of
22888         iterations to the maximum given by nb_iterations_upper_bound,
22889         if defined.
22891 2017-05-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22893         * configure.ac (--enable-mingw-wildcard): Add new configurable feature.
22894         * configure: Regenerate.
22895         * config.in: Regenerate.
22896         * config/i386/driver-mingw32.c: new file.
22897         * config/i386/x-mingw32: Add rule to build driver-mingw32.o.
22898         * config.host: Link driver-mingw32.o on MinGW host.
22899         * doc/install.texi: Document new --enable-mingw-wildcard configure
22900         option.
22902 2017-05-04  Marek Polacek  <polacek@redhat.com>
22904         PR tree-optimization/80612
22905         * calls.c (get_size_range): Check for INTEGRAL_TYPE_P.
22907 2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
22908             Andre Simoes Dias Vieira  <andre.simoesdiasvieira@arm.com>
22910         * config/arm/arm.md (movsi): Change TARGET_32BIT to TARGET_HAVE_MOVT.
22911         (movt splitter): Likewise.
22912         * config/arm/arm.c (arm_option_check_internal): Change arm_arch_thumb2
22913         to TARGET_HAVE_MOVT, and merge with -mslow-flash-data check.
22914         (const_ok_for_arm): Change else to else if (TARGET_THUMB2) and add else
22915         block for Thumb-1 with MOVT.
22916         (thumb2_legitimate_address_p): Move code block ...
22917         (can_avoid_literal_pool_for_label_p): ... into this new function.
22918         (thumb1_legitimate_address_p): Add check for TARGET_HAVE_MOVT and
22919         literal pool.
22920         (thumb_legitimate_constant_p): Add conditional on TARGET_HAVE_MOVT
22921         * doc/invoke.texi (-mpure-code): Change "ARMv7-M targets" for
22922         "M-profile targets with the MOVT instruction".
22924 2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
22926         * config/arm/arm-builtins.c (arm_init_builtins): Rename
22927         __builtin_arm_ldfscr to __builtin_arm_get_fpscr, and rename
22928         __builtin_arm_stfscr to __builtin_arm_set_fpscr.
22930 2017-05-04  Martin Liska  <mliska@suse.cz>
22932         * tree-vrp.c (simplify_cond_using_ranges_2): Remove unused
22933         variable cond_code.
22935 2017-05-04  Richard Biener  <rguenther@suse.de>
22937         * tree.c (array_at_struct_end_p): Handle arrays at struct
22938         end with flexarrays more conservatively.  Refactor and treat
22939         arrays of arrays or aggregates more strict.  Fix
22940         VIEW_CONVERT_EXPR handling.  Remove allow_compref argument.
22941         * tree.c (array_at_struct_end_p): Adjust prototype.
22942         * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust.
22943         * gimple-fold.c (get_range_strlen): Likewise.
22944         * tree-chkp.c (chkp_may_narrow_to_field): Likewise.
22946 2017-05-04  Richard Biener  <rguenther@suse.de>
22948         PR tree-optimization/31130
22949         * tree-vrp.c (needs_overflow_infinity): Remove as always returning
22950         false.
22951         (supports_overflow_infinity): Likewise.
22952         (is_negative_overflow_infinity): Likewise.
22953         (is_positive_overflow_infinity): Likewise.
22954         (is_overflow_infinity): Likewise.
22955         (stmt_overflow_infinity): Likewise.
22956         (overflow_infinity_range_p): Likewise.
22957         (usable_range_p): Remove as always returning true.
22958         (make_overflow_infinity): Remove.
22959         (negative_overflow_infinity): Likewise.
22960         (positive_overflow_infinity): Likewise.
22961         (avoid_overflow_infinity): Likewise.
22962         (set_value_range): Adjust accordingly.
22963         (set_value_range_to_nonnegative): Likewise, remove now unused
22964         overflow_infinity arg.
22965         (vrp_operand_equal_p): Adjust.
22966         (update_value_range): Likewise.
22967         (range_int_cst_singleton_p): Likewise.
22968         (operand_less_p): Likewise.
22969         (compare_values_warnv): Likewise.
22970         (extract_range_for_var_from_comparison_expr): Likewise.
22971         (vrp_int_const_binop): Likewise.
22972         (zero_nonzero_bits_from_vr): Likewise.
22973         (extract_range_from_multiplicative_op_1): Likewise.
22974         (extract_range_from_binary_expr_1): Likewise.
22975         (extract_range_from_unary_expr): Likewise.
22976         (extract_range_from_comparison): Likewise.
22977         (extract_range_basic): Likewise.
22978         (adjust_range_with_scev): Likewise.
22979         (compare_ranges): Likewise.
22980         (compare_range_with_value): Likewise.
22981         (dump_value_range): Likewise.
22982         (test_for_singularity): Likewise, remove strict_overflow_p parameter
22983         never used.
22984         (simplify_cond_using_ranges): Adjust.
22986 2017-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
22988         * brig-builtins.def: Added a builtin for class_f64.
22989         * builtin-types.def: Added a builtin type needed by class_f64.
22991 2017-05-03  Jason Merrill  <jason@redhat.com>
22993         * timevar.def: Add TV_CONSTEXPR.
22995 2017-05-03  David Malcolm  <dmalcolm@redhat.com>
22997         * common.opt (fdiagnostics-parseable-fixits): Fix typo.
22999 2017-05-03  Martin Jambor  <mjambor@suse.cz>
23001         * ipa-prop.c (ipa_update_after_lto_read): Removed.
23002         * ipa-prop.h (ipa_update_after_lto_read): Remove declaration.
23003         * ipa-cp.c (ipcp_propagate_stage): Do not call
23004         ipa_update_after_lto_read.
23005         * ipa-inline.c (ipa_inline): Likewise.
23007 2017-05-03  Martin Jambor  <mjambor@suse.cz>
23009         * ipa-prop.h (ipa_edge_args): Make a class.  Mark with for_user GTY
23010         tag.  Added a default constructor and a destructor.
23011         (ipa_edge_args_sum_t): New class;
23012         (ipa_edge_args_sum): Declare.
23013         (ipa_edge_args_vector): Remove declaration.
23014         (IPA_EDGE_REF): Use ipa_edge_args_sum.
23015         (ipa_free_edge_args_substructures): Remove declaration.
23016         (ipa_check_create_edge_args): Use ipa_edge_args_sum.
23017         (ipa_edge_args_info_available_for_edge_p): Likewise.
23018         * ipa-prop.c (ipa_edge_args_vector): Removed.
23019         (edge_removal_hook_holder): Likewise.
23020         (edge_duplication_hook_holder): Likewise.
23021         (ipa_edge_args_sum): New variable.
23022         (ipa_propagate_indirect_call_infos): Test ipa_edge_args_sum instead of
23023         ipa_edge_args_vector.
23024         (ipa_free_edge_args_substructures): Likewise.
23025         (ipa_free_all_edge_args): Free ipa_edge_args_sum instead of
23026         ipa_edge_args_vector.
23027         (ipa_edge_removal_hook): Turned into method
23028         ipa_edge_args_sum_t::remove.
23029         (ipa_edge_duplication_hook): Turned into method
23030         ipa_edge_args_sum_t::duplicate.
23031         (ipa_register_cgraph_hooks): Create ipa_edge_args_sum instead of
23032         registering edge hooks.
23033         (ipa_unregister_cgraph_hooks): Do not unregister edge hooks.
23034         * ipa-inline-analysis.c (estimate_function_body_sizes): Test
23035         ipa_edge_args_sum instead of ipa_edge_args_vector.
23036         * ipa-profile.c (ipa_profile): Likewise.
23038 2017-05-03  Martin Jambor  <mjambor@suse.cz>
23040         * symbol-summary.h (function_summary): New method exists.
23041         (function_summary::symtab_removal): Deallocate through release.
23042         (call_summary): New class.
23043         (gt_ggc_mx): New overload.
23044         (gt_pch_nx): Likewise.
23045         (gt_pch_nx): Likewise.
23047 2017-05-03  Jeff Law  <law@redhat.com>
23049         PR tree-optimization/78496
23050         * tree-vrp.c (simplify_cond_using_ranges_1): Renamed
23051         from simplify_cond_using_ranges.  Split off code to walk
23052         backwards through casts into ...
23053         (simplify_cond_using_ranges_2): New function.
23054         (simplify_stmt_using_ranges): Call simplify_cond_using_ranges_1.
23055         (execute_vrp): After identifying jump threads, call
23056         simplify_cond_using_ranges_2.
23058 2017-05-03  Jan Hubicka  <hubicka@ucw.cz>
23060         PR bootstrap/80609
23061         * ipa-inline.h (inline_summary): Add ctor.
23062         (create_ggc): Do not use ggc_cleared_alloc.
23064 2017-05-03  Jeff Downs  <heydowns@somuchpressure.net>
23065             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23067         * gcc.c (handle_braces): Support escaping in switch matching
23068         text.
23069         * doc/invoke.texi (Spec Files): Document it.
23070         Remove superfluous @code markup in items.
23072 2017-05-03  David Malcolm  <dmalcolm@redhat.com>
23074         * diagnostic-show-locus.c (struct column_range): New struct.
23075         (get_affected_columns): New function.
23076         (get_printed_columns): New function.
23077         (struct correction): New struct.
23078         (correction::ensure_capacity): New function.
23079         (correction::ensure_terminated): New function.
23080         (struct line_corrections): New struct.
23081         (line_corrections::~line_corrections): New dtor.
23082         (line_corrections::add_hint): New function.
23083         (layout::print_trailing_fixits): Reimplement in terms of the new
23084         classes.
23085         (selftest::test_overlapped_fixit_printing): New function.
23086         (selftest::diagnostic_show_locus_c_tests): Call it.
23088 2017-05-03  Nathan Sidwell  <nathan@acm.org>
23090         Canonicalize canonical type hashing
23091         * tree.h (type_hash_canon_hash): Declare.
23092         * tree.c (type_hash_list, attribute_hash_list): Move into
23093         type_hash_canon_hash.
23094         (build_type_attribute_qual_variant): Break out hash code calc into
23095         type_hash_canon_hash.
23096         (type_hash_canon_hash): New.  Generic type hash computation.
23097         (build_range_type_1, build_array_type_1, build_function_type,
23098         build_method_type_directly, build_offset_type, build_complex_type,
23099         make_vector_type): Call it.
23101 2017-05-03  Richard Biener  <rguenther@suse.de>
23103         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
23104         When all DRs have unknown misaligned do not always peel
23105         when there is a store but apply the same costing model as if
23106         there were only loads.
23108 2017-05-03  Richard Biener  <rguenther@suse.de>
23110         Revert
23111         PR tree-optimization/80492
23112         * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
23113         compare_base_decls returning dont-know properly.
23115 2017-05-03  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23117         * config/arm/iterators.md (CCSI): New mode iterator.
23118         (arch): New mode attribute.
23119         * config/arm/sync.md (atomic_compare_and_swap<mode>_1): Rename into ...
23120         (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1): This and ...
23121         (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): This.  Use CCSI
23122         code iterator for success result mode.
23123         * config/arm/arm.c (arm_expand_compare_and_swap): Adapt code to use
23124         the corresponding new insn generators.
23126 2017-05-03  Bin Cheng  <bin.cheng@arm.com>
23128         Revert r247509
23129         2017-05-02  Bin Cheng  <bin.cheng@arm.com>
23130         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
23132 2017-05-03  Richard Sandiford  <richard.sandiford@linaro.org>
23134         * tree-data-ref.h (SUB_CONFLICTS_IN_A): Wrap SUB argument in brackets.
23135         (SUB_CONFLICTS_IN_B, SUB_LAST_CONFLICT, SUB_DISTANCE): Likewise.
23136         (DDR_A): Wrap DDR argument in brackets.
23137         (DDR_B, DDR_AFFINE_P, DDR_ARE_DEPENDENT, DDR_SUBSCRIPTS): Likewise.
23138         (DDR_LOOP_NEST, DDR_INNER_LOOP, DDR_SELF_REFERENCE): Likewise.
23139         (DDR_REVERSED_P): Likewise.
23141 2017-05-03  Jakub Jelinek  <jakub@redhat.com>
23143         PR tree-optimization/79472
23144         * tree-switch-conversion.c (struct switch_conv_info): Add
23145         contiguous_range and default_case_nonstandard fields.
23146         (collect_switch_conv_info): Compute contiguous_range and
23147         default_case_nonstandard fields, don't clear final_bb if
23148         contiguous_range and only the default case doesn't have the required
23149         structure.
23150         (check_all_empty_except_final): Set default_case_nonstandard instead
23151         of failing if contiguous_range and the default case doesn't have empty
23152         block.
23153         (check_final_bb): Add SWTCH argument, don't fail if contiguous_range
23154         and only the default case doesn't have the required constants.  Skip
23155         virtual phis.
23156         (gather_default_values): Skip virtual phis.  Allow non-NULL CASE_LOW
23157         if default_case_nonstandard.
23158         (build_constructors): Build constant 1 just once.  Assert that default
23159         values aren't inserted in between cases if contiguous_range.  Skip
23160         virtual phis.
23161         (build_arrays): Skip virtual phis.
23162         (prune_bbs): Add DEFAULT_BB argument, don't remove that bb.
23163         (fix_phi_nodes): Don't add e2f phi arg if default_case_nonstandard.
23164         Handle virtual phis.
23165         (gen_inbound_check): Handle default_case_nonstandard case.
23166         (process_switch): Adjust check_final_bb caller.  Call
23167         gather_default_values with the first non-default case instead of
23168         default case if default_case_nonstandard.
23170 2017-05-02  Nathan Sidwell  <nathan@acm.org>
23172         * ggc-page.c (move_ptes_to_front): Replace unsigned >0 with i--
23173         check.  Fix formatting.
23175 2017-05-02  Jan Hubicka  <hubicka@ucw.cz>
23177         * ipa-inline-analysis.c (estimate_node_size_and_time): Allow roundoff
23178         errors when comparing specialized and unspecialized times.
23180 2017-05-02  David Malcolm  <dmalcolm@redhat.com>
23182         * diagnostic-show-locus.c
23183         (layout::should_print_annotation_line_p): Make private.
23184         (layout::print_annotation_line): Make private.
23185         (layout::annotation_line_showed_range_p): Make private.
23186         (layout::show_ruler): Make private.
23187         (layout::print_source_line): Make private.  Pass in line and
23188         line_width, rather than calling location_get_source_line.  Drop
23189         returned value.
23190         (layout::print_leading_fixits): New method.
23191         (layout::print_any_fixits): Rename to...
23192         (layout::print_trailing_fixits): ...this, and make private.
23193         Don't print newline fixits.
23194         (diagnostic_show_locus): Move logic for printing one row into...
23195         (layout::print_line): ...this new function.  Move the
23196         location_get_source_line call and error-handling from
23197         print_source_line to here.  Call print_leading_fixits, and rename
23198         print_any_fixits to print_trailing_fixits.
23199         (selftest::test_fixit_insert_containing_newline): Update now that
23200         newlines are partially supported.
23201         (selftest::test_fixit_insert_containing_newline_2): New test.
23202         (selftest::test_fixit_replace_containing_newline): Update comments.
23203         (selftest::diagnostic_show_locus_c_tests): Call the new test.
23204         * edit-context.c (class added_line): New class.
23205         (class edited_line): Describe newline handling in comment.
23206         (edited_line::actually_edited_p): New method.
23207         (edited_line::print_content): Delete redundant decl.
23208         (edited_line::m_predecessors): New field.
23209         (edited_file::print_content): Call edited_line::print_content.
23210         (edited_file::print_diff): Update to support newlines.
23211         (edited_file::print_diff_hunk): Likewise.
23212         (edited_file::print_run_of_changed_lines): New function.
23213         (edited_file::print_diff_line): Convert to...
23214         (print_diff_line): ...this.
23215         (edited_file::get_effective_line_count): New function.
23216         (edited_line::edited_line): Initialize new field m_predecessors.
23217         (edited_line::~edited_line): Clean up m_predecessors.
23218         (edited_line::apply_fixit): Handle newlines.
23219         (edited_line::get_effective_line_count): New function.
23220         (edited_line::print_content): New function.
23221         (edited_line::print_diff_lines): New function.
23222         (selftest::test_applying_fixits_insert_containing_newline): New
23223         test.
23224         (selftest::test_applying_fixits_replace_containing_newline): New
23225         test.
23226         (selftest::insert_line): New function.
23227         (selftest::test_applying_fixits_multiple_lines): Add example of
23228         inserting a line.
23229         (selftest::edit_context_c_tests): Call the new tests.
23231 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
23233         * tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Delete
23234         parameter cand.  Update dump information.
23235         (get_computation_cost): Update uses.
23237 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
23239         * tree-ssa-loop-ivopts.c (get_computation_aff_1): New.
23240         (get_computation_aff): Reorder parameters.  Use get_computation_aff_1.
23241         (get_computation_at, rewrite_use_address): Update use of
23242         get_computation_aff.
23244 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
23246         * tree-ssa-loop-ivopts.c (get_computation_at): Reorder parameters.
23247         (get_computation): Delete.
23248         (get_computation_cost): Implement like get_computation_cost_at.
23249         Use get_computation_at.
23250         (get_computation_cost_at): Delete.
23251         (rewrite_use_nonlinear_expr): Use get_computation_at.
23252         (rewrite_use_compare, remove_unused_ivs): Ditto.
23254 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
23256         * tree-ssa-loop-ivopts.c (rewrite_use_address): Simple refactor.
23258 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
23260         * tree-ssa-loop-ivopts.c (struct iv_ca): Rename n_regs to n_invs.
23261         (ivopts_global_cost_for_size): Rename parameter and update uses.
23262         (iv_ca_recount_cost): Update uses.
23263         (iv_ca_set_remove_invs, iv_ca_set_no_cp): Record invariants and
23264         candidates seperately in n_invs and n_cands.
23265         (iv_ca_set_add_invs, iv_ca_set_cp, iv_ca_new): Ditto.
23267 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
23269         * tree-ssa-loop-ivopts.c (struct walk_tree_data): New.
23270         (find_inv_vars_cb): New.
23271         (find_depends): Renamed to ...
23272         (find_inv_vars): ... this.
23273         (add_candidate_1, force_var_cost): Call find_inv_vars.
23274         (split_address_cost, determine_group_iv_cost_cond): Ditto.
23276 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
23278         * tree-ssa-loop-ivopts.c (struct cost_pair): Rename depends_on to
23279         inv_vars.  Add inv_exprs.
23280         (struct iv_cand): Rename depends_on to inv_vars.
23281         (struct ivopts_data): Rename max_inv_id/n_invariant_uses to
23282         max_inv_var_id/n_inv_var_uses.  Move max_inv_expr_id around.
23283         Refactor field used_inv_exprs from has_map to array n_inv_expr_uses.
23284         (dump_cand): Dump inv_vars.
23285         (tree_ssa_iv_optimize_init): Support inv_vars and inv_exprs.
23286         (record_invariant, find_depends, add_candidate_1): Ditto.
23287         (set_group_iv_cost, force_var_cost): Ditto.
23288         (split_address_cost, ptr_difference_cost, difference_cost): Ditto.
23289         (get_computation_cost_at, get_computation_cost): Ditto.
23290         (determine_group_iv_cost_generic): Ditto.
23291         (determine_group_iv_cost_address): Ditto.
23292         (determine_group_iv_cost_cond, autoinc_possible_for_pair): Ditto.
23293         (determine_group_iv_costs): Ditto.
23294         (iv_ca_recount_cost): Update call to ivopts_global_cost_for_size.
23295         (iv_ca_set_remove_invariants): Renamed to ...
23296         (iv_ca_set_remove_invs): ... this.  Support inv_vars and inv_exprs.
23297         (iv_ca_set_no_cp): Use iv_ca_set_remove_invs.
23298         (iv_ca_set_add_invariants):  Renamed to ...
23299         (iv_ca_set_add_invs): ... this.  Support inv_vars and inv_exprs.
23300         (iv_ca_set_cp): Use iv_ca_set_add_invs.
23301         (iv_ca_has_deps): Support inv_vars and inv_exprs.
23302         (iv_ca_new, iv_ca_free, iv_ca_dump, free_loop_data): Ditto.
23303         (create_new_ivs): Remove useless dump.
23305 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
23307         * tree-ssa-loop-ivopts.c (get_computation_cost_at): Remove pseudo
23308         iv_cand code.
23309         (determine_group_iv_cost_cond, determine_iv_cost): Ditto.
23310         (iv_ca_set_no_cp, create_new_iv): Ditto.
23312 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
23314         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
23316 2017-05-02  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
23318         * tree.h (EXPR_CILK_SPAWN): Use macro TREE_CHECK2 instead of
23319         function tree_check2.
23321 2017-05-02  Martin Liska  <mliska@suse.cz>
23323         * doc/gcov.texi: Add missing preposition.
23324         * gcov.c (function_info::function_info): Properly fill up
23325         all member variables.
23327 2017-05-02  Tamar Christina  <tamar.christina@arm.com>
23329         * expr.c (expand_expr_real_2): Re-cost if previous costs are the same.
23331 2017-05-02  Tamar Christina  <tamar.christina@arm.com>
23333         * simplify-rtx.c (simplify_binary_operation_1): Add LSHIFTRT case.
23335 2017-05-02  Martin Liska  <mliska@suse.cz>
23337         PR lto/77954.
23338         * lto-streamer-in.c (lto_read_tree_1): Remove
23339         LTO_STREAMER_DEBUG.
23340         * lto-streamer.c (struct tree_hash_entry): Likewise.
23341         (struct tree_entry_hasher): Likewise.
23342         (tree_entry_hasher::hash): Likewise.
23343         (tree_entry_hasher::equal): Likewise.
23344         (lto_streamer_init): Likewise.
23345         (lto_orig_address_map): Likewise.
23346         (lto_orig_address_get): Likewise.
23347         (lto_orig_address_remove): Likewise.
23348         * lto-streamer.h: Likewise.
23349         * tree-streamer-in.c (streamer_alloc_tree): Likewise.
23350         * tree-streamer-out.c (streamer_write_tree_header): Likewise.
23352 2017-05-02  Sebastian Peryt  <sebastian.peryt@intel.com>
23354         * config/i386/avx512fintrin.h (_mm_mask_add_round_sd)
23355         (_mm_maskz_add_round_sd, _mm_mask_add_round_ss)
23356         (mm_maskz_add_round_ss, _mm_mask_sub_round_sd)
23357         (mm_maskz_sub_round_sd, _mm_mask_sub_round_ss)
23358         (mm_maskz_sub_round_ss, _mm_mask_add_sd)
23359         (mm_maskz_add_sd, _mm_mask_add_ss, _mm_maskz_add_ss)
23360         (mm_mask_sub_sd, _mm_maskz_sub_sd, _mm_mask_sub_ss)
23361         (mm_maskz_sub_ss): New intrinsics.
23362         * config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
23363         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
23364         * config/i386/i386-builtin.def (__builtin_ia32_addsd_mask_round)
23365         (__builtin_ia32_addss_mask_round, __builtin_ia32_subsd_mask_round)
23366         (__builtin_ia32_subss_mask_round): New builtins.
23367         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
23368         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
23369         * config/i386/sse.md (<sse>_vm<plusminus_insn><mode>3<round_name>):
23370         Renamed to ...
23371         (<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): ... this.
23372         (v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
23373         Changed to ...
23374         (v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
23375         ... this.
23377 2017-05-02  Martin Jambor  <mjambor@suse.cz>
23379         PR tree-optimization/78687
23380         * tree-sra.c (access): New field parent.
23381         (process_subtree_disqualification): New function.
23382         (disqualify_candidate): Call it.
23383         (build_accesses_from_assign): Reset write flag if creating an
23384         assighnment link.
23385         (build_access_subtree): Fill in parent field and also prpagate
23386         down grp_write flag.
23387         (create_artificial_child_access): New parameter set_grp_write, set
23388         grp_write to its value.
23389         (propagate_subaccesses_across_link): Also propagate grp_write flag
23390         values.
23391         (propagate_all_subaccesses): Push the closest parent back to work
23392         queue if add_access_to_work_queue returned true.
23394 2017-05-02  Richard Biener  <rguenther@suse.de>
23396         * common.opt (fstrict-overflow): Alias negative to fwrapv.
23397         * doc/invoke.texi (fstrict-overflow): Remove all traces of
23398         -fstrict-overflow documentation.
23399         * tree.h (TYPE_OVERFLOW_UNDEFINED): Do not test flag_strict_overflow.
23400         (POINTER_TYPE_OVERFLOW_UNDEFINED): Test !flag_wrapv instead of
23401         flag_strict_overflow.
23402         * ipa-inline.c (can_inline_edge_p): Do not test flag_strict_overflow.
23403         * lto-opts.c (lto_write_options): Do not stream it.
23404         * lto-wrapper.c (merge_and_complain): Do not handle it.
23405         * opts.c (default_options_table): Do not set -fstrict-overflow.
23406         (finish_options): Likewise do not clear it when sanitizing.
23407         * simplify-rtx.c (simplify_const_relational_operation): Do not
23408         test flag_strict_overflow.
23410 2017-05-02  Uros Bizjak  <ubizjak@gmail.com>
23412         * config/alpha/alpha.md (*add<mode>3_ieee): Merge to add<mode>3
23413         using enabled attribute.
23414         (*sub<mode>3_ieee): Merge to sub<mode>3 using enabled attribute.
23415         (*mul<mode>3_ieee): Merge to mul<mode>3 using enabled attribute.
23416         (*div<mode>3_ieee): Merge to div<mode>3 using enabled attribute.
23417         (*sqrt<mode>2_ieee): Merge to sqrt<mode>2 using enabled attribute.
23418         (*fix_truncdfdi_ieee): Merge to *fix_truncdfdi2 using enabled attribute.
23419         (*fix_truncsfdi_ieee): Merge to *fix_truncsfdi2 using enabled attribute.
23420         (*floatdisf_ieee): Merge to floatdisf2 using enabled attribute.
23421         (*floatdidf_ieee): Merge to floatdidf2 using enabled attribute.
23422         (*truncdfsf2_ieee): Merge to truncdfsf2 using enabled attribute.
23423         (*cmpdf_ieee): Merge to *cmpdf_internal using enabled attribute.
23425 2017-05-02  Uros Bizjak  <ubizjak@gmail.com>
23427         * config/i386/i386.c (ix86_code_end): Use {FIRST,LAST}_INT_REG.
23429 2017-05-02  Richard Biener  <rguenther@suse.de>
23431         PR tree-optimization/80591
23432         Revert
23433         2017-04-10  Richard Biener  <rguenther@suse.de>
23435         * tree-ssa-structalias.c (find_func_aliases): Properly handle
23436         asm inputs.
23438 2017-05-02  Richard Biener  <rguenther@suse.de>
23440         PR tree-optimization/80549
23441         * tree-cfgcleanup.c (mfb_keep_latches): New helper.
23442         (cleanup_tree_cfg_noloop): Create forwarders to known loop
23443         headers if they do not have a preheader.
23445 2017-05-02  Martin Liska  <mliska@suse.cz>
23447         PR other/80589
23448         * common.opt: Fix typo.
23449         * doc/invoke.texi: Likewise.
23451 2017-05-01  Jan Beulich  <jbeulich@suse.com>
23453         * config/i386/sse.md (xop_vpermil2<mode>3): Do not allow operand
23454         swapping, add (x,x,m,x,n) alternative.
23456 2017-05-01  Nathan Sidwell  <nathan@acm.org>
23458         * calls.c (combine_pending_stack_adjustment_and_call): Remove
23459         unnecessary unadjusted_alignment check.
23461 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
23463         PR c++/80038
23464         * cilk_common.c (expand_builtin_cilk_detach): Move pedigree
23465         operations here.
23466         * gimplify.c (gimplify_cilk_detach): New function.
23467         (gimplify_call_expr, gimplify_modify_expr): Call it as needed.
23468         * tree-core.h: Document EXPR_CILK_SPAWN.
23469         * tree.h (EXPR_CILK_SPAWN): Define.
23471 2017-05-01  David Malcolm  <dmalcolm@redhat.com>
23473         * diagnostic-show-locus.c (layout::get_expanded_location): Rewrite
23474         to use new fixit_hint representation, using the "replace" logic.
23475         (get_line_span_for_fixit_hint): Likewise.
23476         (layout::print_any_fixits): Likewise.
23477         (selftest::test_one_liner_many_fixits): Rename to...
23478         (selftest::test_one_liner_many_fixits_1): ...this, and update
23479         comment and expected output to reflect that the multiple fix-it
23480         hints are now consolidated into one insertion.
23481         (selftest::test_one_liner_many_fixits_2): New test.
23482         (selftest::test_diagnostic_show_locus_one_liner): Update for
23483         above.
23484         (selftest::test_fixit_consolidation): Update for fix-it API
23485         change.
23486         * diagnostic.c (print_parseable_fixits): Likewise.
23487         * edit-context.c (edited_line::m_line_events): Convert from
23488         auto_vec <line_event *> to auto_vec <line_event>.
23489         (class line_event): Convert from abstract base class to a concrete
23490         class, taking over the role of replace_event.
23491         (class insert_event): Delete.
23492         (class replace_event): Rename to class line_event.  Convert to
23493         half-open range.
23494         (edit_context::add_fixits): Reimplement.
23495         (edit_context::apply_insert): Delete.
23496         (edit_context::apply_replace): Rename to...
23497         (edit_context::apply_fixit): ...this.  Convert to half-open range.
23498         (edited_file::apply_insert): Delete.
23499         (edited_file::apply_replace): Rename to...
23500         (edited_file::apply_fixit): ...this.
23501         (edited_line::~edited_line): Drop deletion of events.
23502         (edited_line::apply_insert): Delete.
23503         (edited_line::apply_replace): Rename to...
23504         (edited_line::apply_fixit): ...this.  Convert to half-open range.
23505         Update for change to type of m_line_events.
23506         * edit-context.h (edit_context::apply_insert): Delete.
23507         (edit_context::apply_replace): Rename to...
23508         (edit_context::apply_fixit): ...this.
23510 2017-05-01  Martin Sebor  <msebor@redhat.com>
23512         * gimple-ssa-sprintf.c (format_integer): Set knownrange when it's
23513         known.
23515 2017-05-01  Uros Bizjak  <ubizjak@gmail.com>
23517         PR target/68491
23518         * config/i386/cpuid.h (__get_cpuid): Always return 0 when
23519         __get_cpuid_max returns 0.
23520         (__get_cpuid_count): Ditto.
23522 2017-05-01  Eric Botcazou  <ebotcazou@adacore.com>
23524         * tree.c (substitute_in_expr) <tcc_vl_exp>: Also inline a call if the
23525         replacement expression is another instance of one of its arguments.
23527 2017-05-01  Jakub Jelinek  <jakub@redhat.com>
23529         PR target/79430
23530         * rtlanal.c (reg_set_p): If reg is a stack_pointer_rtx, also
23531         check for stack push/pop autoinc.
23532         * config/i386/i386.c (ix86_agi_dependent): Return false
23533         if the only reason why modified_in_p returned true is that
23534         addr is SP based and set_insn is a push or pop.
23536 2017-04-29  Jan Hubicka  <hubicka@ucw.cz>
23538         * ipa-inline.c (compute_inlined_call_time): Remove now unnecesary
23539         overflow check.
23541 2017-04-29  Jan Hubicka  <hubicka@ucw.cz>
23543         PR ipa/79224
23544         * ipa-inline-analysis.c (dump_predicate): Add optional parameter NL.
23545         (account_size_time): Use two predicates - exec_pred and
23546         nonconst_pred_ptr.
23547         (evaluate_conditions_for_known_args): Compute both clause and
23548         nonspec_clause.
23549         (evaluate_properties_for_edge): Evaulate both clause and nonspec_clause.
23550         (inline_summary_t::duplicate): Update.
23551         (estimate_function_body_sizes): Caluculate exec and nonconst predicates
23552         separately.
23553         (compute_inline_parameters): Likewise.
23554         (estimate_edge_size_and_time): Update caluclation of time.
23555         (estimate_node_size_and_time): Compute both time and nonspecialized
23556         time.
23557         (estimate_ipcp_clone_size_and_time): Update.
23558         (inline_merge_summary): Update.
23559         (do_estimate_edge_time): Update.
23560         (do_estimate_edge_size): Update.
23561         (do_estimate_edge_hints): Update.
23562         (inline_read_section, inline_write_summary): Stream both new predicates.
23563         * ipa-inline.c (compute_uninlined_call_time): Take uninlined_call_time
23564         as argument.
23565         (compute_inlined_call_time): Cleanup.
23566         (big_speedup_p): Update.
23567         (edge_badness): Update.
23568         * ipa-inline.h (INLINE_TIME_SCALE): Remove.
23569         (size_time_entry): Replace predicate by exec_predicate and
23570         nonconst_predicate.
23571         (edge_growth_cache_entry): Cache both time nad nonspecialized time.
23572         (estimate_edge_time): Return also nonspec_time.
23573         (reset_edge_growth_cache): Update.
23575 2017-04-29  Jakub Jelinek  <jakub@redhat.com>
23577         PR rtl-optimization/80491
23578         * ifcvt.c (noce_process_if_block): When looking for x setter
23579         with missing else_bb, don't check only the insn right before
23580         cond_earliest, but look for the last insn that x is modified in
23581         within the same bb.
23583         PR rtl-optimization/80491
23584         * alias.c (memory_modified_in_insn_p): Return true for CALL_INSNs.
23586 2017-04-29  Marc Glisse  <marc.glisse@inria.fr>
23588         PR tree-optimization/80487
23589         * tree-ssa-alias.c (stmt_kills_ref_p): Handle stpncpy and strncpy.
23591 2017-04-29  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
23593         PR tree-optimization/79697
23594         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Check if callee
23595         is BUILT_IN_STRDUP, BUILT_IN_STRNDUP, BUILT_IN_REALLOC.
23596         (propagate_necessity): Check if def_callee is BUILT_IN_STRDUP or
23597         BUILT_IN_STRNDUP.
23598         * gimple-fold.c (gimple_fold_builtin_realloc): New function.
23599         (gimple_fold_builtin): Call gimple_fold_builtin_realloc.
23601 2017-04-28  Martin Sebor  <msebor@redhat.com>
23603         PR tree-optimization/80523
23604         * gimple-ssa-sprintf.c (target_to_host_charmap): New global variable.
23605         (init_target_to_host_charmap, target_to_host, target_strtol10): New
23606         functions.
23607         (maybe_warn, format_directive, parse_directive): Use new functions.
23608         (pass_sprintf_length::execute): Call init_target_to_host_charmap.
23610 2017-04-28  Marc Glisse  <marc.glisse@inria.fr>
23612         * match.pd (X+Z OP Y+Z, X-Z OP Y-Z, Z-X OP Z-Y): New transformations.
23614 2017-04-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
23616         * configure.ac (SYSTEM_HEADER_DIR, BUILD_SYSTEM_HEADER_DIR,
23617         target_header_dir): Set correctly.
23618         * configure: Regenerated.
23619         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
23620         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
23621         instead of SYSTEM_HEADER_DIR.
23623 2017-04-28  Jan Hubicka  <hubicka@ucw.cz>
23625         * ipa-cp.c (perform_estimation_of_a_value): Turn time to sreal.
23626         (estimate_local_effects): Likewise.
23627         * ipa-inline.c (compute_inlined_call_time, want_inline_small_function_p,
23628         edge_badness, inline_small_functions, dump_overall_stats): LIkewise.
23629         * ipa-inline.h (edge_growth_cache_entry, estimate_time_after_inlining,
23630         estimate_ipcp_clone_size_and_time, do_estimate_edge_time,
23631         do_estimate_edge_time, estimate_edge_time): Likewise.
23632         * ipa-inline-analysis.c (estimate_node_size_and_time,
23633         estimate_ipcp_clone_size_and_time, do_estimate_edge_time): Likewise.
23634         (estimate_time_after_inlining): Remove.
23636 2017-04-28  Martin Liska  <mliska@suse.cz>
23638         * doc/gcov.texi: Enhance documentation of gcov.
23640 2017-04-28  Martin Liska  <mliska@suse.cz>
23642         * doc/gcov.texi: Sort options in alphabetic order.
23643         * doc/gcov-dump.texi: Likewise.
23644         * doc/gcov-tool.texi: Likewise.
23645         * gcov.c (print_usage): Likewise.
23646         * gcov-dump.c (print_usage): Likewise.
23647         * gcov-tool.c (print_merge_usage_message): Likewise.
23648         (print_rewrite_usage_message): Likewise.
23649         (print_overlap_usage_message): Likewise.
23651 2017-04-28  Martin Liska  <mliska@suse.cz>
23653         PR gcov-profile/53915
23654         * gcov.c (format_gcov): Print 'NAN %' when top > bottom.
23656 2017-04-28  Martin Liska  <mliska@suse.cz>
23658         PR gcov-profile/79891
23659         * gcov.c (add_line_counts): Assign BBs to lines just if the BB
23660         is marked by compiler as living on a line.
23661         (get_cycles_count): Remove usage of the union.
23662         (output_intermediate_file): Likewise.
23663         (find_source): Fix GNU coding style.
23664         (accumulate_line_counts): Remove old non-all block mode.
23665         (output_lines): Remove usage of the union.
23666         * profile.c (output_location): Include all BBs, even if
23667         belonging to a same line (and file) as a previous BB.
23669 2017-04-28  Martin Liska  <mliska@suse.cz>
23671         * gcov.c (process_args): Handle new argument 'w'.
23672         (read_graph_file): Assign ID to BBs.
23673         (output_branch_count): Display BB # if verbose flag is set.
23674         (output_lines): Likewise for arcs.
23675         (print_usage): Add '--verbose' option help.
23676         * doc/gcov.texi: Document --verbose (-w) option.
23678 2017-04-28  Martin Liska  <mliska@suse.cz>
23680         * gcov.c (struct block_location_info): New struct.
23681         (process_file): Fill up the new structure.
23682         (read_graph_file): Replace usage of encoding by the newly added
23683         struct.
23684         (add_line_counts): Likewise.
23685         (accumulate_line_counts): Remove usage of the union.
23686         (function_info::function_info): New function.
23687         (function_info::~function_info): Likewise.
23688         (process_file): Call delete instead of release_function.
23689         (release_function): Release the function.
23690         (release_structures): Call delete instead of release_function.
23691         (solve_flow_graph): Replace usage of num_blocks.
23692         (find_exception_blocks): Likewise.
23693         (output_lines): Fix GNU coding style.
23695 2017-04-28  Martin Liska  <mliska@suse.cz>
23697         PR driver/56469
23698         * coverage.c (coverage_remove_note_file): New function.
23699         * coverage.h: Declare the function.
23700         * toplev.c (finalize): Clean if an error has been seen.
23702 2017-04-28  Martin Liska  <mliska@suse.cz>
23704         PR gcov-profile/80031
23705         * gcov-dump.c (tag_blocks): Just print number of basic blocks.
23706         * gcov-io.h (GCOV_TAG_BLOCKS_NUM): Remove unused macro.
23707         * gcov.c (read_graph_file): Read just number of blocks.
23708         * profile.c (branch_prob): Do not stream 0 flags per a basic
23709         block.
23711 2017-04-28  Martin Liska  <mliska@suse.cz>
23713         * gcov-dump.c (tag_*): Add new argument to declarations.
23714         (dump_gcov_file): Likewise.
23715         (tag_blocks): Add and use new argument depth.
23716         (tag_arcs): Likewise.
23717         (tag_lines): Likewise.
23718         (tag_counters): Likewise.
23719         (tag_summary): Likewise.
23720         (dump_working_sets): Use depth to do a proper indentation.
23722 2017-04-28  Jakub Jelinek  <jakub@redhat.com>
23724         PR bootstrap/80531
23725         * cgraph.h (symtab_node::debug_symtab): No longer inline.
23726         * symtab.c (symtab_node::debug_symtab): Move definition here.
23728 2017-04-28  Richard Biener  <rguenther@suse.de>
23730         * lto-streamer.h (LTO_major_version): Bump to 7.
23732 2017-04-28  Richard Biener  <rguenther@suse.de>
23734         * tree-vrp.c (assert_info): New struct.
23735         (add_assert_info): New helper.
23736         (register_edge_assert_for_2): Refactor to add asserts to a vector
23737         of assert_info.
23738         (register_edge_assert_for_1): Likewise.
23739         (register_edge_assert_for): Likewise.
23740         (finish_register_edge_assert_for): New helper actually registering
23741         asserts where live on edge.
23742         (find_conditional_asserts): Adjust.
23743         (find_switch_asserts): Likewise.
23744         (evrp_dom_walker::try_find_new_range): Generalize.
23745         (evrp_dom_walker::before_dom_children): Use register_edge_assert_for.
23747 2017-04-27  Marek Polacek  <polacek@redhat.com>
23749         PR sanitizer/80349
23750         * fold-const.c (fold_binary_loc) <case EQ_EXPR, NE_EXPR>: Convert
23751         arg10 and arg11 to itype.
23753 2017-04-27  Jonathan Wakely  <jwakely@redhat.com>
23755         * doc/extend.texi (Object Size Checking): Improve grammar.
23757 2017-04-27  Richard Earnshaw  <rearnsha@arm.com>
23759         PR target/80530
23760         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Ensure
23761         that the logic for permitting reciprocal estimates matches that
23762         in use_rsqrt_p.
23764 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
23766         PR c++/80534
23767         * tree.c (type_cache_hasher::equal): Only compare
23768         TYPE_TYPELESS_STORAGE flag on non-aggregate element types.
23769         (build_array_type_1): Only hash TYPE_TYPELESS_STORAGE flag on
23770         non-aggregate element types.
23771         * tree.h (TYPE_TYPELESS_STORAGE): Fix comment typo, add more details
23772         about the flag on ARRAY_TYPEs in the comment, formatting fix.
23774 2017-04-27  Richard Biener  <rguenther@suse.de>
23776         PR middle-end/80533
23777         * emit-rtl.c (set_mem_attributes_minus_bitpos): When
23778         stripping ARRAY_REFs from MEM_EXPR make sure we're not
23779         keeping a reference to a trailing array.
23781 2017-04-27  Richard Biener  <rguenther@suse.de>
23783         PR middle-end/80539
23784         * tree-chrec.c (chrec_fold_plus_poly_poly): Deal with not
23785         being in loop-closed SSA form conservatively.
23786         (chrec_fold_multiply_poly_poly): Likewise.
23788 2017-04-27  Tamar Christina  <tamar.christina@arm.com>
23790         PR middle-end/79665
23791         * expr.c (expand_expr_real_2): Move TRUNC_MOD_EXPR, FLOOR_MOD_EXPR,
23792         CEIL_MOD_EXPR, ROUND_MOD_EXPR cases.
23794 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
23796         PR target/77728
23797         * config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): Remove.
23798         (aarch64_function_arg_alignment): Return unsigned int again, but still
23799         ignore TYPE_FIELDS chain decls other than FIELD_DECLs.
23800         (aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
23801         Don't emit -Wpsabi note.
23802         (aarch64_function_arg_boundary): Likewise.
23803         (aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
23804         caller.
23806 2017-04-26  Nathan Sidwell  <nathan@acm.org>
23808         * tree.h (crc32_unsigned_n): Declare.
23809         (crc32_unsigned, crc32_unsigned): Make inline.
23810         * tree.c (crc32_unsigned_bits): Replace with ...
23811         (crc32_unsigned_n): ... this.
23812         (crc32_unsigned, crc32_byte): Remove.
23813         (crc32_string): Remove unnecessary braces.
23815 2017-04-25  Jan Hubicka  <hubicka@ucw.cz>
23817         * ipa-cp.c (estimate_local_effects): Convert sreal to int.
23818         * ipa-inline-analysis.c (MAX_TIME): Remove.
23819         (account_size_time): Use sreal for time.
23820         (dump_inline_summary): Update.
23821         (estimate_function_body_sizes): Update.
23822         (estimate_edge_size_and_time): Update.
23823         (estimate_calls_size_and_time): Update.
23824         (estimate_node_size_and_time): Update.
23825         (inline_merge_summary): Update.
23826         (inline_update_overall_summary): Update.
23827         (estimate_time_after_inlining): Update.
23828         (inline_read_section): Update.
23829         (inline_write_summary): Update.
23830         * ipa-inline.c (compute_uninlined_call_time): Update.
23831         (compute_inlined_call_time): Update.
23832         (recursive_inlining): Update.
23833         (inline_small_functions): Update.
23834         (dump_overall_stats): Update.
23835         * ipa-inline.h: Include sreal.h.
23836         (size_time_entry): Turn time to sreal.
23837         (inline_summary): Turn self_time nad time to sreal.
23839 2017-04-25  Jan Hubicka  <hubicka@ucw.cz>
23841         * sreal.c: Include backend.h, tree.h, gimple.h, cgraph.h and
23842         data-streamer.h
23843         (sreal::stream_out, sreal::stream_in): New.
23844         * sreal.h (sreal::stream_out, sreal::stream_in): Declare.
23846 2017-04-25  Jakub Jelinek  <jakub@redhat.com>
23848         * Makefile.in (s-options): Invoke opt-gather.awk with LC_ALL=C in the
23849         environment.
23851 2017-04-25  Uros Bizjak  <ubizjak@gmail.com>
23853         PR target/70799
23854         * config/i386/i386.c (dimode_scalar_to_vector_candidate_p):
23855         Handle ASHIFTRT.
23856         (dimode_scalar_chain::compute_convert_gain): Ditto.
23857         (dimode_scalar_chain::make_vector_copies): Ditto.
23858         (dimode_scalar_chain::convert_reg): Ditto.
23859         (dimode_scalar_chain::convert_insn): Ditto.
23860         * config/i386/sse.md (VI24_AVX512BW_1): Remove mode iterator.
23861         (VI248_AVX512BW_1): New mode iterator.
23862         (<mask_codefor>ashr<mode>3<mask_name>): Merge insn pattern with
23863         <mask_codefor>ashrv2di3<mask_name> insn using VI248_AVX512BW_1
23864         mode iterator.
23866 2017-04-25  Martin Sebor  <msebor@redhat.com>
23868         PR tree-optimization/80497
23869         * gimple-ssa-sprintf.c (get_int_range): Avoid assuming all integer
23870         constants are representable in HOST_WIDE_INT.
23871         (parse_directive): Ditto.
23873 2017-04-25  Martin Sebor  <msebor@redhat.com>
23875         PR bootstrap/80486
23876         * dominance.c (dom_info::m_n_basic_blocks): Change type to unsigned.
23877         (new_zero_array): Adjust signature.
23878         (dom_info::dom_init): Used unsigned rather that size_t.
23879         (dom_info::dom_info): Same.
23881 2017-04-25  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
23882             Jakub Jelinek  <jakub@redhat.com>
23884         PR target/77728
23885         * config/arm/arm.c: Include gimple.h.
23886         (aapcs_layout_arg): Emit -Wpsabi note if arm_needs_doubleword_align
23887         returns negative, increment ncrn only if it returned positive.
23888         (arm_needs_doubleword_align): Return int instead of bool,
23889         ignore DECL_ALIGN of non-FIELD_DECL TYPE_FIELDS chain
23890         members, but if there is any such non-FIELD_DECL
23891         > PARM_BOUNDARY aligned decl, return -1 instead of false.
23892         (arm_function_arg): Emit -Wpsabi note if arm_needs_doubleword_align
23893         returns negative, increment nregs only if it returned positive.
23894         (arm_setup_incoming_varargs): Likewise.
23895         (arm_function_arg_boundary): Emit -Wpsabi note if
23896         arm_needs_doubleword_align returns negative, return
23897         DOUBLEWORD_ALIGNMENT only if it returned positive.
23899 2017-04-25  Marek Polacek  <polacek@redhat.com>
23901         PR sanitizer/80349
23902         * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
23903         first argument to type.
23905 2017-04-25  Bill Seurer  <seurer@linux.vnet.ibm.com>
23907         PR target/80482
23908         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change
23909         type checks to test for compatibility instead of equality.
23911 2017-04-25  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
23912             Jakub Jelinek  <jakub@redhat.com>
23914         PR target/77728
23915         * config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): New
23916         type.
23917         (aarch64_function_arg_alignment): Return aarch64_fn_arg_alignment
23918         struct.  Ignore DECL_ALIGN of decls other than FIELD_DECL for
23919         the alignment computation, but return their maximum in warn_alignment.
23920         (aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
23921         Emit a -Wpsabi note if warn_alignment is 16 bytes, but alignment
23922         is smaller.
23923         (aarch64_function_arg_boundary): Likewise.  Simplify using MIN/MAX.
23924         (aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
23925         caller.
23927 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
23929         * config/arc/simdext.md (dmpyh): Fix typo.
23931 2017-04-25  Richard Biener  <rguenther@suse.de>
23933         PR tree-optimization/80492
23934         * alias.c (compare_base_decls): Handle registers with asm
23935         specification conservatively.
23936         * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
23937         compare_base_decls returning dont-know properly.
23939 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
23941         * config/arc/arc.c (LEGITIMATE_OFFSET_ADDRESS_P): Delete macro.
23942         (legitimate_offset_address_p): New function.
23943         (arc_legitimate_address_p): Use above function.
23945 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
23947         * config/arc/arc.c (arc_output_mi_thunk): Emit PIC calls.
23949 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
23951         * config/arc/arc.c (arc_conditional_register_usage): Use ACCL,
23952         ACCH registers whenever they are available.
23954 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
23956         * config/arc/arc.c (arc_conditional_register_usage): Make D0, D1
23957         double regs fix when not used.
23959 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
23961         * config/arc/arc.h (REGNO_OK_FOR_BASE_P): Consider also extension
23962         core registers.
23963         (REG_OK_FOR_INDEX_P_NONSTRICT): Likewise.
23964         (REG_OK_FOR_BASE_P_NONSTRICT): Likewise.
23966 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
23968         * config/arc/arc.c (arc_output_addsi): Check for h-register class
23969         when emitting short ADD instructions.
23971 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
23973         * config/arc/arc.md (cmpsi_cc_insn_mixed): Use 'h' register
23974         constraint.
23975         (cmpsi_cc_c_insn): Likewise.
23976         (cbranchsi4_scratch): Compute proper instruction length using
23977         compact_hreg_operand.
23978         * config/arc/predicates.md (compact_hreg_operand): New predicate.
23980 2017-04-25  Richard Biener  <rguenther@suse.de>
23982         PR middle-end/80509
23983         * passes.c (pass_manager::pass_manager): Initialize
23984         m_name_to_pass_map.
23986 2017-04-25  Richard Biener  <rguenther@suse.de>
23988         PR tree-optimization/79201
23989         * tree-ssa-sink.c (statement_sink_location): Handle calls.
23991 2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23993         PR target/80464
23994         * config/s390/vector.md: Split MEM->GPR vector moves for
23995         non-s_operand addresses.
23997 2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23999         PR target/79895
24000         * config/s390/predicates.md (reload_const_wide_int_operand): New
24001         predicate.
24002         * config/s390/s390.md ("movti"): Remove d/P alternative.
24003         ("movti_bigconst"): New pattern definition.
24005 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
24007         PR target/80080
24008         * s390-protos.h (s390_expand_cs_hqi): Removed.
24009         (s390_expand_cs, s390_expand_atomic_exchange_tdsi): New prototypes.
24010         * config/s390/s390.c (s390_emit_compare_and_swap): Handle all integer
24011         modes as well as CCZ1mode and CCZmode.
24012         (s390_expand_atomic_exchange_tdsi, s390_expand_atomic): Adapt to new
24013         signature of s390_emit_compare_and_swap.
24014         (s390_expand_cs_hqi): Likewise, make static.
24015         (s390_expand_cs_tdsi): Generate an explicit compare before trying
24016         compare-and-swap, in some cases.
24017         (s390_expand_cs): Wrapper function.
24018         (s390_expand_atomic_exchange_tdsi): New backend specific expander for
24019         atomic_exchange.
24020         (s390_match_ccmode_set): Allow CCZmode <-> CCZ1 mode.
24021         * config/s390/s390.md ("atomic_compare_and_swap<mode>"): Merge the
24022         patterns for small and large integers.  Forbid symref memory operands.
24023         Move expander to s390.c.  Require cc register.
24024         ("atomic_compare_and_swap<DGPR:mode><CCZZ1:mode>_internal")
24025         ("*atomic_compare_and_swap<TDI:mode><CCZZ1:mode>_1")
24026         ("*atomic_compare_and_swapdi<CCZZ1:mode>_2")
24027         ("*atomic_compare_and_swapsi<CCZZ1:mode>_3"): Use s_operand to forbid
24028         symref memory operands.  Remove CC mode and call s390_match_ccmode
24029         instead.
24030         ("atomic_exchange<mode>"): Allow and implement all integer modes.
24032 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
24034         * config/s390/s390.md (define_peephole2): New peephole to help
24035         combining the load-and-test pattern with volatile memory.
24037 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
24039         * config/s390/s390.md ("cstorecc4"): Use load-on-condition and deal
24040         with CCZmode for TARGET_Z196.
24042 2017-04-25  Jakub Jelinek  <jakub@redhat.com>
24044         PR rtl-optimization/80501
24045         * combine.c (make_compound_operation_int): Set subreg_code to SET
24046         even for AND with mask of the sign bit of mode.
24048         PR rtl-optimization/80500
24049         * loop-unroll.c (combine_var_copies_in_loop_exit): Call copy_rtx on
24050         sum's initial value.
24052 2017-04-25  Julian Brown  <julian@codesourcery.com>
24053             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
24055         * config/aarch64/thunderx2t99.md (thunderx2t99_crc): New Reservation.
24057 2017-04-25  Marc Glisse  <marc.glisse@inria.fr>
24059         * fold-const.c (tree_single_nonzero_warnv_p): Handle SSA_NAME.
24061 2017-04-25  Julian Brown  <julian@codesourcery.com>
24062             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
24064         * config/aarch64/thunderx2t99.md (thunderx2t99_aes): New Reservation.
24065         (thunderx2t99_sha): New Reservation.
24067 2017-04-25  Julian Brown  <julian@codesourcery.com>
24068             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
24070         * config/aarch64/aarch64-simd.md (aarch64_simd_vec_set<mode>): Fix
24071         type for 1-element load.
24073 2017-04-24  Marc Glisse  <marc.glisse@inria.fr>
24075         * match.pd (X/[ex]C CMP Y/[ex]C): New transformation.
24077 2017-04-24  Martin Jambor  <mjambor@suse.cz>
24079         PR tree-optimization/80293
24080         * tree-sra.c (scalarizable_type_p): New parameter const_decl, make
24081         char arrays not totally scalarizable if it is false.
24082         (analyze_all_variable_accesses): Pass correct value in the new
24083         parameter.  Add a statistics counter.
24085 2017-04-24  Jan Hubicka  <hubicka@ucw.cz>
24087         PR middle-end/79931
24088         * ipa-devirt.c (dump_possible_polymorphic_call_targets): Fix ICE.
24090 2017-04-24  Richard Biener  <rguenther@suse.de>
24092         PR tree-optimization/80494
24093         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Bail
24094         out for complex types.
24096 2017-04-24  Richard Biener  <rguenther@suse.de>
24098         * tree-ssa-sccvn.h (run_scc_vn): Adjust prototype.
24099         * tree-ssa-sccvn.c (print_scc): Print SCC size.
24100         (extract_and_process_scc_for_name): Never fail but drop SCC to varying.
24101         (DFS): Adjust and never fail.
24102         (sccvn_dom_walker::fail): Remove.
24103         (sccvn_dom_walker::before_dom_children): Adjust.
24104         (run_scc_vn): Likewise and never fail.
24105         * tree-ssa-pre.c (pass_pre::execute): Adjust.
24106         (pass_fre::execute): Likewise.
24108 2017-04-24  Richard Biener  <rguenther@suse.de>
24110         PR tree-optimization/79725
24111         * tree-ssa-sink.c (statement_sink_location): Return whether
24112         failure reason was zero uses.  Move that check later.
24113         (sink_code_in_bb): Deal with zero uses by removing the stmt
24114         if possible.
24116 2017-04-24  Richard Biener  <rguenther@suse.de>
24118         PR c++/2972
24119         * tree-ssa-uninit.c (warn_uninitialized_vars): Handle some
24120         pointer-based references.
24122 2017-04-24  Richard Biener  <rguenther@suse.de>
24124         PR bootstrap/79814
24125         * pass_manager.h (pass_manager::operator new): Remove.
24126         (pass_manager::operator delete): Likewise.
24127         * passes.c (pass_manager::operator new): Remove.
24128         (pass_manager::operator delete): Likewise.
24129         (pass_manager::pass_manager): Zero individual pass members.
24131 2017-04-23  Uros Bizjak  <ubizjak@gmail.com>
24133         PR target/70799
24134         * config/i386/i386.c (dimode_scalar_to_vector_candidate_p)
24135         <case ASHIFT, case LSHIFTRT>: Also consider variable shifts.
24136         Check "XEXP (src, 1)" operand here.
24137         <case PLUS, case MINUS, case IOR, case XOR, case AND>:
24138         Check "XEXP (src, 1)" operand here.
24139         (dimode_scalar_chain::make_vector_copies): Detect count register
24140         of a shift instruction.  Zero extend count register from QImode
24141         to DImode to satisfy vector shift pattern count operand predicate.
24142         Substitute vector shift count operand with a DImode copy.
24143         (dimode_scalar_chain::convert_reg): Ditto, zero-extend from
24144         vector register.
24146 2017-04-21  Uros Bizjak  <ubizjak@gmail.com>
24148         * config/i386/i386.md (*extzvqi_mem_rex64): Move above *extzv<mode>.
24149         Remove UNSPEC_NOREX_MEM tag.  Update corresponding peephole2 pattern.
24150         (*insvqi_1_mem_rex64): Move above insv<mode>_1.  Remove
24151         UNSPEC_NOREX_MEM tag.  Update corresponding peephole2 pattern.
24152         (UNSPEC_NOREX_MEM): Remove definition.
24154 2017-04-21  Richard Biener  <rguenther@suse.de>
24156         PR tree-optimization/79547
24157         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
24158         Handle strlen, strcmp, strncmp, strcasecmp, strncasecmp, memcmp,
24159         bcmp, strspn, strcspn, __builtin_object_size and __builtin_constant_p
24160         without any constraints.
24162 2017-04-21  Richard Biener  <rguenther@suse.de>
24164         PR tree-optimization/78847
24165         * fold-const.c (split_tree): Handle POINTER_PLUS_EXPR.
24167 2017-04-21  Richard Biener  <rguenther@suse.de>
24169         * tree.h (build_qualified_type): Annotate with CXX_MEM_STAT_INFO.
24170         (build_distinct_type_copy): Likewise.
24171         (build_variant_type_copy): Likewise.
24172         * tree.c (build_qualified_type): Pass down mem-stat info.
24173         (build_distinct_type_copy): Likewise.
24174         (build_variant_type_copy): Likewise.
24176 2017-04-21  Richard Biener  <rguenther@suse.de>
24178         PR tree-optimization/80237
24179         * tree-ssa-pre.c (find_leader_in_sets): Add third set argument,
24180         defaulted to NULL.
24181         (phi_translate_1): Also allow a leader in AVAIL_OUT of pred
24182         for a simplified result.
24184 2016-04-21  Richard Biener  <rguenther@suse.de>
24186         * tree-ssa-loop-ivcanon.c (constant_after_peeling): Do not require
24187         sth as strict as a simple_iv but a chrec without symbols and an
24188         operand defined in the loop we are peeling (and not some subloop).
24189         (propagate_constants_for_unrolling): Propagate all constants.
24191 2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
24193         PR target/79804
24194         * config/i386/i386.c (print_reg): Remove assert for disalowed
24195         regno values, call output_operand_lossage instead.
24197 2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
24199         PR target/78090
24200         * config/i386/constraints.md (Yc): New register constraint.
24201         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
24202         Use Yc constraint for alternative 2 of operand 0.  Remove
24203         preferred_for_speed attribute.
24205 2017-04-20  Alexander Monakov  <amonakov@ispras.ru>
24207         * omp-low.c (lower_lastprivate_clauses): Correct handling of linear and
24208         lastprivate clauses in SIMT case.
24210 2017-04-20  Volker Reichelt  <v.reichelt@netcologne.de>
24212         * doc/invoke.texi (-Wextra-semi): Document new warning option.
24214 2017-04-20  Richard Biener  <rguenther@suse.de>
24216         PR tree-optimization/57796
24217         * tree-vect-stmts.c (vect_model_store_cost): Cost scatters
24218         as N scalar stores.
24219         (vect_model_load_cost): Cost gathers as N scalar loads.
24221 2017-04-20  Richard Biener  <rguenther@suse.de>
24223         * ggc-page.c (ggc_allocated_p): Rename to ...
24224         (safe_lookup_page_table_entry): ... this and return the lookup
24225         result.
24226         (gt_ggc_m_S): Use safe_lookup_page_table_entry.
24228 2017-04-20  Richard Biener  <rguenther@suse.de>
24230         PR tree-optimization/80453
24231         * tree-ssa-sccvn.h (struct vn_phi_s): Add cclhs and ccrhs members.
24232         * tree-ssa-sccvn.c (cond_stmts_equal_p): Use recorded lhs and rhs
24233         from the conditions.
24234         (vn_phi_eq): Pass them down.
24235         (vn_phi_lookup): Record them.
24236         (vn_phi_insert): Likewise.
24238 2017-04-20  Matthew Fortune  <matthew.fortune@imgtec.com>
24240         * config/mips/mips.c (mips_expand_vec_perm_const): Re-fix
24241         uninitialized variable warning to avoid buffer overrun.
24243 2017-04-20  Alexander Monakov  <amonakov@ispras.ru>
24245         PR other/71250
24246         * doc/invoke.texi (-Wmissing-field-initializers): Mention that warning
24247         is suppressed for '{ 0 }' in C.
24249 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
24251         * BASE-VER: Set to 8.0.0.
24253 2017-04-20  Thomas Preud'homme  <thomas.preudhomme@arm.com>
24255         * config/arm/arm.c (arm_elf_asm_cdtor): Create non-default
24256         priority .init_array and .fini_array section with SECTION_NOTYPE
24257         flag.
24259 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
24261         PR middle-end/80423
24262         * tree.h (build_array_type): Add typeless_storage default argument.
24263         * tree.c (type_cache_hasher::equal): Also compare
24264         TYPE_TYPELESS_STORAGE flag for ARRAY_TYPEs.
24265         (build_array_type): Add typeless_storage argument, set
24266         TYPE_TYPELESS_STORAGE to it, if shared also hash it, and pass to
24267         recursive call.
24268         (build_nonshared_array_type): Adjust build_array_type_1 caller.
24269         (build_array_type): Likewise.  Add typeless_storage argument.
24271 2017-04-19  Eric Botcazou  <ebotcazou@adacore.com>
24272             Jakub Jelinek  <jakub@redhat.com>
24274         PR tree-optimization/80426
24275         * tree-vrp.c (extract_range_from_binary_expr_1): For an additive
24276         operation on symbolic operands, also compute the overflow for the
24277         invariant part when the operation degenerates into a negation.
24279 2017-04-19  Jakub Jelinek  <jakub@redhat.com>
24281         PR debug/80461
24282         * dwarf2out.c (modified_type_die, gen_type_die_with_usage):
24283         Check for t with zero TYPE_QUALS_NO_ADDR_SPACE.
24285         PR debug/80436
24286         * tree-ssa-loop-manip.c (find_uses_to_rename_def): Ignore debug uses.
24288 2017-04-19  Georg-Johann Lay  <avr@gjlay.de>
24290         PR target/80462
24291         * config/avr/avr.c (tree.h): Include it.
24292         (cgraph.h): Include it.
24293         (avr_encode_section_info): Don't warn for uninitialized progmem
24294         variable if it's just an alias.
24296 2017-04-19  Richard Biener  <rguenther@suse.de>
24298         PR ipa/65972
24299         * auto-profile.c (afdo_vpt_for_early_inline): Update SSA
24300         when needed by AutoPGO.
24302 2017-04-19  Paulo J. Matos  <paulo@matos-sorge.com>
24304         PR lto/50345
24305         * doc/lto.texi: Remove an extra 'that'.
24307 2017-04-19  Segher Boessenkool  <segher@kernel.crashing.org>
24309         PR rtl-optimization/80429
24310         * ira.c (split_live_ranges_for_shrink_wrap): Don't split regs that
24311         are only used in debug insns.
24313 2017-04-19  Eric Botcazou  <ebotcazou@adacore.com>
24314             Vladimir Makarov  <vmakarov@redhat.com>
24316         * config/sparc/predicates.md (input_operand): Add comment.  Return
24317         true for any memory operand when LRA is in progress.
24318         * config/sparc/sparc.c (sparc_expand_move): Minor formatting fix.
24320 2017-04-18  Jeff Law  <law@redhat.com>
24322         PR target/74563
24323         * mips.md ({return,simple_return}_internal): Do not overwrite
24324         operands[0].
24326 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
24328         PR tree-optimization/80443
24329         * tree-vrp.c (intersect_ranges): For signed 1-bit precision type,
24330         instead of adding 1, subtract -1 and similarly instead of subtracting
24331         1 add -1.
24333 2017-04-18  Richard Sandiford  <richard.sandiford@arm.com>
24335         PR rtl-optimization/80357
24336         * haifa-sched.c (tmp_bitmap): New variable.
24337         (model_recompute): Handle duplicate use records.
24338         (alloc_global_sched_pressure_data): Initialize tmp_bitmap.
24339         (free_global_sched_pressure_data): Free it.
24341 2017-04-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
24343         Revert:
24344         2017-02-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
24345         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
24346         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
24347         instead of SYSTEM_HEADER_DIR.
24349 2017-04-18  Jeff Law  <law@redhat.com>
24351         PR middle-end/80422
24352         * cfgcleanup.c (try_crossjump_to_edge): Verify SRC1 and SRC2 have
24353         predecessors after walking up the insn chain.
24355 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
24357         PR debug/80263
24358         * dwarf2out.c (modified_type_die): Try harder not to emit internal
24359         sizetype type into debug info.
24361 2017-04-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
24363         PR target/80099
24364         * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Eliminate
24365         unneeded test for TARGET_UPPER_REGS_SF.
24366         * config/rs6000/vsx.md (vsx_extract_v4sf_var): Likewise.
24368 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
24370         PR sanitizer/80444
24371         * sancov.c (sancov_pass): Use gsi_start_nondebug_after_labels_bb
24372         instead of gsi_after_labels.
24374 2017-04-18  Jeff Law  <law@redhat.com>
24376         * regcprop.c (maybe_mode_change): Avoid creating copies of the
24377         stack pointer.
24379         Revert:
24380         2017-04-13  Jeff Law  <law@redhat.com>
24381         * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
24382         in operands[1] if it is a MEM and TARGET_MIPS16 is active.
24384 2017-04-18  Georg-Johann Lay  <avr@gjlay.de>
24386         PR target/79453
24387         * config/avr/avr.c (intl.h): Include it.
24388         (avr_pgm_check_var_decl) [reason]: Wrap diagnostic snippets into _().
24390 2017-04-18  Martin Liska  <mliska@suse.cz>
24392         PR gcov-profile/78783
24393         * gcov-tool.c (gcov_output_files): Validate that destination
24394         file is either removed by the tool or by a user.
24396 2017-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
24397             Guy Benyei  <guybe@mellanox.com>
24399         * config/arc/arc.c (arc_reorg): Move loop_end_id into a more local
24400         block, and do not negate it, the stored id is already negative.
24402 2017-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
24404         * config/arc/arc.md (doloop_begin_i): Use @pcl assembler syntax.
24406 2017-04-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
24408         PR target/80098
24409         * config/rs6000/rs6000-cpus.def (OTHER_P9_VECTOR_MASKS): Define
24410         masks of options that should be turned off if the VSX vector
24411         options are turned off.
24412         (OTHER_P8_VECTOR_MASKS): Likewise.
24413         (OTHER_VSX_VECTOR_MASKS): Likewise.
24414         * config/rs6000/rs6000.c (rs6000_option_override_internal): Call
24415         rs6000_disable_incompatible_switches to validate no type switches
24416         like -mvsx.
24417         (rs6000_incompatible_switch): New function to disallow turning on
24418         other vector options if -mno-vsx, -mno-power8-vector, or
24419         -mno-power9-vector are specified.
24421 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
24423         * config/arc/arc.h (CRT_CALL_STATIC_FUNCTION): Use long calls.
24425 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
24427         * config/arc/arc-protos.h (arc_decl_pretend_args): Remove.
24428         * config/arc/arc.c (arc_decl_pretend_args): Likewise.
24429         * config/arc/arc.h (CFA_FRAME_BASE_OFFSET): Likewise.
24430         (ARG_POINTER_CFA_OFFSET): Likewise.
24432 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
24434         * config/arc/arc.c (arc_mode_dependent_address_p): Relax
24435         conditions to take advantage of various optimizations.
24437 2017-04-13  Jeff Law  <law@redhat.com>
24439         * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
24440         in operands[1] if it is a MEM and TARGET_MIPS16 is active.
24441         (zero_extendsidi2_dext): Likewise.
24443 2017-04-13  Jakub Jelinek  <jakub@redhat.com>
24445         PR sanitizer/80403
24446         * fold-const.c (fold_ternary_loc): Revert
24447         use op0 instead of fold_convert_loc (loc, type, arg0) part of
24448         2017-04-12 change.
24450 2017-04-13  Vladimir Makarov  <vmakarov@redhat.com>
24452         PR rtl-optimization/80343
24453         * lra-remat.c (update_scratch_ops): Assign original hard reg to
24454         new scratch pseudo.
24456 2017-04-13  Denis Khalikov <d.khalikov@partner.samsung.com>
24458         PR sanitizer/80414
24459         * ubsan.c (ubsan_expand_bounds_ifn): Pass original index
24460         to ubsan_encode_value.
24462 2017-04-13  Jeff Law  <law@redhat.com>
24464         * reload1.c (eliminate_regs_1): Call gen_rtx_raw_SUBREG for SUBREGs
24465         appearing in DEBUG_INSNs.
24467 2017-04-13  Martin Liska  <mliska@suse.cz>
24469         PR gcov-profile/80413
24470         * gcov-io.c (gcov_write_string): Copy to buffer just when
24471         allocated size is greater than zero.
24473 2017-04-13  Jakub Jelinek  <jakub@redhat.com>
24475         PR debug/80321
24476         * dwarf2out.c (decls_for_scope): Ignore declarations of
24477         current_function_decl in BLOCK_NONLOCALIZED_VARS.
24479 2017-04-12  Jan Hubicka  <hubicka@ucw.cz>
24481         PR lto/69953
24482         * ipa-visibility.c (non_local_p): Fix typos.
24483         (localize_node): When localizing symbol in same comdat group,
24484         dissolve the group only when we know external symbols are going
24485         to be privatized.
24486         (function_and_variable_visibility): Do not localize DECL_EXTERNAL.
24488 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
24490         PR tree-optimization/79390
24491         * optabs.c (emit_conditional_move): If the preferred op2/op3 operand
24492         order does not result in usable sequence, retry with reversed operand
24493         order.
24495         PR sanitizer/80403
24496         PR sanitizer/80404
24497         PR sanitizer/80405
24498         * fold-const.c (fold_ternary_loc): Use op1 instead of arg1 as argument
24499         to fold_build2_loc.  Convert TREE_OPERAND (tem, 0) to type.  Use
24500         op0 instead of fold_convert_loc (loc, type, arg0).
24502 2017-04-12  Jeff Law  <law@redhat.com>
24504         * genattrtab.c (write_eligible_delay): Verify DELAY_INSN still
24505         has a delay slot in the generated code.
24507         * config/cris/cris.md (cris_preferred_reload_class): Return
24508         GENNONACR_REGS rather than GENERAL_REGS.
24510 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
24512         PR c/80163
24513         * expr.c <CASE_CONVERT>: For EXPAND_INITIALIZER determine SIGN_EXTEND
24514         vs. ZERO_EXTEND based on signedness of treeop0's type rather than
24515         signedness of the result type.
24517 2017-04-12  Richard Biener  <rguenther@suse.de>
24518             Jeff Law  <law@redhat.com>
24520         PR tree-optimization/80359
24521         * tree-ssa-dse.c (maybe_trim_partially_dead_store): Do not
24522         trim stores to TARGET_MEM_REFs.
24524 2017-04-12  Richard Biener  <rguenther@suse.de>
24526         PR tree-optimization/79390
24527         * gimple-ssa-split-paths.c (is_feasible_trace): Restrict
24528         threading case even more.
24530 2017-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
24532         PR target/80382
24533         * config/rs6000/sync.md (atomic_load<mode>, atomic_store<mode): Test
24534         for quad_address_p for TImode, instead of just not indexed_address.
24536 2017-04-12  Richard Biener  <rguenther@suse.de>
24537             Bernd Edlinger  <bernd.edlinger@hotmail.de>
24539         PR middle-end/79671
24540         * alias.c (component_uses_parent_alias_set_from): Handle
24541         TYPE_TYPELESS_STORAGE.
24542         (get_alias_set): Likewise.
24543         * tree-core.h (tree_type_common): Add typeless_storage flag.
24544         * tree.h (TYPE_TYPELESS_STORAGE): New macro.
24545         * stor-layout.c (place_union_field): Set TYPE_TYPELESS_STORAGE
24546         for types containing members with TYPE_TYPELESS_STORAGE.
24547         (place_field): Likewise.
24548         (layout_type): Likewise for ARRAY_TYPE.
24549         * lto-streamer-out.c (hash_tree): Hash TYPE_TYPELESS_STORAGE.
24550         * tree-streamer-in.c (unpack_ts_type_common_value_fields): Stream
24551         TYPE_TYPELESS_STORAGE.
24552         * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
24554 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
24556         PR sanitizer/80349
24557         * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
24558         first argument to type.
24560 2017-04-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24562         PR target/80376
24563         PR target/80315
24564         * config/rs6000/rs6000.c (rs6000_expand_unop_builtin): Return
24565         CONST0_RTX (mode) rather than const0_rtx where appropriate.
24566         (rs6000_expand_binop_builtin): Likewise.
24567         (rs6000_expand_ternop_builtin): Likewise; also add missing
24568         vsx_xxpermdi_* variants; also fix typo (arg1 => arg2) for
24569         vshasigma built-ins.
24570         * doc/extend.texi: Document that vec_xxpermdi's third argument
24571         must be a constant.
24573 2017-04-11  Uros Bizjak  <ubizjak@gmail.com>
24575         * config/i386/i386.c (dimode_scalar_chain::compute_convert_gain):
24576         Use shift_const cost parameter when calculating gain of STV shifts.
24578 2017-04-11  Vladimir Makarov  <vmakarov@redhat.com>
24580         PR rtl-optimization/70478
24581         * lra-constraints.c (process_alt_operands): Check memory for
24582         disfavoring memory insn operand.
24584 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
24586         PR middle-end/80100
24587         * simplify-rtx.c (simplify_binary_operation_1) <case IOR>: Perform
24588         left shift in unsigned HOST_WIDE_INT type.
24590         PR rtl-optimization/80385
24591         * simplify-rtx.c (simplify_unary_operation_1): Don't transform
24592         (not (neg X)) into (plus X -1) for complex or non-integral modes.
24594         PR libgomp/80394
24595         * omp-low.c (scan_omp_task): Don't optimize away empty tasks
24596         if they have any depend clauses.
24598 2017-04-11  Martin Liska  <mliska@suse.cz>
24600         PR ipa/80212
24601         * cgraph.c (cgraph_node::dump): Dump calls_comdat_local.
24602         * ipa-split.c (split_function): Create a local comdat symbol
24603         if caller is in a comdat group.
24605 2017-04-11  Martin Liska  <mliska@suse.cz>
24607         PR ipa/80212
24608         * ipa-cp.c (determine_versionability): Handle calls_comdat_local
24609         flags.
24611 2017-04-11  Martin Sebor  <msebor@redhat.com>
24613         PR middle-end/80364
24614         * gimple-ssa-sprintf.c (get_int_range): Remove second argument and
24615         always use the int type.  Use INTEGRAL_TYPE_P() rather than testing
24616         for INTEGER_TYPE.
24617         (directive::set_width, directive::set_precision, format_character):
24618         Adjust.
24619         (parse_directive): Use INTEGRAL_TYPE_P() rather than testing for
24620         INTEGER_TYPE.
24622 2017-04-11  Richard Earnshaw  <rearnsha@arm.com>
24624         PR target/80389
24625         * config/arm/arm.c (arm_configure_build_target): When -mcpu and -arch
24626         conflict, set target->arch_name instead of target->cpu_name.
24628 2017-04-11  Richard Biener  <rguenther@suse.de>
24630         PR tree-optimization/80374
24631         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Use
24632         build_zero_cst, remove fold_convertible_p check again.
24634 2017-04-11  Martin Liska  <mliska@suse.cz>
24636         PR sanitizer/70878
24637         * ubsan.c (instrument_object_size): Do not instrument register
24638         variables.
24640 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
24642         PR target/80381
24643         * config/i386/i386-builtin-types.def
24644         (V16HI_FTYPE_V16HI_INT_V16HI_UHI_COUNT,
24645         V16HI_FTYPE_V16HI_V8HI_V16HI_UHI_COUNT,
24646         V16SI_FTYPE_V16SI_INT_V16SI_UHI_COUNT,
24647         V16SI_FTYPE_V16SI_V4SI_V16SI_UHI_COUNT,
24648         V2DI_FTYPE_V2DI_INT_V2DI_UQI_COUNT,
24649         V2DI_FTYPE_V2DI_V2DI_V2DI_UQI_COUNT,
24650         V32HI_FTYPE_V32HI_INT_V32HI_USI_COUNT,
24651         V32HI_FTYPE_V32HI_V8HI_V32HI_USI_COUNT,
24652         V4DI_FTYPE_V4DI_INT_V4DI_UQI_COUNT,
24653         V4DI_FTYPE_V4DI_V2DI_V4DI_UQI_COUNT,
24654         V4SI_FTYPE_V4SI_INT_V4SI_UQI_COUNT,
24655         V4SI_FTYPE_V4SI_V4SI_V4SI_UQI_COUNT,
24656         V8DI_FTYPE_V8DI_INT_V8DI_UQI_COUNT,
24657         V8DI_FTYPE_V8DI_V2DI_V8DI_UQI_COUNT,
24658         V8HI_FTYPE_V8HI_INT_V8HI_UQI_COUNT,
24659         V8HI_FTYPE_V8HI_V8HI_V8HI_UQI_COUNT,
24660         V8SI_FTYPE_V8SI_INT_V8SI_UQI_COUNT,
24661         V8SI_FTYPE_V8SI_V4SI_V8SI_UQI_COUNT): New function type aliases.
24662         * config/i386/i386-builtin.def (__builtin_ia32_pslld512_mask,
24663         __builtin_ia32_pslldi512_mask, __builtin_ia32_psllq512_mask,
24664         __builtin_ia32_psllqi512_mask, __builtin_ia32_psrad512_mask,
24665         __builtin_ia32_psradi512_mask, __builtin_ia32_psraq512_mask,
24666         __builtin_ia32_psraqi512_mask, __builtin_ia32_psrld512_mask,
24667         __builtin_ia32_psrldi512_mask, __builtin_ia32_psrlq512_mask,
24668         __builtin_ia32_psrlqi512_mask, __builtin_ia32_psllwi128_mask,
24669         __builtin_ia32_pslldi128_mask, __builtin_ia32_psllqi128_mask,
24670         __builtin_ia32_psllw128_mask, __builtin_ia32_pslld128_mask,
24671         __builtin_ia32_psllq128_mask, __builtin_ia32_psllwi256_mask,
24672         __builtin_ia32_psllw256_mask, __builtin_ia32_pslldi256_mask,
24673         __builtin_ia32_pslld256_mask, __builtin_ia32_psllqi256_mask,
24674         __builtin_ia32_psllq256_mask, __builtin_ia32_psradi128_mask,
24675         __builtin_ia32_psrad128_mask, __builtin_ia32_psradi256_mask,
24676         __builtin_ia32_psrad256_mask, __builtin_ia32_psraqi128_mask,
24677         __builtin_ia32_psraq128_mask, __builtin_ia32_psraqi256_mask,
24678         __builtin_ia32_psraq256_mask, __builtin_ia32_psrldi128_mask,
24679         __builtin_ia32_psrld128_mask, __builtin_ia32_psrldi256_mask,
24680         __builtin_ia32_psrld256_mask, __builtin_ia32_psrlqi128_mask,
24681         __builtin_ia32_psrlq128_mask, __builtin_ia32_psrlqi256_mask,
24682         __builtin_ia32_psrlq256_mask, __builtin_ia32_psrawi256_mask,
24683         __builtin_ia32_psraw256_mask, __builtin_ia32_psrawi128_mask,
24684         __builtin_ia32_psraw128_mask, __builtin_ia32_psrlwi256_mask,
24685         __builtin_ia32_psrlw256_mask, __builtin_ia32_psrlwi128_mask,
24686         __builtin_ia32_psrlw128_mask, __builtin_ia32_psllwi512_mask,
24687         __builtin_ia32_psllw512_mask, __builtin_ia32_psrawi512_mask,
24688         __builtin_ia32_psraw512_mask, __builtin_ia32_psrlwi512_mask,
24689         __builtin_ia32_psrlw512_mask): Use _COUNT suffixed function type
24690         aliases.
24691         * config/i386/i386.c (ix86_expand_args_builtin): Rename last_arg_count
24692         flag to second_arg_count, handle 4 argument function type _COUNT
24693         aliases, handle second_arg_count on second argument rather than last.
24695 2017-04-10  Jeff Law  <law@redhat.com>
24697         PR tree-optimization/80374
24698         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Do not try to
24699         record anything if we can not convert integer_zero_node to the
24700         desired type.
24702 2017-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24704         PR target/80108
24705         * config/rs6000/rs6000.c (rs6000_option_override_internal):
24706         Enhance special handling given to the TARGET_P9_MINMAX option in
24707         relation to certain other options.
24709 2017-04-10  Bin Cheng  <bin.cheng@arm.com>
24711         PR tree-optimization/80153
24712         * tree-ssa-loop-ivopts.c (add_iv_candidate_for_use): Check and
24713         remove POINTER_PLUS_EXPR's base part directly, rather than through
24714         aff_tree.
24716 2017-04-10  Richard Biener  <rguenther@suse.de>
24717             Bin Cheng  <bin.cheng@arm.com>
24719         PR tree-optimization/80153
24720         * tree-affine.c (aff_combination_to_tree): Get base pointer from
24721         the first element of pointer type aff_tree.  Build result expr in
24722         aff_tree's type.
24723         (add_elt_to_tree): Convert to type unconditionally.  Remove other
24724         fold_convert calls.
24725         * tree-ssa-loop-ivopts.c (alloc_iv): Pass in consistent types.
24726         (rewrite_use_nonlinear_expr): Check invariant using iv information.
24728 2017-04-10  Richard Biener  <rguenther@suse.de>
24730         * tree-ssa-structalias.c (find_func_aliases): Properly handle
24731         asm inputs.
24733 2017-04-10  Vladimir Makarov  <vmakarov@redhat.com>
24735         PR rtl-optimization/70478
24736         * lra-constraints.c (curr_small_class_check): New.
24737         (update_and_check_small_class_inputs): New.
24738         (process_alt_operands): Update curr_small_class_check.  Disfavor
24739         alternative insn memory operands.  Check available regs for small
24740         class operands.
24742 2017-03-31  Matthew Fortune  <matthew.fortune@imgtec.com>
24744         PR target/80057
24745         * config/mips/mips.opt (-mvirt): Update description.
24746         * doc/invoke.texi (-mvirt): Likewise.
24748 2017-04-10  Richard Biener  <rguenther@suse.de>
24750         PR middle-end/80362
24751         * fold-const.c (fold_binary_loc): Look at unstripped ops when
24752         looking for NEGATE_EXPR in -A / -B to A / B folding.
24754 2017-04-10  Martin Liska  <mliska@suse.cz>
24756         PR gcov-profile/80224
24757         * gcov.c (print_usage): Fix usage string.
24758         (get_gcov_intermediate_filename): Remove.
24759         (output_gcov_file): Use both for normal and intermediate format.
24760         (generate_results): Do not initialize special file for
24761         intermediate format.
24763 2017-04-10  Richard Biener  <rguenther@suse.de>
24765         PR tree-optimization/80304
24766         * tree-ssa-loop-im.c (ref_indep_loop_p_1): Also recurse
24767         for safelen.
24769 2017-04-10  Nathan Sidwell  <nathan@acm.org>
24771         PR target/79905
24772         * config/rs6000/rs6000.c (rs6000_vector_type): New.
24773         (rs6000_init_builtins): Use it.
24775 2016-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24777         * config/arm/arm.md (<mrc>): Add mode to SET source.
24778         (<mrrc>): Likewise.
24780 2017-04-10  Richard Biener  <rguenther@suse.de>
24782         PR middle-end/80344
24783         * gimplify.c (is_gimple_mem_rhs_or_call): Allow CLOBBERs.
24785 2017-04-10  Jakub Jelinek  <jakub@redhat.com>
24787         PR target/80324
24788         * config/i386/avx512fintrin.h (_mm512_reduce_add_epi32,
24789         _mm512_reduce_mul_epi32, _mm512_reduce_and_epi32,
24790         _mm512_reduce_or_epi32, _mm512_mask_reduce_add_epi32,
24791         _mm512_mask_reduce_mul_epi32, _mm512_mask_reduce_and_epi32,
24792         _mm512_mask_reduce_or_epi32, _mm512_reduce_min_epi32,
24793         _mm512_reduce_max_epi32, _mm512_reduce_min_epu32,
24794         _mm512_reduce_max_epu32, _mm512_mask_reduce_min_epi32,
24795         _mm512_mask_reduce_max_epi32, _mm512_mask_reduce_min_epu32,
24796         _mm512_mask_reduce_max_epu32, _mm512_reduce_add_ps,
24797         _mm512_reduce_mul_ps, _mm512_mask_reduce_add_ps,
24798         _mm512_mask_reduce_mul_ps, _mm512_reduce_min_ps, _mm512_reduce_max_ps,
24799         _mm512_mask_reduce_min_ps, _mm512_mask_reduce_max_ps,
24800         _mm512_reduce_add_epi64, _mm512_reduce_mul_epi64,
24801         _mm512_reduce_and_epi64, _mm512_reduce_or_epi64,
24802         _mm512_mask_reduce_add_epi64, _mm512_mask_reduce_mul_epi64,
24803         _mm512_mask_reduce_and_epi64, _mm512_mask_reduce_or_epi64,
24804         _mm512_reduce_min_epi64, _mm512_reduce_max_epi64,
24805         _mm512_mask_reduce_min_epi64, _mm512_mask_reduce_max_epi64,
24806         _mm512_reduce_min_epu64, _mm512_reduce_max_epu64,
24807         _mm512_mask_reduce_min_epu64, _mm512_mask_reduce_max_epu64,
24808         _mm512_reduce_add_pd, _mm512_reduce_mul_pd, _mm512_mask_reduce_add_pd,
24809         _mm512_mask_reduce_mul_pd, _mm512_reduce_min_pd, _mm512_reduce_max_pd,
24810         _mm512_mask_reduce_min_pd, _mm512_mask_reduce_max_pd): New intrinsics.
24812 2017-04-08  Vladimir Makarov  <vmakarov@redhat.com>
24814         PR rtl-optimization/70478
24815         * lra-constraints.c: Reverse the last patch.
24817 2017-04-08  Andreas Tobler  <andreast@gcc.gnu.org>
24819         * config/aarch64/aarch64-freebsd.h: Define MCOUNT_NAME.
24820         Add comment for WCHAR_T.
24822 2017-04-08  Martin Liska  <mliska@suse.cz>
24824         Revert:
24825         2017-04-07  Martin Liska  <mliska@suse.cz>
24827         PR ipa/80212
24828         * ipa-split.c (split_function): Add function part to a same comdat
24829         group.
24831 2017-04-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24833         PR target/80358
24834         * config/rs6000/rs6000.c (expand_block_compare): Fix boundary check.
24836 2017-04-07  Pat Haugen  <pthaugen@us.ibm.com>
24838         * rs6000/rs6000.c (vec_load_pendulum): Rename...
24839         (vec_pairing): ...to this.
24840         (power9_sched_reorder2): Rewrite code for pairing vector/vecload insns.
24841         (rs6000_sched_init): Adjust for name change.
24842         (struct rs6000_sched_context): Likewise.
24843         (rs6000_init_sched_context): Likewise.
24844         (rs6000_set_sched_context): Likewise.
24846 2017-04-07  Jakub Jelinek  <jakub@redhat.com>
24848         PR target/80322
24849         PR target/80323
24850         PR target/80325
24851         PR target/80326
24852         * config/i386/avxintrin.h (_mm256_cvtsd_f64, _mm256_cvtss_f32): New
24853         intrinsics.
24854         * config/i386/avx512fintrin.h (_mm512_int2mask, _mm512_mask2int,
24855         _mm512_abs_ps, _mm512_mask_abs_ps, _mm512_abs_pd, _mm512_mask_abs_pd,
24856         _mm512_cvtsd_f64, _mm512_cvtss_f32): Likewise.
24858 2017-04-07  Andreas Tobler  <andreast@gcc.gnu.org>
24860         * config/aarch64/aarch64-freebsd.h: Define WCHAR_TYPE.
24862 2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>
24864         PR rtl-optimization/70703
24865         * ira-color.c (update_conflict_hard_regno_costs): Use
24866         int64_t instead of HOST_WIDE_INT.
24868 2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>
24870         PR rtl-optimization/70478
24871         * lra-constraints.c (process_alt_operands): Disfavor alternative
24872         insn memory operands.
24874 2017-04-07  Jeff Law  <law@redhat.com>
24876         * config/iq2000/iq2000.c (final_prescan_insn): Do not separate a
24877         CALL and NOTE_INSN_CALL_ARG_LOCATION.
24879 2017-04-07  Martin Liska  <mliska@suse.cz>
24881         PR target/79889
24882         * config/aarch64/aarch64.c (aarch64_process_target_attr):
24883         Show error message instead of an ICE.
24885 2017-04-07  Martin Liska  <mliska@suse.cz>
24887         PR ipa/80212
24888         * ipa-split.c (split_function): Add function part to a same comdat
24889         group.
24891 2017-04-07  Richard Biener  <rguenther@suse.de>
24893         PR middle-end/80341
24894         * tree.c (get_unwidened): Also handle ! for_type case for
24895         INTEGER_CSTs.
24896         * convert.c (do_narrow): Split out from ...
24897         (convert_to_integer_1): ... here.  Do not pass final truncation
24898         type to get_unwidened for TRUNC_DIV_EXPR.
24900 2017-04-07  Richard Biener  <rguenther@suse.de>
24902         * tree-affine.c (wide_int_ext_for_comb): Take type rather
24903         than aff_tree.
24904         (aff_combination_const): Adjust.
24905         (aff_combination_scale): Likewise.
24906         (aff_combination_add_elt): Likewise.
24907         (aff_combination_add_cst): Likewise.
24908         (aff_combination_convert): Likewise.
24909         (add_elt_to_tree): Likewise.  Remove unused argument.
24910         (aff_combination_to_tree): Adjust calls to add_elt_to_tree.
24912 2017-04-07  Sebastian Huber  <sebastian.huber@embedded-brains.de>
24914         * config/arm/arm.h (ARM_DEFAULT_SHORT_ENUMS): Provide default
24915         definition.
24916         * config/arm/arm.c (arm_default_short_enums): Use
24917         ARM_DEFAULT_SHORT_ENUMS.
24918         * config/arm/rtems.h (ARM_DEFAULT_SHORT_ENUMS): Define.
24920 2017-04-06  Jakub Jelinek  <jakub@redhat.com>
24922         PR debug/80234
24923         * dwarf2out.c (gen_member_die): Handle C++17 inline static data
24924         members with redundant out-of-class redeclaration.
24926 2017-04-06  Uros Bizjak  <ubizjak@gmail.com>
24928         PR target/80286
24929         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): New pattern.
24930         * config/i386/i386.md (*zero_extendsidi2):
24931         Add (?*x,*x) and (?*v,*v) alternatives.
24933 2017-04-06  Uros Bizjak  <ubizjak@gmail.com>
24935         PR target/79733
24936         * config/i386/i386.c (ix86_expand_builtin)
24937         <case IX86_BUILTIN_K{,OR}TEST{C,Z}{8,16,32,64}>: Determine insn operand
24938         mode from insn data. Convert operands to insn operand mode.
24939         Copy operands that don't satisfy insn predicate to a register.
24941 2017-04-06  Sam Thursfield  <sam.thursfield@codethink.co.uk>
24943         * config/rs6000/x-aix: Increase memory limit for genautomata on AIX.
24944         Update comments.
24946 2017-04-06  Richard Biener  <rguenther@suse.de>
24948         PR tree-optimization/80334
24949         * tree-ssa-loop-ivopts.c (rewrite_use_address): Properly
24950         preserve alignment of accesses.
24952 2017-04-06  Richard Biener  <rguenther@suse.de>
24954         PR tree-optimization/80262
24955         * tree-sra.c (build_ref_for_offset): Preserve address-space
24956         information.
24957         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
24958         Drop useless address-space information on MEM_REF offsets.
24960 2017-04-05  Andreas Schwab  <schwab@linux-m68k.org>
24962         * builtins.def (BUILT_IN_UPDATE_SETJMP_BUF): Fix type.
24964 2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>
24966         PR rtl-optimization/70703
24967         * ira-color.c (update_conflict_hard_regno_costs): Use
24968         HOST_WIDE_INT instead of long.
24970 2017-04-05  Uros Bizjak  <ubizjak@gmail.com>
24972         PR target/80298
24973         * config/i386/mmintrin.h: Add -msse target option when __SSE__ is
24974         not defined for x86_64 target.  Add -mmmx target option when __SSE2__
24975         is not defined.
24976         * config/i386/mm3dnow.h: Add -msse target when __SSE__ is not defined
24977         for x86_64 target.  Handle -m3dnowa option.
24979 2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>
24981         PR rtl-optimization/70703
24982         * ira-color.c (update_costs_from_allocno): Use the smallest mode.
24983         (update_conflict_hard_regno_costs): Use long instead of unsigned
24984         arithmetic for cost calculation.
24986 2017-04-05  Jakub Jelinek  <jakub@redhat.com>
24987             Bernd Edlinger  <bernd.edlinger@hotmail.de>
24989         PR sanitizer/80308
24990         * asan.c (asan_store_shadow_bytes): Fix location of last_chunk_value
24991         for big endian.
24993 2017-04-05  Eric Botcazou  <ebotcazou@adacore.com>
24995         PR target/78002
24996         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Replace
24997         ptr_mode with Pmode throughout.
24998         * config/aarch64/aarch64.md (probe_stack_range_<PTR:mode): Rename
24999         into probe_stack_range and use DImode.
25001 2017-04-05  Dominik Vogt  <vogt@linux.vnet.ibm.com>
25003         PR target/79890
25004         * config/s390/s390.c (s390_register_info_gprtofpr): Return if
25005         call_eh_return is true.
25007 2017-04-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25009         * config/s390/s390-c.c (s390_resolve_overloaded_builtin):
25010         Initialize last_match_fntype_index.
25012 2017-04-05  Jakub Jelinek  <jakub@redhat.com>
25014         PR target/80310
25015         * tree-nvr.c: Include internal-fn.h.
25016         (pass_return_slot::execute): Ignore internal calls without
25017         direct optab.
25019 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
25020             Richard Biener  <rguenther@suse.de>
25022         PR c++/80297
25023         * genmatch.c (capture::gen_transform): For GENERIC unshare_expr
25024         captures used multiple times, except for the last use.
25025         * generic-match-head.c: Include gimplify.h.
25027 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
25029         PR tree-optimization/79390
25030         * target.h (struct noce_if_info): Declare.
25031         * targhooks.h (default_noce_conversion_profitable_p): Declare.
25032         * target.def (noce_conversion_profitable_p): New target hook.
25033         * ifcvt.h (struct noce_if_info): New type, moved from ...
25034         * ifcvt.c (struct noce_if_info): ... here.
25035         (noce_conversion_profitable_p): Renamed to ...
25036         (default_noce_conversion_profitable_p): ... this.  No longer
25037         static nor inline.
25038         (noce_try_store_flag_constants, noce_try_addcc,
25039         noce_try_store_flag_mask, noce_try_cmove, noce_try_cmove_arith,
25040         noce_convert_multiple_sets): Use targetm.noce_conversion_profitable_p
25041         instead of noce_conversion_profitable_p.
25042         * config/i386/i386.c: Include ifcvt.h.
25043         (ix86_option_override_internal): Don't override
25044         PARAM_MAX_RTL_IF_CONVERSION_INSNS default.
25045         (ix86_noce_conversion_profitable_p): New function.
25046         (TARGET_NOCE_CONVERSION_PROFITABLE_P): Redefine.
25047         * config/i386/x86-tune.def (X86_TUNE_ONE_IF_CONV_INSN): Adjust comment.
25048         * doc/tm.texi.in (TARGET_NOCE_CONVERSION_PROFITABLE_P): Add.
25049         * doc/tm.texi: Regenerated.
25051 2017-04-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25053         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Grammar
25054         correction.
25056 2017-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
25058         PR target/80307
25059         * config/arm/arm.c (thumb1_rtx_costs): Give a cost of 32
25060         instructions for small multiply cores.
25062 2017-04-04  Jeff Law  <law@redhat.com>
25064         * config/mips/mips.c (mips_multi_add): Zero initialize the newly
25065         added member.
25066         (mips_expand_vec_perm_const): Initialize elements in orig_perm
25067         that are not set by the loop over the elements.
25069 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
25071         PR target/80286
25072         * config/i386/i386.c (ix86_expand_args_builtin): If op has scalar
25073         int mode, convert_modes it to mode as unsigned, otherwise use
25074         lowpart_subreg to mode rather than SImode.
25075         * config/i386/sse.md (<mask_codefor>ashr<mode>3<mask_name>,
25076         ashr<mode>3, ashr<mode>3<mask_name>, <shift_insn><mode>3<mask_name>):
25077         Use DImode instead of SImode for the shift count operand.
25078         * config/i386/mmx.md (mmx_ashr<mode>3, mmx_<shift_insn><mode>3):
25079         Likewise.
25081 2017-04-04  Richard Biener  <rguenther@suse.de>
25083         PR middle-end/80281
25084         * match.pd (A + (-B) -> A - B): Make sure to preserve unsigned
25085         arithmetic done for the negate or the plus.  Simplify.
25086         (A - (-B) -> A + B): Likewise.
25087         * fold-const.c (split_tree): Make sure to not negate pointers.
25089 2017-04-04  Segher Boessenkool  <segher@kernel.crashing.org>
25091         PR rtl-optimization/60818
25092         * simplify-rtx.c (simplify_binary_operation_1): Do not replace
25093         a compare of comparisons with the thing compared if this results
25094         in a different machine mode.
25096 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
25098         * alias.c (base_alias_check): Fix typo in comment.
25099         * cgraph.h (class ipa_polymorphic_call_context): Likewise.
25100         * cgraphunit.c (symbol_table::compile): Likewise.
25101         * collect2.c (maybe_run_lto_and_relink): Likewise.
25102         * config/arm/arm.c (arm_thumb1_mi_thunk): Likewise.
25103         * config/avr/avr-arch.h (avr_arch_info_t): Likewise.
25104         * config/avr/avr.c (avr_map_op_t): Likewise.
25105         * config/cr16/cr16.h (DATA_ALIGNMENT): Likewise.
25106         * config/epiphany/epiphany.c (TARGET_ARG_PARTIAL_BYTES): Likewise.
25107         * config/epiphany/epiphany.md (movcc): Likewise.
25108         * config/i386/i386.c (legitimize_pe_coff_extern_decl): Likewise.
25109         * config/m68k/m68k.c (struct _sched_ib, m68k_sched_variable_issue):
25110         Likewise.
25111         * config/mips/mips.c (mips_save_restore_reg): Likewise.
25112         * config/rx/rx.c (rx_is_restricted_memory_address): Likewise.
25113         * config/s390/s390.c (Z10_EARLYLOAD_DISTANCE): Likewise.
25114         * config/sh/sh.c (sh_rtx_costs): Likewise.
25115         * fold-const.c (fold_truth_andor): Likewise.
25116         * genautomata.c (collapse_flag): Likewise.
25117         * gengtype.h (struct type::u::s): Likewise.
25118         * gensupport.c (has_subst_attribute, add_mnemonic_string): Likewise.
25119         * input.c (FORMAT_AMOUNT): Likewise.
25120         * ipa-cp.c (class ipcp_lattice, agg_replacements_to_vector)
25121         (known_aggs_to_agg_replacement_list): Likewise.
25122         * ipa-inline-analysis.c: Likewise.
25123         * ipa-inline.h (estimate_edge_time, estimate_edge_hints): Likewise.
25124         * ipa-polymorphic-call.c
25125         (ipa_polymorphic_call_context::restrict_to_inner_class): Likewise.
25126         * loop-unroll.c (analyze_insn_to_expand_var): Likewise.
25127         * lra.c (lra_optional_reload_pseudos, lra_subreg_reload_pseudos):
25128         Likewise.
25129         * modulo-sched.c (apply_reg_moves): Likewise.
25130         * omp-expand.c (build_omp_regions_1): Likewise.
25131         * trans-mem.c (struct tm_wrapper_hasher): Likewise.
25132         * tree-ssa-loop-ivopts.c (may_eliminate_iv): Likewise.
25133         * tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Likewise.
25134         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
25135         * value-prof.c: Likewise.
25136         * var-tracking.c (val_reset): Likewise.
25138 2017-04-03  Richard Biener  <rguenther@suse.de>
25140         PR tree-optimization/80275
25141         * fold-const.c (split_address_to_core_and_offset): Handle
25142         POINTER_PLUS_EXPR.
25144 2017-04-03  Eric Botcazou  <ebotcazou@adacore.com>
25146         * tree-nested.c (get_descriptor_type): Make sure that the alignment of
25147         descriptors is at least equal to that of functions.
25149 2017-04-02  Uros Bizjak  <ubizjak@gmail.com>
25151         * config/i386/sse.md (movdi_to_sse): Add missing DONE.
25153 2017-04-02  Uros Bizjak  <ubizjak@gmail.com>
25155         PR target/80250
25156         * config/i386/sse.md (mov<IMOD4:mode>): Remove insn pattern.
25157         (mov<IMOD4:mode>): New expander.
25158         (*mov<IMOD4:mode>_internal): New insn and split pattern.
25160 2017-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
25162         PR rtl-optimization/79405
25163         * fwprop.c (propagations_left): New variable.
25164         (forward_propagate_into): Decrement it.
25165         (fwprop_init): Initialize it.
25166         (fw_prop): If the variable has reached zero, stop propagating.
25167         (fwprop_addr): Ditto.
25169 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
25171         PR debug/79255
25172         * dwarf2out.c (decls_for_scope): If BLOCK_NONLOCALIZED_VAR is
25173         a FUNCTION_DECL, pass it as decl instead of origin to
25174         process_scope_var.
25176 2017-03-31  Alexander Monakov  <amonakov@ispras.ru>
25178         * config/nvptx/nvptx.c (nvptx_output_softstack_switch): Correct format
25179         string.
25181 2017-03-31  Pat Haugen  <pthaugen@us.ibm.com>
25183         PR target/80107
25184         * config/rs6000/rs6000.md (extendhi<mode>2): Add test for
25185         TARGET_VSX_SMALL_INTEGER.
25187 2017-03-31  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25189         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
25190         reference to the OpenPOWER 64-Bit ELF V2 ABI Specification.
25192 2017-03-31  Matthew Fortune  <matthew.fortune@imgtec.com>
25194         * config/mips/mips-msa.md (msa_vec_extract_<msafmt_f>): Update
25195         extraction from odd-numbered MSA register.
25197 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
25199         PR middle-end/80173
25200         * expmed.c (store_bit_field_1): Don't attempt to create
25201         a word subreg out of hard registers wider than word if they
25202         have HARD_REGNO_NREGS of 1 for their mode.
25204         PR middle-end/80163
25205         * varasm.c (initializer_constant_valid_p_1): Disallow sign-extending
25206         conversions to integer types wider than word and pointer.
25208         PR debug/80025
25209         * cselib.h (rtx_equal_for_cselib_1): Add depth argument.
25210         (rtx_equal_for_cselib_p): Pass 0 to it.
25211         * cselib.c (cselib_hasher::equal): Likewise.
25212         (rtx_equal_for_cselib_1): Add depth argument.  If depth
25213         is 128, don't look up VALUE locs and punt.  Increment
25214         depth in recursive calls when walking VALUE locs.
25216 2017-03-31  Bernd Edlinger  <bernd.edlinger@hotmail.de>
25218         * gcov.c (md5sum_to_hex): Fix output of MD5 hex bytes.
25219         (make_gcov_file_name): Use the canonical path name for generating
25220         the MD5 value.
25221         (read_line): Fix handling of files with ascii null bytes.
25223 2017-03-30  Matthew Fortune  <matthew.fortune@imgtec.com>
25225         * config/mips/mips.c (mips_expand_vector_init): Create a const_vector
25226         to initialise a vector register instead
25227         of using a const_int.
25229 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
25231         PR translation/80189
25232         * gimplify.c (omp_default_clause): Use %qs instead of %s in
25233         diagnostic messages.
25235 2017-03-30  Peter Bergner  <bergner@vnet.ibm.com>
25237         PR target/80246
25238         * config/rs6000/dfp.md (dfp_dxex_<mode>): Update mode of operand 0.
25239         (dfp_diex_<mode>): Update mode of operand 1.
25240         * doc/extend.texi (dxex, dxexq): Document change to return type.
25241         (diex, diexq): Document change to argument type.
25243 2017-03-30  Martin Jambor  <mjambor@suse.cz>
25245         PR ipa/77333
25246         * cgraph.h (cgraph_build_function_type_skip_args): Declare.
25247         * cgraph.c (redirect_call_stmt_to_callee): Set gimple fntype so that
25248         it reflects the signature changes performed at the callee side.
25249         * cgraphclones.c (build_function_type_skip_args): Make public, renamed
25250         to cgraph_build_function_type_skip_args.
25251         (build_function_decl_skip_args): Adjust call to the above function.
25253 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
25255         PR target/80206
25256         * config/i386/sse.md
25257         (<extract_type>_vextract<shuffletype><extract_suf>_mask): Use
25258         register as dest whenever it is a MEM not rtx_equal_p to the
25259         corresponding dup operand, and when forcing into reg move the
25260         reg into the memory afterwards.
25261         (<extract_type_2>_vextract<shuffletype><extract_suf_2>_mask):
25262         Likewise.  Use <ssehalfvecmode> instead of <ssequartermode>
25263         for the force_reg mode.
25264         (avx512vl_vextractf128<mode>): Use register as dest either
25265         always when a MEM, or when it is a MEM not rtx_equal_p to the
25266         corresponding dup operand, or even not when it is a CONST_VECTOR
25267         depending on the mode and lo vs. hi.
25268         (avx512dq_vextract<shuffletype>64x2_1_maskm): Remove extraneous
25269         parens.
25270         (avx512f_vextract<shuffletype>32x4_1_maskm): Likewise.
25271         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name>):
25272         Likewise.  Require that operands[2] is even.
25273         (<mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name>):
25274         Remove extraneous parens.  Require that operands[2] is a multiple
25275         of 4.
25276         (vec_extract_lo_<mode><mask_name>): Don't bother testing if
25277         operands[0] is a MEM if <mask_applied>, the predicates/constraints
25278         disallow memory then.
25280 2017-03-30  Richard Biener  <rguenther@suse.de>
25282         PR tree-optimization/77498
25283         * tree-ssa-pre.c (phi_translate_1): Do not allow simplifications
25284         to non-constants over backedges.
25286 2017-03-29  Segher Boessenkool  <segher@kernel.crashing.org>
25288         PR rtl-optimization/80233
25289         * combine.c (combine_instructions): Only take NONDEBUG_INSN_P insns
25290         as last_combined_insn.  Do not test for BARRIER_P separately.
25292 2017-03-29  Andreas Schwab  <schwab@suse.de>
25294         PR ada/80146
25295         * calls.c (prepare_call_address): Convert funexp to Pmode before
25296         copying to temp reg.
25298 2017-03-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25300         PR tree-optimization/80158
25301         * gimple-ssa-strength-reduction.c (replace_mult_candidate):
25302         Handle possible future case of more than one alternate
25303         interpretation.
25304         (replace_rhs_if_not_dup): Likewise.
25305         (replace_one_candidate): Likewise.
25307 2017-03-28  Vladimir Makarov  <vmakarov@redhat.com>
25309         PR rtl-optimization/80193
25310         * ira.c (ira): Do not check allocation for LRA.
25312 2017-03-28  Alexander Monakov  <amonakov@ispras.ru>
25314         * config/nvptx/nvptx-protos.h (nvptx_output_simt_enter): Declare.
25315         (nvptx_output_simt_exit): Declare.
25316         * config/nvptx/nvptx.c (nvptx_init_unisimt_predicate): Use
25317         cfun->machine->unisimt_location.  Handle NULL unisimt_predicate.
25318         (init_softstack_frame): Move initialization of crtl->is_leaf to...
25319         (nvptx_declare_function_name): ...here.  Emit declaration of local
25320         memory space buffer for omp_simt_enter insn.
25321         (nvptx_output_unisimt_switch): New.
25322         (nvptx_output_softstack_switch): New.
25323         (nvptx_output_simt_enter): New.
25324         (nvptx_output_simt_exit): New.
25325         * config/nvptx/nvptx.h (struct machine_function): New fields
25326         has_simtreg, unisimt_location, simt_stack_size, simt_stack_align.
25327         * config/nvptx/nvptx.md (UNSPECV_SIMT_ENTER): New unspec.
25328         (UNSPECV_SIMT_EXIT): Ditto.
25329         (omp_simt_enter_insn): New insn.
25330         (omp_simt_enter): New expansion.
25331         (omp_simt_exit): New insn.
25332         * config/nvptx/nvptx.opt (msoft-stack-reserve-local): New option.
25334         * internal-fn.c (expand_GOMP_SIMT_ENTER): New.
25335         (expand_GOMP_SIMT_ENTER_ALLOC): New.
25336         (expand_GOMP_SIMT_EXIT): New.
25337         * internal-fn.def (GOMP_SIMT_ENTER): New internal function.
25338         (GOMP_SIMT_ENTER_ALLOC): Ditto.
25339         (GOMP_SIMT_EXIT): Ditto.
25340         * target-insns.def (omp_simt_enter): New insn.
25341         (omp_simt_exit): Ditto.
25342         * omp-low.c (struct omplow_simd_context): New fields simt_eargs,
25343         simt_dlist.
25344         (lower_rec_simd_input_clauses): Implement SIMT privatization.
25345         (lower_rec_input_clauses): Likewise.
25346         (lower_lastprivate_clauses): Handle SIMT privatization.
25348         * omp-offload.c: Include langhooks.h, tree-nested.h, stor-layout.h.
25349         (ompdevlow_adjust_simt_enter): New.
25350         (find_simtpriv_var_op): New.
25351         (execute_omp_device_lower): Handle IFN_GOMP_SIMT_ENTER,
25352         IFN_GOMP_SIMT_ENTER_ALLOC, IFN_GOMP_SIMT_EXIT.
25354         * tree-inline.h (struct copy_body_data): New field dst_simt_vars.
25355         * tree-inline.c (expand_call_inline): Handle SIMT privatization.
25356         (copy_decl_for_dup_finish): Ditto.
25358         * tree-ssa.c (execute_update_addresses_taken): Handle GOMP_SIMT_ENTER.
25360 2017-03-28  Uros Bizjak  <ubizjak@gmail.com>
25362         PR target/53383
25363         * config/i386/i386.c (ix86_option_override_internal): Always
25364         allow -mpreferred-stack-boundary=3 for 64-bit targets.
25366 2017-03-28  Bin Cheng  <bin.cheng@arm.com>
25368         * tree-vect-loop.c (optimize_mask_stores): Add bb to the right loop.
25370 2017-03-28  Bin Cheng  <bin.cheng@arm.com>
25372         * tree-vect-loop-manip.c (slpeel_add_loop_guard): New param and
25373         mark new edge's irreducible flag accordign to it.
25374         (vect_do_peeling): Check loop preheader edge's irreducible flag
25375         and pass it to function slpeel_add_loop_guard.
25377 2017-03-28  Richard Sandiford  <richard.sandiford@arm.com>
25379         PR tree-optimization/80218
25380         * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
25381         Update block frequencies and counts.
25383 2017-03-28  Richard Biener  <rguenther@suse.de>
25385         PR tree-optimization/78644
25386         * tree-ssa-ccp.c (evaluate_stmt): When we may not use the value
25387         of a simplification result we may not use it at all.
25389 2017-03-28  Richard Biener  <rguenther@suse.de>
25391         PR ipa/80205
25392         * tree-inline.c (copy_phis_for_bb): Do not create PHI node
25393         without arguments, generate default definition of a SSA name.
25395 2017-03-28  Richard Biener  <rguenther@suse.de>
25397         PR middle-end/80222
25398         * gimple-fold.c (gimple_fold_indirect_ref): Do not touch
25399         TYPE_REF_CAN_ALIAS_ALL references.
25400         * fold-const.c (fold_indirect_ref_1): Likewise.
25402 2017-03-28  Martin Liska  <mliska@suse.cz>
25404         PR ipa/80104
25405         * cgraphunit.c (cgraph_node::expand_thunk): Mark argument of a
25406         thunk call as DECL_GIMPLE_REG_P when vector or complex type.
25408 2017-03-28  Claudiu Zissulescu  <claziss@synopsys.com>
25409             Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
25411         * config/arc/arc.h (CPP_SPEC): Add subtarget_cpp_spec.
25412         (EXTRA_SPECS): Define.
25413         (SUBTARGET_EXTRA_SPECS): Likewise.
25414         (SUBTARGET_CPP_SPEC): Likewise.
25415         * config/arc/elf.h (EXTRA_SPECS): Renamed to
25416         SUBTARGET_EXTRA_SPECS.
25417         * config/arc/linux.h (SUBTARGET_CPP_SPEC): Define.
25419 2017-03-28  Claudiu Zissulescu  <claziss@synopsys.com>
25421         * config/arc/simdext.md (vst64_insn): Update pattern.
25422         (vld32wh_insn): Likewise.
25423         (vld32wl_insn): Likewise.
25424         (vld64_insn): Likewise.
25425         (vld32_insn): Likewise.
25427 2017-03-28  Marek Polacek  <polacek@redhat.com>
25429         PR sanitizer/80067
25430         * fold-const.c (fold_comparison): Use protected_set_expr_location
25431         instead of SET_EXPR_LOCATION.
25433 2017-03-28  Markus Trippelsdorf  <markus@trippelsdorf.de>
25435         * tree.c (add_expr): Avoid name lookup warning.
25437 2017-03-27  Jeff Law  <law@redhat.com>
25439         PR tree-optimization/80216
25440         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Fix typo in
25441         function name.  Limit recursion depth.
25442         (record_temporary_equivalences): Corresponding changes.
25444 2017-03-27  Jonathan Wakely  <jwakely@redhat.com>
25446         * doc/invoke.texi (-Wno-narrowing): Reorder so default behavior is
25447         covered first.
25449 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
25451         PR target/80102
25452         * reg-notes.def (REG_CFA_NOTE): Define.  Use it for CFA related
25453         notes.
25454         * cfgcleanup.c (reg_note_cfa_p): New array.
25455         (insns_have_identical_cfa_notes): New function.
25456         (old_insns_match_p): Don't cross-jump in between /f
25457         and non-/f instructions.  If both i1 and i2 are frame related,
25458         verify all CFA notes, their order and content.
25460 2017-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
25462         PR target/78543
25463         * config/rs6000/rs6000.md (bswaphi2_extenddi): Combine bswap
25464         HImode and SImode with zero extend to DImode to one insn.
25465         (bswap<mode>2_extenddi): Likewise.
25466         (bswapsi2_extenddi): Likewise.
25467         (bswaphi2_extendsi): Likewise.
25468         (bswaphi2): Combine bswap HImode and SImode into one insn.
25469         Separate memory insns from swapping register.
25470         (bswapsi2): Likewise.
25471         (bswap<mode>2): Likewise.
25472         (bswaphi2_internal): Delete, no longer used.
25473         (bswapsi2_internal): Likewise.
25474         (bswap<mode>2_load): Split bswap HImode/SImode into separate load,
25475         store, and gpr<-gpr swap insns.
25476         (bswap<mode>2_store): Likewise.
25477         (bswaphi2_reg): Register only splitter, combine with the splitter.
25478         (bswaphi2 splitter): Likewise.
25479         (bswapsi2_reg): Likewise.
25480         (bswapsi2 splitter): Likewise.
25481         (bswapdi2): If we have the LDBRX and STDBRX instructions, split
25482         the insns into load, store, and register/register insns.
25483         (bswapdi2_ldbrx): Likewise.
25484         (bswapdi2_load): Likewise.
25485         (bswapdi2_store): Likewise.
25486         (bswapdi2_reg): Likewise.
25488 2017-03-27  Gunther Nikl  <gnikl@users.sourceforge.net>
25490         * system.h (HAVE_DESIGNATED_INITIALIZERS): Fix non C++ case.
25491         (HAVE_DESIGNATED_UNION_INITIALIZERS): Likewise.
25493 2017-03-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25495         PR target/80103
25496         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Edit and
25497         add comments.
25498         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
25499         special handling for target option conflicts between dform
25500         options (-mpower9-dform, -mpower9-dform-vector,
25501         -mpower9-dform-scalar) and -mno-direct-move.
25503 2017-03-27  Richard Biener  <rguenther@suse.de>
25505         PR tree-optimization/80181
25506         * tree-ssa-ccp.c (likely_value): UNDEFINED ^ X is UNDEFINED.
25508 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
25510         * config/arc/predicates.md (move_double_src_operand): Replace the
25511         call to move_double_src_operand with a call to address_operand.
25513 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
25515         * config/arc/elf.h (ARGET_ARC_TP_REGNO_DEFAULT): Define.
25516         * config/arc/linux.h (ARGET_ARC_TP_REGNO_DEFAULT): Likewise.
25517         * config/arc/arc.opt (mtp-regno): Use ARGET_ARC_TP_REGNO_DEFAULT.
25519 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
25521         * config/arc/predicates.md (long_immediate_loadstore_operand):
25522         Consider scaled addresses cases.
25524 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
25526         * config/arc/arc.c (arc_epilogue_uses): BLINK should be also
25527         restored when in interrupt.
25528         * config/arc/arc.md (simple_return): ARCv2 rtie instruction
25529         doesn't have delay slot.
25531 2017-03-27  Richard Biener  <rguenther@suse.de>
25533         PR ipa/79776
25534         * tree-ssa-structalias.c (associate_varinfo_to_alias): Skip
25535         inlined thunk clones.
25537 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
25539         PR sanitizer/80168
25540         * asan.c (instrument_derefs): Copy over last operand from
25541         original COMPONENT_REF to the new COMPONENT_REF with
25542         DECL_BIT_FIELD_REPRESENTATIVE.
25543         * ubsan.c (instrument_object_size): Likewise.
25545 2017-03-27  Richard Biener  <rguenther@suse.de>
25547         PR tree-optimization/80170
25548         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Make
25549         sure DR/SCEV didnt fold in constants we do not see when looking
25550         at the reference base alignment.
25552 2017-03-27  Richard Biener  <rguenther@suse.de>
25554         PR middle-end/80171
25555         * gimple-fold.c (fold_ctor_reference): Properly guard against
25556         NULL return value from canonicalize_constructor_val.
25558 2017-03-25  Uros Bizjak  <ubizjak@gmail.com>
25560         PR target/80180
25561         * config/i386/i386.c (ix86_expand_builtin)
25562         <IX86_BUILTIN_RDSEED{16,32,64}_STEP>: Do not expand arg0 between
25563         flags reg setting and flags reg using instructions.
25564         <IX86_BUILTIN_RDRAND{16,32,64}_STEP>: Ditto.  Use non-flags reg
25565         clobbering instructions to zero extend op2.
25567 2017-03-25  Gerald Pfeifer  <gerald@pfeifer.com>
25569         * doc/install.texi (Configuration) <--with-aix-soname>:
25570         Update link to AIX ld.
25572 2017-03-25  Bernd Schmidt  <bschmidt@redhat.com>
25574         PR rtl-optimization/80160
25575         PR rtl-optimization/80159
25576         * lra-assigns.c (must_not_spill_p): Tighten new test to also take
25577         reg_alternate_class into account.
25579 2017-03-24  Vladimir Makarov  <vmakarov@redhat.com>
25581         PR target/80148
25582         * lra-assigns.c (assign_by_spills): Add spilled non-reload pseudos
25583         to consider in curr_insn_transform.
25585 2017-03-24  Jakub Jelinek  <jakub@redhat.com>
25587         * genrecog.c (validate_pattern): Add VEC_SELECT validation.
25588         * genmodes.c (emit_min_insn_modes_c): Call emit_mode_nunits
25589         and emit_mode_inner.
25591 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25593         * config/s390/s390-builtins.def: Add VXE builtins.  Add a flags
25594         argument to the overloaded builtin variants.  Use the new flag to
25595         deprecate certain builtin variants.
25596         * config/s390/s390-builtin-types.def: Add new builtin types.
25597         * config/s390/s390-builtins.h: Support new flags field for
25598         overloaded builtins.
25599         * config/s390/s390-c.c (OB_DEF_VAR): New flags field.
25600         (s390_macro_to_expand): Enable vector float data type.
25601         (s390_cpu_cpp_builtins_internal): Indicate support of the new
25602         builtins by incrementing the __VEC__ version number.
25603         (s390_expand_overloaded_builtin): Support expansion of vec_xl and
25604         vec_xst.
25605         (s390_resolve_overloaded_builtin): Emit error messages depending
25606         on the builtin flags.
25607         * config/s390/s390.c (s390_expand_builtin): Support additional
25608         flags argument.  Change error message to match the messages
25609         emitted in s390-c.c.
25610         * config/s390/s390.md: New UNSPEC_* constants.
25611         (op_type): Add new instruction types.
25612         * config/s390/vecintrin.h: Add new builtins and test data class
25613         constants.
25614         * config/s390/vx-builtins.md (V_HW_32_64): Add V4SF.
25615         (V_HW_4, VEC_HW, VECF_HW): New mode iterators.
25616         (VEC_INEXACT, VEC_NOINEXACT): New constants.
25617         ("vec_splats<mode>", "vec_insert<mode>", "vec_promote<mode>")
25618         ("vec_insert_and_zero<mode>", "vec_mergeh<mode>")
25619         ("vec_mergel<mode>"): V_HW -> VEC_HW.
25621         ("vlrlrv16qi", "vstrlrv16qi", "vbpermv16qi", "vec_msumv2di")
25622         ("vmslg", "*vftci<mode>_cconly", "vftci<mode>_intcconly")
25623         ("*vftci<mode>", "vftci<mode>_intcc", "vec_double_s64")
25624         ("vec_double_u64", "vfmin<mode>", "vfmax<mode>"): New definition.
25626         ("and_av2df3", "and_cv2df3", "vec_andc_av2df3")
25627         ("vec_andc_cv2df3", "xor_av2df3", "xor_cv2df3", "vec_nor_av2df3")
25628         ("vec_nor_cv2df3", "ior_av2df3", "ior_cv2df3", "vec_nabs")
25629         ("*vftcidb", "*vftcidb_cconly", "vftcidb"): Remove definition.
25631         ("vec_all_<fpcmpcc:code>v2df", "vec_any_<fpcmpcc:code>v2df")
25632         ("vec_scatter_elementv4si_DI", "vec_cmp<fpcmp:code>v2df")
25633         ("vec_di_to_df_s64", "vec_di_to_df_u64", "vec_df_to_di_u64")
25634         ("vfidb", "*vldeb", "*vledb", "*vec_cmp<insn_cmp>v2df_cconly")
25635         ("vec_cmpeqv2df_cc", "vec_cmpeqv2df_cc", "vec_cmphv2df_cc")
25636         ("vec_cmphev2df_cc", "*vec_cmpeqv2df_cc")
25637         ("*vec_cmphv2df_cc", "*vec_cmphev2df_cc"): Enable new modes as ...
25639         ("vec_all_<fpcmpcc:code><mode>", "vec_any_<fpcmpcc:code><mode>")
25640         ("vec_scatter_element<V_HW_4:mode>_DI")
25641         ("vec_cmp<fpcmp:code><mode>", "vcdgb", "vcdlgb", "vclgdb")
25642         ("vec_fpint<mode>", "vflls")
25643         ("vflrd", "*vec_cmp<insn_cmp><mode>_cconly", "vec_cmpeq<mode>_cc")
25644         ("vec_cmpeq<mode>_cc", "vec_cmph<mode>_cc", "vec_cmphe<mode>_cc")
25645         ("*vec_cmpeq<mode>_cc", "*vec_cmph<mode>_cc")
25646         ("*vec_cmphe<mode>_cc"): ... these.
25648         ("vec_ctd_s64", "vec_ctsl", "vec_ctul", "vec_st2f"): Use rounding
25649         mode constant instead of magic value.
25651 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25653         * config/s390/s390.c (s390_expand_vec_compare): Support other
25654         vector floating point modes than just V2DF.
25655         (s390_expand_vcond): Likewise.
25656         (s390_hard_regno_mode_ok): Allow SFmode values in VRs.
25657         (s390_cannot_change_mode_class): Prevent mode changes between TF
25658         and V1TF in vector registers.
25659         * config/s390/s390.md (DF, SF): New mode attributes.
25660         ("*cmp<mode>_ccs", "add<mode>3", "sub<mode>3", "mul<mode>3")
25661         ("fma<mode>4", "fms<mode>4", "div<mode>3", "*neg<mode>2"): Add
25662         SFmode support for VRs.
25663         * config/s390/vector.md (V_HW, V_HW2, VT_HW, ti*, nonvec): Add new
25664         vector fp modes.
25665         (VFT, VF_HW): New mode iterators.
25666         (vw, sdx): New mode attributes.
25667         ("addv2df3", "subv2df3", "mulv2df3", "divv2df3", "sqrtv2df2")
25668         ("fmav2df4","fmsv2df4", "negv2df2", "absv2df2", "*negabsv2df2")
25669         ("smaxv2df3", "sminv2df3", "*vec_cmp<VFCMP_HW_OP:code>v2df_nocc")
25670         ("vec_cmpuneqv2df", "vec_cmpltgtv2df", "vec_orderedv2df")
25671         ("vec_unorderedv2df"): Adjust the v2df only patterns to support
25672         also the new vector floating point modes.  Renaming to ...
25674         ("add<mode>3", "sub<mode>3", "mul<mode>3", "div<mode>3")
25675         ("sqrt<mode>2", "fma<mode>4", "fms<mode>4", "neg<mode>2")
25676         ("abs<mode>2", "negabs<mode>2", "smax<mode>3")
25677         ("smin<mode>3", "*vec_cmp<VFCMP_HW_OP:code><mode>_nocc")
25678         ("vec_cmpuneq<mode>", "vec_cmpltgt<mode>", "vec_ordered<mode>")
25679         ("vec_unordered<mode>"): ... these.
25681         ("neg_fma<mode>4", "neg_fms<mode>4", "*smax<mode>3_vxe")
25682         ("*smin<mode>3_vxe", "*sminv2df3_vx", "*vec_extendv4sf")
25683         ("*vec_extendv2df"): New insn definitions.
25685 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25687         * config/s390/s390.md ("*adddi3_sign", "*subdi3_sign", "mulditi3")
25688         ("mulditi3_2", "*muldi3_sign"): New patterns.
25689         ("muldi3", "*muldi3", "mulsi3", "*mulsi3"): Add an expander and
25690         rename the pattern definition.
25692 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25694         * config/s390/s390.md ("indirect_jump"): Turn insn definition into
25695         expander.
25696         ("*indirect_jump", "*indirect2_jump"): New pattern definitions.
25698 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25700         * config/s390/s390.c (s390_expand_vec_init): Use vllezl
25701         instruction if possible.
25702         * config/s390/vector.md (vec_halfnumelts): New mode
25703         attribute.
25704         ("*vec_vllezlf<mode>"): New pattern.
25706 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25708         * config/s390/vector.md ("popcountv16qi2", "popcountv8hi2")
25709         ("popcountv4si2", "popcountv2di2"): Rename to ...
25710         ("popcount<mode>2", "popcountv8hi2_vx", "popcountv4si2_vx")
25711         ("popcountv2di2_vx"): ... these and add !TARGET_VXE to the
25712         condition.
25713         ("popcount<mode>2_vxe"): New pattern.
25715 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25717         * common/config/s390/s390-common.c (processor_flags_table): Add
25718         arch12.
25719         * config.gcc: Add arch12.
25720         * config/s390/driver-native.c (s390_host_detect_local_cpu):
25721         Default to arch12 for unknown CPU model numbers.
25722         * config/s390/s390-builtins.def: Add B_VXE builtin flag.
25723         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Adjust
25724         PROCESSOR_max sanity check.
25725         * config/s390/s390-opts.h (enum processor_type): Add
25726         PROCESSOR_ARCH12.
25727         * config/s390/s390.c (processor_table): Add arch12.
25728         (s390_expand_builtin): Add check for B_VXE flag.
25729         (s390_issue_rate): Add PROCESSOR_ARCH12.
25730         (s390_get_sched_attrmask): Likewise.
25731         (s390_get_unit_mask): Likewise.
25732         (s390_sched_score): Enable z13 scheduling for arch12.
25733         (s390_sched_reorder): Likewise.
25734         (s390_sched_variable_issue): Likewise.
25735         * config/s390/s390.h (enum processor_flags): Add PF_ARCH12 and
25736         PF_VXE.
25737         (s390_tune_attr): Use z13 scheduling also for arch12.
25738         (TARGET_CPU_ARCH12, TARGET_CPU_ARCH12_P, TARGET_CPU_VXE)
25739         (TARGET_CPU_VXE_P, TARGET_ARCH12, TARGET_ARCH12_P, TARGET_VXE)
25740         (TARGET_VXE_P): New macros.
25741         * config/s390/s390.md: Add arch12 to cpu attribute.  Add arch12
25742         and vxe to cpu_facility.  Add arch12 and vxe to enabled attribute.
25743         * config/s390/s390.opt: Add arch12 as processor_type.
25745 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25747         * config/s390/s390.md
25748         ("fixuns_truncdddi2", "fixuns_trunctddi2")
25749         ("fixuns_trunc<BFP:mode><GPR:mode>2"): Merge into ...
25750         ("fixuns_trunc<FP:mode><GPR:mode>2"): New expander.
25752         ("fixuns_trunc<BFP:mode><GPR:mode>2", "fixuns_trunc<mode>si2"):
25753         Rename expanders to ...
25755         ("fixuns_trunc<BFP:mode><GPR:mode>2_emu")
25756         ("fixuns_truncdddi2_emu"): ... these.
25758         ("fixuns_trunc<mode>si2_emu"): New expander.
25760         ("*fixuns_truncdfdi2_z13"): Rename to ...
25761         ("*fixuns_truncdfdi2_vx"): ... this.
25763 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25765         * config/s390/2964.md: Remove the single element vector compare
25766         instructions which are no longer used.
25767         * config/s390/s390.c (s390_select_ccmode): Remove handling of
25768         vector CCmodes.
25769         (s390_canonicalize_comparison): Remove handling of DFmode
25770         compares.
25771         (s390_expand_vec_compare_scalar): Remove function.
25772         (s390_emit_compare): Don't call s390_expand_vec_compare_scalar.
25773         * config/s390/s390.md ("*vec_cmp<insn_cmp>df_cconly"): Remove
25774         pattern.
25775         ("*cmp<mode>_ccs"): Add wfcdb instruction.
25777 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25779         * config/s390/s390.md ("mov<mode>_64dfp" DD_DF): Use vleig for loading a
25780         FP zero.
25781         ("*mov<mode>_64" DD_DF): Remove the vector instructions. These
25782         will anyway by matched by mov<mode>_64dfp.
25784 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25786         * config/s390/s390.md ("mov<mode>" SD_SF): Change vleg/vsteg to
25787         vlef/vstef.  Add missing operand to vleif.
25789 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25791         * config/s390/s390.c (s390_expand_vec_init): Enable vector load
25792         pair for all vector types with 64 bit elements.
25793         * config/s390/vx-builtins.md (V_HW_64): Move mode iterator to ...
25794         * config/s390/vector.md (V_HW_64): ... here.
25795         (V_128_NOSINGLE): New mode iterator.
25796         ("vec_init<V_HW:mode>"): Use V_128 as mode iterator.
25797         ("*vec_splat<mode>"): Use V_128_NOSINGLE mode iterator.
25798         ("*vec_tf_to_v1tf", "*vec_ti_to_v1ti"): New pattern definitions.
25799         ("*vec_load_pairv2di"): Change to ...
25800         ("*vec_load_pair<mode>"): ... this one.
25802 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25804         * config/s390/constraints.md: Add comments.
25805         (jKK): Reject element sizes > 8 bytes.
25806         * config/s390/s390.c (s390_split_ok_p): Enable splitting also for
25807         s_operands.
25808         * config/s390/s390.md: Add the s_operand checks formerly in
25809         s390_split_ok_p to various splitters where they are still
25810         required.
25811         * config/s390/vector.md ("mov<mode>" V_128): Add GPR alternatives
25812         for 128 bit vectors.  Plus two splitters.
25814 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25816         * config/s390/s390.md: Rename the cpu facilty vec to vx throughout
25817         the file.
25819 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25821         PR target/79893
25822         * config/s390/s390-c.c (s390_adjust_builtin_arglist): Issue an
25823         error if the boundary argument is not constant.
25825 2017-03-24  Jakub Jelinek  <jakub@redhat.com>
25827         PR rtl-optimization/80112
25828         * loop-doloop.c (doloop_condition_get): Don't check condition
25829         if cmp isn't SET with IF_THEN_ELSE src.
25831 2017-03-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25833         PR tree-optimization/80158
25834         * gimple-ssa-strength-reduction.c (replace_mult_candidate): When
25835         replacing a candidate statement, also replace it for the
25836         candidate's alternate interpretation.
25837         (replace_rhs_if_not_dup): Likewise.
25838         (replace_one_candidate): Likewise.
25840 2017-03-24  Richard Biener  <rguenther@suse.de>
25842         PR tree-optimization/80167
25843         * graphite-isl-ast-to-gimple.c
25844         (translate_isl_ast_to_gimple::is_valid_rename): Handle default-defs
25845         properly.
25846         (translate_isl_ast_to_gimple::get_rename): Likewise.
25848 2017-03-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25850         * config/rs6000/rs6000.c (rs6000_option_override_internal): Change
25851         handling of certain combinations of target options, including the
25852         combinations -mpower8-vector vs. -mno-vsx, -mpower9-vector vs.
25853         -mno-power8-vector, and -mpower9_dform vs. -mno-power9-vector.
25855 2017-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25857         PR target/71436
25858         * config/arm/arm.md (*load_multiple): Add reload_completed to
25859         matching condition.
25861 2017-03-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25862             Richard Biener  <rguenth@suse.de>
25864         PR tree-optimization/79908
25865         PR tree-optimization/80136
25866         * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
25867         been cast away, gimplify_and_add suffices.
25869 2017-03-23  Markus Trippelsdorf  <markus@trippelsdorf.de>
25871         * tree-vrp.c (identify_jump_threads): Delete avail_exprs.
25873 2017-03-23  Richard Biener  <rguenther@suse.de>
25875         PR tree-optimization/80032
25876         * gimplify.c (gimple_push_cleanup): Forced unconditional
25877         cleanups still have to go to the conditional_cleanups
25878         sequence.
25880 2017-03-22  Jakub Jelinek  <jakub@redhat.com>
25882         PR tree-optimization/80072
25883         * tree-ssa-reassoc.c (struct operand_entry): Change id field type
25884         to unsigned int.
25885         (next_operand_entry_id): Change type to unsigned int.
25886         (sort_by_operand_rank): Make sure to return the right return value
25887         even if unsigned fields are bigger than INT_MAX.
25888         (struct oecount): Change cnt and id type to unsigned int.
25889         (oecount_hasher::equal): Formatting fix.
25890         (oecount_cmp): Make sure to return the right return value
25891         even if unsigned fields are bigger than INT_MAX.
25892         (undistribute_ops_list): Change next_oecount_id type to unsigned int.
25894         PR c++/80129
25895         * gimplify.c (gimplify_modify_expr_rhs) <case COND_EXPR>: Clear
25896         TREE_READONLY on result if writing it more than once.
25898         PR sanitizer/80110
25899         * doc/invoke.texi (-fsanitize=thread): Document that with
25900         -fnon-call-exceptions atomics are not able to throw
25901         exceptions.
25903         PR sanitizer/80110
25904         * tsan.c: Include tree-eh.h.
25905         (instrument_builtin_call): Call maybe_clean_eh_stmt or
25906         maybe_clean_or_replace_eh_stmt where needed.
25907         (instrument_memory_accesses): Add cfg_changed argument.
25908         Call gimple_purge_dead_eh_edges on each block and set *cfg_changed
25909         if it returned true.
25910         (tsan_pass): Adjust caller.  Return TODO_cleanup_cfg if cfg_changed.
25912         PR rtl-optimization/63191
25913         * config/i386/i386.c (ix86_delegitimize_address): Turn into small
25914         wrapper function, moved the whole old content into ...
25915         (ix86_delegitimize_address_1): ... this.  New inline function.
25916         (ix86_find_base_term): Use ix86_delegitimize_address_1 with
25917         true as last argument instead of ix86_delegitimize_address.
25919 2017-03-22  Wilco Dijkstra  <wdijkstr@arm.com>
25921         * config/aarch64/aarch64.c (generic_branch_cost): Copy
25922         cortexa57_branch_cost.
25924 2017-03-22  Wilco Dijkstra  <wdijkstr@arm.com>
25926         * config/aarch64/aarch64.c (generic_tunings): Add AES fusion.
25928 2017-03-21  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25930         PR target/80123
25931         * doc/md.texi (Constraints): Document wA constraint.
25932         * config/rs6000/constraints.md (wA): New.
25933         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Add wA reg_class.
25934         (rs6000_init_hard_regno_mode_ok): Init wA constraint.
25935         * config/rs6000/rs6000.h (RS6000_CONSTRAINT_wA): New.
25936         * config/rs6000/vsx.md (vsx_splat_<mode>): Use wA constraint.
25938 2017-03-22  Cesar Philippidis  <cesar@codesourcery.com>
25940         PR c++/80029
25941         * gimplify.c (is_oacc_declared): New function.
25942         (oacc_default_clause): Use it to set default flags for acc declared
25943         variables inside parallel regions.
25944         (gimplify_scan_omp_clauses): Strip firstprivate pointers for acc
25945         declared variables.
25946         (gimplify_oacc_declare): Gimplify the declare clauses.  Add the
25947         declare attribute to any decl as necessary.
25949 2017-03-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
25951         PR target/80082
25952         * config/arm/arm-isa.h (isa_bit_lpae): New feature bit.
25953         (ISA_ARMv7ve): Add isa_bit_lpae to the definition.
25954         * config/arm/arm-protos.h (arm_arch7ve): Rename into ...
25955         (arm_arch_lpae): This.
25956         * config/arm/arm.c (arm_arch7ve): Rename into ...
25957         (arm_arch_lpae): This.  Define it in term of isa_bit_lpae.
25958         * config/arm/arm.h (TARGET_HAVE_LPAE): Redefine in term of
25959         arm_arch_lpae.
25961 2017-03-22  Martin Liska  <mliska@suse.cz>
25963         PR target/79906
25964         * config/rs6000/rs6000.c (rs6000_inner_target_options): Show
25965         error message instead of an ICE.
25967 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25969         * doc/extend.texi (6.11 Additional Floating Types): Revise.
25971 2017-03-21  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25973         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
25974         comments.
25975         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
25976         comments.
25978 2017-03-21  Martin Sebor  <msebor@redhat.com>
25980         * doc/extend.texi: Use "cannot" instead of "can't."
25981         * doc/hostconfig.texi: Same.
25982         * doc/install.texi: Same.
25983         * doc/invoke.texi: Same.
25984         * doc/loop.texi: Same.
25985         * doc/md.texi: Same.
25986         * doc/objc.texi: Same.
25987         * doc/rtl.texi: Same.
25988         * doc/tm.texi: Same.
25989         * doc/tm.texi.in: Same.
25990         * doc/trouble.texi: Same.
25992 2017-03-21  Alexandre Oliva <aoliva@redhat.com>
25994         PR debug/63238
25995         * dwarf2out.c (struct checksum_attributes): Add at_alignment.
25996         (collect_checksum_attributes): Set it.
25997         (die_checksum_ordered): Use it.
25999 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26001         PR tree-optimization/79908
26002         * tree-stdarg.c (expand_ifn_va_arg_1): Revert the following
26003         change: For a VA_ARG whose LHS has been cast away, use
26004         force_gimple_operand to construct the side effects.
26006 2017-03-21  David Malcolm  <dmalcolm@redhat.com>
26008         PR translation/80001
26009         * omp-offload.c (oacc_loop_fixed_partitions): Make diagnostics
26010         more amenable to translation.
26011         (oacc_loop_auto_partitions): Likewise.
26013 2017-03-21  Marek Polacek  <polacek@redhat.com>
26014             Martin Sebor  <msebor@redhat.com>
26016         PR tree-optimization/80109
26017         * gimple-ssa-warn-alloca.c (alloca_call_type): Only call get_range_info
26018         on INTEGRAL_TYPE_P.
26020 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
26021             Segher Boessenkool  <segher@kernel.crashing.org>
26023         PR target/80125
26024         * combine.c (can_combine_p): Revert the 2017-03-20 change, only
26025         check reg_used_between_p between insn and one of succ or succ2
26026         depending on if succ is artificial insn not inserted into insn
26027         stream.
26029 2017-03-21  Martin Liska  <mliska@suse.cz>
26031         PR gcov-profile/80081
26032         * Makefile.in: Add gcov-dump and fix installation of gcov-tool.
26033         * doc/gcc.texi: Include gcov-dump stuff.
26034         * doc/gcov-dump.texi: New file.
26036 2017-03-21  Toma Tabacu  <toma.tabacu@imgtec.com>
26038         PR rtl-optimization/79150
26039         * config/mips/mips.c (mips_block_move_loop): Emit a NOP after the
26040         conditional jump, if the jump is the last insn of the loop.
26042 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26043             Richard Biener  <rguenth@suse.de>
26045         PR tree-optimization/79908
26046         * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
26047         been cast away, use force_gimple_operand to construct the side
26048         effects.
26050 2017-03-21  Martin Liska  <mliska@suse.cz>
26052         PR libfortran/79956
26053         * simplify-rtx.c (simplify_immed_subreg): Initialize a variable
26054         to NULL.
26056 2017-03-21  Brad Spengler <spender@grsecurity.net>
26058         PR plugins/80094
26059         * plugin.c (htab_hash_plugin): New function.
26060         (add_new_plugin): Use it and adjust.
26061         (parse_plugin_arg_opt): Adjust.
26062         (init_one_plugin): Likewise.
26064 2017-03-21  Richard Biener  <rguenther@suse.de>
26066         PR tree-optimization/80032
26067         * gimplify.c (gimple_push_cleanup): Add force_uncond parameter,
26068         if set force the cleanup to happen unconditionally.
26069         (gimplify_target_expr): Push inserted clobbers with force_uncond
26070         to avoid them being removed by control-dependent DCE.
26072 2017-03-21  Richard Biener  <rguenther@suse.de>
26074         PR tree-optimization/80122
26075         * tree-inline.c (copy_bb): Do not expans va-arg packs or
26076         va_arg_pack_len when the inlined call stmt requires pack
26077         expansion itself.
26078         * tree-inline.h (struct copy_body_data): Make call_stmt a gcall *.
26080 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
26082         PR sanitizer/78158
26083         * tsan.c (instrument_builtin_call): If the memory model argument
26084         is not a constant, assume it is valid.
26086         PR c/67338
26087         * fold-const.c (round_up_loc): Negate divisor in unsigned type to
26088         avoid UB.
26090 2017-03-20  Segher Boessenkool  <segher@kernel.crashing.org>
26092         PR rtl-optimization/79910
26093         * combine.c (can_combine_p): Do not allow combining an I0 or I1
26094         if its dest is used by an insn before I2 (other than the combined
26095         insns themselves, which are properly handled already).
26097 2017-03-20  Segher Boessenkool  <segher@kernel.crashing.org>
26099         Revert:
26100         2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
26102         * combine.c (record_used_regs): New static function.
26103         (try_combine): Handle situations where there is an additional
26104         instruction between I2 and I3 which needs to have a LOG_LINK
26105         updated.
26107         Revert:
26108         2017-03-17  Jim Wilson  <jim.wilson@linaro.org>
26110         * combine.c (try_combine): Delete redundant i1 test.  Call
26111         prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
26113 2017-03-20  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26115         PR target/80083
26116         * config/rs6000/rs6000.md (*movsi_internal1): Fix constraints for
26117         alternatives 13/14.
26119 2017-03-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26121         PR tree-optimization/80054
26122         * gimple-ssa-strength-reduction.c (all_phi_incrs_profitable): Fail
26123         the optimization if a PHI or any of its arguments is not dominated
26124         by the candidate's basis.  Use gphi* rather than gimple* as
26125         appropriate.
26126         (replace_profitable_candidates): Clean up a gimple* variable that
26127         should be a gphi* variable.
26129 2017-03-20  Martin Sebor  <msebor@redhat.com>
26131         PR c++/52477
26132         * doc/extend.texi (attribute constructor): Document present limitation.
26134 2017-03-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
26136         PR target/79963
26137         * config/rs6000/altivec.h (vec_all_ne): Under __cplusplus__ and
26138         __POWER9_VECTOR__ #ifdef control, change template definition to
26139         use Power9-specific built-in function.
26140         (vec_any_eq): Likewise.
26141         * config/rs6000/vector.md (vector_ae_v2di_p): Change the flag used
26142         to control outcomes from this test.
26143         (vector_ae_<mode>p): For VEC_F modes, likewise.
26145 2017-03-20  Ian Lance Taylor  <iant@google.com>
26147         * config/i386/i386.c (ix86_function_regparm): Save an extra
26148         register for -fsplit-stack with DECL_STATIC_CHAIN.
26150 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com>
26152         PR target/79912
26153         * config/riscv/riscv.c (riscv_preferred_reload_class): Remove.
26154         (TARGET_PREFERRED_RELOAD_CLASS): Likewise.
26156 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com>
26158         * config/riscv/riscv.c (riscv_print_operand): Use "fence
26159         iorw,ow".
26160         * config/riscv/sync.mc (mem_thread_fence_1): Use "fence
26161         iorw,iorw".
26163 2017-03-20  Marek Polacek  <polacek@redhat.com>
26165         PR sanitizer/80063
26166         * asan.c (DEF_SANITIZER_BUILTIN): Use do { } while (0).
26168 2017-03-20  Richard Biener  <rguenther@suse.de>
26170         PR tree-optimization/80113
26171         * graphite-isl-ast-to-gimple.c (copy_loop_phi_nodes): Do not
26172         allocate extra SSA name for PHI def.
26173         (add_close_phis_to_outer_loops): Likewise.
26174         (add_close_phis_to_merge_points): Likewise.
26175         (copy_loop_close_phi_args): Likewise.
26176         (copy_cond_phi_nodes): Likewise.
26178 2017-03-20  Martin Liska  <mliska@suse.cz>
26180         PR middle-end/79753
26181         * tree-chkp.c (chkp_build_returned_bound): Do not build
26182         returned bounds for a LHS that's not a BOUNDED_P type.
26184 2017-03-20  Martin Liska  <mliska@suse.cz>
26186         PR target/79769
26187         PR target/79770
26188         * tree-chkp.c (chkp_find_bounds_1): Handle REAL_CST,
26189         COMPLEX_CST and VECTOR_CST.
26191 2017-03-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
26193         PR target/78857
26194         * config/s390/s390.md ("cmp<mode>_ccs_0"): Add a clobber of the
26195         target operand.  A new splitter adds the clobber statement in case
26196         the target operand is dead anyway.
26198 2017-03-19  Gerald Pfeifer  <gerald@pfeifer.com>
26200         * doc/install.texi (Specific) <sparc-*-linux*>: No longer refer
26201         to age-old versions of binutils and glibc.
26203 2017-03-18  Segher Boessenkool  <segher@kernel.crashing.org>
26205         * doc/contrib.texi (Contributors): Remove duplicate entry for myself.
26207 2017-03-18  Gerald Pfeifer  <gerald@pfeifer.com>
26209         * doc/contrib.texi (Contributors): Add Segher Boessenkool.
26211 2017-03-18  Gerald Pfeifer  <gerald@pfeifer.com>
26213         * doc/install.texi (Specific) <arm-*-eabi>: Remove old
26214         requirement for binutils 2.13.
26216 2017-03-17  Jim Wilson  <jim.wilson@linaro.org>
26218         * combine.c (try_combine): Delete redundant i1 test.  Call
26219         prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
26221 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com
26223         * doc/install.texi (Specific) <riscv32-*-elf>: Add riscv32-*-elf,
26224         riscv32-*-linux, riscv64-*-elf, riscv64-*-linux to the table of
26225         contents.
26226         <riscv64-*-elf>: Re-arrange section
26227         <riscv32-*-elf>: Add a note about requiring binutils 2.28.
26228         <riscv32-*-linux>: Likewise.
26229         <riscv64-*-elf>: Likewise
26230         <riscv64-*-linux>: Likewise.
26232 2017-03-17  Richard Earnshaw  <rearnsha@arm.com>
26234         PR target/80052
26235         * aarch64.opt(verbose-cost-dump): Fix typo.
26237 2017-03-17  Pat Haugen  <pthaugen@us.ibm.com>
26239         PR target/79951
26240         * config/rs6000/rs6000.md (copysign<mode>3_fcpsgn): Test
26241         for VECTOR_UNIT_VSX_P (<MODE>mode) too.
26243 2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
26245         * reload.c (find_reloads): When reloading a nonoffsettable address,
26246         use RELOAD_OTHER for it and its address reloads.
26248         PR rtl-optimization/79910
26249         * combine.c (record_used_regs): New static function.
26250         (try_combine): Handle situations where there is an additional
26251         instruction between I2 and I3 which needs to have a LOG_LINK
26252         updated.
26254 2017-03-17  Jeff Law  <law@redhat.com>
26256         PR tree-optimization/71437
26257         * tree-vrp.c (simplify_stmt_for_jump_threading): Lookup the
26258         conditional in the hash table first.
26259         (vrp_dom_walker::before_dom_children): Extract condition from
26260         ASSERT_EXPR.  Record condition, its inverion and any implied
26261         conditions as well.
26263 2017-03-17  Marek Polacek  <polacek@redhat.com>
26264             Markus Trippelsdorf  <markus@trippelsdorf.de>
26266         PR tree-optimization/80079
26267         * gimple-ssa-store-merging.c (class pass_store_merging): Initialize
26268         m_stores_head.
26270 2017-03-17  Richard Biener  <rguenther@suse.de>
26272         PR middle-end/80075
26273         * tree-eh.c (stmt_could_throw_1_p): Only handle gimple assigns.
26274         Properly verify the LHS before the RHS possibly claims to be
26275         handled.
26276         (stmt_could_throw_p): Hande gimple conds fully here.  Clobbers
26277         do not throw.
26279 2017-03-17  Martin Jambor  <mjambor@suse.cz>
26281         * doc/invoke.texi (Option Options): Include -fipa-vrp in the list.
26282         (List of -O2 options): Likewise.
26283         (-fipa-bit-cp): Replace "ipa" with "interprocedural."
26284         (-fipa-vrp) New.
26286 2017-03-17  Tom de Vries  <tom@codesourcery.com>
26288         * gcov-dump.c (print_usage): Print bug_report_url.
26290 2017-03-17  Richard Biener  <rguenther@suse.de>
26292         PR middle-end/80050
26293         * genmatch.c (parser::next): Remove pointless check for CPP_EOF.
26294         (parser::peek): Likewise.
26296 2017-03-17  Richard Biener  <rguenther@suse.de>
26298         PR tree-optimization/80048
26299         * sese.c (free_sese_info): Properly release rename_map and
26300         copied_bb_map elements.
26302 2017-03-16  Alexandre Oliva <aoliva@redhat.com>
26304         * gimple-ssa-store-merging.c (struct imm_store_chain_info):
26305         Add linked-list forward and backlinks.  Insert on
26306         construction, remove on destruction.
26307         (class pass_store_merging): Add m_stores_head field.
26308         (pass_store_merging::terminate_and_process_all_chains):
26309         Iterate over m_stores_head list.
26310         (pass_store_merging::terminate_all_aliasing_chains):
26311         Likewise.
26312         (pass_store_merging::execute): Check for debug stmts first.
26313         Push new chains onto the m_stores_head stack.
26315 2017-03-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
26317         PR target/71294
26318         * config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Allow a
26319         SPLAT operation on ISA 2.07 64-bit systems that have direct move,
26320         but no MTVSRDD support, by doing MTVSRD and XXPERMDI.
26322 2017-03-16  Jeff Law  <law@redhat.com>
26324         PR tree-optimization/71437
26325         * tree-ssa-dom.c (dom_opt_dom_walker): Remove thread_across_edge
26326         member function.  Implementation moved into after_dom_children
26327         member function and into the threader's thread_outgoing_edges
26328         function.
26329         (dom_opt_dom_walker::after_dom_children): Simplify by moving
26330         some code into new thread_outgoing_edges.
26331         * tree-ssa-threadedge.c (thread_across_edge): Make static and simplify
26332         definition.  Simplify marker handling (do it here).   Assume we always
26333         have the available expression and the const/copies tables.
26334         (thread_outgoing_edges): New function extracted from tree-ssa-dom.c
26335         and tree-vrp.c
26336         * tree-ssa-threadedge.h (thread_outgoing_edges): Declare.
26337         * tree-vrp.c (equiv_stack): No longer file scoped.
26338         (vrp_dom_walker): New class.
26339         (vrp_dom_walker::before_dom_children): New member function.
26340         (vrp_dom_walker::after_dom_children): Likewise.
26341         (identify_jump_threads):  Setup domwalker.  Use it rather than
26342         walking edges in a random order by hand.  Simplify setup/finalization.
26343         (finalize_jump_threads): Remove.
26344         (vrp_finalize): Do not call identify_jump_threads here.
26345         (execute_vrp): Do it here instead and call thread_through_all_blocks
26346         here too.
26348         PR tree-optimization/71437
26349         * tree-ssa-dom.c (pfn_simplify): Add basic_block argument.  All
26350         callers changed.
26351         (simplify_stmt_for_jump_threading): Add basic_block argument.  All
26352         callers changed.
26353         (lhs_of_dominating_assert): Moved from here into tree-vrp.c.
26354         (dom_opt_dom_walker::thread_across_edge): Remove
26355         handle_dominating_asserts argument.  All callers changed.
26356         (record_temporary_equivalences_from_stmts_at_dest): Corresponding
26357         changes.  Remove calls to lhs_of_dominating_assert.  Other
26358         uses of handle_dominating_asserts turn into unconditional code
26359         (simplify_control_stmt_condition_1): Likewise.
26360         (simplify_control_stmt_condition): Likewise.
26361         (thread_through_normal_block, thread_across_edge): Likewise.
26362         * tree-ssa-threadedge.h (thread_across_edge): Corresponding changes.
26363         * tree-vrp.c (lhs_of_dominating_assert): Move here.  Return original
26364         object if it is not an SSA_NAME.
26365         (simplify_stmt_for_jump_threading): Call lhs_of_dominating_assert
26366         before calling into the VRP specific simplifiers.
26367         (identify_jump_threads): Remove handle_dominating_asserts
26368         argument.
26370 2017-03-16  Jakub Jelinek  <jakub@redhat.com>
26372         PR fortran/79886
26373         * tree-diagnostic.c (default_tree_printer): No longer static.
26374         * tree-diagnostic.h (default_tree_printer): New prototype.
26376 2017-03-16  Tamar Christina  <tamar.christina@arm.com>
26378         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>)
26379         Change ins into fmov.
26381 2017-03-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26383         * config/aarch64/iterators.md (h_con): Return "x" for V4HF and V8HF.
26384         * config/aarch64/aarch64-simd.md (*aarch64_fma4_elt_from_dup<mode>):
26385         Use h_con constraint for operand 1.
26386         (*aarch64_fnma4_elt_from_dup<mode>): Likewise.
26387         (*aarch64_mulx_elt_from_dup<mode>): Likewise for operand 2.
26389 2017-03-15  Jeff Law  <law@redhat.com>
26391         PR tree-optimization/71437
26392         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): New function.
26393         (record_temporary_equivalences): Use it.
26395         PR tree-optimization/71437
26396         * tree-ssa-dom.c (struct cond_equivalence): Moved from here into
26397         tree-ssa-scopedtables.
26398         (lookup_avail_expr, build_and_record_new_cond): Likewise.
26399         (record_conditions, record_cond, vuse_eq): Likewise.
26400         (record_edge_info): Adjust to API tweak of record_conditions.
26401         (simplify_stmt_for_jump_threading): Similarly for lookup_avail_expr.
26402         (record_temporary_equivalences, optimize_stmt): Likewise.
26403         (eliminate_redundant_computations): Likewise.
26404         (record_equivalences_from_stmt): Likewise.
26405         * tree-ssa-scopedtables.c: Include options.h and params.h.
26406         (vuse_eq): New function, moved from tree-ssa-dom.c
26407         (build_and_record_new_cond): Likewise.
26408         (record_conditions): Likewise.  Accept vector of conditions rather
26409         than edge_equivalence structure for first argument.
26410         for the first argument.
26411         (avail_exprs_stack::lookup_avail_expr): New member function, moved
26412         from tree-ssa-dom.c.
26413         (avail_exprs_stack::record_cond): Likewise.
26414         * tree-ssa-scopedtables.h (struct cond_equivalence): Moved here
26415         from tree-ssa-dom.c.
26416         (avail_exprs_stack): Add new member functions lookup_avail_expr
26417         and record_cond.
26418         (record_conditions): Declare.
26420 2017-03-15  Vladimir Makarov  <vmakarov@redhat.com>
26422         PR target/80017
26423         * lra-constraints.c (process_alt_operands): Increase reject for
26424         reloading an input/output operand.
26426 2017-03-15  Michael Meissner  <meissner@linux.vnet.ibm.com>
26428         PR target/79038
26429         * config/rs6000/rs6000.md (float<QHI:mode><IEEE128:mode>2): Define
26430         insns to convert from signed/unsigned char/short to IEEE 128-bit
26431         floating point.
26432         (floatuns<QHI:mode><IEEE128:mode>2): Likewise.
26434 2017-03-15  Uros Bizjak  <ubizjak@gmail.com>
26436         PR target/80019
26437         * config/i386/i386.c (ix86_vector_duplicate_value): Create
26438         subreg of inner mode for values already in registers.
26440 2017-03-15  Bernd Schmidt  <bschmidt@redhat.com>
26442         * config/c6x/c6x.c (hwloop_optimize): Handle case where the old
26443         iteration reg is used after the loop.
26445 2017-03-14  Martin Sebor  <msebor@redhat.com>
26447         PR tree-optimization/79800
26448         * gimple-ssa-sprintf.c (format_floating: Add argument.  Handle
26449         precision in negative-positive range.
26450         (format_floating): Call non-const overload with adjusted precision.
26452 2017-03-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
26454         PR target/79947
26455         * config/rs6000/rs6000.h (TARGET_FRSQRTES): Add check for
26456         -mpowerpc-gfxopt.
26458 2017-03-14  Martin Sebor  <msebor@redhat.com>
26460         PR middle-end/80020
26461         * builtin-attrs.def (ATTR_ALLOC_SIZE_2_NOTHROW_LIST): New macro.
26462         * builtins.def (aligned_alloc): Use it.
26464         PR c/79936
26465         * Makefile.in (GTFILES): Add calls.c.
26466         * calls.c: Include "gt-calls.h".
26468 2017-03-14  Bernd Schmidt  <bschmidt@redhat.com>
26470         PR rtl-optimization/79728
26471         * regs.h (struct target_regs): New field
26472         x_contains_allocatable_regs_of_mode.
26473         (contains_allocatable_regs_of_mode): New macro.
26474         * reginfo.c (init_reg_sets_1): Initialize it, and change
26475         contains_reg_of_mode so it includes global regs as well.
26476         * reload.c (push_reload): Use contains_allocatable_regs_of_mode
26477         rather than contains_regs_of_mode.
26479 2017-03-14  Martin Liska  <mliska@suse.cz>
26481         * doc/invoke.texi: Document options that can't be combined with
26482         -fcheck-pointer-bounds.
26484 2017-03-14  Martin Liska  <mliska@suse.cz>
26486         PR middle-end/79831
26487         * doc/invoke.texi (-Wchkp): Document the option.
26489 2017-03-14  Martin Liska  <mliska@suse.cz>
26491         * Makefile.in: Install gcov-dump.
26493 2017-03-14  Martin Liska  <mliska@suse.cz>
26495         * multiple_target.c (expand_target_clones): Bail out for
26496         an invalid attribute.
26498 2017-03-14  Richard Biener  <rguenther@suse.de>
26500         * alias.c (struct alias_set_entry): Pack properly.
26501         * cfgloop.h (struct loop): Likewise.
26502         * cse.c (struct set): Likewise.
26503         * ipa-utils.c (struct searchc_env): Likewise.
26504         * loop-invariant.c (struct invariant): Likewise.
26505         * lra-remat.c (struct cand): Likewise.
26506         * recog.c (struct change_t): Likewise.
26507         * rtl.h (struct address_info): Likewise.
26508         * symbol-summary.h (function_summary): Likewise.
26509         * tree-loop-distribution.c (struct partition): Likewise.
26510         * tree-object-size.c (struct object_size_info): Likewise.
26511         * tree-ssa-loop-ivopts.c (struct cost_pair): Likewise.
26512         * tree-ssa-threadupdate.c (struct ssa_local_info_t): Likewise.
26513         * tree-vect-data-refs.c (struct _vect_peel_info): Likewise.
26514         * tree-vect-slp.c (struct _slp_oprnd_info): Likewise.
26515         * tree-vect-stmts.c (struct simd_call_arg_info): Likewise.
26516         * tree-vectorizer.h (struct _loop_vec_info): Likewise.
26517         (struct _stmt_vec_info): Likewise.
26519 2017-03-14  Martin Liska  <mliska@suse.cz>
26521         PR target/79892
26522         * multiple_target.c (create_dispatcher_calls): Check that
26523         a target can create a function dispatcher.
26525 2017-03-14  Martin Liska  <mliska@suse.cz>
26527         PR lto/66295
26528         * multiple_target.c (expand_target_clones): Drop local.local
26529         flag for default implementation.
26531 2017-03-14  Richard Biener  <rguenther@suse.de>
26533         PR tree-optimization/80030
26534         * tree-vect-stmts.c (vectorizable_store): Plug memleak.
26536 2017-03-13  Kito Cheng  <kito.cheng@gmail.com>
26538         * config/riscv/riscv.c (riscv_emit_float_compare>: Use
26539         gcc_fallthrough() instead of __attribute__((fallthrough));
26541 2017-03-13  Gerald Pfeifer  <gerald@pfeifer.com>
26543         * doc/gcc.texi: Remove "up" link to (DIR).
26544         * doc/gccint.texi: Ditto.
26546 2017-03-13  Gerald Pfeifer  <gerald@pfeifer.com>
26548         * doc/install.texi (Specific) <avr>: Remove reference to
26549         binutils 2.13.
26551 2017-03-13  Jeff Law  <law@redhat.com>
26553         * config/riscv/riscv.c (riscv_emit_float_compare): Use fallthru
26554         attribute rather than comments.
26556         * config/pdp11/pdp11.md (movmemhi): Adjust operand numbers to
26557         match_scratch operand is highest.
26559 2017-03-13  Martin Liska  <mliska@suse.cz>
26561         PR middle-end/78339
26562         * ipa-pure-const.c (warn_function_noreturn): If the declarations
26563         is a CHKP clone, use original declaration.
26565 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
26567         * config/arc/arc.c (arc_init): Use multiplier whenever we have it.
26568         (arc_conditional_register_usage): Use a different allocation order
26569         when optimizing for size.
26570         * common/config/arc/arc-common.c (arc_option_optimization_table):
26571         Section anchors default on when optimizing for size.
26573 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
26575         * config/arc/arc.md (*tst_bitfield_tst): Fix pattern.
26577 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
26579         * config/arc/arc.c (arc_output_addsi): Emit code density adds.
26580         * config/arc/arc.md (cpu_facility): Add cd variant.
26581         (*movqi_insn): Add code density variant.
26582         (*movhi_insn): Likewise.
26583         (*movqi_insn): Likewise.
26584         (*addsi3_mixed): Likewise.
26585         (subsi3_insn): Likewise.
26587 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
26589         * config/arc/arc.md (movsi_cond_exec): Update constraint.
26591 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
26593         * config/arc/arc.c (arc_legitimize_pic_address): Handle PIC
26594         expressions with MINUS and UNARY ops.
26596 2017-03-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26598         PR target/79911
26599         * config/arm/neon.md (vec_sel_widen_ssum_lo<VQI:mode><VW:mode>3):
26600         Rename to...
26601         (vec_sel_widen_ssum_lo<mode><V_half>3): ... This. Avoid mismatch
26602         between vec_select and vector argument.
26603         (vec_sel_widen_ssum_hi<VQI:mode><VW:mode>3): Rename to...
26604         (vec_sel_widen_ssum_hi<mode><V_half>3): ... This. Likewise.
26605         (vec_sel_widen_usum_lo<VQI:mode><VW:mode>3): Rename to...
26606         (vec_sel_widen_usum_lo<mode><V_half>3): ... This.
26607         (vec_sel_widen_usum_hi<VQI:mode><VW:mode>3): Rename to...
26608         (vec_sel_widen_usum_hi<mode><V_half>3): ... This.
26610 2017-03-13  Richard Biener  <rguenther@suse.de>
26612         PR other/79991
26613         * params.def (vect-max-peeling-for-alignment): Fix typo.
26615 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
26617         * doc/install.texi (Specific) <mips-*-*>: Remove description of
26618         issue that only occurred with binutils below 2.18.
26620 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
26622         * doc/install.texi (Specific) <cris-axis-elf>: No longer
26623         refer to binutils 2.11/2.12 minimum.
26625 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
26627         * doc/install.texi (Specific) <powerpc-*-*>: Remove link to
26628         ftp.kernel.org and simplify binutils requirement.
26630 2017-03-11  Gerald Pfeifer  <gerald@pfeifer.com>
26632         * doc/invoke.texi (Warning Options): Fix spelling of link-time
26633         optimization.
26634         (Optimize Options): Ditto.  Also remove redundancy.
26636 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
26638         PR translation/79848
26639         * ipa-devirt.c (warn_types_mismatch): Simplify uses of "%<%s%>" to
26640         "%qs".
26641         * ipa-pure-const.c (suggest_attribute): Likewise.  Convert _
26642         to G_ to avoid double translation.
26644 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
26646         PR translation/79923
26647         * auto-profile.c (get_combined_location): Convert leading
26648         character of diagnostics to lower case and remove trailing period.
26649         (read_profile): Likewise for various diagnostics.
26650         * config/arm/arm.c (arm_option_override): Remove trailing period
26651         from various diagnostics.
26652         * config/msp430/msp430.c (msp430_expand_delay_cycles): Likewise.
26653         (msp430_expand_delay_cycles): Likewise.
26655 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
26657         PR target/79925
26658         * config/aarch64/aarch64.c (aarch64_validate_mcpu): Quote the
26659         full command-line argument, rather than just "str".
26660         (aarch64_validate_march): Likewise.
26661         (aarch64_validate_mtune): Likewise.
26663 2017-03-10  Bernd Schmidt  <bschmidt@redhat.com>
26665         PR rtl-optimization/78911
26666         * lra-assigns.c (must_not_spill_p): New function.
26667         (spill_for): Use it.
26669 2017-03-10  Jakub Jelinek  <jakub@redhat.com>
26671         PR tree-optimization/79981
26672         * tree-vrp.c (extract_range_basic): Handle IMAGPART_EXPR of
26673         ATOMIC_COMPARE_EXCHANGE ifn result.
26674         (stmt_interesting_for_vrp, vrp_visit_stmt): Handle
26675         IFN_ATOMIC_COMPARE_EXCHANGE.
26677 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
26679         PR driver/79875
26680         * opts.c (parse_sanitizer_options): Add missing question mark to
26681         "did you mean" message.
26683 2017-03-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26685         * config/rs6000/rs6000-builtin.def (VMULEUB_UNS): Remove orphaned
26686         built-in.
26687         (VMULEUH_UNS): Likewise.
26688         (VMULOUB_UNS): Likewise.
26689         (VMULOUH_UNS): Likewise.
26690         * config/rs6000/rs6000.c (builtin_function_type): Remove
26691         references to ALTIVEC_BUILTIN_VMUL[EO]U[BH]_UNS.
26693 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
26695         PR bootstrap/79952
26696         * read-rtl-function.c (function_reader::read_rtx_operand): Update
26697         x with result of extra_parsing_for_operand_code_0.
26698         (function_reader::extra_parsing_for_operand_code_0): Convert
26699         return type from void to rtx, returning x.  When reading
26700         SYMBOL_REF with SYMBOL_FLAG_HAS_BLOCK_INFO, reallocate x to the
26701         larger size containing struct block_symbol.
26703 2017-03-10  Segher Boessenkool  <segher@kernel.crashing.org>
26705         * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
26706         -mfloat128-hardware without -m64.
26708 2017-03-10  Will Schmidt <will_schmidt@vnet.ibm.com>
26710         PR target/79941
26711         * config/rs6000/rs6000.c (builtin_function_type): Add VMUL*U[HB]
26712         entries to the case statement that marks unsigned arguments to
26713         overloaded functions.
26715 2017-03-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
26717         * config/rs6000/rs6000.c (rs6000_option_override_internal): Fix
26718         two typographic errors in the handling of TARGET_UPPER_REGS_DI.
26720 2017-03-10  Pat Haugen  <pthaugen@us.ibm.com>
26722         PR target/79907
26723         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Test
26724         TARGET_UPPER_REGS_DI when setting 'wi' constraint regclass.
26726 2017-03-10  Martin Liska  <mliska@suse.cz>
26728         PR target/65705
26729         PR target/69804
26730         * toplev.c (process_options): Enable MPX with LSAN and UBSAN.
26731         * tree-chkp.c (chkp_walk_pointer_assignments): Verify that
26732         FIELD != NULL.
26734 2017-03-10  Olivier Hainque  <hainque@adacore.com>
26736         * tree-switch-conversion (array_value_type): Start by resetting
26737         candidate type to it's main variant.
26739 2017-03-10  Jakub Jelinek  <jakub@redhat.com>
26741         PR rtl-optimization/79909
26742         * combine.c (try_combine): Use simplify_replace_rtx on individual
26743         CALL_INSN_FUNCTION_USAGE elements instead of replace_rtx on copy_rtx
26744         of the whole CALL_INSN_FUNCTION_USAGE.
26746         PR tree-optimization/79972
26747         * gimple-ssa-warn-alloca.c (alloca_call_type): Only call
26748         get_range_info on SSA_NAMEs.  Formatting fixes.
26750 2017-03-10  Richard Biener  <rguenther@suse.de>
26751             Jakub Jelinek  <jakub@redhat.com>
26753         PR tree-optimization/77975
26754         * tree-ssa-loop-niter.c (get_base_for): Allow phi argument from latch
26755         edge to be constant.
26756         (get_val_for): For constant x return it.  Formatting fix.
26757         (loop_niter_by_eval): Avoid pointless looping if the next iteration
26758         would use the same bases as the current one.
26760 2017-03-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26762         * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Use rotate
26763         instead of vec_select for V1TImode.
26764         * conifg/rs6000/vsx.md (VSX_LE): Remove mode iterator that is no
26765         longer needed.
26766         (VSX_LE_128): Add V1TI to this mode iterator.
26767         (*vsx_le_perm_load_<mode>): Change to use VSX_D mode iterator.
26768         (*vsx_le_perm_store_<mode>): Likewise.
26769         (pre-reload splitter for VSX stores): Likewise.
26770         (post-reload splitter for VSX stores): Likewise.
26771         (*vsx_xxpermdi2_le_<mode>): Likewise.
26772         (*vsx_lxvd2x2_le_<mode>): Likewise.
26773         (*vsx_stxvd2x2_le_<mode>): Likewise.
26775 2017-03-09  Michael Eager  <eager@eagercon.com>
26777         Correct failures with --enable-checking=yes,rtl.
26779         * config/microblaze/microblaze.c (microblaze_expand_shift):
26780         Replace GET_CODE test with CONST_INT_P and INTVAL test with
26781         test for const0_rtx.
26782         * config/microblaze/microblaze.md (ashlsi3_byone, ashrsi3_byone,
26783         lshrsi3_byone): Replace INTVAL with test for const1_rtx.
26785 2017-03-09  Richard Biener  <rguenther@suse.de>
26787         PR tree-optimization/79977
26788         * graphite-scop-detection.c (scop_detection::merge_sese):
26789         Handle the case of extra exits to blocks dominating the entry.
26791 2017-03-09  Toma Tabacu  <toma.tabacu@imgtec.com>
26793         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
26794         Document rdynamic.
26796 2017-03-09  Vladimir Makarov  <vmakarov@redhat.com>
26798         PR rtl-optimization/79949
26799         * lra-constraints.c (process_alt_operands): Check memory when
26800         trying to predict a cycle.  Print about the overall increase.
26802 2017-03-09  Richard Biener  <rguenther@suse.de>
26804         PR middle-end/79971
26805         * gimple-expr.c (useless_type_conversion_p): Preserve
26806         TYPE_SATURATING for fixed-point types.
26808 2017-03-09  Richard Biener  <rguenther@suse.de>
26810         PR ipa/79970
26811         * ipa-prop.c (ipa_modify_formal_parameters): Avoid changing
26812         alignment of BLKmode params.
26814 2017-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26816         PR target/79913
26817         * config/aarch64/iterators.md (VALL_F16_NO_V2Q): New mode iterator.
26818         (VALL_NO_V2Q): Likewise.
26819         (VDQF_DF): Delete.
26820         * config/aarch64/aarch64-simd.md
26821         (aarch64_dup_lane_<vswap_width_name><mode>): Use VALL_F16_NO_V2Q
26822         iterator.
26823         (*aarch64_simd_vec_copy_lane_<vswap_width_name><mode>): Use
26824         VALL_NO_V2Q mode iterator.
26825         (*aarch64_vgetfmulx<mode>): Use VDQF iterator.
26827 2017-03-09  Martin Liska  <mliska@suse.cz>
26829         PR tree-optimization/79631
26830         * tree-chkp-opt.c (chkp_is_constant_addr): Call
26831         tree_int_cst_sign_bit just for INTEGER constants.
26833 2017-03-09  Martin Liska  <mliska@suse.cz>
26835         PR target/65705
26836         PR target/69804
26837         * toplev.c (process_options): Disable -fcheck-pointer-bounds with
26838         sanitizers.
26840 2017-03-09  Marek Polacek  <polacek@redhat.com>
26842         PR c++/79672
26843         * tree.c (inchash::add_expr): Handle TREE_VEC.
26845 2017-03-09  Martin Liska  <mliska@suse.cz>
26847         PR ipa/79764
26848         (chkp_narrow_size_and_offset): New function.
26849         (chkp_parse_array_and_component_ref): Support BIT_FIELD_REF.
26850         (void chkp_parse_bit_field_ref): New function.
26851         (chkp_make_addressed_object_bounds): Add case for BIT_FIELD_REF.
26852         (chkp_process_stmt): Use chkp_parse_bit_field_ref.
26854 2017-03-09  Martin Liska  <mliska@suse.cz>
26856         PR ipa/79761
26857         * tree-chkp.c (chkp_get_bound_for_parm): Get bounds for a param.
26858         (chkp_find_bounds_1): Remove gcc_unreachable.
26860 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
26862         PR sanitizer/79944
26863         * asan.c (get_mem_refs_of_builtin_call): For BUILT_IN_ATOMIC* and
26864         BUILT_IN_SYNC*, determine the access type from the size suffix and
26865         always build a MEM_REF with that type.  Handle forgotten
26866         BUILT_IN_SYNC_FETCH_AND_NAND_16 and BUILT_IN_SYNC_NAND_AND_FETCH_16.
26868         PR target/79932
26869         * config/i386/avx512vlintrin.h (_mm256_cmpge_epi32_mask,
26870         _mm256_cmpge_epi64_mask, _mm256_cmpge_epu32_mask,
26871         _mm256_cmpge_epu64_mask, _mm256_cmple_epi32_mask,
26872         _mm256_cmple_epi64_mask, _mm256_cmple_epu32_mask,
26873         _mm256_cmple_epu64_mask, _mm256_cmplt_epi32_mask,
26874         _mm256_cmplt_epi64_mask, _mm256_cmplt_epu32_mask,
26875         _mm256_cmplt_epu64_mask, _mm256_cmpneq_epi32_mask,
26876         _mm256_cmpneq_epi64_mask, _mm256_cmpneq_epu32_mask,
26877         _mm256_cmpneq_epu64_mask, _mm256_mask_cmpge_epi32_mask,
26878         _mm256_mask_cmpge_epi64_mask, _mm256_mask_cmpge_epu32_mask,
26879         _mm256_mask_cmpge_epu64_mask, _mm256_mask_cmple_epi32_mask,
26880         _mm256_mask_cmple_epi64_mask, _mm256_mask_cmple_epu32_mask,
26881         _mm256_mask_cmple_epu64_mask, _mm256_mask_cmplt_epi32_mask,
26882         _mm256_mask_cmplt_epi64_mask, _mm256_mask_cmplt_epu32_mask,
26883         _mm256_mask_cmplt_epu64_mask, _mm256_mask_cmpneq_epi32_mask,
26884         _mm256_mask_cmpneq_epi64_mask, _mm256_mask_cmpneq_epu32_mask,
26885         _mm256_mask_cmpneq_epu64_mask, _mm_cmpge_epi32_mask,
26886         _mm_cmpge_epi64_mask, _mm_cmpge_epu32_mask, _mm_cmpge_epu64_mask,
26887         _mm_cmple_epi32_mask, _mm_cmple_epi64_mask, _mm_cmple_epu32_mask,
26888         _mm_cmple_epu64_mask, _mm_cmplt_epi32_mask, _mm_cmplt_epi64_mask,
26889         _mm_cmplt_epu32_mask, _mm_cmplt_epu64_mask, _mm_cmpneq_epi32_mask,
26890         _mm_cmpneq_epi64_mask, _mm_cmpneq_epu32_mask, _mm_cmpneq_epu64_mask,
26891         _mm_mask_cmpge_epi32_mask, _mm_mask_cmpge_epi64_mask,
26892         _mm_mask_cmpge_epu32_mask, _mm_mask_cmpge_epu64_mask,
26893         _mm_mask_cmple_epi32_mask, _mm_mask_cmple_epi64_mask,
26894         _mm_mask_cmple_epu32_mask, _mm_mask_cmple_epu64_mask,
26895         _mm_mask_cmplt_epi32_mask, _mm_mask_cmplt_epi64_mask,
26896         _mm_mask_cmplt_epu32_mask, _mm_mask_cmplt_epu64_mask,
26897         _mm_mask_cmpneq_epi32_mask, _mm_mask_cmpneq_epi64_mask,
26898         _mm_mask_cmpneq_epu32_mask, _mm_mask_cmpneq_epu64_mask): Move
26899         definitions outside of __OPTIMIZE__ guarded section.
26901         PR target/79932
26902         * config/i386/avx512bwintrin.h (_mm512_packs_epi32,
26903         _mm512_maskz_packs_epi32, _mm512_mask_packs_epi32,
26904         _mm512_packus_epi32, _mm512_maskz_packus_epi32,
26905         _mm512_mask_packus_epi32): Move definitions outside of __OPTIMIZE__
26906         guarded section.
26908 2017-03-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
26910         * config/s390/vx-builtins.md ("vfee<mode>", "vfeez<mode>")
26911         ("vfenez<mode>"): Add missing constraints.
26913 2017-03-08  Martin Sebor  <msebor@redhat.com>
26915         PR target/79928
26916         * config/nds32/nds32.c (nds32_option_override):
26917         Fix misspelled diagnostic.
26919 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
26921         PR c/79940
26922         * gimplify.c (gimplify_omp_for): Replace index var in outer
26923         taskloop statement with an artificial variable and add
26924         OMP_CLAUSE_PRIVATE clause for it.
26926 2017-03-08  Richard Biener  <rguenther@suse.de>
26928         PR tree-optimization/79955
26929         * tree-ssa-uninit.c (warn_uninitialized_vars): Do not warn
26930         for accesses that are completely outside of the variable.
26932 2017-03-08  Andrew Haley  <aph@redhat.com>
26934         PR tree-optimization/79943
26935         * tree-ssa-loop-split.c (compute_new_first_bound): When
26936         calculating the new upper bound, (END-BEG) should be added, not
26937         subtracted.
26939 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
26941         * config/avr/avr.md (setmemhi): Make sure match_dup
26942         operand number comes before match_scratch.
26944 2017-03-08  Richard Biener  <rguenther@suse.de>
26946         PR tree-optimization/79920
26947         * tree-vect-slp.c (vect_create_mask_and_perm): Remove and inline
26948         with ncopies == 1 to ...
26949         (vect_transform_slp_perm_load): ... here.  Properly compute
26950         all element loads by iterating VF times over the group.  Do
26951         not handle ncopies (computed in a broken way) in
26952         vect_create_mask_and_perm.
26954 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
26956         PR sanitizer/79904
26957         * internal-fn.c (expand_vector_ubsan_overflow): If arg0 or arg1
26958         is a uniform vector, use uniform_vector_p return value instead of
26959         building ARRAY_REF on folded VIEW_CONVERT_EXPR to array type.
26961 2017-03-07  Marek Polacek  <polacek@redhat.com>
26963         PR middle-end/79809
26964         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Use HOST_WIDE_INT.
26965         (alloca_call_type): Likewise.
26967 2017-03-07  Martin Liska  <mliska@suse.cz>
26969         * gcov.c (process_args): Put comment to correct location.
26971 2017-03-07  Martin Liska  <mliska@suse.cz>
26973         PR middle-end/68270
26974         * tree-chkp.c (chkp_may_narrow_to_field): Add new argument ref.
26975         Use array_at_struct_end_p instead of DECL_CHAIN (field).
26976         (chkp_narrow_bounds_for_field): Likewise.
26977         (chkp_parse_array_and_component_ref): Pass one more argument to
26978         call.
26980 2017-03-07  Richard Biener  <rguenther@suse.de>
26982         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve
26983         preheaders.
26985 2017-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
26987         * config/i386/i386.c (ix86_local_alignment): Align most aggregates
26988         of 16 bytes and more to 16 bytes, not those of 16 bits and more.
26990 2017-03-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26992         PR c/79855
26993         * params.def (PARAM_STORE_MERGING_ALLOW_UNALIGNED): Add full stop
26994         to end of description.
26995         (PARAM_MAX_STORES_TO_MERGE): Likewise.
26997 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
26999         PR rtl-optimization/79901
27000         * config/i386/sse.md (*avx512bw_<code><mode>3<mask_name>): Renamed to
27001         ...
27002         (*avx512f_<code><mode>3<mask_name>): ... this.
27003         (<code><mode>3 with maxmin code iterator): Use VI8_AVX2_AVX512F
27004         iterator instead of VI8_AVX2_AVX512BW.
27006         PR rtl-optimization/79901
27007         * expr.c (expand_expr_real_2): For vector MIN/MAX, if there is no
27008         min/max expander, expand it using expand_vec_cond_expr.
27010         PR sanitizer/79897
27011         * ubsan.c (ubsan_encode_value): Call mark_addressable on the
27012         temporary.
27014 2017-03-06  Jakub Jelinek  <jakub@redhat.com>
27016         PR c++/79821
27017         * dwarf2out.h (dw_vec_const): Change array type from unsigned char *
27018         to void * for PCH reasons.
27019         * dwarf2out.c (output_loc_operands, output_die): Cast
27020         v.val_vec.array to unsigned char *.
27022 2017-03-06  John David Anglin  <danglin@gcc.gnu.org>
27024         PR target/77850
27025         * config/pa/pa-64.h (PAD_VARARGS_DOWN): Don't pad down complex and
27026         vector types.
27028 2017-03-06  Vladimir Makarov  <vmakarov@redhat.com>
27030         PR rtl-optimization/79571
27031         * lra-constraints.c (process_alt_operands): Calculate static
27032         reject and subtract it from overall when only addresses will be
27033         reloaded.
27035 2017-03-06  Julia Koval  <julia.koval@intel.com>
27037         PR target/79793
27038         * config/i386/i386.c (ix86_minimum_incoming_stack_boundary): Set
27039         incoming stack boundary to 128 for 64-bit targets.
27041 2017-03-06  Richard Biener  <rguenther@suse.de>
27043         PR tree-optimization/79894
27044         * tree-vectorizer.c (vectorize_loops): Set loop_vectorized_call
27045         to NULL after folding it.
27047 2017-03-06  Richard Biener  <rguenther@suse.de>
27049         PR tree-optimization/79824
27050         * tree-vect-stmts.c (get_group_load_store_type): Fix alignment
27051         check disabling peeling for gaps.
27053 2017-03-06  Toma Tabacu  <toma.tabacu@imgtec.com>
27055         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
27056         attributes): Document gettimeofday.
27058 2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>
27060         * config/s390/s390.c (s390_option_override_internal): Set
27061         PARAM_MIN_VECT_LOOP_BOUND
27063 2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>
27065         * config/s390/s390.c (s390_asm_output_function_label): Use nopr %r0.
27066         * config/s390/s390.md: Likewise.
27068 2017-03-06  Jakub Jelinek  <jakub@redhat.com>
27070         PR target/79812
27071         * config/i386/sse.md (VI8F_256_512): Remove mode iterator.
27072         (<avx2_avx512>_perm<mode>): Rename to ...
27073         (avx2_perm<mode>): ... this.  Use VI8F_256 iterator instead
27074         of VI8F_256_512.
27075         (<avx512>_perm<mode>_mask): Rename to ...
27076         (avx512vl_perm<mode>_mask): ... this.  Use VI8F_256 iterator instead
27077         of VI8F_256_512.
27078         (<avx2_avx512>_perm<mode>_1<mask_name>): Rename to ...
27079         (avx2_perm<mode>_1<mask_name): ... this.  Use VI8F_256 iterator
27080         instead of VI8F_256_512.
27081         (avx512f_perm<mode>): New define_expand.
27082         (avx512f_perm<mode>_mask): Likewise.
27083         (avx512f_perm<mode>_1<mask_name>): New define_insn.
27084         (<avx512>_vec_dup<mode>_1): Fix up vec_select mode.
27086 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
27088         * config/mips/mips-msa.md (msa_fmax_a_<msafmt>, msa_fmin_a_<msafmt>,
27089         msa_max_a_<msafmt>, msa_min_a_<msafmt>): Introduce mode interator for
27090         if_then_else.
27091         (smin<mode>3, smax<mode>3): Change operand print code from 'B' to 'E'.
27093 2017-03-06  Martin Liska  <mliska@suse.cz>
27095         PR sanitize/79783
27096         * asan.c (asan_expand_poison_ifn): Do not expand ASAN_POISON
27097         when having a SSA NAME w/o VAR_DECL assigned to it.
27099 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
27101         * config/mips/mips-msa.md (msa_dotp_<su>_d, msa_dpadd_<su>_d,
27102         msa_dpsub_<su>_d): Fix MODE for vec_select.
27104 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
27106         * config/mips/mips.c (mips_gen_const_int_vector): Change type of last
27107         argument.
27108         * config/mips/mips-protos.h (mips_gen_const_int_vector): Likewise.
27110 2017-03-06  Richard Biener  <rguenther@suse.de>
27112         * lto-streamer.c (lto_check_version): Use %qs in diagnostics.
27113         * plugin.c (register_plugin_info): Likewise.
27114         * tree-chkp.c (chkp_make_static_const_bounds): Likewise.
27116 2017-03-05  Jakub Jelinek  <jakub@redhat.com>
27118         * config/i386/sse.md (sse_storehps, sse_storelps,
27119         avx_<castmode><avxsizesuffix>_<castmode>,
27120         avx512f_<castmode><avxsizesuffix>_<castmode>,
27121         avx512f_<castmode><avxsizesuffix>_256<castmode>): Require
27122         in condition that at least one operand is not a MEM.
27124 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
27126         PR middle-end/79805
27127         * internal-fn.def (ATOMIC_BIT_TEST_AND_SET, ATOMIC_BIT_TEST_AND_RESET,
27128         ATOMIC_BIT_TEST_AND_COMPLEMENT, ATOMIC_COMPARE_EXCHANGE): Remove
27129         ECF_NOTHROW.
27130         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Set
27131         gimple_call_nothrow_p flag based on whether original builtin can throw.
27132         If it can, emit following stmts on the fallthrough edge.
27133         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Similarly, except
27134         don't create new bb if inserting just debug stmts on the edge, try to
27135         insert them on the fallthru bb or just reset debug stmts.
27137 2017-03-03  Segher Boesssenkool  <segher@kernel.crashing.org>
27139         PR target/43763
27140         * config/rs6000/rs6000.c (rs6000_final_prescan_insn): Save and
27141         restore recog_data (including the operand rtxes inside it) around
27142         the call to get_insn_template.
27144 2017-03-03  Martin Sebor  <msebor@redhat.com>
27146         PR tree-optimization/79699
27147         * context.c (context::~context): Free MPFR caches to avoid
27148         a memory leak on program exit.
27150 2017-03-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27152         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
27153         Use wide_int::ulow () instead of .elt (0).
27155 2017-03-03  Uros Bizjak  <ubizjak@gmail.com>
27157         * config/i386/i386.md (*pushtf): Change *roF constraint to *roC.
27158         (*pushxf): Limit oF constraint to 32bit targets and add oC
27159         constraint for 64bit targets.
27160         (pushxf splitter): Use PUSH_ROUNDING to calculate stack adjustment.
27161         (*pushdf): Change rmF constraint to rmC.
27163 2017-03-03  Martin Liska  <mliska@suse.cz>
27165         * tree-ssa-loop-prefetch.c (pass_loop_prefetch::execute):
27166         Remove unused variable.
27168 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
27170         PR target/79807
27171         * config/i386/i386.c (ix86_expand_multi_arg_builtin): If target
27172         is a memory operand, increase num_memory.
27173         (ix86_expand_args_builtin): Likewise.
27175 2017-03-03  Jan Hubicka  <jh@suse.cz>
27177         PR lto/79760
27178         * ipa-devirt.c (maybe_record_node): Properly handle
27179         __cxa_pure_virtual visibility.
27181 2017-03-03  Martin Liska  <mliska@suse.cz>
27183         PR tree-optimization/79803
27184         * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Remove
27185         assert.
27186         (pass_loop_prefetch::execute): Disabled optimization if an
27187         assumption about L1 cache size is not met.
27189 2017-03-03  Martin Liska  <mliska@suse.cz>
27191         PR rtl-optimization/79574
27192         * gcse.c (struct gcse_expr): Use HOST_WIDE_INT instead of int.
27193         (hash_scan_set): Likewise.
27194         (dump_hash_table): Likewise.
27195         (hoist_code): Likewise.
27197 2017-03-03  Richard Biener  <rguenther@suse.de>
27199         * fixed-value.c (fixed_from_string): Restore use of elt (1)
27200         in place of uhigh ().
27201         (fixed_convert_from_real): Likewise.
27203 2017-03-03  Uros Bizjak  <ubizjak@gmail.com>
27205         PR target/79514
27206         * config/i386/i386.md (*pushxf_rounded): Use Pmode instead of DImode.
27208 2017-03-03  Richard Biener  <rguenther@suse.de>
27210         PR middle-end/79818
27211         * match.pd ( X +- C1 CMP C2 -> X CMP C2 -+ C1): Add missing
27212         TYPE_OVERFLOW_UNDEFINED check.
27214 2017-03-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27216         * config/rs6000/vector.md (vector_ne_<mode>_p): Correct operand
27217         numbers.
27218         (vector_ae_<mode>_p): Likewise.
27219         (vector_nez_<mode>_p): Likewise.
27220         (vector_ne_v2di_p): Likewise.
27221         (vector_ae_v2di_p): Likewise.
27222         (vector_ne_<mode>_p): Likewise.
27223         * config/rs6000/vsx.md (vsx_tsqrt<mode>2_fg): Correct operand
27224         numbers.
27225         (vsx_tsqrt<mode>2_fe): Likewise.
27227 2017-03-02  Uros Bizjak  <ubizjak@gmail.com>
27229         PR target/79514
27230         * config/i386/i386.md (*pushxf_rounded): New insn_and_split pattern.
27232 2017-03-02  Jakub Jelinek  <jakub@redhat.com>
27234         PR rtl-optimization/79780
27235         * cprop.c (one_cprop_pass): When second and further conditional trap
27236         in a single basic block is turned into an unconditional trap, turn it
27237         into a deleted note to avoid RTL verification failures.
27239 2017-03-02  Richard Biener  <rguenther@suse.de>
27241         * fold-const.c (const_binop): Use ulow () instead of elt (0).
27243 2017-03-02  Richard Biener  <rguenther@suse.de>
27245         PR tree-optimization/79345
27246         PR c++/42000
27247         * tree-ssa-alias.c (walk_aliased_vdefs_1): Take a limit
27248         param and abort the walk, returning -1 if it is hit.
27249         (walk_aliased_vdefs): Take a limit param and pass it on.
27250         * tree-ssa-alias.h (walk_aliased_vdefs): Add a limit param,
27251         defaulting to 0 and return a signed int.
27252         * tree-ssa-uninit.c (struct check_defs_data): New struct.
27253         (check_defs): New helper.
27254         (warn_uninitialized_vars): Use walk_aliased_vdefs to warn
27255         about uninitialized memory.
27256         * fixed-value.c (fixed_from_string): Use ulow/uhigh to avoid
27257         bogus uninitialized warning.
27258         (fixed_convert_from_real): Likewise.
27260 2017-03-02  Bin Cheng  <bin.cheng@arm.com>
27262         PR tree-optimization/66768
27263         * tree-ssa-loop-ivopts.c (find_interesting_uses_address): Skip addr
27264         iv_use if base object can't be determined.
27266 2017-03-02  Jakub Jelinek  <jakub@redhat.com>
27268         PR tree-optimization/79345
27269         * gensupport.h (struct pattern_stats): Add min_scratch_opno field.
27270         * gensupport.c (get_pattern_stats_1) <case MATCH_SCRATCH>: Update it.
27271         (get_pattern_stats): Initialize it.
27272         * genemit.c (gen_expand): Verify match_scratch numbers come after
27273         match_operand/match_dup numbers.
27274         * config/i386/i386.md (<s>mul<mode>3_highpart): Swap match_dup and
27275         match_scratch numbers.
27276         * config/i386/sse.md (avx2_gathersi<mode>, avx2_gatherdi<mode>):
27277         Likewise.
27278         * config/s390/s390.md (trunctdsd2): Likewise.
27280 2017-03-02  Richard Biener  <rguenther@suse.de>
27282         * wide-int.h (wide_int_storage::operator=): Implement in terms
27283         of wi::copy.
27285 2017-03-02  Richard Biener  <rguenther@suse.de>
27287         PR tree-optimization/79777
27288         * tree-ssa-pre.c (eliminate_insert): Give up if we simplify
27289         the to insert expression to sth existing.
27291 2017-03-01  Martin Sebor  <msebor@redhat.com>
27293         PR middle-end/79692
27294         * gimple-ssa-sprintf.c
27295         (directive::known_width_and_precision): New function.
27296         (format_integer): Use it.
27297         (get_mpfr_format_length): Consider the full range of precision
27298         when computing %g output with the # flag.  Set the likely byte
27299         count to 3 rather than 1 when precision is indeterminate.
27300         (format_floating): Correct the lower bound of precision.
27302 2017-03-01  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27304         * doc/invoke.texi: Document default code model for 64-bit Linux.
27306 2017-03-01  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27308         PR target/79752
27309         * config/rs6000/rs6000.md (peephole2 for udiv/umod): Should emit
27310         udiv rather than div since input pattern is unsigned.
27312 2017-03-01  Uros Bizjak  <ubizjak@gmail.com>
27314         * config/i386/i386.c (print_reg): Warn for values of
27315         unsupported size in integer register.
27317 2017-03-01  Michael Meissner  <meissner@linux.vnet.ibm.com>
27319         PR target/79439
27320         * config/rs6000/predicates.md (current_file_function_operand): Do
27321         not allow self calls to be local if the function is replaceable.
27323 2017-03-01  Kelvin Nilsen  <kelvin@gcc.gnu.org>
27325         PR target/79395
27326         * config/rs6000/altivec.h (vec_ctz and others): Change the
27327         preprocessor macro that controls conditional compilation from
27328         _ARCH_PWR9 to __POWER9_VECTOR__.
27329         (vec_all_ne): Change parameterization of __altivec_scalar_pred
27330         macro expansion under preprocessor #ifdef __POWER9_VECTOR__
27331         control (instead of _ARCH_PWR9 control) so that template
27332         definition uses power9-specific function.
27333         (vec_any_eq): Likewise.
27334         (vec_all_ne): Change macro definition to use a power9-specific
27335         expansion under #ifdef __POWER9_VECTOR__ control (instead of
27336         _ARCH_PWR9 control).
27337         (vec_any_eq) Likewise.
27338         * config/rs6000/rs6000-builtin.def (CMPNEF): Remove BU_P9V_AV_2
27339         expansion for CMPNEF to remove support for xvcmpnesp instruction.
27340         (CMPNED): Remove BU_P9V_AV2 expansion for CMPNED to remove
27341         support for xvcmpnedp instruction.
27342         (VCMPNEB_P): Replace BU_P9V_AV_P macro expansion with BU_P9V_AV_2
27343         macro expansion so that Power9 implementation of vec_all_ne does
27344         not use the AltiVec predicate framework.
27345         (VCMPNEH_P): Likewise.
27346         (VCMPNEW_P): Likewise.
27347         (VCMPNED_P): Likewise.
27348         (VCMPNEFP_P): Likewise.
27349         (VCMPNEDP_P): Likewise.
27350         (VCMPAEB_P): Add BU_P9V_AV_2 macro expansion to change
27351         implementation of vec_any_eq to not use AltiVec predicate
27352         framework.
27353         (VCMPAEH_P): Likewise.
27354         (VCMPAEW_P): Likewise.
27355         (VCMPAED_P): Likewise.
27356         (VCMPAEFP_P): Likewise.
27357         (VCMPAEDP_P): Likewise.
27358         (VCMPNE_P): Replace BU_P9V_OVERLOAD_P macro expansion with
27359         BU_P9V_OVERLOAD_2 so that Power9 implementation of vec_all_ne does
27360         not use the AltiVec predicate framework.
27361         (VCMPAE_P): Add BU_P9V_OVERLOAD_2 macro to change implementation
27362         of vec_any_eq to not use AltiVec predicate framework.
27363         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
27364         support for predefined __POWER9_VECTOR__ macro to indicate that
27365         Power9 instruction selection is enabled.
27366         (altivec_overloaded_builtins): Remove extraneous
27367         ALTIVEC_BUILTIN_VEC_CMPNE entry for overloaded
27368         function argument types RS6000_BTI_bool_V16QI and
27369         RS6000_BTI_bool_V16QI.  Remove erroneous ALTIVEC_BUILTIN_VEC_CMPNE
27370         entry for overloaded function argument types RS6000_BTI_bool_V4SI
27371         andRS6000_BTI_bool_V4SI, mapping to P9V_BUILTIN_CMPNEB.  Remove
27372         two entries mapping to P9V_BUITIN_CMPNED and one entry mapping to
27373         P9V_BUILTIN_CMPNEF to force use of instructions not specific to
27374         Power9 for implementations of vec_cmpne.  Change the signature for
27375         all definitions of the overloaded P9V_BUILTIN_VEC_CMPNE_P function
27376         (representing vec_all_ne) to remove the previously described first
27377         argument of type RS6000_BTI_INTSI, as this was an artifact of
27378         reliance on the AltiVec predicate framework, which is no longer
27379         used in the implementation of these functions.  Add
27380         P9V_BUILTIN_VEC_VCMPAE_P entries (representing the vec_anyeq
27381         function) to match all of the P9V_BUILTIN_VEC_VCMNE_P entries
27382         since, unlike the AltiVec predicate framework implementation, we
27383         do not share function descriptors between vec_alle and vec_anyeq.
27384         (altivec_resolve_overloaded_builtin): Add SFmode and DFmode to the
27385         set of modes that receive special treatment even when
27386         TARGET_P9_VECTOR is true.  The special treatment emits code that
27387         does not depend on Power9 instructions.
27388         * config/rs6000/vector.md (vector_ne_<mode>_p): Change this
27389         define_expand to not rely on AltiVec predicate framework.
27390         (vector_ae_<mode>p): New define_expand to represent vec_any_eq
27391         function.
27392         (vector_ne_v2di_p): Change this define_expand to not rely on
27393         AltiVec predicate framework.
27394         (vector_ae_v2di_p): New define_expand to represent vec_any_eq
27395         function.
27396         (vector_ne_<mode>_p): Change this define_expand to not rely on
27397         AltiVec predicate framework.
27398         (vector_ae_<mode>p): New define_expand to represent vec_any_eq
27399         function.
27400         * config/rs6000/vsx.md (*vsx_ne_<mode>_p): For modes VSX_EXTRACT_I
27401         (V16QI, V8HI, V4SI), correct a typo in the code emitted for this
27402         define_insn pattern.
27403         (*vsx_ne_<mode>_p): For modes VSX_F (V4SF and V2DF), remove this
27404         define_insn pattern because the xvcmpne<VSs>. instruction is not
27405         supported.
27406         (vcmpne<VSs>): Remove this define_insn because xvcmpne<VSs>
27407         instruction is not supported.
27409 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
27411         * config/nvptx/nvptx.c: Include intl.h.
27413 2017-03-01  Martin Jambor  <mjambor@suse.cz>
27415         PR lto/78140
27416         * ipa-prop.h (ipa_bits): Removed field known.
27417         (ipa_jump_func): Removed field vr_known.  Changed fields bits and m_vr
27418         to pointers.  Adjusted their comments to warn about their sharing.
27419         (ipcp_transformation_summary): Change bits to a vector of pointers.
27420         (ipa_check_create_edge_args): Moved to ipa-prop.c, declare.
27421         (ipa_get_ipa_bits_for_value): Declare.
27422         * tree-vrp.h (value_range): Mark as GTY((for_user)).
27423         * ipa-prop.c (ipa_bit_ggc_hash_traits): New.
27424         (ipa_bits_hash_table): Likewise.
27425         (ipa_vr_ggc_hash_traits): Likewise.
27426         (ipa_vr_hash_table): Likewise.
27427         (ipa_print_node_jump_functions_for_edge): Adjust for bits and m_vr
27428         being pointers and vr_known being removed.
27429         (ipa_set_jf_unknown): Likewise.
27430         (ipa_get_ipa_bits_for_value): New function.
27431         (ipa_set_jfunc_bits): Likewise.
27432         (ipa_get_value_range): New overloaded functions.
27433         (ipa_set_jfunc_vr): Likewise.
27434         (ipa_compute_jump_functions_for_edge): Use the above functions to
27435         construct bits and vr parts of jump functions.
27436         (ipa_check_create_edge_args): Move here from ipa-prop.h, also allocate
27437         ipa_bits_hash_table and ipa_vr_hash_table if they do not already
27438         exist.
27439         (ipcp_grow_transformations_if_necessary): Also allocate
27440         ipa_bits_hash_table and ipa_vr_hash_table if they do not already
27441         exist.
27442         (ipa_node_params_t::duplicate): Do not copy bits, just pointers to
27443         them.  Fix too long lines.
27444         (ipa_write_jump_function): Adjust for bits and m_vr being pointers and
27445         vr_known being removed.
27446         (ipa_read_jump_function): Use new setter functions to construct bits
27447         and vr parts of jump functions or set them to NULL.
27448         (write_ipcp_transformation_info): Adjust for bits being pointers.
27449         (read_ipcp_transformation_info): Likewise.
27450         (ipcp_update_bits): Likewise.  Fix excessively long lines a trailing
27451         space.
27452         Include gt-ipa-prop.h.
27453         * ipa-cp.c (propagate_bits_across_jump_function): Adjust for bits
27454         being pointers.
27455         (ipcp_store_bits_results): Likewise.
27456         (propagate_vr_across_jump_function): Adjust for m_vr being a pointer.
27457         Do not write to existing jump functions but use a temporary instead.
27459 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
27461         PR c++/79681
27462         * fold-const.c (make_bit_field_ref): If orig_inner is COMPONENT_REF,
27463         attempt to use its first operand as BIT_FIELD_REF base.
27465 2017-03-01  Richard Biener  <rguenther@suse.de>
27467         PR middle-end/79721
27468         * tree-chrec.c (chrec_evaluate): Perform computation of Newtons
27469         interpolating formula in wrapping arithmetic.
27470         (chrec_apply): Convert chrec_evaluate return value to wanted type.
27472 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
27474         PR tree-optimization/79734
27475         * tree-vect-generic.c (expand_vector_condition): Optimize
27476         AVX512 vector boolean VEC_COND_EXPRs into bitwise operations.
27477         Handle VEC_COND_EXPR where comparison has different inner width from
27478         type's inner width.
27480 2017-02-28  Sandra Loosemore  <sandra@codesourcery.com>
27482         * doc/invoke.texi (ARC Options): Copy-edit to fix punctuation,
27483         markup, and similar issues.  Remove @opindex entries for things
27484         that aren't options.  Add missing -mmpy-option entries.
27486 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
27488         PR tree-optimization/79737
27489         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): If bitlen is
27490         a multiple of BITS_PER_UNIT and !BYTES_BIG_ENDIAN, clear
27491         tmpbuf[byte_size - 1].  Call natice_encode_expr with byte_size - 1
27492         instead of byte_size.  Formatting fix.
27493         (shift_bytes_in_array_right): Formatting fix.
27495 2017-02-28  Eric Botcazou  <ebotcazou@adacore.com>
27497         PR target/79749
27498         * config/sparc/sparc.c (sparc_frame_pointer_required): Add missing
27499         condition on optimize for the leaf function test.
27501 2017-02-28  Martin Liska  <mliska@suse.cz>
27503         PR lto/79625
27504         * read-rtl-function.c (function_reader::handle_unknown_directive):
27505         Bail out when one uses -flto.
27507 2017-02-28  Martin Liska  <mliska@suse.cz>
27509         * common.opt: Replace space with tabular for options of <number>
27510         type.
27511         * config/i386/i386.opt: Show <number> value for
27512         -mlarge-data-threshold.
27513         * opts.c (print_filtered_help): Do not display number in hexadecimal
27514         format.
27516 2017-02-28  Martin Liska  <mliska@suse.cz>
27518         * common.opt: Fix --help=option -Q for options which are of
27519         an enum type.
27521 2017-02-28  Uros Bizjak  <ubizjak@gmail.com>
27523         * config/i386/i386.c (print_reg): Error out for values
27524         of 8-bit size in invalid integer register.
27526 2017-02-28  Martin Sebor  <msebor@redhat.com>
27528         PR tree-optimization/79691
27529         * passes.def (pass_all_optimizations_g): Enable pass_sprintf_length.
27531 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
27533         PR target/79729
27534         * config/i386/i386.c (ix86_print_operand) <case 'R'>: Replace
27535         gcc_unreachable with output_operand_lossage.
27537 2017-02-28  Richard Biener  <rguenther@suse.de>
27539         PR tree-optimization/79740
27540         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Allow redundant
27541         inserts.
27542         (visit_nary_op): Insert the nary into the hashtable if we
27543         pattern-matched sth.
27544         * tree-ssa-pre.c (eliminate_insert): Robustify.
27546 2017-02-28  Richard Biener  <rguenther@suse.de>
27548         PR middle-end/79731
27549         * fold-const.c (decode_field_reference): Reject out-of-bound
27550         accesses.
27552 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
27554         * config/i386/i386.c: Include intl.h.
27555         (ix86_option_override_internal): Use cond ? G_("...") : G_("...")
27556         instead of just cond ? "..." : "...".
27557         * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Likewise.
27558         * coverage.c (read_counts_file): Likewise.
27559         * omp-offload.c: Include intl.h.
27560         (oacc_loop_fixed_partitions): Use cond ? G_("...") : G_("...") instead
27561         of just cond ? "..." : "...".
27562         * gcov.c (read_count_file): Use cond ? N_("...") : N_("...") instead
27563         of just cond ? "..." : "...".
27565 2017-02-28  Richard Earnshaw  <rearnsha@arm.com>
27567         PR target/79742
27568         * config/arm/parsecpu.awk (gen_data): Set tuning target to 'tune for'
27569         entry, if present.
27570         * config/arm/arm-cpus.in (cortex-m0plus.small-multiply): Correct
27571         'tune for' CPU name.
27572         * config/arm/arm-cpu-data.h: Regenerated.
27574 2017-02-28  Richard Biener  <rguenther@suse.de>
27576         PR tree-optimization/79732
27577         * tree-inline.c (expand_call_inline): Do not shadow var.
27579 2017-02-28  Richard Biener  <rguenther@suse.de>
27581         PR tree-optimization/79723
27582         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Preserve
27583         address-space properly.
27585 2017-02-28  Thomas Schwinge  <thomas@codesourcery.com>
27587         * doc/optinfo.texi (Optimization groups): Fix option used for
27588         OPTGROUP_ALL.
27589         * doc/invoke.texi (-fopt-info): Document "omp".
27590         * dumpfile.h: Sort OPTGROUP_OMP before OPTGROUP_VEC.
27591         (OPTGROUP_ALL): Add OPTGROUP_OMP.
27592         * hsa-gen.c (pass_data_gen_hsail): Use OPTGROUP_OMP.
27593         * ipa-hsa.c (pass_data_ipa_hsa): Likewise.
27594         * omp-simd-clone.c (pass_data_omp_simd_clone): Likewise.
27596         * dumpfile.h (OPTGROUP_OPENMP): Rename to OPTGROUP_OMP.  Adjust
27597         all users.
27598         * dumpfile.c (optgroup_options): Instead of "openmp", associate
27599         OPTGROUP_OMP with "omp".
27601 2017-02-27  Pat Haugen  <pthaugen@us.ibm.com>
27603         PR target/79544
27604         * config/rs6000/rs6000-c.c (struct altivec_builtin_types): Use VSRAD
27605         for arithmetic shift of unsigned V2DI.
27607 2017-02-27  Claudiu Zissulescu  <claziss@synopsys.com>
27609         * config.gcc (arc*-): Clean up, use arc/big.h, arc/elf.h, and
27610         arc/linux.h headers.
27611         * config/arc/arc.h (TARGET_OS_CPP_BUILTINS): Remove.
27612         (LINK_SPEC): Likewise.
27613         (ARC_TLS_EXTRA_START_SPEC): Likewise.
27614         (EXTRA_SPECS): Likewise.
27615         (STARTFILE_SPEC): Likewise.
27616         (ENDFILE_SPEC): Likewise.
27617         (LIB_SPEC): Likewise.
27618         (TARGET_SDATA_DEFAULT): Likewise.
27619         (TARGET_MMEDIUM_CALLS_DEFAULT): Likewise.
27620         (MULTILIB_DEFAULTS): Likewise.
27621         (DWARF2_UNWIND_INFO): Likewise.
27622         * config/arc/big.h: New file.
27623         * config/arc/elf.h: Likewise.
27624         * config/arc/linux.h: Likewise.
27625         * config/arc/t-uClibc: Remove.
27627 2017-02-27  Bin Cheng  <bin.cheng@arm.com>
27629         PR tree-optimization/77536
27630         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): New function.
27631         (tree_transform_and_unroll_loop): Use above function to compute the
27632         estimated niter of unrolled loop and use it when scaling profile.
27633         Also use count info rather than frequency if it's non-zero.
27634         * tree-ssa-loop-manip.h niter_for_unrolled_loop(): New declaration.
27635         * tree-vect-loop.c (scale_profile_for_vect_loop): New function.
27636         (vect_transform_loop): Call above function.
27638 2017-02-27  Richard Biener  <rguenther@suse.de>
27640         PR tree-optimization/45397
27641         * tree-ssa-pre.c (eliminate_insert): Handle BIT_AND_EXPR.
27642         * tree-ssa-sccvn.c (valueized_wider_op): New helper.
27643         (visit_nary_op): Add pattern matching for CSEing sign-changed
27644         or truncated operations with wider ones.
27646 2017-02-27  Richard Biener  <rguenther@suse.de>
27648         PR tree-optimization/79690
27649         * tree-vect-stmts.c (vectorizable_store): Use vector type
27650         built from the DR with address-space.
27652 2017-02-26  Gerald Pfeifer  <gerald@pfeifer.com>
27654         * doc/invoke.texi (Optimize Options): Refine the description
27655         of asan-use-after-return.
27657 2017-02-25  Alan Modra  <amodra@gmail.com>
27659         PR rtl-optimization/79584
27660         * lra-constraints.c (base_to_reg): Reload ad->base, the entire
27661         base, not ad->base_term, the reg within base.  Remove assertion
27662         that ad->base == ad->base_term.  Replace gen_int_mode using
27663         bogus mode with const0_rtx.
27665 2017-02-25  Jakub Jelinek  <jakub@redhat.com>
27667         PR middle-end/79396
27668         * tree-eh.c (operation_could_trap_p, stmt_could_throw_1_p): Handle
27669         FMA_EXPR like tcc_binary or tcc_unary.
27671         * tree-ssa-loop-niter.c (number_of_iterations_exit): Simplify warning.
27673         PR debug/77589
27674         * dwarf2out.c (struct dw_loc_list_struct): Add noted_variable_value
27675         bitfield.
27676         (size_of_loc_descr): Handle DW_OP_GNU_variable_value.
27677         (output_loc_operands): Handle DW_OP_call_ref and
27678         DW_OP_GNU_variable_value.
27679         (struct variable_value_struct): New type.
27680         (struct variable_value_hasher): Likewise.
27681         (variable_value_hash): New variable.
27682         (string_types): Remove.
27683         (copy_loc_descr): New function.
27684         (add_loc_descr_to_each): Clarify comment.  Use copy_loc_descr.
27685         (prepend_loc_descr_to_each): New function.
27686         (add_loc_list): Fix comment typo.  Use prepend_loc_descr_to_each
27687         instead of add_loc_descr_to_each if the first argument is single
27688         location list and the second has multiple.
27689         (resolve_args_picking_1): Handle DW_OP_GNU_variable_value.
27690         (loc_list_from_tree_1): For early_dwarf, emit DW_OP_GNU_variable_value
27691         when looking for variable value which doesn't have other location info.
27692         (loc_list_from_tree): Formatting fix.
27693         (gen_array_type_die): Simplify DW_AT_string_length handling.
27694         (adjust_string_types): Remove.
27695         (gen_subprogram_die): Don't call adjust_string_types nor test/set
27696         string_types.  Call resolve_variable_values.
27697         (prune_unused_types_walk_loc_descr): Handle DW_OP_GNU_variable_value.
27698         (resolve_addr_in_expr): Likewise.  Add A argument.
27699         (copy_deref_exprloc): Remove deref argument.  Adjust for the
27700         original expression being DW_OP_GNU_variable_value with optionally
27701         DW_OP_stack_value after it instead of DW_OP_call4 with DW_OP_deref
27702         optionally after it.
27703         (optimize_string_length): Rework for DW_OP_GNU_variable_value.
27704         (resolve_addr): Adjust optimize_string_length and resolve_addr_in_expr
27705         callers.  Set remove_AT_byte_size if removing DW_AT_string_length.
27706         (variable_value_hasher::hash, variable_value_hasher::equal): New
27707         methods.
27708         (resolve_variable_value_in_expr, resolve_variable_value,
27709         resolve_variable_values, note_variable_value_in_expr,
27710         note_variable_value): New functions.
27711         (dwarf2out_early_finish): Call note_variable_value on all toplevel
27712         DIEs.
27714 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
27716         PR c/79677
27717         * opts.h (handle_generated_option): Add GENERATED_P argument.
27718         * opts-common.c (handle_option): Adjust function comment.
27719         (handle_generated_option): Add GENERATED_P argument, pass it to
27720         handle_option.
27721         (control_warning_option): Pass false to handle_generated_option
27722         GENERATED_P.
27723         * opts.c (maybe_default_option): Pass true to handle_generated_option
27724         GENERATED_P.
27725         * optc-gen.awk: Likewise.
27727 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
27729         * config/sh/sh.md (tstsi_t): If operands[0] is a SUBREG instead of
27730         a REG, look at the REG it is a SUBREG of.
27731         (splitter for cmpeqsi_t): Ditto.
27733 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
27735         * config/pa/pa.c (pa_combine_instructions): Do not share RTL.  Make
27736         the special USEs with the pattern of the insn, not the insn itself.
27738 2017-02-24  Matthew Fortune  <matthew.fortune@imgtec.com>
27740         PR target/79473
27741         * doc/invoke.texi: Document -mload-store-pairs.
27743 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
27744             Sandra Loosemore  <sandra@codesourcery.com>
27746         * config/nios2/nios2.c (nios2_simple_const_p): Returns false if the
27747         argument isn't a CONST_INT.
27748         (nios2_alternate_compare_const): Assert op is a CONST_INT.
27749         (nios2_valid_compare_const_p): Assert op is a CONST_INT.
27750         (nios2_validate_compare): Bypass alternate compare logic if *op2
27751         is not a CONST_INT.
27752         (ldstwm_operation_p): Return false if first_base is not a REG or
27753         if first_offset is not a CONST_INT.
27755 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
27757         * config/cris/cris.md: Use correct operand in a define_peephole2.
27759 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
27761         * config/c6x/c6x.c (predicate_insn): Do not incorrectly share RTL.
27763 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
27765         * config/arc/arc.c (arc_ccfsm_advance): Only take the PATTERN of
27766         this_insn if it is an INSN or JUMP_INSN.
27767         (force_offsettable): Look at base, not at addr.
27768         * config/arc/predicates.md (brcc_nolimm_operator): Don't call INTVAL
27769         on things that aren't necessarily CONST_INTs.
27771 2017-02-24  Uros Bizjak  <ubizjak@gmail.com>
27773         * doc/invoke.texi (x86 Options, -mfpmath=sse): Mention that
27774         -mfpmath=sse is the default also for x86-32 targets with SSE2
27775         instruction set when @option{-ffast-math} is enabled
27777 2017-02-24  Jeff Law  <law@redhat.com>
27779         PR rtl-optimizatoin/79286
27780         * ira.c (update_equiv_regs): Drop may_trap_p exception to
27781         dominance test.
27783 2017-02-24  Richard Biener  <rguenther@suse.de>
27785         PR tree-optimization/79389
27786         * gimple-ssa-split-paths.c (is_feasible_trace): Properly skip
27787         debug insns.
27789 2017-02-24  Aldy Hernandez  <aldyh@redhat.com>
27791         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update
27792         function comment to reflect reality.
27793         (loop_exits_before_overflow): Fix typo in function description.
27795 2017-02-24  Richard Biener  <rguenther@suse.de>
27797         PR tree-optimization/79389
27798         * gimple-ssa-split-paths.c (is_feasible_trace): Verify more
27799         properly that a threading opportunity exists.  Detect conditional
27800         copy/constant propagation opportunities.
27802 2017-02-23  Eric Botcazou  <ebotcazou@adacore.com>
27804         * config/visium/visium.md (type): Add trap.
27805         (b): New mode attribute.
27806         (*btst): Rename into...
27807         (*btst<mode>): ...this and adjust.
27808         (*cbranchsi4_btst_insn): Rename into...
27809         (*cbranch<mode>4_btst_insn): ...this and adjust.
27810         (trap): New define_insn.
27812 2017-02-23  Jakub Jelinek  <jakub@redhat.com>
27814         PR tree-optimization/79389
27815         * ifcvt.c (struct noce_if_info): Add rev_cond field.
27816         (noce_reversed_cond_code): New function.
27817         (noce_emit_store_flag): Use rev_cond if non-NULL instead of
27818         reversed_comparison_code.  Formatting fix.
27819         (noce_try_store_flag): Test rev_cond != NULL in addition to
27820         reversed_comparison_code.
27821         (noce_try_store_flag_constants): Likewise.
27822         (noce_try_store_flag_mask): Likewise.
27823         (noce_try_addcc): Use rev_cond if non-NULL instead of
27824         reversed_comparison_code.
27825         (noce_try_cmove_arith): Likewise.  Formatting fixes.
27826         (noce_try_minmax, noce_try_abs): Clear rev_cond.
27827         (noce_find_if_block): Initialize rev_cond.
27828         (find_cond_trap): Call noce_get_condition with then_bb == trap_bb
27829         instead of false as last argument never attempt to reverse it
27830         afterwards.
27832 2017-02-23  Bin Cheng  <bin.cheng@arm.com>
27834         PR tree-optimization/79663
27835         * tree-predcom.c (combine_chains): Process refs in reverse order
27836         only for ZERO length chains, and add explaining comment.
27838 2017-02-23  Jeff Law  <law@redhat.com>
27840         PR tree-optimization/79578
27841         * tree-ssa-dse.c (clear_bytes_written_by): Use OEP_ADDRESS_OF
27842         in call to operand_equal_p.
27844 2017-01-23  Dominique d'Humieres  <dominiq@lps.ens.fr>
27846         PR target/71017
27847         * config/i386/cpuid.h: Fix another undefined behavior.
27849 2017-02-23  Richard Biener  <rguenther@suse.de>
27851         PR tree-optimization/79683
27852         * tree-vect-stmts.c (vect_analyze_stmt): Do not overwrite
27853         vector types for data-refs.
27855 2017-02-23  Martin Liska  <mliska@suse.cz>
27857         * params.def (PARAM_MIN_NONDEBUG_INSN_UID): Change default to 0.
27859 2017-02-23  Jakub Jelinek  <jakub@redhat.com>
27861         PR middle-end/79665
27862         * internal-fn.c (get_range_pos_neg): Moved to ...
27863         * tree.c (get_range_pos_neg): ... here.  No longer static.
27864         * tree.h (get_range_pos_neg): New prototype.
27865         * expr.c (expand_expr_real_2) <case TRUNC_DIV_EXPR>: If both arguments
27866         are known to be in between 0 and signed maximum inclusive, try to
27867         expand both unsigned and signed divmod and use the cheaper one from
27868         those.
27870 2017-02-22  Jeff Law  <law@redhat.com>
27872         PR tree-optimization/79578
27873         * tree-ssa-dse.c (clear_bytes_written_by): Use operand_equal_p
27874         to compare base operands.
27876 2017-02-22  Segher Boessenkool  <segher@kernel.crashing.org>
27878         PR target/79211
27879         * config/rs6000/rs6000.md (*fsel<SFDF:mode><SFDF2:mode>4): Use
27880         gpc_reg_operand instead of fpr_reg_operand.
27882 2017-02-22  Sameera Deshpande  <sameera.deshpande@imgtec.com>
27884         * config/mips/mips.c (mips_return_in_memory): Force FP
27885         vector types to be returned in memory for o32 ABI.
27887 2017-02-22  Jakub Jelinek  <jakub@redhat.com>
27889         * dwarf2out.c (gen_variable_die): For -gdwarf-5, use DW_TAG_variable
27890         instead of DW_TAG_member for static data member declarations and don't
27891         set no_linkage_name for static inline data members.
27892         (gen_member_die): For -gdwarf-5 don't change DW_TAG_variable
27893         to DW_TAG_member.
27895 2017-02-22  Martin Liska  <mliska@suse.cz>
27897         * doc/invoke.texi: Replace inequality signs with square brackets
27898         for -Wnormalized.
27900 2017-02-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27902         PR tree-optimization/68644
27903         * gcc.dg/tree-ssa/ivopts-lt-2.c: Skip for powerpc*-*-*.
27905 2017-02-22  Matthew Fortune  <matthew.fortune@imgtec.com>
27907         PR target/78660
27908         * lra-constraints.c (simplify_operand_subreg): Handle
27909         WORD_REGISTER_OPERATIONS targets.
27911 2017-02-22  Jakub Jelinek  <jakub@redhat.com>
27913         PR target/70465
27914         * reg-stack.c (emit_swap_insn): Treat (float_extend:?F (mem:?F))
27915         and (const_double:?F) like (mem:?F) for the purpose of fxch %st(1)
27916         elimination by swapping fld*.
27918 2017-02-22  Richard Biener  <rguenther@suse.de>
27920         PR tree-optimization/79673
27921         * tree-ssa-pre.c (compute_avail): Use wide_int_to_tree to
27922         convert the [TARGET_]MEM_REF offset INTEGER_CST, scrapping off
27923         irrelevant address-space qualifiers and avoiding a
27924         ADDR_SPACE_CONVERT_EXPR from fold_convert.
27926 2017-02-22  Richard Biener  <rguenther@suse.de>
27928         PR tree-optimization/79666
27929         * tree-vrp.c (extract_range_from_binary_expr_1): Make sure
27930         to not symbolically negate if that may introduce undefined
27931         overflow.
27933 2017-02-22  Martin Liska  <mliska@suse.cz>
27935         PR lto/79587
27936         * data-streamer-in.c (streamer_read_gcov_count): Remove assert.
27937         * data-streamer-out.c (streamer_write_gcov_count_stream):
27938         Likewise.
27939         * value-prof.c (stream_out_histogram_value): Make assert more
27940         precise based on type of counter.
27942 2017-02-21  Uros Bizjak  <ubizjak@gmail.com>
27944         PR target/79593
27945         * config/i386/i386.md (standard_x87sse_constant_load splitter):
27946         Use nonimmediate_operand instead of memory_operand for operand 1.
27947         (float-extend standard_x87sse_constant_load splitter): Ditto.
27949 2017-02-21  Jeff Law  <law@redhat.com>
27951         PR tree-optimization/79621
27952         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Ignore
27953         blocks with edges to themselves.
27955 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
27957         PR target/79633
27958         * tree-chkp-opt.c (chkp_optimize_string_function_calls): Use
27959         is_gimple_call instead of comparing gimple_code with GIMPLE_CALL.
27960         Use gimple_call_builtin_p.
27962         PR target/79570
27963         * sel-sched.c (moveup_expr_cached): Don't call sel_bb_head
27964         on temporarily removed DEBUG_INSNs.
27966         PR tree-optimization/79649
27967         * tree-loop-distribution.c (classify_partition): Give up on
27968         non-generic address space loads/stores.
27970 2017-02-21  Aldy Hernandez  <aldyh@redhat.com>
27972         * doc/loop.texi (Loop manipulation): Remove nonexistent
27973         tree_ssa_loop_version from the documentation.
27974         * cfgloopmanip.c (loop_version): Document CONDITION_BB argument.
27976 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
27978         PR target/79494
27979         * config/i386/i386.c (ix86_expand_split_stack_prologue): Call
27980         make_reg_eh_region_note_nothrow_nononlocal on call_insn.
27981         * config/rs6000/rs6000.c: Include except.h.
27982         (rs6000_expand_split_stack_prologue): Call
27983         make_reg_eh_region_note_nothrow_nononlocal on the call insn.
27985 2017-02-21  Martin Jambor  <mjambor@suse.cz>
27987         PR lto/79579
27988         * ipa-prop.c (ipa_prop_write_jump_functions): Bail out if no edges
27989         have been analyzed.
27991 2017-02-21  Martin Jambor  <mjambor@suse.cz>
27993         * common.opt (-fipa-cp-alignment): Mark as ignored and preserved
27994         for backward compatibility only.
27995         * doc/invoke.texi (Option Summary): Remove all references to
27996         -fipa-cp-alignment.
27998 2017-02-21  Matthew Fortune  <matthew.fortune@imgtec.com>
28000         PR target/78660
28001         Revert:
28002         2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
28004         * lra-constraints.c (curr_insn_transform): Handle
28005         WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
28007 2017-02-21  Martin Liska  <mliska@suse.cz>
28009         * config/i386/i386.opt: Replace -masm-dialect with -masm.
28011 2017-02-21  Thomas Schwinge  <thomas@codesourcery.com>
28013         PR translation/79638
28014         * config/nvptx/nvptx.c (ENTRY_TEMPLATE): Single out "%ntid.y".
28016 2017-02-21  Eric Botcazou  <ebotcazou@adacore.com>
28018         PR ada/67205
28019         * config/arm/arm.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define.
28020         (arm_function_ok_for_sibcall): Return false for an indirect call by
28021         descriptor if all the argument registers are used.
28022         (arm_relayout_function): Use FUNCTION_ALIGNMENT macro to adjust the
28023         alignment of the function.
28025 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
28027         PR tree-optimization/61441
28028         * simplify-rtx.c (simplify_const_unary_operation): For
28029         -fsignaling-nans and sNaN operand, return NULL_RTX rather than
28030         the sNaN unmodified.
28032 2017-02-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
28034         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
28035         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
28036         instead of SYSTEM_HEADER_DIR.
28038 2017-02-20  Gerald Pfeifer  <gerald@pfeifer.com>
28039             Martin LiÅ¡ka  <mliska@suse.cz>
28041         * doc/invoke.texi (use-after-scope-direct-emission-threshold):
28042         Fix typos and grammar, use active voice, and clarify.
28044 2017-02-20  Marek Polacek  <polacek@redhat.com>
28046         PR middle-end/79537
28047         * gimplify.c (gimplify_expr): Handle unused *&&L;.
28049         PR sanitizer/79558
28050         * ubsan.c (ubsan_type_descriptor): Check if TYPE_MAX_VALUE is null.
28052 2017-02-20  Jakub Jelinek  <jakub@redhat.com>
28054         PR target/79568
28055         * config/i386/i386.c (ix86_expand_builtin): Handle
28056         OPTION_MASK_ISA_AVX512VL and OPTION_MASK_ISA_64BIT in
28057         ix86_builtins_isa[fcode].isa as a requirement of those
28058         flags and any other flag in the bitmask.
28059         (ix86_init_mmx_sse_builtins): Use 0 instead of
28060         ~OPTION_MASK_ISA_64BIT as mask.
28061         * config/i386/i386-builtin.def (__builtin_ia32_rdtsc,
28062         __builtin_ia32_rdtscp, __builtin_ia32_pause, __builtin_ia32_bsrsi,
28063         __builtin_ia32_rdpmc, __builtin_ia32_rolqi, __builtin_ia32_rolhi,
28064         __builtin_ia32_rorqi, __builtin_ia32_rorhi): Likewise.
28066 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
28068         PR target/78012
28069         * lra-constraints.c (split_reg): Check requested split mode
28070         is supported by the register.
28072 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
28074         * lra-constraints.c (simplify_operand_subreg): Remove early
28075         return false.
28077 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
28079         PR target/78660
28080         * lra-constraints.c (curr_insn_transform): Tighten condition
28081         for converting SUBREG reloads from OP_OUT to OP_INOUT.
28083 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
28085         PR target/78660
28086         * lra-constraints.c (curr_insn_transform): Handle
28087         WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
28089 2017-02-19  Uros Bizjak  <ubizjak@gmail.com>
28091         Revert:
28092         2016-05-30  Uros Bizjak  <ubizjak@gmail.com>
28094         * config/i386/sync.md (mfence_nosse): Use "lock orl $0, -4(%esp)".
28096 2017-02-19  Jonathan Wakely  <jwakely@redhat.com>
28098         PR c++/69523
28099         * doc/invoke.texi (C++ Dialect Options) [-Wliteral-suffix]: Update
28100         description.
28102 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
28104         * gimple-pretty-print.c (dump_ternary_rhs): Adjust gimple dump format
28105         for FMA_EXPR.
28107 2017-02-18  Jakub Jelinek  <jakub@redhat.com>
28109         * final.c (last_columnnum, override_columnnum): New variables.
28110         (final_start_function): Set last_columnnum, pass it to begin_prologue
28111         hook and pass 0 to dwarf2out_begin_prologue.
28112         (final_scan_insn): Update override_columnnum.  Pass last_columnnum
28113         to source_line debug hook.
28114         (notice_source_line): Compute last_columnnum and for debug_column_info
28115         return true on column changes.
28116         * debug.h (struct gcc_debug_hooks): Add column argument to
28117         source_line and begin_prologue hooks.
28118         (debug_nothing_int_charstar_int_bool): Remove prototype.
28119         (debug_nothing_int_int_charstar,
28120         debug_nothing_int_int_charstar_int_bool): New prototypes.
28121         (dwarf2out_begin_prologue): Add column argument.
28122         * debug.c (do_nothing_debug_hooks): Adjust source_line and
28123         begin_prologue hooks.
28124         (debug_nothing_int_charstar_int_bool): Remove.
28125         (debug_nothing_int_int_charstar,
28126         debug_nothing_int_int_charstar_int_bool): New functions.
28127         * dwarf2out.c (dwarf2out_begin_prologue): Add column argument, pass it
28128         through to dwarf2out_source_line.
28129         (dwarf2_lineno_debug_hooks): Adjust begin_prologue hook.
28130         (dwarf2out_source_line): Add column argument, emit it if requested.
28131         * sdbout.c (sdbout_source_line, sdbout_begin_prologue): Add column
28132         arguments.
28133         * xcoffout.h (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
28134         * xcoffout.c (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
28135         * vmsdbgout.c (vmsdbgout_begin_prologue): Add column argument, pass it
28136         through to dwarf2out_begin_prologue.
28137         (vmsdbgout_source_line): Add column argument, pass it through to
28138         dwarf2out_source_line.
28139         * dbxout.c (dbxout_begin_prologue): Add column argument, adjust
28140         dbxout_source_line caller.
28141         (dbxout_source_line): Add column argument.
28143         * common.opt (gno-column-info, gcolumn-info): New options.
28144         * dwarf2out.c (dwarf2_lineno_debug_hooks): Formatting fix.
28145         (check_die): Also test for multiple DW_AT_decl_column attributes.
28146         (add_src_coords_attributes, dwarf2out_imported_module_or_decl_1): Add
28147         DW_AT_decl_column if requested.
28148         (gen_subprogram_die): Compare and/or add also DW_AT_decl_column
28149         if requested.
28150         (gen_variable_die): Likewise.
28151         (add_call_src_coords_attributes): Add DW_AT_call_column if requested.
28152         * doc/invoke.texi (-gcolumn-info, -gno-column-info): Document.
28154         PR target/79569
28155         * config/i386/i386.opt (m3dnowa): Replace Undocumented with Report.
28156         * common/config/i386/i386-common.c (OPTION_MASK_ISA_3DNOW_A_SET): Define.
28157         (ix86_handle_option): Handle OPT_m3dnowa.
28158         * doc/invoke.texi (-m3dnowa): Document.
28159         * doc/extend.texi (__builtin_ia32_pmulhuw, __builtin_ia32_pf2iw): Use
28160         -m3dnowa instead of -m3dnow -march=athlon.
28162         PR target/79559
28163         * config/i386/i386.c (ix86_print_operand): Use output_operand_lossage
28164         instead of gcc_assert for K, r and R code checks.  Formatting fixes.
28166 2017-02-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28168         PR target/79261
28169         * config/rs6000/rs6000.c (rs6000_expand_ternop_builtin): Add
28170         support for CODE_FOR_vsx_xxpermdi_v2d[fi]_be.
28171         * config/rs6000/rs6000.md (reload_gpr_from_vsx<mode>): Call
28172         generator for vsx_xxpermdi_<mode>_be.
28173         * config/rs6000/vsx.md (vsx_xxpermdi_<mode>): Remove logic to
28174         force big-endian semantics.
28175         (vsx_xxpermdi_<mode>_be): New define_expand with same
28176         implementation as previous version of vsx_xxpermdi_<mode>.
28178 2017-02-17  Jakub Jelinek  <jakub@redhat.com>
28180         PR tree-optimization/79327
28181         * gimple-ssa-sprintf.c (format_integer): Remove likely_adjust
28182         variable, its initialization and use.
28184 2017-02-17  Julia Koval  <julia.koval@intel.com>
28186         * common/config/i386/i386-common.c (OPTION_MASK_ISA_RDPID_SET): New.
28187         (OPTION_MASK_ISA_PKU_UNSET): New.
28188         (ix86_handle_option): Handle -mrdpid.
28189         * config/i386/cpuid.h (bit_RDPID): New.
28190         * config/i386/driver-i386.c (host_detect_local_cpu):
28191         Detect RDPID feature.
28192         * config/i386/i386-builtin.def (__builtin_ia32_rdpid): New.
28193         * config/i386/i386-c.c (ix86_target_macros_internal):
28194         Handle RDPID flag.
28195         * config/i386/i386.c (ix86_target_string): Add -mrdpid to isa2_opts.
28196         (ix86_valid_target_attribute_inner_p): Add "rdpid".
28197         (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
28198         * config/i386/i386.h (TARGET_RDPID, TARGET_RDPID_P): New.
28199         * config/i386/i386.md (define_insn "rdpid"): New.
28200         * config/i386/i386.opt Add -mrdpid.
28201         * config/i386/immintrin.h (_rdpid_u32): New.
28203 2017-02-17  Vladimir Makarov  <vmakarov@redhat.com>
28205         PR rtl-optimization/79541
28206         * lra-constraints.c (curr_insn_transform): Remove wrong asm insn
28207         instead of transforming it into USE.
28209 2017-02-17  Segher Boessenkool  <segher@kernel.crashing.org>
28211         * config/rs6000/rs6000.md (extendsfdf2): Remove default arguments.
28212         If HONOR_SNANS (SFmode) force the input to a register.
28213         (*extendsfdf2_fpr): Add !HONOR_SNANS (SFmode) condition.
28214         (*extendsfdf2_snan): New pattern, used when using SNaNs; it generates
28215         an frsp or similar insn.
28217 2017-02-17  Martin Liska  <mliska@suse.cz>
28219         PR rtl-optimization/79577
28220         * params.def (selsched-max-sched-times): Increase minimum to 1.
28222 2017-02-17  Martin Liska  <mliska@suse.cz>
28224         PR rtl-optimization/79574
28225         * gcse.c (want_to_gcse_p): Prevent integer overflow.
28227 2017-02-17  Martin Liska  <mliska@suse.cz>
28229         PR tree-optimization/79529
28230         * tree-ssa-loop-unswitch.c (is_maybe_undefined): Use
28231         ssa_defined_default_def_p to handle cases which are implicitly
28232         defined.
28233         * tree-ssa.c (ssa_defined_default_def_p): New function.
28234         (ssa_undefined_value_p): Use ssa_defined_default_def_p to handle cases
28235         which are implicitly defined.
28236         * tree-ssa.h (ssa_defined_default_def_p): Declare.
28238 2017-02-17  Richard Biener  <rguenther@suse.de>
28240         PR middle-end/79576
28241         * params.def (max-ssa-name-query-depth): Limit to 10.
28243 2017-02-17  Richard Biener  <rguenther@suse.de>
28245         PR tree-optimization/79552
28246         * tree-ssa-structalias.c (visit_loadstore): Properly verify
28247         default defs.
28249 2017-02-17  Richard Biener  <rguenther@suse.de>
28251         PR bootstrap/79567
28252         * genmatch.c (output_line_directive): Handle DIR_SEPARATOR_2.
28254 2017-02-17  Marek Polacek  <polacek@redhat.com>
28256         PR middle-end/79536
28257         * fold-const.c (fold_negate_expr_1): Renamed from fold_negate_expr.
28258         (fold_negate_expr): New wrapper.
28260 2017-02-16  Sandra Loosemore  <sandra@codesourcery.com>
28262         * doc/invoke.texi (C++ Dialect Options) [-Wno-non-template-friend]: 
28263         Correct terminology and de-emphasize pre-standard behavior.
28265 2017-02-16  Alan Modra  <amodra@gmail.com>
28267         PR rtl-optimization/79286
28268         * ira.c (def_dominates_uses): New function.
28269         (update_equiv_regs): Don't create an equivalence for insns that
28270         may trap where the register def does not dominate the use.
28272 2017-02-16  Vladimir Makarov  <vmakarov@redhat.com>
28274         PR rtl-optimization/78127
28275         * lra.c (lra): Call lra_eliminate before finish the loop after
28276         lra_constraint.
28278 2017-02-16  Richard Biener  <rguenther@suse.de>
28280         * graphite.h: Do not include isl/isl_val_gmp.h, instead include
28281         isl/isl_val.h.
28282         * graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
28283         (gcc_expression_from_isl_expr_int): Use generic isl_val interface.
28284         * graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
28285         (isl_val_int_from_wi): New function.
28286         (extract_affine_gmp): Rename to ...
28287         (extract_affine_wi): ... this, take a widest_int.
28288         (extract_affine_int): Just wrap extract_affine_wi.
28289         (add_param_constraints): Use isl_val_int_from_wi.
28290         (add_loop_constraints): Likewise, and extract_affine_wi.
28292 2017-02-15  Jeff Law  <law@redhat.com>
28294         PR middle-end/79521
28295         * ira-costs.c (scan_one_insn): Check have_regs_of_mode before calling
28296         ira_init_register_move_cost_if_necessary.
28298 2017-02-15  Martin Sebor  <msebor@redhat.com>
28300         PR middle-end/32003
28301         * doc/invoke.texi (-fdump-final-insns): Replace option accidentally
28302         removed in a prior commit.
28304 2017-02-15  Bin Cheng  <bin.cheng@arm.com>
28306         PR tree-optimization/79347
28307         * tree-vect-loop-manip.c (vect_do_peeling): Maintain profile
28308         counters during peeling.
28310 2017-02-15  Thomas Schwinge  <thomas@codesourcery.com>
28312         * Makefile.in (site.exp): Remove "set ISLVER".
28314 2017-02-15  Jakub Jelinek  <jakub@redhat.com>
28316         PR target/79487
28317         * real.c (real_from_integer): Call real_convert even for decimal.
28319 2017-02-15  Dominik Vogt  <vogt@linux.vnet.ibm.com>
28321         PR target/79421
28322         * config/s390/s390.c: define TARGET_CUSTOM_FUNCTION_DESCRIPTORS.
28324 2017-02-14  Andrew Pinski  <apinski@cavium.com>
28326         * config/aarch64/aarch64-cores.def (thunderx2t99): Move to under 'C"
28327         cores and change the partno/implementer to be correct.
28328         (thunderx2t99p1): New core which replaces thunderx2t99 and still has
28329         the 'B" as the implementer.
28330         * config/aarch64/aarch64-tune.md: Regenerate.
28332 2017-02-14  Carl Love  <cel@us.ibm.com>
28334         * config/rs6000/rs6000.c: Add case statement entry to make the
28335         xvcvuxdsp built-in argument unsigned.
28336         * config/rs6000/vsx.md: Fix the source and return operand types so they
28337         match the instruction definitions from the ISA document.  Fix typo
28338         in the instruction generation for the (define_insn "vsx_xvcvuxdsp"
28339         statement.
28341 2017-02-14  Vladimir Makarov  <vmakarov@redhat.com>
28343         PR target/79282
28344         * lra-int.h (struct lra_operand_data, struct lra_insn_reg): Add
28345         member early_clobber_alts.
28346         * lra-lives.c (reg_early_clobber_p): New.
28347         (process_bb_lives): Use it.
28348         * lra.c (new_insn_reg): New arg early_clobber_alts.  Use it.
28349         (debug_operand_data): Initialize early_clobber_alts.
28350         (setup_operand_alternative): Set up early_clobber_alts.
28351         (collect_non_operand_hard_regs): Ditto.  Pass early clobber
28352         alternatives to new_insn_reg.
28353         (add_regs_to_insn_regno_info): Add arg early_clobber_alts.  Use
28354         it.
28355         (lra_update_insn_regno_info): Pass the new arg.
28357 2017-02-14  Jakub Jelinek  <jakub@redhat.com>
28359         PR middle-end/79505
28360         * omp-offload.c (free_oacc_loop): Release loop->ifns vector.
28361         (new_oacc_loop_raw): Don't clear already cleared fields.
28363         PR target/79481
28364         * config/i386/avx512pfintrin.h (_mm512_prefetch_i32gather_pd,
28365         _mm512_prefetch_i32gather_ps, _mm512_prefetch_i64gather_pd,
28366         _mm512_prefetch_i64gather_ps): New inline functions and macros.
28368 2017-02-14  Uros Bizjak  <ubizjak@gmail.com>
28370         PR target/79495
28371         * config/i386/i386.md (*movxf_internal): Add (o,rC) alternative.
28373 2017-02-14  H.J. Lu  <hongjiu.lu@intel.com>
28375         PR target/79498
28376         * config/i386/i386.c (timode_scalar_chain::convert_insn): Insert
28377         the extra instruction to the right place to store 128-bit constant
28378         when needed.
28380 2017-02-14  Martin Sebor  <msebor@redhat.com>
28382         PR middle-end/79448
28383         * gimple-ssa-sprintf.c (format_directive): Avoid issuing INT_MAX
28384           warning for strings of unknown length.
28386 2017-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
28388         * config.gcc (supported_defaults) [powerpc*-*-*]: Update.
28390 2017-02-14  Jeff Law  <law@redhat.com>
28392         PR target/79404
28393         * ira-costs.c (scan_one_insn): Initialize register move costs
28394         for pseudos seen in USE/CLOBBER insns.
28396         PR tree-optimization/79095
28397         * tree-vrp.c (extract_range_from_binary_expr_1): For EXACT_DIV_EXPR,
28398         if the numerator has the range ~[0,0] make the resultant range ~[0,0].
28399         (extract_range_from_binary_expr): For MINUS_EXPR with no derived range,
28400         if the operands are known to be not equal, then the resulting range
28401         is ~[0,0].
28402         (intersect_ranges): If the new range is ~[0,0] and the old range is
28403         wide, then prefer ~[0,0].
28404         * tree-vrp.c (overflow_comparison_p_1): New function.
28405         (overflow_comparison_p): New function.
28406         * tree-vrp.c (register_edge_assert_for_2): Register additional asserts
28407         if NAME is used in an overflow test.
28408         (vrp_evaluate_conditional_warnv_with_ops): If the ops represent an
28409         overflow check that can be expressed as an equality test, then adjust
28410         ops to be that equality test.
28412 2017-02-14  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
28414         * config/s390/s390-builtin-types.def: Remove flags argument.
28415         * config/s390/s390.c (s390_init_builtins): Likewise.
28417 2017-02-14  Martin Liska  <mliska@suse.cz>
28419         * tree-ssa-loop-unswitch.c (hoist_guard): Release get_loop_body
28420         vector.  Fix trailing white spaces.
28422 2017-02-14  James Greenhalgh  <james.greenhalgh@arm.com>
28424         * config/aarch64/aarch64.c (aarch64_simd_container_mode): Handle
28425         HFmode.
28427 2017-02-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28429         PR rtl-optimization/68664
28430         * config/arm/arm.c (arm_sched_can_speculate_insn):
28431         New function.  Declare prototype.
28432         (TARGET_SCHED_CAN_SPECULATE_INSN): Define.
28434 2017-02-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28436         PR rtl-optimization/68664
28437         * config/aarch64/aarch64.c (aarch64_sched_can_speculate_insn):
28438         New function.
28439         (TARGET_SCHED_CAN_SPECULATE_INSN): Define.
28441 2017-02-14  Amit Pawar  <amit.pawar@amd.com>
28443         * config/i386/i386.c (znver1_cost): Fix the alignment for function and
28444         max skip bytes for function, loop and jump.
28446 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
28448         * gimple-pretty-print.c (dump_unary_rhs): Adjust dump format for
28449         ABS_EXPR for gimple dump.
28451 2017-02-14  Jakub Jelinek  <jakub@redhat.com>
28453         PR target/79462
28454         * config/sh/sh.c (expand_cbranchdi4): Don't clear operands[4].
28456         PR tree-optimization/79408
28457         * tree-vrp.c (simplify_div_or_mod_using_ranges): Handle also the
28458         case when on TRUNC_MOD_EXPR op0 is INTEGER_CST.
28459         (simplify_stmt_using_ranges): Call simplify_div_or_mod_using_ranges
28460         also if rhs1 is INTEGER_CST.
28462 2017-02-14  Richard Biener  <rguenther@suse.de>
28464         PR middle-end/79432
28465         * tree-into-ssa.c (insert_phi_nodes): When the function can
28466         have abnormal edges rewrite SSA names with broken use-def
28467         dominance out of SSA and register them for PHI insertion.
28469 2017-02-13  Martin Sebor  <msebor@redhat.com>
28471         PR middle-end/79496
28472         * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call): Avoid
28473         clearing info.nowrite flag when snprintf size argument is a range.
28475 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
28477         * cprop.c (cprop_jump): Add missing space in string literal.
28478         * tree-ssa-structalias.c (rewrite_constraints): Likewise.
28479         (get_constraint_for_component_ref): Likewise.
28480         * df-core.c (df_worklist_dataflow_doublequeue): Likewise.
28481         * tree-outof-ssa.c (insert_partition_copy_on_edge): Likewise.
28482         * lra-constraints.c (process_alt_operands): Likewise.
28483         * ipa-inline.c (inline_small_functions): Likewise.
28484         * tree-ssa-sccvn.c (visit_reference_op_store): Likewise.
28485         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
28486         * trans-mem.c (diagnose_tm_1_op): Likewise.
28487         * omp-grid.c (grid_find_single_omp_among_assignments): Likewise.
28488         (grid_parallel_clauses_gridifiable): Likewise.
28490         * config/nvptx/mkoffload.c (process): Add space in between
28491         , and %d.
28493         * config/i386/i386.h (REG_CLASS_NAMES): Add , in between
28494         "MOD4_SSE_REGS" and "ALL_REGS".
28496         * spellcheck.c (test_data): Add , in between "foo" and "food".
28498 2017-02-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
28500         PR target/79449
28501         * config/rs6000/rs6000.c (expand_block_compare): Make sure runtime
28502         boundary crossing check and subsequent code generation agree.
28504 2017-02-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28506         * config/aarch64/aarch64.c (has_memory_op): Delete.
28507         (aarch64_madd_needs_nop): Use contains_mem_rtx_p instead of
28508         has_memory_op.
28510 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
28512         PR rtl-optimization/79388
28513         PR rtl-optimization/79450
28514         * combine.c (distribute_notes): When removing TEM_INSN for which
28515         corresponding dest has last value recorded, invalidate that last
28516         value.
28518 2017-02-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28520         * config/arm/arm.c (arm_print_tune_info): Use ASM_COMMENT_START instead
28521         of explicit '@'.  Add missing assembly comment marker on branch costs
28522         printout.
28524 2017-02-13  Nathan Sidwell  <nathan@acm.org>
28526         * gengtype-lex.l (<in_struct>): Add '/'.
28528 2017-02-13  Martin Liska  <mliska@suse.cz>
28530         PR c/79471
28531         * calls.c (expand_call): Replace XALLOCAVEC with XCNEWVEC.
28533 2017-02-13  Richard Biener  <rguenther@suse.de>
28535         * configure.ac (HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS):
28536         Remove.
28537         * configure: Re-generate.
28538         * config.in: Likewise.
28539         * graphite-dependences.c: Simplify as if
28540         HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS was defined.
28541         * graphite-isl-ast-to-gimple.c: Likewise.
28542         * graphite-optimize-isl.c: Likewise.
28543         * graphite-poly.c: Likewise.
28544         * graphite-sese-to-poly.c: Likewise.
28545         * graphite.h: Likewise.
28546         * toplev.c: Include isl/version.h and use isl_version () for
28547         printing the ISL version.
28548         * doc/install.texi: Update ISL requirement.
28550 2017-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
28552         * doc/standards.texi (Standards): Update reference to
28553         Objective-C 2.0.
28555 2017-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
28557         * doc/extend.texi (Named Address Spaces): sourceware.org now
28558         defaults to https.
28559         * doc/install.texi (Binaries): Ditto.
28560         (Specific): Ditto.
28562 2017-02-11  Sandra Loosemore  <sandra@codesourcery.com>
28564         * doc/cpp.texi: Replace "stringify"/"stringification" with C
28565         standard terminology "stringize"/"stringizing" throughout.
28566         * doc/cppinternals.texi: Likewise.
28568 2017-02-11  Sandra Loosemore  <sandra@codesourcery.com>
28570         * doc/extend.texi: Fix some spelling mistakes and typos.
28571         * doc/invoke.texi: Likewise.
28573 2017-02-11  Jan Hubicka  <hubicka@ucw.cz>
28575         PR ipa/79224
28576         * params.def (inline-min-speedup) Change from 10 to 8.
28578 2017-02-11  Jakub Jelinek  <jakub@redhat.com>
28580         * doc/invoke.texi (fopenmp): Bump OpenMP version from 4.0 to
28581         4.5.
28583 2017-02-11  Jan Hubicka  <hubicka@ucw.cz>
28585         PR ipa/79224
28586         * ipa-inline-analysis.c (get_minimal_bb): New function.
28587         (record_modified): Use it.
28588         (remap_edge_change_prob): Handle also ancestor functions.
28590 2017-02-11  Gerald Pfeifer  <gerald@pfeifer.com>
28592         * doc/contrib.texi (Contributors): Remove broken link into
28593         the Mauve CVS repository.
28595 2017-02-11  Jakub Jelinek  <jakub@redhat.com>
28597         PR middle-end/79454
28598         * internal-fn.c (expand_vector_ubsan_overflow): Use piece-wise
28599         result computation whenever lhs doesn't have vector mode, not
28600         just when it has BLKmode.
28602 2017-02-10  Gerald Pfeifer  <gerald@pfeifer.com>
28604         * doc/makefile.texi (profiledbootstrap): Refer to the
28605         installation instructions only in textual form.
28607 2017-02-10  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
28609         PR target/79295
28610         * config/rs6000/altivec.md (bcd<bcd_add_sub>): Fix constraints.
28612 2017-02-10  Gerald Pfeifer  <gerald@pfeifer.com>
28614         * doc/install.texi (Specific): Use https for blackfin.uclinux.org.
28615         (Specific): Update mingw-w64 reference.
28616         (Binaries): Ditto.
28617         (Specific): Remove broken link to Renesas RX processor.
28619 2017-02-10  Richard Biener  <rguenther@suse.de>
28621         * toplev.c (process_options): Do not mention obsolete graphite
28622         options when printing sorry message about missing graphite support.
28623         Mention -floop-nest-optimize.
28625 2017-02-10  Christophe Lyon  <christophe.lyon@linaro.org>
28627         * config/aarch64/arm_neon.h (vtst_p8): Rewrite without asm.
28628         (vtst_p16): Likewise.
28629         (vtstq_p8): Likewise.
28630         (vtstq_p16): Likewise.
28631         (vtst_p64): New.
28632         (vtstq_p64): Likewise.
28633         * config/arm/arm_neon.h (vgetq_lane_p64): New.
28634         (vset_lane_p64): New.
28635         (vsetq_lane_p64): New.
28637 2017-02-10  Jakub Jelinek  <jakub@redhat.com>
28639         PR tree-optimization/79411
28640         * tree-ssa-reassoc.c (is_reassociable_op): Return false if
28641         stmt operands are SSA_NAMEs used in abnormal phis.
28642         (can_reassociate_p): Return false if op is SSA_NAME used in abnormal
28643         phis.
28645 2017-02-09  Jan Hubicka  <hubicka@ucw.cz>
28647         PR ipa/70795
28648         * cgraphunit.c (cgraph_node::add_new_function): Set externally_visible
28649         flag if needed.
28651 2017-02-09  Jan Hubicka  <hubicka@ucw.cz>
28653         * tree-ssa-loop-unswitch.c (hoist_guard): Update profile.
28655 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
28657         * omp-offload.c (oacc_loop_auto_partitions): Use || instead of |
28658         to avoid warning.
28660         PR c/79413
28661         * gimplify.h (is_gimple_sizepos): Only test for INTEGER_CST constants,
28662         not arbitrary TREE_CONSTANT.
28664         PR c/79431
28665         * gimplify.c (gimplify_adjust_omp_clauses): Ignore
28666         "omp declare target link" attribute unless is_global_var.
28667         * omp-offload.c (find_link_var_op): Likewise.
28669 2017-02-09  Nathan Sidwell  <nathan@codesourcery.com>
28670             Chung-Lin Tang  <cltang@codesourcery.com>
28672         * gimplify.c (gimplify_scan_omp_clauses): No special handling for
28673         OMP_CLAUSE_TILE.
28674         (gimplify_adjust_omp_clauses): Don't delete TILE.
28675         (gimplify_omp_for): Deal with TILE.
28676         * internal-fn.c (expand_GOACC_TILE): New function.
28677         * internal-fn.def (GOACC_DIM_POS): Comment may be overly conservative.
28678         (GOACC_TILE): New.
28679         * omp-expand.c (struct oacc_collapse): Add tile and outer fields.
28680         (expand_oacc_collapse_init): Add LOC paramter.  Initialize tile
28681         element fields.
28682         (expand_oacc_collapse_vars): Add INNER parm, adjust for tiling,
28683         avoid DIV for outermost collapse var.
28684         (expand_oacc_for): Insert tile element loop as needed.  Adjust.
28685         Remove out of date comments, fix whitespace.
28686         * omp-general.c (omp_extract_for_data): Deal with tiling.
28687         * omp-general.h (enum oacc_loop_flags): Add OLF_TILE flag,
28688         adjust OLF_DIM_BASE value.
28689         (struct omp_for_data): Add tiling field.
28690         * omp-low.c (scan_sharing_clauses): Allow OMP_CLAUSE_TILE.
28691         (lower_oacc_head_mark): Add OLF_TILE as appropriate.  Ensure 2 levels
28692         for auto loops.  Remove default auto determining, moved to
28693         oacc_loop_fixed_partitions.
28694         * omp-offload.c (struct oacc_loop): Change 'ifns' to vector of call
28695         stmts, add e_mask field.
28696         (oacc_dim_call): New function, abstracted out from oacc_thread_numbers.
28697         (oacc_thread_numbers): Use oacc_dim_call.
28698         (oacc_xform_tile): New.
28699         (new_oacc_loop_raw): Initialize e_mask, adjust for ifns vector.
28700         (finish_oacc_loop): Adjust for ifns vector.
28701         (oacc_loop_discover_walk): Append loop abstraction sites to list,
28702         add case for GOACC_TILE fns.
28703         (oacc_loop_xform_loop): Delete.
28704         (oacc_loop_process): Iterate over call list directly, and add
28705         handling for GOACC_TILE fns.
28706         (oacc_loop_fixed_partitions): Determine default auto, deal with TILE,
28707         dump partitioning.
28708         (oacc_loop_auto_partitions): Add outer_assign parm. Assign all but
28709         vector partitioning to outer loops.  Assign 2 partitions to loops
28710         when available. Add TILE handling.
28711         (oacc_loop_partition): Adjust oacc_loop_auto_partitions call.
28712         (execite_oacc_device_lower): Process GOACC_TILE fns,
28713         ignore unknown specs.
28714         * tree-nested.c (convert_nonlocal_omp_clauses): Allow OMP_CLAUSE_TILE.
28715         * tree.c (omp_clause_num_ops): Adjust TILE ops.
28716         * tree.h (OMP_CLAUSE_TILE_ITERVAR, OMP_CLAUSE_TILE_COUNT): New.
28718 2017-02-09  Gerald Pfeifer  <gerald@pfeifer.com>
28720         * configure.ac (ACX_BUGURL): Update.
28721         * configure: Regenerate.
28723 2017-02-09  Richard Biener  <rguenther@suse.de>
28725         PR tree-optimization/69823
28726         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
28727         Properly enumerate all BBs in the region.  Use auto_vec/auto_bitmap.
28729 2017-02-09  Andrew Burgess  <andrew.burgess@embecosm.com>
28731         * config/arc/arc-c.def: Add __NPS400__ definition.
28732         * config/arc/arc.h (CPP_SPEC): Don't define __NPS400__ here.
28733         (TARGET_NPS400): Define.
28735 2017-02-09  Andrew Burgess  <andrew.burgess@embecosm.com>
28737         * config/arc/arc-arch.h (arc_arch_t): Move unchanged to earlier in
28738         file.
28739         (arc_cpu_t): Change base_architecture field, arch, to a arc_arc_t
28740         pointer, arch_info.
28741         (arc_cpu_types): Fill the arch_info field with a pointer into the
28742         arc_arch_types table.
28743         (arc_selected_cpu): Declare.
28744         * config/arc/arc.c (arc_selected_cpu): Make global.
28745         (arc_selected_arch): Delete.
28746         (arc_base_cpu): Delete.
28747         (arc_override_options): Remove references to deleted variables,
28748         update access to arch information.
28749         (ARC_OPT): Update access to arch information.
28750         (ARC_OPTX): Likewise.
28751         * config/arc/arc.h (arc_base_cpu): Remove declaration.
28752         (TARGET_ARC600): Update access to arch information.
28753         (TARGET_ARC601): Likewise.
28754         (TARGET_ARC700): Likewise.
28755         (TARGET_EM): Likewise.
28756         (TARGET_HS): Likewise.
28757         * config/arc/driver-arc.c (arc_cpu_to_as): Update access to arch
28758         information.
28760 2017-02-08  Pat Haugen  <pthaugen@us.ibm.com>
28762         PR target/78604
28763         * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Invert
28764         condition/operands for integer GE/LE/GEU/LEU operations.
28766 2017-02-08  Segher Boessenkool  <segher@kernel.crashing.org>
28768         PR translation/79397
28769         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Fix spelling
28770         of AltiVec.
28772 2017-02-08  Martin Jambor  <mjambor@suse.cz>
28774         PR ipa/79375
28775         * ipa-prop.c (ipa_alloc_node_params): Make static, return bool
28776         whether allocation happened.
28777         (ipa_initialize_node_params): Do not call ipa_alloc_node_params if
28778         nothing was allocated.
28780 2017-02-08  Jakub Jelinek  <jakub@redhat.com>
28782         PR tree-optimization/79408
28783         * tree-vrp.c (simplify_div_or_mod_using_ranges): If op1 is not
28784         constant, but SSA_NAME with a known integer range, use the minimum
28785         of that range instead of op1 to determine if modulo can be replaced
28786         with its first operand.
28788 2016-02-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28790         * config/riscv/riscv.c (riscv_build_integer_1): Avoid use of INT16_MAX.
28792 2017-02-08  Richard Biener  <rguenther@suse.de>
28794         PR tree-optimization/71824
28795         * graphite-scop-detection.c (scop_detection::build_scop_breadth):
28796         Check all loops contained in the merged region.
28798 2017-02-07  Andrew Pinski  <apinski@cavium.com>
28800         * config/aarch64/aarch64.md (popcount<mode>2): New pattern.
28802 2017-02-07  Andrew Pinski  <apinski@cavium.com>
28804         * config/aarch64/aarch64-cores.def (thunderx): Disable LSE.
28805         (thunderxt88): Likewise.
28806         (thunderxt81): Disable LSE and change v8.1 to v8.
28807         (thunderxt83): Likewise.
28809 2017-02-07  Jakub Jelinek  <jakub@redhat.com>
28810             Richard Biener  <rguenther@suse.de>
28812         PR middle-end/79399
28813         * ira-int.h (struct target_ira_int): Change x_max_struct_costs_size
28814         type from int to size_t.
28815         * ira-costs.c (struct_costs_size): Change type from int to size_t.
28817 2017-02-07  Jakub Jelinek  <jakub@redhat.com>
28819         PR rtl-optimization/79386
28820         * cprop.c (bypass_conditional_jumps): Initialize
28821         bypass_last_basic_block already before splitting bbs after
28822         unconditional traps...
28823         (bypass_conditional_jumps): ... rather than here.
28825         PR target/79299
28826         * config/i386/sse.md (xtg_mode, gatherq_mode): New mode attrs.
28827         (*avx512f_gathersi<mode>, *avx512f_gathersi<mode>_2,
28828         *avx512f_gatherdi<mode>, *avx512f_gatherdi<mode>_2): Use them,
28829         fix -masm=intel patterns.
28831 2017-02-07  Richard Biener  <rguenther@suse.de>
28833         PR tree-optimization/79256
28834         PR middle-end/79278
28835         * builtins.c (get_object_alignment_2): Use min_align_of_type
28836         to extract alignment for MEM_REFs to honor BIGGEST_FIELD_ALIGNMENT
28837         and ADJUST_FIELD_ALIGN.
28839         * doc/tm.texi.in (ADJUST_FIELD_ALIGN): Adjust to take additional
28840         type parameter.
28841         * doc/tm.texi: Regenerate.
28842         * stor-layout.c (layout_decl): Adjust.
28843         (update_alignment_for_field): Likewise.
28844         (place_field): Likewise.
28845         (min_align_of_type): Likewise.
28846         * config/arc/arc.h (ADJUST_FIELD_ALIGN): Adjust.
28847         * config/epiphany/epiphany.h (ADJUST_FIELD_ALIGN): Likewise.
28848         * config/epiphany/epiphany.c (epiphany_adjust_field_align): Likewise.
28849         * config/frv/frv.h (ADJUST_FIELD_ALIGN): Likewise.
28850         * config/frv/frv.c (frv_adjust_field_align): Likewise.
28851         * config/i386/i386.h (ADJUST_FIELD_ALIGN): Likewise.
28852         * config/i386/i386.c (x86_field_alignment): Likewise.
28853         * config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Likewise.
28854         * config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Likewise.
28855         * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
28856         * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
28857         * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Likewise.
28858         * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p):
28859          Likewise.
28861         Revert
28862         2017-01-30  Richard Biener  <rguenther@suse.de>
28864         PR tree-optimization/79256
28865         * targhooks.c (default_builtin_vector_alignment_reachable): Honor
28866         BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
28867         alignment on TYPE.
28869 2017-02-07  Toma Tabacu  <toma.tabacu@imgtec.com>
28871         * config/mips/mips.c (mips_expand_builtin_insn): Convert the QImode
28872         argument of the pshufh, psllh, psllw, psrah, psraw, psrlh, psrlw
28873         builtins to SImode and emit a zero-extend, if necessary.
28875 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
28877         * docs/invoke.texi (RISC-V Options): Alphabetize.
28879 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
28881         * doc/invoke.texi (RISC-V Options): Use two spaces to separate
28882         options.
28884 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
28886         * config/riscv/riscv.c: New file.
28887         * common/config/riscv/riscv-common.c: Likewise.
28888         * config.gcc: Likewise.
28889         * config/riscv/constraints.md: Likewise.
28890         * config/riscv/elf.h: Likewise.
28891         * config/riscv/generic.md: Likewise.
28892         * config/riscv/linux.h: Likewise.
28893         * config/riscv/multilib-generator: Likewise.
28894         * config/riscv/peephole.md: Likewise.
28895         * config/riscv/pic.md: Likewise.
28896         * config/riscv/predicates.md: Likewise.
28897         * config/riscv/riscv-builtins.c: Likewise.
28898         * config/riscv/riscv-c.c: Likewise.
28899         * config/riscv/riscv-ftypes.def: Likewise.
28900         * config/riscv/riscv-modes.def: Likewise.
28901         * config/riscv/riscv-opts.h: Likewise.
28902         * config/riscv/riscv-protos.h: Likewise.
28903         * config/riscv/riscv.h: Likewise.
28904         * config/riscv/riscv.md: Likewise.
28905         * config/riscv/riscv.opt: Likewise.
28906         * config/riscv/sync.md: Likewise.
28907         * config/riscv/t-elf-multilib: Likewise.
28908         * config/riscv/t-linux: Likewise.
28909         * config/riscv/t-linux-multilib: Likewise.
28910         * config/riscv/t-riscv: Likewise.
28911         * configure.ac: Likewise.
28912         * doc/contrib.texi: Add Kito Cheng, Palmer Dabbelt, and Andrew
28913         Waterman as RISC-V maintainers.
28914         * doc/install.texi: Add RISC-V entries.
28915         * doc/invoke.texi: Add RISC-V options section.
28916         * doc/md.texi: Add RISC-V constraints section.
28917         * configure: Regenerated.
28919 2017-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
28921         PR target/66144
28922         * config/rs6000/vector.md (vcond<mode><mode>): Allow the true and
28923         false values to be constant vectors with all 0 or all 1 bits set.
28924         (vcondu<mode><mode>): Likewise.
28925         * config/rs6000/predicates.md (vector_int_reg_or_same_bit): New
28926         predicate.
28927         (fpmask_comparison_operator): Update comment.
28928         (vecint_comparison_operator): New predicate.
28929         * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Optimize
28930         vector conditionals when the true and false values are constant
28931         vectors with all 0 bits or all 1 bits set.
28933 2017-02-06  Martin Sebor  <msebor@redhat.com>
28935         PR  tree-optimization/79376
28936         * gimple-fold.c (get_range_strlen): Set the minimum length to zero.
28938 2017-02-06  Uros Bizjak  <ubizjak@gmail.com>
28940         * config/i386/sse.md (vector modes -> vec_extract* splitter): Use
28941         explicit subreg RTX with operand 1.  Use VECTOR_MODE_P predicate
28942         to simplify split condition.
28944 2017-02-06  Jakub Jelinek  <jakub@redhat.com>
28946         * omp-expand.c (oxpand_omp_atomic_fetch_op,
28947         expand_omp_atomic_pipeline): Return false if can_atomic_load_p is
28948         false.
28950 2017-02-06  Segher Boessenkool  <segher@kernel.crashing.org>
28952         PR rtl-optimization/68664
28953         * target.def (can_speculate_insn): New hook.
28954         * doc/tm.texi.in (TARGET_SCHED_CAN_SPECULATE_INSN): New hook.
28955         * doc/tm.texi: Regenerate.
28956         * sched-rgn.c (can_schedule_ready_p): Use the new hook.
28957         * config/rs6000/rs6000.c (TARGET_SCHED_CAN_SPECULATE_INSN): New macro.
28958         (rs6000_sched_can_speculate_insn): New function.
28960 2017-02-06  Jakub Jelinek  <jakub@redhat.com>
28962         PR tree-optimization/79284
28963         * tree-vectorizer.h (VECT_SCALAR_BOOLEAN_TYPE_P): Define.
28964         * tree-vect-stmts.c (vect_get_vec_def_for_operand,
28965         vectorizable_mask_load_store, vectorizable_operation,
28966         vect_is_simple_cond, get_same_sized_vectype): Use it instead
28967         of comparing TREE_CODE of a type against BOOLEAN_TYPE.
28968         * tree-vect-patterns.c (check_bool_pattern, search_type_for_mask_1,
28969         vect_recog_bool_pattern, vect_recog_mask_conversion_pattern): Likewise.
28970         * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
28971         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28972         Remove redundant gimple_code (stmt) == GIMPLE_ASSIGN test after
28973         is_gimple_assign (stmt).  Replace another such test with
28974         is_gimple_assign (stmt).
28976 2017-02-06  Georg-Johann Lay  <avr@gjlay.de>
28978         PR target/78883
28979         * config/avr/avr.c (rtl-iter.h): Include it.
28980         (TARGET_LEGITIMATE_COMBINED_INSN): New hook define...
28981         (avr_legitimate_combined_insn): ...and implementation.
28983 2017-02-06  Dominik Vogt  <vogt@linux.vnet.ibm.com>
28985         * config/s390/predicates.md ("larl_operand"): Use macros from hwint.h.
28986         * config/s390/s390.c (s390_const_operand_ok)
28987         (s390_canonicalize_comparison, s390_extract_part)
28988         (s390_single_part, s390_contiguous_bitmask_nowrap_p)
28989         (s390_contiguous_bitmask_p, s390_rtx_costs)
28990         (legitimize_pic_address): Likewise.
28991         * config/s390/s390.md ("clzdi2", "clztidi2"): Likewise.
28992         * config/s390/vx-builtins.md ("vec_genbytemaskv16qi")
28993         ("vec_permi<mode>", "vfae<mode>", "*vfaes<mode>", "vstrc<mode>")
28994         ("*vstrcs<mode>"): Use UINTVAL() to set unsigned HOST_WIDE_INT.
28995         * config/s390/vector.md ("vec_vfenes<mode>"): Likewise.
28997 2017-02-06  Georg-Johann Lay  <avr@gjlay.de>
28999         * config/avr/avr.md (*addhi3_zero_extend): Add alternative where
29000         REGNO($0) == REGNO($1).
29002 2017-02-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29004         * config/s390/linux.h(SIZE_TYPE): Add comment.
29006 2017-02-06  Julian Brown  <julian@codesourcery.com>
29007             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
29008             Virendra Pathak  <virendra.pathak@broadcom.com>
29010         * config/aarch64/aarch64-cores.def: Change the scheduler
29011         to Thunderx2t99.
29012         * config/aarch64/aarch64.md: Include thunderx2t99.md.
29013         * config/aarch64/thunderx2t99.md: New file.
29015 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
29017         * doc/standards.texi (Go Language): Update link to language
29018         standard.
29020 2017-02-05  Jan Hubicka  <hubicka@ucw.cz>
29022         * tree-eh.c (lower_resx): Sanitize profile.
29023         (cleanup_empty_eh_move_lp): Likewise.
29025 2017-02-05  Jan Hubicka  <hubicka@ucw.cz>
29027         PR tree-ssa/79347
29028         * cfgloopmanip.c (lv_adjust_loop_entry_edge, loop_version): Add
29029         ELSE_PROB.
29030         * cfgloopmanip.h (loop_version): Update prototype.
29031         * modulo-sched.c (sms_schedule): Update call of loop_version.
29032         * tree-if-conv.c(version_loop_for_if_conversion): Likewise.
29033         * tree-parloops.c (gen_parallel_loop): Likewise.
29034         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Likewise.
29035         * tree-ssa-loop-split.c (split_loop): Likewise.
29036         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Likewise.
29037         * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
29039 2017-02-05  Martin Liska  <mliska@suse.cz>
29041         PR bootstrap/78985
29042         * config/s390/s390.c (s390_gimplify_va_arg): Initialize local
29043         variable to NULL.
29044         (print_operand_address): Initialize a struct to zero.
29046 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
29048         * doc/contrib.texi (Contributors): Refer to Hans Boehm's
29049         garbage collector only in textual form.
29051 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
29053         * doc/extend.texi (x86 specific memory model extensions for
29054         transactional memory): Simplify a phrase.
29056 2017-02-05  Eric Botcazou  <ebotcazou@adacore.com>
29058         PR target/79353
29059         * config/sparc/sync.md (atomic_loaddi_1): Replace 'U' constraint with
29060         'r', 'm' constraint with 'T' and !TARGET_ARCH64 with TARGET_ARCH32.
29061         (atomic_storedi_1): Likewise.
29063 2017-02-04  Jakub Jelinek  <jakub@redhat.com>
29065         PR tree-optimization/79338
29066         * tree-parloops.c (gather_scalar_reductions): Don't call
29067         vect_analyze_loop_form for loop->inner before destroying loop's
29068         loop_vinfo.
29070 2017-02-03  Martin Sebor  <msebor@redhat.com>
29072         PR tree-optimization/79327
29073         * gimple-ssa-sprintf.c (tree_digits): Avoid adding the base prefix
29074         when precision has resulted in leading zeros.
29075         (format_integer): Adjust the likely counter to assume an unknown
29076         argument that may be zero is non-zero.
29078 2017-02-03  Jason Merrill  <jason@redhat.com>
29080         PR c++/78689
29081         * tree-inline.c (copy_tree_body_r) [COND_EXPR]: Revert change to
29082         avoid copying non-taken branch.
29084 2017-02-03  Jakub Jelinek  <jakub@redhat.com>
29086         PR tree-optimization/79340
29087         * tree-vect-loop.c (vectorizable_reduction): Release
29088         vec_defs elements after safe_splicing them into other vectors.
29089         Formatting fixes.
29091         PR tree-optimization/79327
29092         * gimple-ssa-sprintf.c (adjust_range_for_overflow): If returning
29093         true, always set *argmin and *argmax to TYPE_{MIN,MAX}_VALUE of
29094         dirtype.
29095         (format_integer): Use wide_int_to_tree instead of build_int_cst
29096         + to_?hwi.  If argmin is NULL, just set argmin and argmax to
29097         TYPE_{MIN,MAX}_VALUE of argtype.  Simplify and fix computation
29098         of shortest and longest sequence.
29100 2017-02-03  Uros Bizjak  <ubizjak@gmail.com>
29102         * config/i386/i386.c (dimode_scalar_chain::convert_reg):
29103         Use pextrd for TARGET_SSE4_1 when creating scalar copy.
29105 2017-02-03  Walter Lee  <walt@tilera.com>
29107         PR target/78862
29108         * config/tilegx/tilegx.md (tilegx_expand_prologue): Add blockage
29109         after initial stackframe link reg save.
29110         * config/tilepro/tilepro.md (tilepro_expand_prologue): Likewise.
29112 2017-02-03  Jakub Jelinek  <jakub@redhat.com>
29114         PR target/79354
29115         * config/rs6000/rs6000.md (movsi_from_sf): Use wb constraint instead of
29116         wu for stxssp alternative.
29118 2017-02-03  Martin Sebor  <msebor@redhat.com>
29120         PR tree-optimization/79352
29121         * gimple-fold.c (get_range_strlen): Add argument.
29122         (get_range_strlen): Change return type to bool.
29123         (get_maxval_strlen): Pass in a dummy argument.
29124         * gimple-fold.h (get_range_strlen): Change return type to bool.
29125         * gimple-ssa-sprintf.c (get_string_length): Set unlikely counter.
29126         * tree.h (array_at_struct_end_p): Add argument.
29127         * tree.c (array_at_struct_end_p): Handle it.
29129 2017-02-03  Martin Liska  <mliska@suse.cz>
29131         PR lto/66295
29132         * multiple_target.c (create_dispatcher_calls): Redirect edge
29133         from a caller of a dispatcher.
29134         (expand_target_clones): Make the clones local.
29135         (ipa_target_clone): Do both target clones and resolvers.
29136         (ipa_dispatcher_calls): Remove the pass.
29137         (pass_dispatcher_calls::gate): Likewise.
29138         (make_pass_dispatcher_calls): Likewise.
29139         * passes.def (pass_target_clone): Put as very first IPA early
29140         pass.
29142 2017-02-03  Martin Liska  <mliska@suse.cz>
29144         * symtab.c (symtab_node::binds_to_current_def_p): Bail out
29145         in case of a function with ifunc attribute.
29147 2017-02-03  Martin Liska  <mliska@suse.cz>
29149         * cgraph.c (cgraph_node::dump): Dump function version info.
29150         * symtab.c (symtab_node::dump_base): Add missing new line.
29152 2017-02-02  Jan Hubicka  <hubicka@ucw.cz>
29154         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): New function.
29155         (ifcombine_ifandif): Use it.
29157 2017-02-03  Martin Liska  <mliska@suse.cz>
29159         * doc/invoke.texi: Document default value for
29160         use-after-scope-direct-emission-threshold.
29162 2017-02-03  Martin Liska  <mliska@suse.cz>
29164         PR tree-optimization/79339
29165         * gimple-ssa-sprintf.c (format_floating_max): Call mpfr_clear.
29166         (format_floating): Likewise.
29168 2017-02-03  Martin Liska  <mliska@suse.cz>
29170         PR ipa/79337
29171         * ipa-prop.c (ipa_node_params_t::insert): Remove current
29172         implementation.
29173         (ipa_node_params_t::remove): Likewise.
29174         * ipa-prop.h (ipa_node_params::ipa_node_params): Make default
29175         initialization from removed ipa_node_params_t::insert.
29176         (ipa_node_params::~ipa_node_params): Move from removed
29177         ipa_node_params_t::release.
29178         * symbol-summary.h (symbol_summary::m_released): New member.
29179         Do not release a summary twice.  Do not allow to call finalizer
29180         for types of a summary that live in GGC memory.
29182 2017-02-02  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
29184         * config/aarch64/aarch64.c (thunderx2t99_tunings): Enable AES and
29185         cmp_branch fusion.
29187 2017-02-02  Martin Sebor  <msebor@redhat.com>
29189         PR middle-end/79275
29190         * gimple-ssa-sprintf.c (get_string_length): Set lower bound to zero.
29191         (format_string): Tighten up the range of output for non-constant
29192         strings and correct the expected range for wide non-constant strings.
29194 2017-02-02  Martin Sebor  <msebor@redhat.com>
29196         * doc/invoke.texi (-maccumulate-args): Fix bad grammar.
29198         PR middle-end/32003
29199         * doc/invoke.texi (-fdump-tree-): Remove pass-specific options from
29200         index.
29201         (-fdump-tree-@var): Add to index and document how to come up
29202         with pass-specific option and dump file names.
29203         (-fdump-passes): Clarify where to look for output.
29205 2017-02-02  Jan Hubicka  <hubicka@ucw.cz>
29207         PR middle-end/77445
29208         * tree-ssa-threadbackward.c (profitable_jump_thread_path): Dump
29209         statistics of the analyzed path; allow threading for speed when
29210         any of BBs along the path are optimized for speed.
29212 2017-02-02  Eric Botcazou  <ebotcazou@adacore.com>
29214         PR middle-end/78468
29215         * emit-rtl.c (init_emit): Add ??? comment for problematic alignment
29216         settings of the virtual registers.
29218         Revert again
29219         2016-08-23  Dominik Vogt  <vogt@linux.vnet.ibm.com>
29221         * explow.c (get_dynamic_stack_size): Take known alignment of stack
29222         pointer + STACK_DYNAMIC_OFFSET into account when calculating the size
29223         needed.
29225 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29227         * config/s390/vx-builtins.md ("vec_ceil", "vec_floor")
29228         ("vec_trunc", "vec_roundc", "vec_round"): Remove expanders.
29230 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29232         * config/s390/s390.md: Add missing comments with the expanded
29233         mnemonics.
29234         * config/s390/vector.md: Likewise.
29235         * config/s390/vx-builtins.md: Likewise.
29237 2017-02-02  Jakub Jelinek  <jakub@redhat.com>
29239         PR target/79197
29240         * config/rs6000/rs6000.md (*fixuns_trunc<mode>di2_fctiduz): Rename to ...
29241         (fixuns_trunc<mode>di2): ... this, remove previous expander.  Put all
29242         conditions on a single line.
29244 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29246         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
29247         __S390_VX__ to __VX__.
29249 2017-02-01  Andrew Pinski  <apinski@cavium.com>
29251         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost): Pass
29252         stmt_info to record_stmt_cost.
29253         (vect_get_known_peeling_cost): Pass stmt_info if known to
29254         record_stmt_cost.
29255         * config/aarch64/aarch64-protos.h (cpu_vector_cost): Split
29256         cpu_vector_cost field into
29257         scalar_int_stmt_cost and scalar_fp_stmt_cost.  Split vec_stmt_cost
29258         field into vec_int_stmt_cost and vec_fp_stmt_cost.
29259         * config/aarch64/aarch64.c (generic_vector_cost): Update for the
29260         splitting of scalar_stmt_cost and vec_stmt_cost.
29261         (thunderx_vector_cost): Likewise.
29262         (cortexa57_vector_cost): LIkewise.
29263         (exynosm1_vector_cost): Likewise.
29264         (xgene1_vector_cost): Likewise.
29265         (thunderx2t99_vector_cost): Improve after the splitting of the two
29266         fields.
29267         (aarch64_builtin_vectorization_cost): Update for the splitting of
29268         scalar_stmt_cost and vec_stmt_cost.
29270 2017-02-01  Torvald Riegel  <triegel@redhat.com>
29271             Richard Henderson  <rth@redhat.com>
29273         * builtins.c (fold_builtin_atomic_always_lock_free): Make "lock-free"
29274         conditional on existance of a fast atomic load.
29275         * optabs-query.c (can_atomic_load_p): New function.
29276         * optabs-query.h (can_atomic_load_p): Declare it.
29277         * optabs.c (expand_atomic_exchange): Always delegate to libatomic if
29278         no fast atomic load is available for the particular size of access.
29279         (expand_atomic_compare_and_swap): Likewise.
29280         (expand_atomic_load): Likewise.
29281         (expand_atomic_store): Likewise.
29282         (expand_atomic_fetch_op): Likewise.
29283         * testsuite/lib/target-supports.exp
29284         (check_effective_target_sync_int_128): Remove x86 because it provides
29285         no fast atomic load.
29286         (check_effective_target_sync_int_128_runtime): Likewise.
29288 2017-02-01  Richard Biener  <rguenther@suse.de>
29290         * graphite.c: Include tree-vectorizer.h for find_loop_location.
29291         (graphite_transform_loops): Provide opt-info for optimized nests.
29292         * tree-parloop.c (parallelize_loops): Provide opt-info for
29293         parallelized loops.
29295 2017-02-01  Richard Biener  <rguenther@suse.de>
29297         PR middle-end/79315
29298         * tree-cfg.c (move_stmt_op): Never set TREE_BLOCK when it
29299         was not set before.
29301 2017-02-01  Richard Biener  <rguenther@suse.de>
29303         PR tree-optimization/71824
29304         * graphite-scop-detection.c (scop_detection::build_scop_breadth):
29305         Verify the loops are valid in the merged SESE region.
29306         (scop_detection::can_represent_loop_1): Check analyzing the
29307         evolution of the number of iterations in the region succeeds.
29309 2017-01-31  Ian Lance Taylor  <iant@golang.org>
29311         * config/i386/i386.c (ix86_expand_split_stack_prologue): Add
29312         REG_ARGS_SIZE note to 32-bit push insns and call insn.
29314 2017-01-31  David Malcolm  <dmalcolm@redhat.com>
29316         PR preprocessor/79210
29317         * input.c (get_substring_ranges_for_loc): Replace line_width
29318         assertion with error-handling.
29320 2017-01-31  Richard Biener  <rguenther@suse.de>
29322         PR tree-optimization/77318
29323         * graphite-sese-to-poly.c (extract_affine): Fix assert.
29324         (create_pw_aff_from_tree): Take loop parameter.
29325         (add_condition_to_pbb): Pass loop of the condition to
29326         create_pw_aff_from_tree.
29328 2017-01-31  Jakub Jelinek  <jakub@redhat.com>
29330         * config/s390/s390.c (s390_asan_shadow_offset): New function.
29331         (TARGET_ASAN_SHADOW_OFFSET): Redefine.
29333 2017-01-31  Michael Meissner  <meissner@linux.vnet.ibm.com>
29335         PR target/78597
29336         PR target/79038
29337         * config/rs6000/rs6000-protos.h (convert_float128_to_int): Delete,
29338         no longer used.
29339         (convert_int_to_float128): Likewise.
29340         * config/rs6000/rs6000.c (convert_float128_to_int): Likewise.
29341         (convert_int_to_float128): Likewise.
29342         * config/rs6000/rs6000.md (UNSPEC_IEEE128_MOVE): Likewise.
29343         (UNSPEC_IEEE128_CONVERT): Likewise.
29344         (floatsi<mode>2, FLOAT128 iterator): Bypass calling
29345         rs6000_expand_float128_convert if we have IEEE 128-bit hardware.
29346         Use local variables for IBM extended format.
29347         (fix_trunc<mode>si2, FLOAT128 iterator): Likewise.
29348         (fix_trunc<mode>si2_fprs): Likewise.
29349         (fixuns_trunc<IEEE128:mode><SDI:mode>2): Likewise.
29350         (floatuns<IEEE128:mode>2, IEEE128 iterator): Likewise.
29351         (fix<uns>_<mode>si2_hw): Rework the IEEE 128-bt hardware support
29352         to know that we can now have integers of all sizes in vector
29353         registers.
29354         (fix<uns>_<mode>di2_hw): Likewise.
29355         (float<uns>_<mode>si2_hw): Likewise.
29356         (fix_<mode>si2_hw): Likewise.
29357         (fixuns_<mode>si2_hw): Likewise.
29358         (float<uns>_<mode>di2_hw): Likewise.
29359         (float_<mode>di2_hw): Likewise.
29360         (float_<mode>si2_hw): Likewise.
29361         (floatuns_<mode>di2_hw): Likewise.
29362         (floatuns_<mode>si2_hw): Likewise.
29363         (xscvqp<su>wz_<mode>): Delete, no longer used.
29364         (xscvqp<su>dz_<mode>): Likewise.
29365         (xscv<su>dqp_<mode>): Likewise.
29366         (ieee128_mfvsrd_64bit): Likewise.
29367         (ieee128_mfvsrd_32bit): Likewise.
29368         (ieee128_mfvsrwz): Likewise.
29369         (ieee128_mtvsrw): Likewise.
29370         (ieee128_mtvsrd_64bit): Likewise.
29371         (ieee128_mtvsrd_32bit): Likewise.
29373 2017-01-31  Martin Liska  <mliska@suse.cz>
29375         PR ipa/79285
29376         * ipa-prop.c (ipa_free_all_node_params): Call release method
29377         instead of ~sumbol_summary to not to trigger double times
29378         dtor of hash_map.
29380 2017-01-31  Aldy Hernandez  <aldyh@redhat.com>
29382         PR tree-optimization/71691
29383         * bitmap.h (class auto_bitmap): New.
29384         * tree-ssa-loop-unswitch.c (tree_may_unswitch_on): Call
29385         is_maybe_undefined instead of ssa_undefined_value_p.
29387 2017-01-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29389         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
29390         __S390_ARCH_LEVEL__ to __ARCH__.
29392 2017-01-31  Jakub Jelinek  <jakub@redhat.com>
29394         PR tree-optimization/79267
29395         * value-prof.c (gimple_ic): Only drop lhs for noreturn calls
29396         if should_remove_lhs_p is true.
29398 2017-01-30  Alexandre Oliva <aoliva@redhat.com>
29400         PR debug/63238
29401         * dwarf2out.c (clone_as_declaration): Drop DW_AT_alignment.
29402         (add_alignment_attribute): New.
29403         (base_type_die): Add alignment attribute.
29404         (subrange_type_die): Likewise.
29405         (modified_type_die): Likewise.
29406         (gen_array_type_die): Likewise.
29407         (gen_descr_array_type_die: Likewise.
29408         (gen_enumeration_type_die): Likewise.
29409         (gen_subprogram_die): Likewise.
29410         (gen_variable_die): Likewise.
29411         (gen_field_die): Likewise.
29412         (gen_ptr_to_mbr_type_die): Likewise.
29413         (gen_struct_or_union_type_die): Likewise.
29414         (gen_subroutine_type_die): Likewise.
29415         (gen_typedef_die): Likewise.
29416         (base_type_cmp): Compare alignment attribute.
29418 2017-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
29420         PR target/79170
29421         * config/rs6000/altivec.md (*setb_internal): Rename to setb_signed.
29422         (setb_unsigned) New pattern for setb with CCUNS.
29423         * config/rs6000/rs6000.c (expand_block_compare): Use a different
29424         subfc./subfe sequence to avoid overflow problems.  Generate a
29425         shorter sequence with cmpld/setb for power9.
29426         * config/rs6000/rs6000.md (subf<mode>3_carry_dot2): Add a new pattern
29427         for generating subfc. instruction.
29428         (cmpstrsi): Add TARGET_POPCNTD predicate as the generate sequence
29429         now uses this instruction.
29431 2017-01-30  Ian Lance Taylor  <iant@google.com>
29433         PR debug/79289
29434         * dwarf2out.c (gen_type_die_with_usage): When picking a variant
29435         for FUNCTION_TYPE/METHOD_TYPE, use the first matching one.
29437 2017-01-30  Martin Sebor  <msebor@redhat.com>
29439         * gimple-ssa-sprintf.c (fmtresult::adjust_for_width_or_precision):
29440         Move constant to the right of a relational operator.
29441         (get_mpfr_format_length, format_character, format_string): Ditto.
29442         (should_warn_p, maybe_warn): Same.
29444         * doc/invoke.texi (-Wformat-truncation=1): Fix typo.
29446 2017-01-30  Maxim Ostapenko  <m.ostapenko@samsung.com>
29448         PR lto/79061
29449         * asan.c (get_translation_unit_decl): Remove function.
29450         (asan_add_global): Force has_dynamic_init to zero in LTO mode.
29452 2017-01-30  Martin Liska  <mliska@suse.cz>
29454         PR gcov-profile/79259
29455         * opts.c (common_handle_option): Enable flag_ipa_bit_cp w/
29456         -fprofile-generate.
29458 2017-01-30  Martin Liska  <mliska@suse.cz>
29460         PR bootstrap/78985
29461         * config/aarch64/cortex-a57-fma-steering.c (func_fma_steering::analyze):
29462         Initialize variables with NULL value.
29464 2017-01-30  Richard Earnshaw  <rearnsh@arm.com>
29466         PR target/79260
29467         * config.gcc (arm*-*-*): Add arm/arm-flags.h and arm/arm-isa.h to
29468         tm_p_file.
29469         * arm/arm-protos.h: Don't directly include arm-flags.h and arm-isa.h.
29471 2017-01-30  Richard Biener  <rguenther@suse.de>
29473         PR tree-optimization/79276
29474         * tree-vrp.c (process_assert_insertions): Properly adjust common
29475         when removing a duplicate.
29477         * gcc.dg/torture/pr79276.c: New testcase.
29479 2017-01-30  Richard Biener  <rguenther@suse.de>
29481         PR tree-optimization/79256
29482         * targhooks.c (default_builtin_vector_alignment_reachable): Honor
29483         BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
29484         alignment on TYPE.
29485         * tree.c (build_aligned_type): Set TYPE_USER_ALIGN.
29487 2017-01-30  Dominik Vogt  <vogt@linux.vnet.ibm.com>
29489         PR target/79240
29490         * config/s390/s390.md ("*r<noxa>sbg_<mode>_srl_bitmask")
29491         ("*r<noxa>sbg_<mode>_sll_bitmask")
29492         ("*extzv_<mode>_srl<clobbercc_or_nocc>")
29493         ("*extzv_<mode>_sll<clobbercc_or_nocc>"):
29494         Use contiguous_bitmask_nowrap_operand.
29496 2017-01-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29498         PR target/79268
29499         * config/rs6000/altivec.h (vec_xl): Revise #define.
29500         (vec_xst): Likewise.
29502 2017-01-27  Uros Bizjak  <ubizjak@gmail.com>
29504         * config/i386/i386.c (print_reg): Use REGNO instead of true_regnum.
29506 2017-01-27  Bernd Schmidt  <bschmidt@redhat.com>
29508         PR rtl-optimization/79194
29509         * cprop.c (one_cprop_pass): Move deletion of code after unconditional
29510         traps before call to bypass_conditional_jumps.
29512 2017-01-27  Vladimir Makarov  <vmakarov@redhat.com>
29514         PR tree-optimization/71374
29515         * lra-constraints.c (check_conflict_input_operands): New.
29516         (match_reload): Use it.
29518 2017-01-27  Vladimir Makarov  <vmakarov@redhat.com>
29520         PR target/79131
29521         * lra-assigns.c (find_hard_regno_for_1): Take endianess for into
29522         account to calculate conflict_set.
29524 2017-01-27  Bin Cheng  <bin.cheng@arm.com>
29526         PR rtl-optimization/78559
29527         * combine.c (try_combine): Discard REG_EQUAL and REG_EQUIV for
29528         other_insn in combine.
29530 2017-01-27  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
29532         * builtin-types.def: Use unsigned_char_type_node for BT_UINT8.  Use
29533         uint16_type_node for BT_UINT16.
29535 2017-01-27  David Malcolm  <dmalcolm@redhat.com>
29537         * doc/sourcebuild.texi (Testsuites): Add "GIMPLE Tests" and
29538         "RTL Tests" to menu.
29539         (GIMPLE Tests): New node.
29540         (RTL Tests): New node.
29542 2017-01-27  Richard Biener  <rguenther@suse.de>
29544         PR tree-optimization/79245
29545         * tree-loop-distribution.c (distribute_loop): Apply cost
29546         modeling also to detected patterns.
29548 2017-01-27  Richard Biener  <rguenther@suse.de>
29550         PR tree-optimization/71433
29551         * tree-vrp.c (register_new_assert_for): Revert earlier changes.
29552         (compare_assert_loc): New function.
29553         (process_assert_insertions): Sort and optimize assert locations
29554         to remove duplicates and push down identical assertions on
29555         edges to their destination block.
29557 2017-01-27  Richard Biener  <rguenther@suse.de>
29559         PR tree-optimization/79244
29560         * tree-vrp.c (remove_range_assertions): Forcefully propagate
29561         out SSA names even if abnormal.
29563 2017-01-27  Jakub Jelinek  <jakub@redhat.com>
29565         * realmpfr.h: Poison MPFR_RND{N,Z,U,D}.
29566         * gimple-ssa-sprintf.c (format_floating_max): Use GMP_RNDN
29567         instead of MPFR_RNDN.
29569 2017-01-27  Richard Earnshaw  <rearnsha@arm.com>
29571         PR target/79239
29572         * arm.c (arm_option_override): Don't call build_target_option_node
29573         until after doing all option overrides.
29574         (arm_valid_target_attribute_tree): Likewise.
29576 2017-01-27  Martin Liska  <mliska@suse.cz>
29578         * doc/invoke.texi (-fprofile-arcs): Document profiling support
29579         for {cd}tors and C++ {cd}tors.
29581 2017-01-27  Dominik Vogt  <vogt@linux.vnet.ibm.com>
29583         * config/s390/s390.md ("*setmem_long_and")
29584         ("*setmem_long_and_31z"): Use zero_extend instead of and.
29586 2017-01-26  Martin Sebor  <msebor@redhat.com>
29588         * gimple-ssa-sprintf.c (format_floating): Simplify the computation
29589         of precision.
29591 2017-01-26  Martin Sebor  <msebor@redhat.com>
29593         * gimple-ssa-sprintf.c (format_floating): Test HAVE_XFmode and
29594         HAVE_DFmode before using XFmode or DFmode.
29595         (parse_directive): Avoid using the z length modifier to avoid
29596         the ISO C++98 does not support the â€˜z’ gnu_printf length modifier.
29598         PR middle-end/78703
29599         * gimple-ssa-sprintf.c (adjust_for_width_or_precision): Change
29600         to accept adjustment as an array.
29601         (get_int_range): New function.
29602         (struct directive): Make width and prec arrays.
29603         (directive::set_width, directive::set_precision): Call get_int_range.
29604         (format_integer, format_floating): Handle width and precision ranges.
29605         (format_string, parse_directive): Same.
29607 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
29609         PR debug/79129
29610         * dwarf2out.c (generate_skeleton_bottom_up): For children with
29611         comdat_type_p set, just clone them, but keep the children in the
29612         original DIE.
29614         PR debug/78835
29615         * dwarf2out.c (prune_unused_types): Mark all functions with DIEs
29616         which have direct callers with -fvar-tracking-assignments enabled
29617         in the current TU.
29618         (resolve_addr): Avoid adding skeleton DIEs for DW_AT_call_origin
29619         inside of type units.
29621 2017-01-26  Martin Sebor  <msebor@redhat.com>
29623         PR middle-end/78703
29624         * gimple-ssa-sprintf.c (struct result_range): Add likely and
29625         unlikely counters.
29626         (struct format_result): Replace number_chars, number_chars_min,
29627         and number_chars_max with a single member of struct result_range.
29628         Remove bounded.
29629         (format_result::operator+=): Adjust.
29630         (struct fmtresult): Remove bounded.  Handle likely and unlikely
29631         counters.
29632         (fmtresult::adjust_for_width_or_precision): New function.
29633         (fmtresult:type_max_digits): New function.
29634         (bytes_remaining): Handle likely and unlikely counters.
29635         (min_bytes_remaining): Remove.
29636         (format_percent): Simplify.
29637         (format_integer, format_floating): Set likely and unlikely counters.
29638         (get_string_length, format_character, format_string): Same.
29639         (format_plain, should_warn_p): New function.
29640         (maybe_warn): Call should_warn_p.  Update diagnostic messages
29641         and handle those for all directives, including plain strings.
29642         (format_directive): Handle likely and unlikely counters.
29643         Remove unnecessary quoting from diagnostics.  Add an informational
29644         note.
29645         (add_bytes): Remove.
29646         (pass_sprintf_length::compute_format_length): Simplify.
29647         (try_substitute_return_value): Handle likely and unlikely counters.
29649 2017-01-26  Carl Love  <cel@us.ibm.com>
29651         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Remove
29652         bogus entries for the P8V_BUILTIN_VEC_VGBBD built-ins
29654 2017-01-26  Vladimir Makarov  <vmakarov@redhat.com>
29656         PR target/79131
29657         * lra-assigns.c (setup_live_pseudos_and_spill_after_risky): Take
29658         endianess for subregs into account.
29659         * lra-constraints.c (lra_constraints): Do risky transformations
29660         always on the first iteration.
29661         * lra-lives.c (check_pseudos_live_through_calls): Add arg
29662         last_call_used_reg_set.
29663         (process_bb_lives): Define and use last_call_used_reg_set.
29664         * lra.c (lra): Always continue after lra_constraints on the first
29665         iteration.
29667 2017-01-26  Kirill Yukhin  <kirill.yukhin@gmail.com>
29669         * gcc.target/i386/avx512bw-kshiftlq-2.c: Use unsigned long long
29670         constant.
29671         * gcc.target/i386/avx512bw-kshiftrq-2.c: Ditto.
29673 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
29675         * config/i386/avx512fintrin.h (_ktest_mask16_u8,
29676         _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): Move to ...
29677         * config/i386/avx512dqintrin.h (_ktest_mask16_u8,
29678         _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): ... here.
29679         * config/i386/i386-builtin.def (__builtin_ia32_ktestchi,
29680         __builtin_ia32_ktestzhi, __builtin_ia32_kaddhi): Use
29681         OPTION_MASK_ISA_AVX512DQ instead of OPTION_MASK_ISA_AVX512F.
29682         * config/i386/sse.md (SWI1248_AVX512BWDQ2): New mode iterator.
29683         (kadd<mode>, ktest<mode>): Use it instead of SWI1248_AVX512BWDQ.
29685 2017-01-26  Marek Polacek  <polacek@redhat.com>
29687         PR c/79199
29688         * fold-const.c (operand_equal_p) [COND_EXPR]: Use OP_SAME_WITH_NULL
29689         for the third operand.
29691 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
29693         PR middle-end/79236
29694         * omp-low.c (struct omp_context): Add simt_stmt field.
29695         (scan_omp_for): Return omp_context *.
29696         (scan_omp_simd): Set simt_stmt on the non-_simt_ SIMD
29697         context to the _simt_ SIMD stmt.
29698         (lower_omp_for): For combined SIMD with sibling _simt_
29699         SIMD, make sure to use the same decls in _looptemp_
29700         clauses as in the sibling.
29702 2017-01-26  David Sherwood  <david.sherwood@arm.com>
29704         PR middle-end/79212
29705         * gimplify.c (omp_notice_variable): Add GOVD_SEEN flag to variables in
29706         all contexts.
29708 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
29710         PR target/70465
29711         * reg-stack.c (emit_swap_insn): Instead of fld a; fld b; fxchg %st(1);
29712         emit fld b; fld a; if possible.
29714         * brig-builtins.def: Update copyright years.
29715         * config/arm/arm_acle_builtins.def: Update copyright years.
29717 2017-01-25  Michael Meissner  <meissner@linux.vnet.ibm.com>
29719         PR target/79179
29720         * config/rs6000/vsx.md (vsx_extract_<mode>_store): Use wY
29721         constraint instead of o for the stxsd instruction.
29723 2017-01-25  Carl Love  <cel@us.ibm.com>
29725         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Fix order
29726         of entries for ALTIVEC_BUILTIN_VEC_PACKS and P8V_BUILTIN_VEC_VGBBD.
29728 2017-01-25  Jonathan Wakely  <jwakely@redhat.com>
29730         * doc/invoke.texi (C++ Dialect Options): Fix typo.
29732 2017-01-25  Richard Biener  <rguenther@suse.de>
29734         PR tree-optimization/69264
29735         * target.def (vector_alignment_reachable): Improve documentation.
29736         * doc/tm.texi: Regenerate.
29737         * targhooks.c (default_builtin_vector_alignment_reachable): Simplify
29738         and add a comment.
29739         * tree-vect-data-refs.c (vect_supportable_dr_alignment): Revert
29740         earlier changes with respect to TYPE_USER_ALIGN.
29741         (vector_alignment_reachable_p): Likewise.  Improve dumping.
29743 2016-01-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29745         PR target/79145
29746         * config/arm/arm.md (xordi3): Force constant operand into a register
29747         for TARGET_IWMMXT.
29749 2016-01-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29751         * doc/invoke.texi (-fstore-merging): Correct default optimization
29752         levels at which it is enabled.
29753         (-O): Move -fstore-merging from list to...
29754         (-O2): ... Here.
29756 2017-01-25  Richard Biener  <rguenther@suse.de>
29758         PR debug/78363
29759         * omp-expand.c: Include debug.h.
29760         (expand_omp_taskreg): Make sure to generate early debug before
29761         outlining anything from a function.
29762         (expand_omp_target): Likewise.
29763         (grid_expand_target_grid_body): Likewise.
29765 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
29767         PR lto/79061
29768         * asan.c (get_translation_unit_decl): New function.
29769         (asan_add_global): Extract modules file name from globals
29770         TRANSLATION_UNIT_DECL name.
29772 2017-01-24  Eric Botcazou  <ebotcazou@adacore.com>
29774         PR target/77439
29775         * config/arm/arm.c (arm_function_ok_for_sibcall): Add back restriction
29776         for long calls with APCS frame and VFP.
29778 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
29780         * cfg.c (original_copy_tables_initialized_p): New function.
29781         * cfg.h (original_copy_tables_initialized_p): New decl.
29782         * cfgrtl.c (relink_block_chain): Guard the call to
29783         free_original_copy_tables with a call to
29784         original_copy_tables_initialized_p.
29785         * cgraph.h (symtab_node::native_rtl_p): New decl.
29786         * cgraphunit.c (symtab_node::native_rtl_p): New function.
29787         (symtab_node::needed_p): Don't assert for early assembly output
29788         for __RTL functions.
29789         (cgraph_node::finalize_function): Set "force_output" for __RTL
29790         functions.
29791         (cgraph_node::analyze): Bail out early for __RTL functions.
29792         (analyze_functions): Update assertion to support __RTL functions.
29793         (cgraph_node::expand): Bail out early for __RTL functions.
29794         * final.c (rest_of_clean_state): Don't call delete_tree_ssa for
29795         __RTL functions.
29796         * function.h (struct function): Update comment for field
29797         "pass_startwith".
29798         * gimple-expr.c: Include "tree-pass.h".
29799         (gimple_has_body_p): Return false for __RTL functions.
29800         * Makefile.in (OBJS): Add run-rtl-passes.o.
29801         * pass_manager.h (gcc::pass_manager::get_rest_of_compilation): New
29802         accessor.
29803         (gcc::pass_manager::get_clean_slate): New accessor.
29804         * passes.c: Include "insn-addr.h".
29805         (should_skip_pass_p): Add logging.  Update logic for running
29806         "expand" to be compatible with both __GIMPLE and __RTL.  Guard
29807         property-provider override so it is only done for gimple passes.
29808         Don't skip dfinit.
29809         (skip_pass): New function.
29810         (execute_one_pass): Call skip_pass when skipping passes.
29811         * read-md.c (md_reader::read_char): Support filtering
29812         the input to a subset of line numbers.
29813         (md_reader::md_reader): Initialize fields
29814         m_first_line and m_last_line.
29815         (md_reader::read_file_fragment): New function.
29816         * read-md.h (md_reader::read_file_fragment): New decl.
29817         (md_reader::m_first_line): New field.
29818         (md_reader::m_last_line): New field.
29819         * read-rtl-function.c (function_reader::create_function): Only
29820         create cfun if it doesn't already exist.  Set PROP_rtl on cfun's
29821         curr_properties.  Set DECL_INITIAL to a dummy block.
29822         (read_rtl_function_body_from_file_range): New function.
29823         * read-rtl-function.h (read_rtl_function_body_from_file_range):
29824         New decl.
29825         * run-rtl-passes.c: New file.
29826         * run-rtl-passes.h: New file.
29828 2017-01-24  Jeff Law  <law@redhat.com>
29830         * config/microblaze/microblaze.h (ASM_FORMAT_PRIVATE_NAME): Increase
29831         buffer size.
29833 2017-01-24  Bin Cheng  <bin.cheng@arm.com>
29835         PR tree-optimization/79159
29836         * tree-ssa-loop-niter.c (get_cst_init_from_scev): New function.
29837         (record_nonwrapping_iv): Improve boundary using above function if no
29838         value range information.
29840 2017-01-24  Pekka Jääskeläinen  <pekka@parmance.com>
29841             Martin Jambor  <mjambor@suse.cz>
29843         * brig-builtins.def: New file.
29844         * builtins.def (DEF_HSAIL_BUILTIN): New macro.
29845         (DEF_HSAIL_ATOMIC_BUILTIN): Likewise.
29846         (DEF_HSAIL_SAT_BUILTIN): Likewise.
29847         (DEF_HSAIL_INTR_BUILTIN): Likewise.
29848         (DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN): Likewise.
29849         * builtin-types.def (BT_INT8): New.
29850         (BT_INT16): Likewise.
29851         (BT_UINT8): Likewise.
29852         (BT_UINT16): Likewise.
29853         (BT_FN_ULONG): Likewise.
29854         (BT_FN_UINT_INT): Likewise.
29855         (BT_FN_UINT_ULONG): Likewise.
29856         (BT_FN_UINT_LONG): Likewise.
29857         (BT_FN_UINT_PTR): Likewise.
29858         (BT_FN_ULONG_PTR): Likewise.
29859         (BT_FN_INT8_FLOAT): Likewise.
29860         (BT_FN_INT16_FLOAT): Likewise.
29861         (BT_FN_UINT32_FLOAT): Likewise.
29862         (BT_FN_UINT16_FLOAT): Likewise.
29863         (BT_FN_UINT8_FLOAT): Likewise.
29864         (BT_FN_UINT64_FLOAT): Likewise.
29865         (BT_FN_UINT16_UINT32): Likewise.
29866         (BT_FN_UINT32_UINT16): Likewise.
29867         (BT_FN_UINT16_UINT16_UINT16): Likewise.
29868         (BT_FN_INT_PTR_INT): Likewise.
29869         (BT_FN_UINT_PTR_UINT): Likewise.
29870         (BT_FN_LONG_PTR_LONG): Likewise.
29871         (BT_FN_ULONG_PTR_ULONG): Likewise.
29872         (BT_FN_VOID_UINT64_UINT64): Likewise.
29873         (BT_FN_UINT8_UINT8_UINT8): Likewise.
29874         (BT_FN_INT8_INT8_INT8): Likewise.
29875         (BT_FN_INT16_INT16_INT16): Likewise.
29876         (BT_FN_INT_INT_INT): Likewise.
29877         (BT_FN_UINT_FLOAT_UINT): Likewise.
29878         (BT_FN_FLOAT_UINT_UINT): Likewise.
29879         (BT_FN_ULONG_UINT_UINT): Likewise.
29880         (BT_FN_ULONG_UINT_PTR): Likewise.
29881         (BT_FN_ULONG_ULONG_ULONG): Likewise.
29882         (BT_FN_UINT_UINT_UINT): Likewise.
29883         (BT_FN_VOID_UINT_PTR): Likewise.
29884         (BT_FN_UINT_UINT_PTR: Likewise.
29885         (BT_FN_UINT32_UINT64_PTR): Likewise.
29886         (BT_FN_INT_INT_UINT_UINT): Likewise.
29887         (BT_FN_UINT_UINT_UINT_UINT): Likewise.
29888         (BT_FN_UINT_UINT_UINT_PTR): Likewise.
29889         (BT_FN_UINT_ULONG_ULONG_UINT): Likewise.
29890         (BT_FN_ULONG_ULONG_ULONG_ULONG): Likewise.
29891         (BT_FN_LONG_LONG_UINT_UINT): Likewise.
29892         (BT_FN_ULONG_ULONG_UINT_UINT): Likewise.
29893         (BT_FN_VOID_UINT32_UINT64_PTR): Likewise.
29894         (BT_FN_VOID_UINT32_UINT32_PTR): Likewise.
29895         (BT_FN_UINT_UINT_UINT_UINT_UINT): Likewise.
29896         (BT_FN_UINT_FLOAT_FLOAT_FLOAT_FLOAT): Likewise.
29897         (BT_FN_ULONG_ULONG_ULONG_UINT_UINT): Likewise.
29898         * doc/frontends.texi: List BRIG FE.
29899         * doc/install.texi (Testing): Add BRIG tesring requirements.
29900         * doc/invoke.texi (Overall Options): Mention BRIG.
29901         * doc/standards.texi (Standards): Doucment BRIG HSA version.
29903 2017-01-24  Richard Biener  <rguenther@suse.de>
29905         PR translation/79208
29906         * ipa-devirt.c (odr_types_equivalent_p): Fix typo in diagnostic.
29908 2017-01-24  Martin Jambor  <mjambor@suse.cz>
29910         PR bootstrap/79198
29911         * ipa-prop.c (ipa_free_all_node_params): Call summary destructor.
29912         * ipa-prop.c (ipa_node_params_t::insert): Initialize fields known_csts
29913         and known_contexts.
29915 2017-01-24  Aldy Hernandez  <aldyh@redhat.com>
29917         PR middle-end/79123
29918         * gimple-ssa-warn-alloca.c (alloca_call_type): Make sure
29919         casts from signed to unsigned really don't have a range.
29921 2017-01-24  Markus Trippelsdorf  <markus@trippelsdorf.de>
29923         * gimple-ssa-sprintf.c (format_floating): Change MPFR_RNDx to
29924         GMP_RNDx for compatiblity.
29926 2017-01-24  Martin Liska  <mliska@suse.cz>
29928         PR bootstrap/79132
29929         * tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Insert assert
29930         that would prevent us to call alloca with -1 as argument.
29932 2017-01-24  Jakub Jelinek  <jakub@redhat.com>
29934         * dwarf2out.c (output_compilation_unit_header, output_file_names):
29935         Avoid -Wformat-security warning.
29937 2017-01-23  Andrew Pinski  <apinski@cavium.com>
29939         * config/aarch64/aarch64.c (thunderx2t99_addrcost_table): Improve
29940         cost table.
29942 2017-01-23  Martin Sebor  <msebor@redhat.com>
29944         PR middle-end/78703
29945         * gimple-ssa-sprintf.c (warn_level): New global.
29946         (format_integer): Use it here and throughout the rest of the file.
29947         Use the same switch to compute sign as base.
29948         (maybe_warn): New function.
29949         (format_directive): Factor out warnings into maybe_warn.
29950         Add debugging output.  Use warn_level.
29951         (add_bytes): Use warn_level.
29952         (pass_sprintf_length::compute_format_length): Add debugging output.
29953         (try_substitute_return_value): Same.
29954         (pass_sprintf_length::handle_gimple_call): Set and use warn_level.
29956         PR middle-end/78703
29957         * gimple-ssa-sprintf.c (struct format_result): Remove constant member.
29958         (struct fmtresult, format_integer, format_floating): Adjust.
29959         (fmtresult::fmtresult): Set max correctly in two argument ctor.
29960         (get_string_length, format_string,format_directive): Same.
29961         (pass_sprintf_length::compute_format_length): Same.
29962         (try_substitute_return_value): Simplify slightly.
29964         PR middle-end/78703
29965         * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust formatting.
29966         (fmtresult::operator+=): Outlined.
29967         (struct fmtresult): Add ctors.
29968         (struct conversion_spec): Rename...
29969         (struct directive): ...to this.  Add and remove data members.
29970         (directive::set_width, directive::set_precision): New functions.
29971         (format_percent): Use fmtresult ctor.
29972         (get_width_and_precision): Remove.
29973         (format_integer): Make naming changes.  Avoid computing width and
29974         precision.
29975         (format_floating): Same.  Adjust indentation.
29976         (format_character, format_none): New functions.
29977         (format_string): Moved character handling to format_character.
29978         (format_directive): Remove arguments, change return type.
29979         (parse_directive): New function.
29980         (pass_sprintf_length::compute_format_length): Move directive
29981         parsing to parse_directive.
29983 2017-01-23  Jakub Jelinek  <jakub@redhat.com>
29985         * tree.h (assign_assembler_name_if_neeeded): Rename to ...
29986         (assign_assembler_name_if_needed): ... this.
29987         * tree.c (assign_assembler_name_if_neeeded): Rename to ...
29988         (assign_assembler_name_if_needed): ... this.
29989         (free_lang_data_in_cgraph): Adjust callers.
29990         * cgraphunit.c (cgraph_node::analyze): Likewise.
29991         * omp-expand.c (expand_omp_taskreg, expand_omp_target):
29992         Likewise.
29994 2017-01-23  Richard Biener  <rguenther@suse.de>
29996         PR tree-optimization/79088
29997         PR tree-optimization/79188
29998         * tree-ssa-threadupdate.c (mark_threaded_blocks): Move code
29999         resetting loop bounds after last path deletion.  Reset loop
30000         bounds of the target loop, make code match the comments.
30001         * tree-ssa-threadbackwards.c (pass_early_thread_jumps::execute):
30002         Make sure loops need no fixups.
30004 2017-01-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>
30006         * config/rs6000/rs6000-builtin.def (VSIEDPF): Add scalar insert
30007         exponent support with double type for first argument.
30008         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Changed
30009         type returned by __builtin_vec_extract_sig,
30010         __builtin_vec_extract_sig_sp, and __builtin_vec_extract_sig_dp
30011         functions from "vector int" to "vector unsigned int" or from
30012         "vector long long int" to "vector unsigned long long int".
30013         Changed type returned by __builtin_vec_extract_exp,
30014         __builtin_vec_extract_exp_sp, and __builtin_vec_extract_exp_dp
30015         functions from "vector int" to "vector unsigned int" or from
30016         "vector long long int" to "vector unsigned long long int".
30017         Changed return type of __builtin_vec_test_data_class,
30018         __builtin_vec_test_data_class_sp, and
30019         __builtin_vec_test_data_class_dp from "vector int" to
30020         "vector bool int" or from "vector long long int" to "vector bool
30021         long long int" and changed second argument type from "unsigned
30022         int" to "int".  Added new overloaded function forms "vector float
30023         __builtin_vec_insert_exp (vector float, vector unsigned int)" and
30024         "vector float __builtin_vec_insert_exp_sp (vector float, vector
30025         unsigned int)" and "vector double __builtin_vec_insert_exp (vector
30026         double, vector unsigned long long int)" and "vector double
30027         __builtin_vec_insert_exp_dp (vector double, vector unsigned long
30028         long int)".  Changed return type of
30029         __builtin_scalar_test_data_class and
30030         __builtin_scalar_test_data_class_sp and
30031         __builtin_scalar_test_data_class_dp from "unsigned int" to "bool
30032         int" and changed second argument from "unsigned int" to "int".
30033         Changed type returned by __builtin_scalar_test_neg,
30034         __builtin_scalar_test_neg_sp, and __builtin_scalar_test_neg_dp
30035         from "int" to "bool int".  Added new overloaded function form
30036         "double __builtin_scalar_insert_exp (double, unsigned long long int)".
30037         * config/rs6000/vsx.md (xsiexpdpf): New insn for scalar insert
30038         exponent double-precision with floating point first argument.
30039         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
30040         documentation of scalar_test_data_class, scalar_test_neg,
30041         scalar_extract_sig, scalar_extract_exp, scalar_insert_exp,
30042         vector_extract_exp, vec_extract_sig, vec_insert_exp, and
30043         vec_test_data_class built-in functions to reflect refinements in
30044         their type signatures.
30046 2017-01-23  Andreas Tobler  <andreast@gcc.gnu.org>
30048         * config/aarch64/aarch64.c (aarch64_elf_asm_constructor): Increase
30049         size of buf.
30050         (aarch64_elf_asm_destructor): Likewise.
30052 2017-01-23  Bernd Schmidt  <bschmidt@redhat.com>
30054         PR rtl-optimization/78634
30055         * config/i386/i386.c (ix86_max_noce_ifcvt_seq_cost): New function.
30056         (TARGET_MAX_NOCE_IFCVT_SEQ_COST): Define.
30057         * ifcvt.c (noce_try_cmove): Add missing cost check.
30059         PR rtl-optimization/71724
30060         * combine.c (if_then_else_cond): Look for situations where it is
30061         beneficial to undo the work of one of the recursive calls.
30063 2017-01-23  Bin Cheng  <bin.cheng@arm.com>
30065         PR tree-optimization/70754
30066         * tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
30067         (reassociate_to_the_same_stmt): New parameter INSERT_BEFORE.  Insert
30068         combined stmt before it if not NULL.
30069         (combine_chains): Process refs reversely and compute dominance point
30070         for root ref.
30072 2017-01-23  Martin Liska  <mliska@suse.cz>
30074         PR tree-optimization/79196
30075         * tree-ssa-strlen.c (fold_strstr_to_memcmp): Rename to ...
30076         (fold_strstr_to_strncmp): ... this.  Fold the pattern to strncmp
30077         instead of memcmp.
30078         (strlen_optimize_stmt): Call the renamed function.
30080 2017-01-23  Michael Matz  <matz@suse.de>
30082         PR tree-optimization/78384
30083         * tree-ssa-loop-split.c (patch_loop_exit): Use correct edge.
30085 2017-01-23  Richard Biener  <rguenther@suse.de>
30087         PR tree-optimization/79186
30088         * tree-vrp.c (register_new_assert_for): Make sure we've seen
30089         both incoming edges before moving an assert.
30091 2017-01-23  Martin Jambor  <mjambor@suse.cz>
30093         * ipa-prop.c (load_from_param_1): Removed.
30094         (load_from_unmodified_param): Bits from load_from_param_1 put back
30095         here.
30096         (load_from_param): Removed.
30097         (compute_complex_assign_jump_func): Removed stmt2 and just replaced it
30098         with stmt.  Reverted back to use of load_from_unmodified_param.
30100 2017-01-23  Martin Jambor  <mjambor@suse.cz>
30102         PR ipa/79108
30103         * ipa-prop.h (ipa_param_descriptor): Anotate with with GTY(()).
30104         (ipa_node_params): Annotate with GTY((for_user)).  Make descriptors
30105         field a pointer to garbage collected vector, mark lattices and
30106         ipcp_orig_node with GTY((skip)).
30107         (ipa_get_param_count): Adjust to descriptors being a pointer.
30108         (ipa_get_param): Likewise.
30109         (ipa_get_type): Likewise.
30110         (ipa_get_param_move_cost): Likewise.
30111         (ipa_set_param_used): Likewise.
30112         (ipa_get_controlled_uses): Likewise.
30113         (ipa_set_controlled_uses): Likewise.
30114         (ipa_is_param_used): Likewise.
30115         (ipa_node_params_t): Move into garbage collector.  New methods insert
30116         and remove.
30117         (ipa_node_params_sum): Annotate wth GTY(()).
30118         (ipa_check_create_node_params): Adjust to ipa_node_params_sum being
30119         garbage collected.
30120         (ipa_load_from_parm_agg): Adjust declaration.
30121         * ipa-icf.c (param_used_p): Adjust to descriptors being a pointer.
30122         * ipa-profile.c (ipa_profile): Likewise.
30123         * ipa-prop.c (ipa_get_param_decl_index_1): Likewise.
30124         (ipa_populate_param_decls): Make descriptors parameter garbage
30125         collected.
30126         (ipa_dump_param): Adjust to descriptors being a pointer.
30127         (ipa_alloc_node_params): Likewise.
30128         (ipa_initialize_node_params): Likewise.
30129         (load_from_param_1): Make descriptors parameter garbage collected.
30130         (load_from_unmodified_param): Likewise.
30131         (load_from_param): Likewise.
30132         (ipa_load_from_parm_agg): Likewise.
30133         (ipa_node_params::~ipa_node_params): Removed.
30134         (ipa_free_all_node_params): Remove call to delete operator.
30135         (ipa_node_params_t::insert): New.
30136         (ipa_node_params_t::remove): Likewise.
30137         (ipa_node_params_t::duplicate): Adjust to descriptors being a pointer,
30138         copy known_csts and known_contexts vectors.
30139         (ipa_read_node_info): Adjust to descriptors being a pointer.
30140         (ipcp_modif_dom_walker): Make m_descriptors field garbage
30141         collected.
30142         (ipcp_transform_function): Make descriptors variable garbage
30143         collected.
30145 2017-01-23  Andrew Senkevich  <andrew.senkevich@intel.com>
30147         * config/i386/avx512bwintrin.h: Add k-mask test, kortest intrinsics.
30148         * config/i386/avx512dqintrin.h: Ditto.
30149         * config/i386/avx512fintrin.h: Ditto.
30150         * config/i386/i386.c: Handle new builtins.
30151         * config/i386/i386-builtin.def: Add new builtins.
30152         * config/i386/sse.md (ktest<mode>, kortest<mode>): New.
30153         (UNSPEC_KORTEST, UNSPEC_KTEST): New.
30155 2017-01-23  Jakub Jelinek  <jakub@redhat.com>
30156             Martin Liska  <mliska@suse.cz>
30158         * asan.h: Define ASAN_USE_AFTER_SCOPE_ATTRIBUTE.
30159         * asan.c (asan_expand_poison_ifn): Support stores and use
30160         appropriate ASAN report function.
30161         * internal-fn.c (expand_ASAN_POISON_USE): New function.
30162         * internal-fn.def (ASAN_POISON_USE): Declare.
30163         * tree-into-ssa.c (maybe_add_asan_poison_write): New function.
30164         (maybe_register_def): Create ASAN_POISON_USE when sanitizing.
30165         * tree-ssa-dce.c (eliminate_unnecessary_stmts): Remove
30166         ASAN_POISON calls w/o LHS.
30167         * tree-ssa.c (execute_update_addresses_taken): Create clobber
30168         for ASAN_MARK (UNPOISON, &x, ...) in order to prevent usage of a LHS
30169         from ASAN_MARK (POISON, &x, ...) coming to a PHI node.
30170         * gimplify.c (asan_poison_variables): Add attribute
30171         use_after_scope_memory to variables that really needs to live
30172         in memory.
30173         * tree-ssa.c (is_asan_mark_p): Do not rewrite into SSA when
30174         having the attribute.
30176 2017-01-23  Martin Liska  <mliska@suse.cz>
30178         * asan.c (create_asan_shadow_var): New function.
30179         (asan_expand_poison_ifn): Likewise.
30180         * asan.h (asan_expand_poison_ifn): New declaration.
30181         * internal-fn.c (expand_ASAN_POISON): Likewise.
30182         * internal-fn.def (ASAN_POISON): New builtin.
30183         * sanopt.c (pass_sanopt::execute): Expand
30184         asan_expand_poison_ifn.
30185         * tree-inline.c (copy_decl_for_dup_finish): Make function
30186         external.
30187         * tree-inline.h (copy_decl_for_dup_finish): Likewise.
30188         * tree-ssa.c (is_asan_mark_p): New function.
30189         (execute_update_addresses_taken): Rewrite local variables
30190         (identified just by use-after-scope as addressable) into SSA.
30192 2017-01-22  Gerald Pfeifer  <gerald@pfeifer.com>
30194         * doc/install.texi (Specific): opensource.apple.com uses https
30195         now. Remove trailing slash.
30197 2017-01-22  Gerald Pfeifer  <gerald@pfeifer.com>
30199         * README.Portability: Remove note on an Irix compatibility issue.
30201 2017-01-22  Dimitry Andric <dim@FreeBSD.org>
30203         * gcov.c (INCLUDE_ALGORITHM): Define.
30204         (INCLUDE_VECTOR): Define.
30205         No longer include <vector> and <algorithm> directly.
30207 2017-01-21  Gerald Pfeifer  <gerald@pfeifer.com>
30209         * doc/extend.texi (Thread-Local): Change www.akkadia.org reference
30210         to https.
30211         * doc/invoke.texi (Code Gen Options): Ditto.
30213 2017-01-21  Jan Hubicka  <hubicka@ucw.cz>
30215         PR lto/78407
30216         * cfg.c (update_bb_profile_for_threading): Fix updating of probablity.
30218 2017-01-21  Bernd Schmidt  <bschmidt@redhat.com>
30220         rtl-optimization/79125
30221         * cprop.c (local_cprop_pass): Handle cases where we make an
30222         unconditional trap.
30224 2017-01-20  Segher Boessenkool  <segher@kernel.crashing.org>
30226         PR target/61729
30227         PR target/77850
30228         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
30229         read from, for big endian.
30231 2017-01-20  Jiong Wang  <jiong.wang@arm.com>
30233         * config/aarch64/aarch64-builtins.c (aarch64_init_builtins): Register
30234         register pauth builtins for LP64 only.
30236 2017-01-20  Marek Polacek  <polacek@redhat.com>
30238         PR c/79152
30239         * gimplify.c (should_warn_for_implicit_fallthrough): Handle consecutive
30240         non-case labels.
30242 2017-01-20  Alexander Monakov  <amonakov@ispras.ru>
30244         * omp-expand.c (expand_omp_simd): Clear PROP_gimple_lomp_dev regardless
30245         of safelen status.
30246         * omp-offload.c (pass_omp_device_lower::gate): Use PROP_gimple_lomp_dev.
30247         * passes.c (dump_properties): Handle PROP_gimple_lomp_dev.
30248         * tree-inline.c (expand_call_inline): Propagate PROP_gimple_lomp_dev.
30250 2017-01-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
30252         PR target/71270
30253         * config/arm/arm.c (neon_valid_immediate): Reject vector constants
30254         in big-endian mode when they are not a single duplicated value.
30256 2017-01-20  Richard Biener  <rguenther@suse.de>
30258         * BASE-VER: Bump to 7.0.1.
30260 2017-01-20  Alexander Monakov  <amonakov@ispras.ru>
30262         * omp-low.c (omplow_simd_context): New struct.  Use it...
30263         (lower_rec_simd_input_clauses): ...here and...
30264         (lower_rec_input_clauses): ...here to hold common data.  Adjust all
30265         references to idx, lane, max_vf, is_simt.
30267 2017-01-20  Graham Markall  <graham.markall@embecosm.com>
30269         * config/arc/arc.h (LINK_SPEC): Use arclinux_nps emulation when
30270         mcpu=nps400.
30272 2017-01-20  Martin Jambor  <mjambor@suse.cz>
30274         * hsa.h: Renaed to hsa-common.h.  Adjusted a comment.
30275         * hsa.c: Renaed to hsa-common.c.  Change include of gt-hsa.h to
30276         gt-hsa-common.h.
30277         * Makefile.in (OBJS): Rename hsa.o to hsa-common.o.
30278         (GTFILES): Rename hsa.c to hsa-common.c.
30279         * hsa-brig.c: Change include of hsa.h to hsa-common.h.
30280         * hsa-dump.c: Likewise.
30281         * hsa-gen.c: Likewise.
30282         * hsa-regalloc.c: Likewise.
30283         * ipa-hsa.c: Likewise.
30284         * omp-expand.c: Likewise.
30285         * omp-low.c: Likewise.
30286         * toplev.c: Likewise.
30288 2017-01-20  Marek Polacek  <polacek@redhat.com>
30290         PR c/64279
30291         * doc/invoke.texi: Document -Wduplicated-branches.
30292         * fold-const.c (operand_equal_p): Handle MODIFY_EXPR, INIT_EXPR,
30293         COMPOUND_EXPR, PREDECREMENT_EXPR, PREINCREMENT_EXPR,
30294         POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, CLEANUP_POINT_EXPR, EXPR_STMT,
30295         STATEMENT_LIST, and RETURN_EXPR.  For non-pure non-const functions
30296         return 0 only when not OEP_LEXICOGRAPHIC.
30297         (fold_build_cleanup_point_expr): Use the expression
30298         location when building CLEANUP_POINT_EXPR.
30299         * tree-core.h (enum operand_equal_flag): Add OEP_LEXICOGRAPHIC.
30300         * tree.c (add_expr): Handle error_mark_node.
30302 2017-01-20  Martin Liska  <mliska@suse.cz>
30304         PR lto/69188
30305         * tree-profile.c (init_ic_make_global_vars): Do not call
30306         finalize_decl.
30307         (gimple_init_gcov_profiler): Likewise.
30309 2017-01-20  Martin Liska  <mliska@suse.cz>
30311         PR ipa/71190
30312         * cgraph.h (maybe_create_reference): Remove argument and
30313         update comment.
30314         * cgraphclones.c (cgraph_node::create_virtual_clone): Remove one
30315         argument.
30316         * ipa-cp.c (create_specialized_node): Likewise.
30317         * symtab.c (symtab_node::maybe_create_reference): Handle
30318         VAR_DECLs and ADDR_EXPRs and select ipa_ref_use type.
30320 2017-01-20  Martin Liska  <mliska@suse.cz>
30322         * read-rtl-function.c (function_reader::create_function): Use
30323         build_decl instread of build_decl_stat.
30325 2017-01-20  Andrew Senkevich  <andrew.senkevich@intel.com>
30327         * config/i386/avx512bwintrin.h: Add k-mask registers shift intrinsics.
30328         * config/i386/avx512dqintrin.h: Ditto.
30329         * config/i386/avx512fintrin.h: Ditto.
30330         * config/i386/i386-builtin-types.def: Add new types.
30331         * config/i386/i386.c: Handle new types.
30332         * config/i386/i386-builtin.def (__builtin_ia32_kshiftliqi)
30333         (__builtin_ia32_kshiftlihi, __builtin_ia32_kshiftlisi)
30334         (__builtin_ia32_kshiftlidi, __builtin_ia32_kshiftriqi)
30335         (__builtin_ia32_kshiftrihi, __builtin_ia32_kshiftrisi)
30336         (__builtin_ia32_kshiftridi): New.
30337         * config/i386/sse.md (k<code><mode>): Rename *k<code><mode>.
30339 2017-01-19  Segher Boessenkool  <segher@kernel.crashing.org>
30341         PR target/78875
30342         PR target/79140
30343         * config/rs6000/rs6000.c (TARGET_STACK_PROTECT_GUARD): Unconditionally
30344         define to rs6000_init_stack_protect_guard.
30345         (rs6000_init_stack_protect_guard): New function.
30347 2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
30348             Yunqiang Su  <yunqiang.su@imgtec.com>
30350         * config.gcc (supported_defaults): Add madd4.
30351         (with_madd4): Add validation.
30352         (all_defaults): Add madd4.
30353         * config/mips/mips.opt (mmadd4): New option.
30354         * config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
30355         mmadd4.
30356         (TARGET_CPU_CPP_BUILTINS): Add builtin_define for
30357         __mips_no_madd4.
30358         (ISA_HAS_UNFUSED_MADD4): Gate with mips_madd4.
30359         (ISA_HAS_FUSED_MADD4): Likewise.
30360         * doc/invoke.texi (-mmadd4): Document the new option.
30361         * doc/install.texi (--with-madd4): Document the new option.
30363 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
30365         * config/aarch64/aarch64-builtins.c (enum aarch64_builtins): New
30366         entries for AARCH64_PAUTH_BUILTIN_XPACLRI,
30367         AARCH64_PAUTH_BUILTIN_PACIA1716, AARCH64_PAUTH_BUILTIN_AUTIA1716.
30368         (aarch64_init_pauth_hint_builtins): New.
30369         (aarch64_init_builtins): Call aarch64_init_pauth_hint_builtins.
30370         (aarch64_expand_builtin): Expand new builtins.
30372 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
30374         * reg-notes.def (CFA_TOGGLE_RA_MANGLE): New reg-note.
30375         * combine-stack-adj.c (no_unhandled_cfa): Handle
30376         REG_CFA_TOGGLE_RA_MANGLE.
30377         * dwarf2cfi.c (dwarf2out_frame_debug): Handle REG_CFA_TOGGLE_RA_MANGLE.
30378         * config/aarch64/aarch64.c (aarch64_expand_prologue): Generates DWARF
30379         info for return address signing.
30380         (aarch64_expand_epilogue): Likewise.
30382 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
30384         * config/aarch64/aarch64-opts.h (aarch64_function_type): New enum.
30385         * config/aarch64/aarch64-protos.h
30386         (aarch64_return_address_signing_enabled): New declaration.
30387         * config/aarch64/aarch64.c (aarch64_return_address_signing_enabled):
30388         New function.
30389         (aarch64_expand_prologue): Sign return address before it's pushed onto
30390         stack.
30391         (aarch64_expand_epilogue): Authenticate return address fetched from
30392         stack.
30393         (aarch64_override_options): Sanity check for ILP32 and ISA level.
30394         (aarch64_attributes): New function attributes for "sign-return-address".
30395         * config/aarch64/aarch64.md (UNSPEC_AUTI1716, UNSPEC_AUTISP,
30396         UNSPEC_PACI1716, UNSPEC_PACISP, UNSPEC_XPACLRI): New unspecs.
30397         ("*do_return"): Generate combined instructions according to key index.
30398         ("<pauth_mnem_prefix>sp", "<pauth_mnem_prefix1716", "xpaclri"): New.
30399         * config/aarch64/iterators.md (PAUTH_LR_SP, PAUTH_17_16): New integer
30400         iterators.
30401         (pauth_mnem_prefix, pauth_hint_num_a): New integer attributes.
30402         * config/aarch64/aarch64.opt (msign-return-address=): New.
30403         * doc/extend.texi (AArch64 Function Attributes): Documents
30404         "sign-return-address=".
30405         * doc/invoke.texi (AArch64 Options): Documents "-msign-return-address=".
30407 2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
30409         * doc/invoke.texi: Add missing -mlxc1-sxc1 options to
30410         overall option summary.
30412 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
30414         * config/aarch64/aarch64-arches.def: New entry for "armv8.3-a".
30415         * config/aarch64/aarch64.h (AARCH64_FL_V8_3, AARCH64_FL_FOR_ARCH8_3,
30416         AARCH64_ISA_V8_3, TARGET_ARMV8_3): New.
30417         * doc/invoke.texi (AArch64 Options): Document "armv8.3-a".
30419 2017-01-19  Michael Meissner  <meissner@linux.vnet.ibm.com>
30421         * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Enable
30422         -mpower9-minmax by default for -mcpu=power9.
30423         (ISA_3_MASKS_IEEE): Require -mvsx-small-integer to enable IEEE
30424         128-bit floating point.
30426 2017-01-20  Alan Modra  <amodra@gmail.com>
30428         * config/rs6000/rs6000.md (cmpstrnsi, cmpstrsi): Fail if
30429         optimizing for size.
30431 2017-01-20  Alan Modra  <amodra@gmail.com>
30433         PR target/79144
30434         * config/rs6000/rs6000.c (expand_strn_compare): Get the asm name
30435         for strcmp and strncmp from corresponding builtin decl.
30437 2017-01-19  Uros Bizjak  <ubizjak@gmail.com>
30439         * config.gcc (x86_64-*-rtems*): Use i386/rtemself.h
30440         instead of i386/rtems-64.h.
30441         * config/i386/rtems-64.h: Remove.
30443 2017-01-19  Uros Bizjak  <ubizjak@gmail.com>
30445         PR target/78478
30446         Revert:
30447         2013-11-05  Uros Bizjak  <ubizjak@gmail.com>
30449         * config/i386/rtemself.h (LONG_DOUBLE_TYPE_SIZE): New define.
30451 2017-01-19  Tamar Christina  <tamar.christina@arm.com>
30453         * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup):
30454         Change int to HOST_WIDE_INT.
30455         * config/aarch64/aarch64-protos.h
30456         (aarch64_simd_gen_const_vector_dup): Likewise.
30457         * config/aarch64/aarch64-simd.md: Add copysign<mode>3.
30459 2017-01-19  David Malcolm  <dmalcolm@redhat.com>
30461         * langhooks-def.h (lhd_type_for_size): New decl.
30462         (LANG_HOOKS_TYPE_FOR_SIZE): Define as lhd_type_for_size.
30463         * langhooks.c (lhd_type_for_size): New function, taken from
30464         lto_type_for_size.
30466 2017-01-19  Pat Haugen  <pthaugen@us.ibm.com>
30468         * config/rs6000/power9.md (power9-alu): Remove 'cmp' type and add
30469         define_bypass for CR latency.
30470         (power9-cracked-alu): Update bypass latency and remove power9-branch.
30471         (power9-alu2): Add define_bypass for CR latency.
30472         (power9-cmp): New.
30473         (power9-mul): Update insn latency.
30474         (power9-mul-compare): Update insn latency, bypass latency and remove
30475         power9-branch.
30477 2016-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
30479         * config/aarch64/aarch64-protos.h (aarch64_nopcrelative_literal_loads):
30480         Delete.
30481         * config/aarch64/aarch64.md
30482         (aarch64_reload_movcp<GPF_TF:mode><P:mode>): Delete reference to
30483         aarch64_nopcrelative_literal_loads.
30484         (aarch64_reload_movcp<VALL:mode><P:mode>): Likewise.
30486 2017-01-19  Chenghua Xu  <paul.hua.gm@gmail.com>
30488         * config/mips/mips.h (ISA_HAS_FUSED_MADD4): Enable for
30489         TARGET_LOONGSON_3A.
30490         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_LOONGSON_3A.
30492 2017-01-19  Doug Gilmore  <doug.gilmore@imgtec.com>
30494         PR target/78176
30495         * config.gcc (supported_defaults): Add lxc1-sxc1.
30496         (with_lxc1_sxc1): Add validation.
30497         (all_defaults): Add lxc1-sxc1.
30498         * config/mips/mips.opt (mlxc1-sxc1): New option.
30499         * config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
30500         mlxc1-sxc1.
30501         (TARGET_CPU_CPP_BUILTINS): Add builtin_define for
30502         __mips_no_lxc1_sxc1.
30503         (ISA_HAS_LXC1_SXC1): Gate with mips_lxc1_sxc1.
30504         * doc/invoke.texi (-mlxc1-sxc1): Document the new option.
30505         * doc/install.texi (--with-lxc1-sxc1): Document the new option.
30507 2017-01-19  Richard Biener  <rguenther@suse.de>
30509         PR tree-optimization/72488
30510         * tree-ssa-sccvn.c (run_scc_vn): When we abort the VN make
30511         sure to restore SSA info.
30512         * tree-ssa.c (verify_ssa): Verify SSA info is not shared.
30514 2017-01-19  Richard Earnshaw  <rearnsha@arm.com>
30516         PR rtl-optimization/79121
30517         * expr.c (expand_expr_real_2, case LSHIFT_EXPR): Look at the signedness
30518         of the inner type when shifting an extended value.
30520 2017-01-17  Jan Hubicka  <hubicka@ucw.cz>
30522         PR lto/78407
30523         * symtab.c (symtab_node::equal_address_to): Fix comparing of
30524         interposable aliases.
30526 2017-01-18  Peter Bergner  <bergner@vnet.ibm.com>
30528         PR target/78516
30529         * config/rs6000/spe.md (mov_si<mode>_e500_subreg0): Fix constraints.
30530         Use the evmergelohi instruction.
30531         (mov_si<mode>_e500_subreg4_2_le): Likewise.
30532         (mov_sitf_e500_subreg8_2_be): Likewise.
30533         (mov_sitf_e500_subreg12_2_le): Likewise.
30534         (mov_si<mode>_e500_subreg0_2_le): Fix constraints.
30535         (mov_si<mode>_e500_subreg4_2_be): Likewise.
30536         (mov_sitf_e500_subreg8_2_le): Likewise.
30537         (mov_sitf_e500_subreg12_2_be): Likewise.
30539 2017-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30541         * config/rs6000/altivec.md (altivec_vbpermq): Change "type"
30542         attribute from vecsimple to vecperm.
30543         (altivec_vbpermq2): Likewise.
30545 2017-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30547         PR target/79040
30548         * config/rs6000/altivec.h: Fix typo of vec_cntlz to vec_cnttz.
30550 2017-01-18  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
30551         * config/rs6000/rs6000-protos.h (expand_strn_compare): Add arg.
30552         * config/rs6000/rs6000.c (expand_strn_compare): Add ability to expand
30553         strcmp. Fix bug where comparison didn't stop with zero byte. Fix
30554         case where N arg is SIZE_MAX.
30555         * config/rs6000/rs6000.md (cmpstrnsi): Args to expand_strn_compare.
30556         (cmpstrsi): Add pattern.
30558 2017-01-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
30560         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
30561         __builtin_vec_revb builtins.
30562         * config/rs6000/rs6000-builtins.def (P9V_BUILTIN_XXBRQ_V16QI): Add
30563         built-in functions to support generation of the ISA 3.0 XXBR<x>
30564         vector byte reverse instructions.
30565         (P9V_BUILTIN_XXBRQ_V1TI): Likewise.
30566         (P9V_BUILTIN_XXBRD_V2DI): Likewise.
30567         (P9V_BUILTIN_XXBRD_V2DF): Likewise.
30568         (P9V_BUILTIN_XXBGW_V4SI): Likewise.
30569         (P9V_BUILTIN_XXBGW_V4SF): Likewise.
30570         (P9V_BUILTIN_XXBGH_V8HI): Likewise.
30571         (P9V_BUILTIN_VEC_REVB): Likewise.
30572         * config/rs6000/vsx.md (p9_xxbrq_v1ti): New insns/expanders to
30573         generate the ISA 3.0 XXBR<x> vector byte reverse instructions.
30574         (p9_xxbrq_v16qi): Likewise.
30575         (p9_xxbrd_<mode>, VSX_D iterator): Likewise.
30576         (p9_xxbrw_<mode>, VSX_W iterator): Likewise.
30577         (p9_xxbrh_v8hi): Likewise.
30578         * config/rs6000/altivec.h (vec_revb): Define if ISA 3.0.
30579         * doc/extend.texi (RS/6000 Altivec Built-ins): Document the
30580         vec_revb built-in functions.
30582 2017-01-18  Uros Bizjak  <ubizjak@gmail.com>
30584         PR rtl-optimization/78952
30585         * config/i386/i386.md (any_extract): New code iterator.
30586         (*insvqi_2): Use any_extract for source operand.
30587         (*insvqi_3): Use any_shiftrt for source operand.
30589 2017-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
30591         * config/aarch64/aarch64.c (aarch64_sched_adjust_priority)
30592         New function.
30593         (TARGET_SCHED_ADJUST_PRIORITY): Define target hook.
30595 2017-01-18  Matthias Klose  <doko@ubuntu.com>
30597         * doc/install.texi: Allow default for --with-target-bdw-gc-include.
30599 2016-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30601         * config/rs6000/altivec.h (vec_bperm): Change #define.
30602         * config/rs6000/altivec.md (UNSPEC_VBPERMD): New enum constant.
30603         (altivec_vbpermq2): New define_insn.
30604         (altivec_vbpermd): Likewise.
30605         * config/rs6000/rs6000-builtin.def (VBPERMQ2): New monomorphic
30606         function interface.
30607         (VBPERMD): Likewise.
30608         (VBPERM): New polymorphic function interface.
30609         * config/rs6000/r6000-c.c (altivec_overloaded_builtins_table):
30610         Add entries for P9V_BUILTIN_VEC_VBPERM.
30611         * doc/extend.texi: Add interfaces for vec_bperm.
30613 2017-01-18  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
30615         * config/s390/s390-c.c (s390_expand_overloaded_builtin): Downcase
30616         first letter of error messages.
30617         (s390_resolve_overloaded_builtin): Likewise.
30618         * config/s390/s390.c (s390_expand_builtin): Likewise.
30619         (s390_invalid_arg_for_unprototyped_fn): Likewise.
30620         (s390_valid_target_attribute_inner_p): Likewise.
30621         * config/s390/s390.md ("tabort"): Likewise.
30623 2017-01-18  Toma Tabacu  <toma.tabacu@imgtec.com>
30625         * config/mips/mips.h (ISA_HAS_DIV3): Remove unused macro.
30626         (ISA_AVOID_DIV_HILO): New macro.
30627         (ISA_HAS_DIV): Use new ISA_AVOID_DIV_HILO macro.
30628         (ISA_HAS_DDIV): Likewise.
30630 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
30632         * doc/invoke.texi (fabi-version): Correct number of occurrences.
30634 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
30636         * doc/invoke.texi (fabi-version): Spelling fix.
30638 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
30640         PR c++/70182
30641         * doc/invoke.texi (fabi-version): Mention mangling fix for
30642         operator names.
30644 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
30646         PR c++/77489
30647         * doc/invoke.texi (fabi-version): Document discriminator mangling.
30649 2017-01-17  Segher Boessenkool  <segher@kernel.crashing.org>
30651         PR target/78875
30652         * config/rs6000/rs6000-opts.h (stack_protector_guard): New enum.
30653         * config/rs6000/rs6000.c (rs6000_option_override_internal): Handle
30654         the new options.
30655         * config/rs6000/rs6000.md (stack_protect_set): Handle the new more
30656         flexible settings.
30657         (stack_protect_test): Ditto.
30658         * config/rs6000/rs6000.opt (mstack-protector-guard=,
30659         mstack-protector-guard-reg=, mstack-protector-guard-offset=): New
30660         options.
30661         * doc/invoke.texi (Option Summary) [RS/6000 and PowerPC Options]:
30662         Add -mstack-protector-guard=, -mstack-protector-guard-reg=, and
30663         -mstack-protector-guard-offset=.
30664         (RS/6000 and PowerPC Options): Ditto.
30666 2017-01-17  Uros Bizjak  <ubizjak@gmail.com>
30668         * config/i386/i386.h (MASK_CLASS_P): New define.
30669         * config/i386/i386.c (inline_secondary_memory_needed): Ensure that
30670         there are no registers from different register sets also when
30671         mask registers are used.  Update function comment.
30672         * config/i386/i386.md (*movsi_internal): Split (*k/*krm) alternative
30673         to (*k/*r) and (*k/*km) alternatives.
30675 2017-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
30677         * config/aarch64/aarch64.md (eh_return): Remove pattern and splitter.
30678         * config/aarch64/aarch64.h (AARCH64_EH_STACKADJ_REGNUM): Remove.
30679         (EH_RETURN_HANDLER_RTX): New define.
30680         * config/aarch64/aarch64.c (aarch64_frame_pointer_required):
30681         Force frame pointer in EH return functions.
30682         (aarch64_expand_epilogue): Add barrier for eh_return.
30683         (aarch64_final_eh_return_addr): Remove.
30684         (aarch64_eh_return_handler_rtx): New function.
30685         * config/aarch64/aarch64-protos.h (aarch64_final_eh_return_addr):
30686         Remove.
30687         (aarch64_eh_return_handler_rtx): New prototype.
30689 2017-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30691         * config/rs6000/altivec.h (vec_rlmi): New #define.
30692         (vec_vrlnm): Likewise.
30693         (vec_rlnm): Likewise.
30694         * config/rs6000/altivec.md (UNSPEC_VRLMI): New UNSPEC enum value.
30695         (UNSPEC_VRLNM): Likewise.
30696         (VIlong): New mode iterator.
30697         (altivec_vrl<VI_char>mi): New define_insn.
30698         (altivec_vrl<VI_char>nm): Likewise.
30699         * config/rs6000/rs6000-builtin.def (VRLWNM): New monomorphic
30700         function entry.
30701         (VRLDNM): Likewise.
30702         (RLNM): New polymorphic function entry.
30703         (VRLWMI): New monomorphic function entry.
30704         (VRLDMI): Likewise.
30705         (RLMI): New polymorphic function entry.
30706         * config/rs6000/r6000-c.c (altivec_overloaded_builtin_table): Add
30707         new entries for P9V_BUILTIN_VEC_RLMI and P9V_BUILTIN_VEC_RLNM.
30708         * doc/extend.texi: Add description of vec_rlmi, vec_rlnm, and
30709         vec_vrlnm.
30711 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
30713         PR debug/78839
30714         * dwarf2out.c (field_byte_offset): Restore the
30715         PCC_BITFIELD_TYPE_MATTERS behavior for INTEGER_CST DECL_FIELD_OFFSET
30716         and DECL_FIELD_BIT_OFFSET.  Use fold_build2 instead of build2 + fold.
30717         (analyze_variants_discr, gen_variant_part): Use fold_build2 instead
30718         of build2 + fold.
30720 2017-01-17  Eric Botcazou  <ebotcazou@adacore.com>
30722         PR ada/67205
30723         * config/aarch64/aarch64.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define
30725 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
30727         PR debug/71669
30728         * dwarf2out.c (add_data_member_location_attribute): For constant
30729         offset bitfield emit for -gdwarf-5 DW_AT_data_bit_offset attribute
30730         instead of DW_AT_data_member_location, DW_AT_bit_offset and
30731         DW_AT_byte_size attributes.
30733 2017-01-17  Eric Botcazou  <ebotcazou@adacore.com>
30735         * config/rs6000/rs6000.c (rs6000_emit_move): Also use a TOC reference
30736         after forcing to constant memory when the code model is medium.
30738 2017-01-17  Julia Koval  <julia.koval@intel.com>
30740         PR target/76731
30741         * config/i386/avx512fintrin.h
30742         (_mm512_i32gather_ps): Change __addr type to void const*.
30743         (_mm512_mask_i32gather_ps): Ditto.
30744         (_mm512_i32gather_pd): Ditto.
30745         (_mm512_mask_i32gather_pd): Ditto.
30746         (_mm512_i64gather_ps): Ditto.
30747         (_mm512_mask_i64gather_ps): Ditto.
30748         (_mm512_i64gather_pd): Ditto.
30749         (_mm512_mask_i64gather_pd): Ditto.
30750         (_mm512_i32gather_epi32): Ditto.
30751         (_mm512_mask_i32gather_epi32): Ditto.
30752         (_mm512_i32gather_epi64): Ditto.
30753         (_mm512_mask_i32gather_epi64): Ditto.
30754         (_mm512_i64gather_epi32): Ditto.
30755         (_mm512_mask_i64gather_epi32): Ditto.
30756         (_mm512_i64gather_epi64): Ditto.
30757         (_mm512_mask_i64gather_epi64): Ditto.
30758         (_mm512_i32scatter_ps): Change __addr type to void*.
30759         (_mm512_mask_i32scatter_ps): Ditto.
30760         (_mm512_i32scatter_pd): Ditto.
30761         (_mm512_mask_i32scatter_pd): Ditto.
30762         (_mm512_i64scatter_ps): Ditto.
30763         (_mm512_mask_i64scatter_ps): Ditto.
30764         (_mm512_i64scatter_pd): Ditto.
30765         (_mm512_mask_i64scatter_pd): Ditto.
30766         (_mm512_i32scatter_epi32): Ditto.
30767         (_mm512_mask_i32scatter_epi32): Ditto.
30768         (_mm512_i32scatter_epi64): Ditto.
30769         (_mm512_mask_i32scatter_epi64): Ditto.
30770         (_mm512_i64scatter_epi32): Ditto.
30771         (_mm512_mask_i64scatter_epi32): Ditto.
30772         (_mm512_i64scatter_epi64): Ditto.
30773         (_mm512_mask_i64scatter_epi64): Ditto.
30774         * config/i386/avx512pfintrin.h
30775         (_mm512_mask_prefetch_i32gather_pd): Change __addr type to void const*.
30776         (_mm512_mask_prefetch_i32gather_ps): Ditto.
30777         (_mm512_mask_prefetch_i64gather_pd): Ditto.
30778         (_mm512_mask_prefetch_i64gather_ps): Ditto.
30779         (_mm512_prefetch_i32scatter_pd): Change __addr type to void*.
30780         (_mm512_prefetch_i32scatter_ps): Ditto.
30781         (_mm512_mask_prefetch_i32scatter_pd): Ditto.
30782         (_mm512_mask_prefetch_i32scatter_ps): Ditto.
30783         (_mm512_prefetch_i64scatter_pd): Ditto.
30784         (_mm512_prefetch_i64scatter_ps): Ditto.
30785         (_mm512_mask_prefetch_i64scatter_pd): Ditto.
30786         (_mm512_mask_prefetch_i64scatter_ps): Ditto.
30787         * config/i386/avx512vlintrin.h
30788         (_mm256_mmask_i32gather_ps): Change __addr type to void const*.
30789         (_mm_mmask_i32gather_ps): Ditto.
30790         (_mm256_mmask_i32gather_pd): Ditto.
30791         (_mm_mmask_i32gather_pd): Ditto.
30792         (_mm256_mmask_i64gather_ps): Ditto.
30793         (_mm_mmask_i64gather_ps): Ditto.
30794         (_mm256_mmask_i64gather_pd): Ditto.
30795         (_mm_mmask_i64gather_pd): Ditto.
30796         (_mm256_mmask_i32gather_epi32): Ditto.
30797         (_mm_mmask_i32gather_epi32): Ditto.
30798         (_mm256_mmask_i32gather_epi64): Ditto.
30799         (_mm_mmask_i32gather_epi64): Ditto.
30800         (_mm256_mmask_i64gather_epi32): Ditto.
30801         (_mm_mmask_i64gather_epi32): Ditto.
30802         (_mm256_mmask_i64gather_epi64): Ditto.
30803         (_mm_mmask_i64gather_epi64): Ditto.
30804         (_mm256_i32scatter_ps): Change __addr type to void*.
30805         (_mm256_mask_i32scatter_ps): Ditto.
30806         (_mm_i32scatter_ps): Ditto.
30807         (_mm_mask_i32scatter_ps): Ditto.
30808         (_mm256_i32scatter_pd): Ditto.
30809         (_mm256_mask_i32scatter_pd): Ditto.
30810         (_mm_i32scatter_pd): Ditto.
30811         (_mm_mask_i32scatter_pd): Ditto.
30812         (_mm256_i64scatter_ps): Ditto.
30813         (_mm256_mask_i64scatter_ps): Ditto.
30814         (_mm_i64scatter_ps): Ditto.
30815         (_mm_mask_i64scatter_ps): Ditto.
30816         (_mm256_i64scatter_pd): Ditto.
30817         (_mm256_mask_i64scatter_pd): Ditto.
30818         (_mm_i64scatter_pd): Ditto.
30819         (_mm_mask_i64scatter_pd): Ditto.
30820         (_mm256_i32scatter_epi32): Ditto.
30821         (_mm256_mask_i32scatter_epi32): Ditto.
30822         (_mm_i32scatter_epi32): Ditto.
30823         (_mm_mask_i32scatter_epi32): Ditto.
30824         (_mm256_i32scatter_epi64): Ditto.
30825         (_mm256_mask_i32scatter_epi64): Ditto.
30826         (_mm_i32scatter_epi64): Ditto.
30827         (_mm_mask_i32scatter_epi64): Ditto.
30828         (_mm256_i64scatter_epi32): Ditto.
30829         (_mm256_mask_i64scatter_epi32): Ditto.
30830         (_mm_i64scatter_epi32): Ditto.
30831         (_mm_mask_i64scatter_epi32): Ditto.
30832         (_mm256_i64scatter_epi64): Ditto.
30833         (_mm256_mask_i64scatter_epi64): Ditto.
30834         (_mm_i64scatter_epi64): Ditto.
30835         (_mm_mask_i64scatter_epi64): Ditto.
30836         * config/i386/i386-builtin-types.def (V16SF_V16SF_PCFLOAT_V16SI_HI_INT)
30837         (V8DF_V8DF_PCDOUBLE_V8SI_QI_INT, V8SF_V8SF_PCFLOAT_V8DI_QI_INT)
30838         (V8DF_V8DF_PCDOUBLE_V8DI_QI_INT, V16SI_V16SI_PCINT_V16SI_HI_INT)
30839         (V8DI_V8DI_PCINT64_V8SI_QI_INT, V8SI_V8SI_PCINT_V8DI_QI_INT)
30840         (V8DI_V8DI_PCINT64_V8DI_QI_INT, V2DF_V2DF_PCDOUBLE_V4SI_QI_INT)
30841         (V4DF_V4DF_PCDOUBLE_V4SI_QI_INT, V2DF_V2DF_PCDOUBLE_V2DI_QI_INT)
30842         (V4DF_V4DF_PCDOUBLE_V4DI_QI_INT, V4SF_V4SF_PCFLOAT_V4SI_QI_INT)
30843         (V8SF_V8SF_PCFLOAT_V8SI_QI_INT, V4SF_V4SF_PCFLOAT_V2DI_QI_INT)
30844         (V4SF_V4SF_PCFLOAT_V4DI_QI_INT, V2DI_V2DI_PCINT64_V4SI_QI_INT)
30845         (V4DI_V4DI_PCINT64_V4SI_QI_INT, V2DI_V2DI_PCINT64_V2DI_QI_INT)
30846         (V4DI_V4DI_PCINT64_V4DI_QI_INT, V4SI_V4SI_PCINT_V4SI_QI_INT)
30847         (V8SI_V8SI_PCINT_V8SI_QI_INT, V4SI_V4SI_PCINT_V2DI_QI_INT)
30848         (V4SI_V4SI_PCINT_V4DI_QI_INT, VOID_PFLOAT_HI_V16SI_V16SF_INT)
30849         (VOID_PFLOAT_QI_V8SI_V8SF_INT, VOID_PFLOAT_QI_V4SI_V4SF_INT)
30850         (VOID_PDOUBLE_QI_V8SI_V8DF_INT, VOID_PDOUBLE_QI_V4SI_V4DF_INT)
30851         (VOID_PDOUBLE_QI_V4SI_V2DF_INT, VOID_PFLOAT_QI_V8DI_V8SF_INT)
30852         (VOID_PFLOAT_QI_V4DI_V4SF_INT, VOID_PFLOAT_QI_V2DI_V4SF_INT)
30853         (VOID_PDOUBLE_QI_V8DI_V8DF_INT, VOID_PDOUBLE_QI_V4DI_V4DF_INT)
30854         (VOID_PDOUBLE_QI_V2DI_V2DF_INT, VOID_PINT_HI_V16SI_V16SI_INT)
30855         (VOID_PINT_QI_V8SI_V8SI_INT, VOID_PINT_QI_V4SI_V4SI_INT)
30856         (VOID_PLONGLONG_QI_V8SI_V8DI_INT, VOID_PLONGLONG_QI_V4SI_V4DI_INT)
30857         (VOID_PLONGLONG_QI_V4SI_V2DI_INT, VOID_PINT_QI_V8DI_V8SI_INT)
30858         (VOID_PINT_QI_V4DI_V4SI_INT, VOID_PINT_QI_V2DI_V4SI_INT)
30859         (VOID_PLONGLONG_QI_V8DI_V8DI_INT, VOID_QI_V8SI_PCINT64_INT_INT)
30860         (VOID_PLONGLONG_QI_V4DI_V4DI_INT, VOID_PLONGLONG_QI_V2DI_V2DI_INT)
30861         (VOID_HI_V16SI_PCINT_INT_INT, VOID_QI_V8DI_PCINT64_INT_INT)
30862         (VOID_QI_V8DI_PCINT_INT_INT): Remove.
30863         (V16SF_V16SF_PCVOID_V16SI_HI_INT,  V8DF_V8DF_PCVOID_V8SI_QI_INT)
30864         (V8SF_V8SF_PCVOID_V8DI_QI_INT, V8DF_V8DF_PCVOID_V8DI_QI_INT)
30865         (V16SI_V16SI_PCVOID_V16SI_HI_INT, V8DI_V8DI_PCVOID_V8SI_QI_INT)
30866         (V8SI_V8SI_PCVOID_V8DI_QI_INT, V8DI_V8DI_PCVOID_V8DI_QI_INT)
30867         (VOID_PVOID_HI_V16SI_V16SF_INT, VOID_PVOID_QI_V8SI_V8DF_INT)
30868         (VOID_PVOID_QI_V8DI_V8SF_INT, VOID_PVOID_QI_V8DI_V8DF_INT)
30869         (VOID_PVOID_HI_V16SI_V16SI_INT, VOID_PVOID_QI_V8SI_V8DI_INT)
30870         (VOID_PVOID_QI_V8DI_V8SI_INT, VOID_PVOID_QI_V8DI_V8DI_INT)
30871         (V2DF_V2DF_PCVOID_V4SI_QI_INT, V4DF_V4DF_PCVOID_V4SI_QI_INT)
30872         (V2DF_V2DF_PCVOID_V2DI_QI_INT, V4DF_V4DF_PCVOID_V4DI_QI_INT
30873         (V4SF_V4SF_PCVOID_V4SI_QI_INT, V8SF_V8SF_PCVOID_V8SI_QI_INT)
30874         (V4SF_V4SF_PCVOID_V2DI_QI_INT, V4SF_V4SF_PCVOID_V4DI_QI_INT)
30875         (V2DI_V2DI_PCVOID_V4SI_QI_INT, V4DI_V4DI_PCVOID_V4SI_QI_INT)
30876         (V2DI_V2DI_PCVOID_V2DI_QI_INT, V4DI_V4DI_PCVOID_V4DI_QI_INT)
30877         (V4SI_V4SI_PCVOID_V4SI_QI_INT, V8SI_V8SI_PCVOID_V8SI_QI_INT)
30878         (V4SI_V4SI_PCVOID_V2DI_QI_INT, V4SI_V4SI_PCVOID_V4DI_QI_INT)
30879         (VOID_PVOID_QI_V8SI_V8SF_INT, VOID_PVOID_QI_V4SI_V4SF_INT)
30880         (VOID_PVOID_QI_V4SI_V4DF_INT, VOID_PVOID_QI_V4SI_V2DF_INT)
30881         (VOID_PVOID_QI_V4DI_V4SF_INT, VOID_PVOID_QI_V2DI_V4SF_INT)
30882         (VOID_PVOID_QI_V4DI_V4DF_INT, VOID_PVOID_QI_V2DI_V2DF_INT)
30883         (VOID_PVOID_QI_V8SI_V8SI_INT, VOID_PVOID_QI_V4SI_V4SI_INT)
30884         (VOID_PVOID_QI_V4SI_V4DI_INT, VOID_PVOID_QI_V4SI_V2DI_INT)
30885         (VOID_PVOID_QI_V4DI_V4SI_INT, VOID_PVOID_QI_V2DI_V4SI_INT)
30886         (VOID_PVOID_QI_V4DI_V4DI_INT, VOID_PVOID_QI_V2DI_V2DI_INT)
30887         (VOID_QI_V8SI_PCVOID_INT_INT, VOID_HI_V16SI_PCVOID_INT_INT)
30888         (VOID_QI_V8DI_PCVOID_INT_INT): Add.
30889         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Adjust builtin
30890         definitions accordingly.
30892 2017-01-17  Kito Cheng  <kito.cheng@gmail.com>
30893             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
30895         PR target/79079
30896         * internal-fn.c (expand_mul_overflow): Use convert_modes instead of
30897         gen_lowpart.
30899 2017-01-17  Vladimir Makarov  <vmakarov@redhat.com>
30901         PR target/79058
30902         * ira-conflicts.c (ira_build_conflicts): Update total conflict
30903         hard regs for inner regno.
30905 2017-01-17  Martin Liska  <mliska@suse.cz>
30907         PR ipa/71207
30908         * ipa-polymorphic-call.c (contains_type_p): Fix wrong
30909         assumption and add comment.
30911 2017-01-17  Nathan Sidwell  <nathan@acm.org>
30913         * ipa-visibility.c (localize_node): New function, broken out of ...
30914         (function_and_variable_visibility): ... here. Call it.
30916 2017-01-17  Jan Hubicka  <hubicka@ucw.cz>
30918         PR middle-end/77445
30919         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges):
30920         correctly set frequency of oudgoing edge.
30921         (duplicate_thread_path): Fix profile updating.
30923 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
30925         PR other/79046
30926         * configure.ac: Add GCC_BASE_VER.
30927         * Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
30928         version from BASE-VER file.
30929         (CFLAGS-gcc.o): Add -DBASEVER=$(BASEVER_s).
30930         (gcc.o): Depend on $(BASEVER).
30931         * common.opt (dumpfullversion): New option.
30932         * gcc.c (driver_handle_option): Handle OPT_dumpfullversion.
30933         * doc/invoke.texi: Document -dumpfullversion.
30934         * doc/install.texi: Document --with-gcc-major-version-only.
30935         * configure: Regenerated.
30937 2017-01-17  Richard Biener  <rguenther@suse.de>
30939         PR tree-optimization/71433
30940         * tree-vrp.c (register_new_assert_for): Merge same asserts
30941         on all incoming edges.
30942         (process_assert_insertions_for): Handle insertions at the
30943         beginning of BBs.
30945 2017-01-17  Gerald Pfeifer  <gerald@pfeifer.com>
30947         * config/i386/cygwin.h (LIBGCJ_SONAME): Remove.
30948         * config/i386/mingw32.h (LIBGCJ_SONAME): Remove.
30950 2017-01-17  Kaz Kojima  <kkojima@gcc.gnu.org>
30952         PR target/78633
30953         * config/sh/sh.md (cmpeqsi_t+1): Call copy_rtx to avoid invalid
30954         RTL sharing.
30956 2017-01-17  Alan Modra  <amodra@gmail.com>
30958         PR target/79066
30959         * config/rs6000/rs6000.md (elf_high, elf_low): Disable when pic.
30960         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Don't allow
30961         symbolic stack limit when pic.
30963 2017-01-16  Martin Sebor  <msebor@redhat.com>
30965         PR tree-optimization/78608
30966         * gimple-ssa-sprintf.c (tree_digits): Avoid negating TYPE_MIN.
30968 2017-01-16  Jeff Law  <law@redhat.com>
30970         Revert:
30971         2016-12-02  Tadek Kijkowski  <tkijkowski@gmail.com>
30972         * Makefile.in (PREPROCESSOR_DEFINES): Add a level of indirection
30973         for several include directories that may be relative to sysroot.
30974         * config/i386/x-mingw32 (gplus_includedir): Define.
30975         (gplus_tool_includedir, gplus_backward_include_dir): Likewise.
30976         (native_system_includedir): Likewise.
30977         * config/i386/mingw32.h (STANDARD_STARTFILE_PREFIX_1): Do not
30978         override if TARGET_SYSTEM_ROOT is defined.
30979         (NATIVE_SYSTEM_HEADER_DIR): Likewise.
30981         PR tree-optimization/79090
30982         PR tree-optimization/33562
30983         PR tree-optimization/61912
30984         PR tree-optimization/77485
30985         * tree-ssa-dse.c (compute_trims): Accept STMT argument.  Dump STMT
30986         and computed trims into the dump file.
30988 2017-01-17  Uros Bizjak  <ubizjak@gmail.com>
30990         * config/i386/i386.h (LIMIT_RELOAD_CLASS): Remove.
30992 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
30994         PR c/79089
30995         * gimplify.c (gimplify_init_constructor): If want_value and
30996         object == lhs, unshare lhs to avoid invalid tree sharing.  Formatting
30997         fix.
30999         PR target/79080
31000         * loop-doloop.c (doloop_modify): Call unshare_all_rtl_in_chain on
31001         sequence.  Formatting fixes.
31002         (doloop_optimize): Formatting fixes.
31004         PR driver/49726
31005         * gcc.c (debug_level_greater_than_spec_func): New function.
31006         (static_spec_functions): Add debug-level-gt spec function.
31007         (ASM_DEBUG_SPEC, cpp_options): Use %:debug-level-gt(0) instead of
31008         !g0.
31009         * config/darwin.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
31010         * config/darwin9.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
31011         * common.opt (g, gcoff, gdwarf, gdwarf-, ggdb, gno-pubnames,
31012         gpubnames, ggnu-pubnames, gno-record-gcc-switches,
31013         grecord-gcc-switches, gno-strict-dwarf, gstrict-dwarf, gstabs,
31014         gstabs+, gtoggle, gvms, gxcoff, gxcoff+): Add Driver flag.
31016 2017-01-16  Uros Bizjak  <ubizjak@gmail.com>
31018         * config/i386/i386.h (HARD_REGNO_CALLER_SAVE_MODE): Apply HImode and
31019         QImode fixups to general and mask registers only.
31021 2017-01-16  Carl Love  <cel@us.ibm.com>
31023         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Add support
31024         for built-in functions
31025         vector signed char vec_nabs (vector signed char)
31026         vector signed short vec_nabs (vector signed short)
31027         vector signed int vec_nabs (vector signed int)
31028         vector signed long long vec_nabs (vector signed long long)
31029         vector float vec_nabs (vector float)
31030         vector double vec_nabs (vector double)
31031         * config/rs6000/rs6000-builtin.def: Add definitions for NABS functions
31032         and NABS overload.
31033         * config/rs6000/altivec.md: New define_expand nabs<mode>2 types
31034         * config/rs6000/altivec.h: New define for vec_nabs built-in function.
31035         * doc/extend.texi: Update the documentation file for the new built-in
31036         functions.
31038 2017-01-16  Martin Sebor  <msebor@redhat.com>
31040         * gimple-ssa-sprintf.c (format_directive): Correct a typo in a warning
31041         message.
31043 2017-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31045         * config/rs6000/rs6000.c (rtx_is_swappable_p): Change
31046         UNSPEC_VSX__XXSPLTD to require special splat handling.
31048 2017-01-16  David Malcolm  <dmalcolm@redhat.com>
31050         PR bootstrap/78616
31051         * system.h: Poison strndup.
31053 2017-01-16  Alan Modra  <amodra@gmail.com>
31055         PR target/79098
31056         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Don't
31057         use a switch.
31059 2017-01-16  Georg-Johann Lay  <avr@gjlay.de>
31061         * config/avr/avr.h (BRANCH_COST) [reload_completed]: Increase by 4.
31063 2017-01-15  Uros Bizjak  <ubizjak@gmail.com>
31065         * config/i386/i386.c (ix86_legitimate_combined_insn): Do not
31066         call recog here.  Assert that INSN_CODE (insn) is non-negative.
31068 2017-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
31070         PR target/72749
31071         * cfgrtl.c (rtl_split_edge): Also patch jump insns that jump to the
31072         fallthrough.
31073         * haifa-sched.c (dump_insn_stream): Don't crash if there is a label
31074         in the currently scheduled RTL fragment.
31076 2017-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
31078         PR rtl-optimization/78751
31079         * ifcvt.c (find_cond_trap): If we generated a non-existing insn,
31080         give up.
31082 2017-01-14  Jeff Law  <law@redhat.com>
31084         PR tree-optimization/79090
31085         * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject zero length and
31086         variable length stores.
31087         (compute_trims): Delete dead assignment to *trim_tail.
31088         (dse_dom_walker::dse_optimize_stmt): Optimize mem* calls with
31089         zero length.
31091 2017-01-14  Bernd Schmidt  <bschmidt@redhat.com>
31093         PR rtl-optimization/78626
31094         PR rtl-optimization/78727
31095         * cprop.c (one_cprop_pass): Collect unconditional traps in the middle
31096         of a block, and split such blocks after everything else is finished.
31098 2017-01-14  Alan Modra  <amodra@gmail.com>
31100         PR target/72749
31101         * combine.c (recog_for_combine_1): Set INSN_CODE before calling
31102         target legitimate_combined_insn.
31103         * config/rs6000/rs6000.c (TARGET_LEGITIMATE_COMBINED_INSN): Define.
31104         (rs6000_legitimate_combined_insn): New function.
31105         * config/rs6000/rs6000.md (UNSPEC_DOLOOP): Delete, and remove
31106         all uses.
31107         (ctr<mode>_internal3): Rename from *ctr<mode>_internal5.
31108         (ctr<mode>_internal4): Rename from *ctr<mode>_internal6.
31109         (ctr<mode>_internal1, ctr<mode>_internal2): Remove '*' from name.
31111 2017-01-14  Gerald Pfeifer  <gerald@pfeifer.com>
31113         * doc/frontends.texi (G++ and GCC): Remove references to Java.
31115 2017-01-13  Jeff Law  <law@redhat.com>
31117         PR tree-optimization/33562
31118         PR tree-optimization/61912
31119         PR tree-optimization/77485
31120         * tree-ssa-dse.c (delete_dead_call): Accept gsi rather than
31121         a statement.
31122         (delete_dead_assignment): Likewise.
31123         (dse_dom_walker::dse_optimize_stmt): Pass in the gsi rather than
31124         statement to delete_dead_call and delete_dead_assignment.
31126 2017-01-13  David Malcolm  <dmalcolm@redhat.com>
31128         PR c/78304
31129         * substring-locations.c (format_warning_va): Strengthen case 1 so
31130         that both endpoints of the substring must be within the format
31131         range for just the substring to be printed.
31133 2017-01-13  Uros Bizjak  <ubizjak@gmail.com>
31135         * config/i386/i386.opt (msgx): Use ix86_isa_flags2 variable.
31136         * config/i386/i386.c (ix86_target_string): Add missing options
31137         to isa_opts and reorder options by implied ISAs.  Rename isa_opts2 to
31138         isa2_opts, ix86_flag_opts to flag2_opts, ix86_target_other to
31139         flags_other and ix86_target_other to flags2_other.  Display unknown
31140         isa2 options.
31141         (ix86_valid_target_attribute_inner_p): Add missing options and
31142         reorder options by implied ISAs, as in ix86_target_string.
31144 2017-01-13  Richard Sandiford  <richard.sandiford@arm.com>
31146         * hash-table.h (hash_table::too_empty_p): New function.
31147         (hash_table::expand): Use it.
31148         (hash_table::traverse): Likewise.
31149         (hash_table::empty_slot): Use sizeof (value_type) instead of
31150         sizeof (PTR) to convert bytes to elements.  Shrink the table
31151         if the current size is excessive for the current number of
31152         elements.
31154 2017-01-13  Richard Sandiford  <richard.sandiford@arm.com>
31156         * ira-costs.c (record_reg_classes): Break from the inner loop
31157         early once alt_fail is known to be true.  Update outer loop
31158         handling accordingly.
31160 2017-01-13  Jeff Law  <law@redhat.com>
31162         * tree-ssa-dse.c (decrement_count): New function.
31163         (increment_start_addr, maybe_trim_memstar_call): Likewise.
31164         (dse_dom_walker::optimize_stmt): Call maybe_trim_memstar_call directly
31165         when we know the partially dead statement is a mem* function.
31167         PR tree-optimization/61912
31168         PR tree-optimization/77485
31169         * tree-ssa-dse.c: Include expr.h.
31170         (maybe_trim_constructor_store): New function.
31171         (maybe_trim_partially_dead_store): Call maybe_trim_constructor_store.
31173         PR tree-optimization/33562
31174         PR tree-optimization/61912
31175         PR tree-optimization/77485
31176         * doc/invoke.texi: Document new dse-max-object-size param.
31177         * params.def (PARM_DSE_MAX_OBJECT_SIZE): New PARAM.
31178         * tree-ssa-dse.c: Include params.h.
31179         (dse_store_status): New enum.
31180         (initialize_ao_ref_for_dse): New, partially extracted from
31181         dse_optimize_stmt.
31182         (valid_ao_ref_for_dse, normalize_ref): New.
31183         (setup_live_bytes_from_ref, compute_trims): Likewise.
31184         (clear_bytes_written_by, maybe_trim_complex_store): Likewise.
31185         (maybe_trim_partially_dead_store): Likewise.
31186         (maybe_trim_complex_store): Likewise.
31187         (dse_classify_store): Renamed from dse_possibly_dead_store_p.
31188         Track what bytes live from the original store.  Return tri-state
31189         for dead, partially dead or live.
31190         (dse_dom_walker): Add constructor, destructor and new private members.
31191         (delete_dead_call, delete_dead_assignment): New extracted from
31192         dse_optimize_stmt.
31193         (dse_optimize_stmt): Make a member of dse_dom_walker.
31194         Use initialize_ao_ref_for_dse.
31196         PR tree-optimization/33562
31197         PR tree-optimization/61912
31198         PR tree-optimization/77485
31199         * sbitmap.h (bitmap_count_bits): Prototype.
31200         (bitmap_clear_range, bitmap_set_range): Likewise.
31201         * sbitmap.c (bitmap_clear_range): New function.
31202         (bitmap_set_range, sbitmap_popcount, bitmap_count_bits): Likewise.
31204 2017-01-13  Martin Liska  <mliska@suse.cz>
31206         PR ipa/79043
31207         * function.c (set_cfun): Add new argument force.
31208         * function.h (set_cfun): Likewise.
31209         * ipa-inline-transform.c (inline_call): Use the function when
31210         strict alising from is dropped for function we inline to.
31212 2017-01-13  Richard Biener  <rguenther@suse.de>
31214         * tree-pretty-print.c (dump_generic_node): Fix inverted condition
31215         for dumping GIMPLE INTEGER_CSTs.
31217 2017-01-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
31219         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define __STDC_VERSION__
31220         to 201112L since C++17.
31222 2017-01-13  Maxim Ostapenko  <m.ostapenko@samsung.com>
31224         PR sanitizer/78887
31225         * asan.c (asan_needs_odr_indicator_p): Don't emit ODR indicators
31226         if -fsanitize=kernel-address is present.
31228 2017-01-13  Richard Biener  <rguenther@suse.de>
31230         * tree-pretty-print.c (dump_generic_node): Dump INTEGER_CSTs
31231         as _Literal ( type ) number in case usual suffixes do not
31232         preserve all information.
31234 2017-01-13  Richard Biener  <rguenther@suse.de>
31236         PR tree-optimization/77283
31237         * gimple-ssa-split-paths.c: Include gimple-ssa.h, tree-phinodes.h
31238         and ssa-iterators.h.
31239         (is_feasible_trace): Implement a cost model based on joiner
31240         PHI node uses.
31242 2017-01-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
31244         PR target/79004
31245         * config/rs6000/rs6000.md (FP_ISA3): Do not optimize converting
31246         char or short to __float128/_Float128 directly.
31248 2017-01-12  Martin Sebor  <msebor@redhat.com>
31250         to -Wformat-overflow.
31251         * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust.
31252         (min_bytes_remaining): Same.
31253         (get_string_length): Same.
31254         (format_string): Same.
31255         (format_directive): Same.
31256         (add_bytes): Same.
31257         (pass_sprintf_length::handle_gimple_call): Same.
31259 2017-01-12  Jakub Jelinek  <jakub@redhat.com>
31261         * gimple-ssa-sprintf.c (try_substitute_return_value): Remove
31262         info.nowrite calls with no lhs that can't throw.  Return bool
31263         whether gsi_remove has been called or not.
31264         (pass_sprintf_length::handle_gimple_call): Return bool whether
31265         try_substitute_return_value called gsi_remove.  Formatting fix.
31266         (pass_sprintf_length::execute): Don't use gsi_remove if
31267         handle_gimple_call returned true.
31269         PR bootstrap/79069
31270         * cfgrtl.c (rtl_tidy_fallthru_edge): For any_uncondjump_p that can't
31271         be removed due to side-effects, don't remove following barrier nor
31272         turn the successor edge into fallthru edge.
31274 2017-01-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31276         PR target/79044
31277         * config/rs6000/rs6000.c (insn_is_swappable_p): Mark
31278         element-reversing loads and stores as not swappable.
31280 2017-01-12  Nathan Sidwell  <nathan@acm.org>
31281             Nicolai Stange  <nicstange@gmail.com>
31283         * combine.c (try_combine): Don't ignore result of overlap checking
31284         loop.  Combine overlap & asm check into single loop.
31286 2017-01-12  Richard Biener  <rguenther@suse.de>
31288         * tree-pretty-print.c (dump_generic_node): Provide -gimple
31289         variant for MEM_REF.  Sanitize INTEGER_CST for -gimple.
31291 2017-01-12  Richard Biener  <rguenther@suse.de>
31293         * tree.c (initialize_tree_contains_struct): Make TS_OPTIMIZATION
31294         and TS_TARGET_OPTION directly derive from TS_BASE.
31295         * tree-core.h (tree_optimization_option): Derive from tree_base.
31296         (tree_target_option): Likewise.
31298 2017-01-11  Uros Bizjak  <ubizjak@gmail.com>
31300         * config/i386/i386.c (memory_address_length): Increase len
31301         only when rip_relative_addr_p returns false.
31303 2017-01-11  Julia Koval  <julia.koval@intel.com>
31305         * common/config/i386/i386-common.c (OPTION_MASK_ISA_SGX_UNSET): New.
31306         (OPTION_MASK_ISA_SGX_SET): New.
31307         (ix86_handle_option): Handle OPT_msgx.
31308         * config.gcc: Added sgxintrin.h.
31309         * config/i386/driver-i386.c (host_detect_local_cpu): Detect sgx.
31310         * config/i386/i386-c.c (ix86_target_macros_internal): Define __SGX__.
31311         * config/i386/i386.c (ix86_target_string): Add -msgx.
31312         (PTA_SGX): New.
31313         (ix86_option_override_internal): Handle new options.
31314         (ix86_valid_target_attribute_inner_p): Add sgx.
31315         * config/i386/i386.h (TARGET_SGX, TARGET_SGX_P): New.
31316         * config/i386/i386.opt: Add msgx.
31317         * config/i386/sgxintrin.h: New file.
31318         * config/i386/x86intrin.h: Add sgxintrin.h.
31320 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
31322         PR c++/71537
31323         * fold-const.c (maybe_nonzero_address): Return 1 for function
31324         local objects.
31325         (tree_single_nonzero_warnv_p): Don't handle function local objects
31326         here.
31328         PR c++/72813
31329         * gcc.c (default_compilers): Don't add -o %g.s for -S -save-temps
31330         of c-header.
31332 2017-01-11  David Malcolm  <dmalcolm@redhat.com>
31334         PR driver/78877
31335         * opts.c: Include "spellcheck.h"
31336         (struct string_fragment): New struct.
31337         (struct edit_distance_traits<const string_fragment &>): New
31338         struct.
31339         (get_closest_sanitizer_option): New function.
31340         (parse_sanitizer_options): Offer suggestions for unrecognized arguments.
31342 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
31344         * dwarf2out.c (DWARF_COMPILE_UNIT_HEADER_SIZE): For DWARF5 decrease
31345         by 12.
31346         (DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE): Always
31347         DWARF_COMPILE_UNIT_HEADER_SIZE plus 12.
31348         (DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE): Define.
31349         (calc_base_type_die_sizes): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE
31350         for initial die_offset if dwarf_split_debug_info.
31351         (output_comp_unit): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE for
31352         initial next_die_offset if dwo_id is non-NULL.  Don't emit padding
31353         fields.
31354         (output_skeleton_debug_sections): Formatting fix.  Use
31355         DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE instead of
31356         DWARF_COMPILE_UNIT_HEADER_SIZE.  Don't emit padding.
31358 2017-01-11  Wilco Dijkstra  <wdijkstr@arm.com>
31360         * config/arm/cortex-a53.md: Add bypasses for
31361         cortex_a53_r2f_cvt.
31362         (cortex_a53_r2f): Only use for transfers.
31363         (cortex_a53_f2r): Likewise.
31364         (cortex_a53_r2f_cvt): Add reservation for conversions.
31365         (cortex_a53_f2r_cvt): Likewise.
31367 2017-01-11  Tamar Christina  <tamar.christina@arm.com>
31369         * config/arm/arm_neon.h: Add __artificial__ and gnu_inline
31370         to all inlined functions, change static to extern.
31372 2017-01-11  Christophe Lyon  <christophe.lyon@linaro.org>
31374         PR target/78253
31375         * config/arm/arm.c (legitimize_pic_address): Handle reference to
31376         weak symbol.
31377         (arm_assemble_integer): Likewise.
31379 2017-01-11  Richard Earnshaw  <rearnsha@arm.com>
31381         * config.gcc: Use new awk script to check CPU, FPU and architecture
31382         parameters for --with-... options.
31383         * config/arm/parsecpu.awk: New file
31384         * config/arm/arm-cpus.in: New file.
31385         * config/arm/arm-opts.h: Include arm-cpu.h instead of processing .def
31386         files.
31387         * config/arm/arm.c: Include arm-cpu-data.h instead of processing .def
31388         files.
31389         * config/arm/t-arm: Update dependency rules.
31390         * common/config/arm/arm-common.c: Include arm-cpu-cdata.h instead
31391         of processing .def files.
31392         * config/arm/genopt.sh: Deleted.
31393         * config/arm/gentune.sh: Deleted.
31394         * config/arm/arm-cores.def: Deleted.
31395         * config/arm/arm-arches.def: Deleted.
31396         * config/arm/arm-fpus.def: Deleted.
31397         * config/arm/arm-tune.md: Regenerated.
31398         * config/arm/arm-tables.opt: Regenerated.
31399         * config/arm/arm-cpu.h: New generated file.
31400         * config/arm/arm-cpu-data.h: New generated file.
31401         * config/arm/arm-cpu-cdata.h: New generated file.
31403 2017-01-11  Maxim Ostapenko  <m.ostapenko@samsung.com>
31405         PR lto/79042
31406         * lto-cgraph.c (lto_output_varpool_node): Pack dynamically_initialized
31407         bit.
31408         (input_varpool_node): Unpack dynamically_initialized bit.
31410 2017-01-11  Eric Botcazou  <ebotcazou@adacore.com>
31412         PR rtl-optimization/79032
31413         * lra-constraints.c (simplify_operand_subreg): In the MEM case, test
31414         the alignment of the adjusted memory reference against that of MODE,
31415         instead of the alignment of the original memory reference.
31417 2017-01-11  Martin Jambor  <mjambor@suse.cz>
31419         * hsa.c (hsa_callable_function_p): Revert addition of DECL_ARTIFICIAL
31420         test.
31421         * ipa-hsa.c (process_hsa_functions): Only duplicate non-artificial
31422         decorated functions.
31424 2017-01-11  Richard Biener  <rguenther@suse.de>
31426         * tree-vrp.c (evrp_dom_walker::before_dom_children): Also
31427         set range/nonnull info for PHI results.  Do not set it on
31428         stmts marked for removal.
31430 2017-01-10  Eric Botcazou  <ebotcazou@adacore.com>
31432         * expr.c (store_field): In the bitfield case, fetch the return value
31433         from the registers before applying a single big-endian adjustment.
31434         Always do a final load for a BLKmode value not larger than a word.
31436 2017-01-10  David Malcolm  <dmalcolm@redhat.com>
31438         PR c++/77949
31439         * input.c (selftest::test_accessing_ordinary_linemaps): Verify
31440         that we correctly handle column numbers greater than
31441         LINE_MAP_MAX_COLUMN_NUMBER.
31443 2017-01-10  Martin Sebor  <msebor@redhat.com>
31445         PR middle-end/78245
31446         * gimple-ssa-sprintf.c (get_destination_size): Call
31447         {init,fini}object_sizes.
31448         * tree-object-size.c (addr_object_size): Adjust.
31449         (pass_through_call): Adjust.
31450         (pass_object_sizes::execute): Adjust.
31451         * tree-object-size.h (fini_object_sizes): Declare.
31453 2017-01-10  Martin Sebor  <msebor@redhat.com>
31455         PR tree-optimization/78775
31456         * builtins.c (get_size_range): Move...
31457         * calls.c: ...to here.
31458         (alloc_max_size): Accept zero argument.
31459         (operand_signed_p): Remove.
31460         (maybe_warn_alloc_args_overflow): Call get_size_range.
31461         * calls.h (get_size_range): Declare.
31463 2017-01-10  Joe Seymour  <joe.s@somniumtech.com>
31465         * config/msp430/driver-msp430.c (msp430_mcu_data): Sync with data
31466         from TI's devices.csv file as of September 2016.
31467         * config/msp430/msp430.c (msp430_mcu_data): Likewise.
31469 2017-01-10  Sandra Loosemore  <sandra@codesourcery.com>
31471         * doc/extend.texi: Tweak formatting to fix overfull hbox warnings.
31472         * doc/invoke.texi: Likewise.
31473         * doc/md.texi: Likewise.
31474         * doc/objc.texi: Likewise.
31476 2017-01-10  Joshua Conner  <joshconner@google.com>
31478         * config/arm/fuchsia-elf.h: New file.
31479         * config/fuchsia.h: New file.
31480         * config.gcc (*-*-fuchsia*): Set native_system_header_dir.
31481         (aarch64*-*-fuchsia*, arm*-*-fuchsia*, x86_64-*-fuchsia*): Add to
31482         targets.
31483         * config.host: (aarch64*-*-fuchsia*, arm*-*-fuchsia*): Add to hosts.
31485 2016-01-10  Richard Biener  <rguenther@suse.de>
31487         PR tree-optimization/79034
31488         * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
31489         Propagate out degenerate PHIs in the joiner.
31491 2017-01-10  Martin Liska  <mliska@suse.cz>
31493         * ipa-icf.c (sort_sem_items_by_decl_uid): New function.
31494         (sort_congruence_classes_by_decl_uid): Likewise.
31495         (sort_congruence_class_groups_by_decl_uid): Likewise.
31496         (sem_item_optimizer::merge_classes): Sort class, groups in these
31497         classes and members in the groups by DECL_UID of declarations.
31498         This would make merge operations stable.
31500 2017-01-10  Martin Liska  <mliska@suse.cz>
31502         * ipa-icf.c (sem_item_optimizer::sem_item_optimizer): Remove
31503         usage of m_classes_vec.
31504         (sem_item_optimizer::~sem_item_optimizer):  Likewise.
31505         (sem_item_optimizer::get_group_by_hash): Likewise.
31506         (sem_item_optimizer::subdivide_classes_by_equality): Likewise.
31507         (sem_item_optimizer::subdivide_classes_by_sensitive_refs): Likewise.
31508         (sem_item_optimizer::verify_classes): Likewise.
31509         (sem_item_optimizer::process_cong_reduction): Likewise.
31510         (sem_item_optimizer::dump_cong_classes): Likewise.
31511         (sem_item_optimizer::merge_classes): Likewise.
31512         * ipa-icf.h (congruence_class_hash): Rename from
31513         congruence_class_group_hash.  Remove declaration of m_classes_vec.
31515 2017-01-10  Andrew Senkevich  <andrew.senkevich@intel.com>
31517         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VPOPCNTDQ_SET,
31518         OPTION_MASK_ISA_AVX512VPOPCNTDQ_UNSET): New.
31519         * config.gcc: Add avx512vpopcntdqintrin.h.
31520         * config/i386/avx512vpopcntdqintrin.h: New.
31521         * config/i386/cpuid.h (bit_AVX512VPOPCNTDQ): New.
31522         * config/i386/i386-builtin-types.def: Add new types.
31523         * config/i386/i386-builtin.def (__builtin_ia32_vpopcountd_v16si,
31524         __builtin_ia32_vpopcountd_v16si_mask, __builtin_ia32_vpopcountq_v8di,
31525         __builtin_ia32_vpopcountq_v8di_mask): New.
31526         * config/i386/i386-c.c (ix86_target_macros_internal): Define
31527         __AVX512VPOPCNTDQ__.
31528         * config/i386/i386.c (ix86_target_string): Add -mavx512vpopcntdq.
31529         (PTA_AVX512VPOPCNTDQ): Define.
31530         * config/i386/i386.h (TARGET_AVX512VPOPCNTDQ,
31531         TARGET_AVX512VPOPCNTDQ_P): Define.
31532         * config/i386/i386.opt: Add mavx512vpopcntdq.
31533         * config/i386/immintrin.h: Include avx512vpopcntdqintrin.h.
31534         * config/i386/sse.md (define_insn "vpopcount<mode><mask_name>"): New.
31536 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
31538         PR middle-end/77484
31539         * predict.def (PRED_CALL): Set to 67.
31541 2017-01-09  Eric Botcazou  <ebotcazou@adacore.com>
31543         * expr.c (store_field): In the bitfield case, if the value comes from
31544         a function call and is of an aggregate type returned in registers, do
31545         not modify the field mode; extract the value in all cases if the mode
31546         is BLKmode and the size is not larger than a word.
31548 2017-01-09  Dominique d'Humieres  <dominiq@lps.ens.fr>
31550         PR target/71017
31551         * config/i386/cpuid.h: Fix undefined behavior.
31553 2017-01-04  Jeff Law  <law@redhat.com>
31555         PR tree-optimization/79007
31556         PR tree-optimization/67955
31557         * tree-ssa-alias.c (same_addr_size_stores_p): Only need to be
31558         conservative for pt.null when flag_non_call_exceptions is on.
31560 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
31562         PR translation/79019
31563         PR translation/79020
31564         * params.def (PARAM_INLINE_MIN_SPEEDUP,
31565         PARAM_IPA_CP_SINGLE_CALL_PENALTY,
31566         PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD): Fix typos
31567         in descriptions.
31568         * config/avr/avr.opt (maccumulate-args): Likewise.
31569         * config/msp430/msp430.opt (mwarn-mcu): Likewise.
31570         * common.opt (freport-bug): Likewise.
31571         * cif-code.def (CIF_FINAL_ERROR): Likewise.
31572         * doc/invoke.texi (ipa-cp-single-call-penalty): Likewise.
31573         * config/s390/s390.c (s390_invalid_binary_op): Fix spelling in
31574         translatable string.
31575         * config/i386/i386.c (function_value_32): Likewise.
31576         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Likewise.
31577         * config/msp430/msp430.c (msp430_option_override, msp430_attr):
31578         Likewise.
31579         * config/msp430/driver-msp430.c (msp430_select_hwmult_lib): Likewise.
31580         * common/config/msp430/msp430-common.c (msp430_handle_option):
31581         Likewise.
31582         * symtab.c (symtab_node::verify_base): Likewise.
31583         * opts.c (set_debug_level): Likewise.
31584         * tree.c (verify_type_variant): Likewise.  Fix typo in comment.
31585         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add
31586         missing whitespace to translatable strings.
31587         * config/avr/avr.md (bswapsi2): Fix typo in comment.
31588         * config/sh/superh.h: Likewise.
31589         * config/i386/xopintrin.h: Likewise.
31590         * config/i386/znver1.md: Likewise.
31591         * config/rs6000/rs6000.c (struct rs6000_opt_mask): Likewise.
31592         * ipa-inline-analysis.c (compute_inline_parameters): Likewise.
31593         * double-int.h (struct double_int): Likewise.
31594         * double-int.c (div_and_round_double): Likewise.
31595         * wide-int.cc: Likewise.
31596         * tree-ssa.c (non_rewritable_mem_ref_base): Likewise.
31597         * tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
31598         * cfgcleanup.c (crossjumps_occured): Renamed to ...
31599         (crossjumps_occurred): ... this.
31600         (try_crossjump_bb, try_head_merge_bb, try_optimize_cfg, cleanup_cfg):
31601         Adjust all uses.
31603         PR tree-optimization/78899
31604         * tree-if-conv.c (version_loop_for_if_conversion): Instead of
31605         returning bool return struct loop *, NULL for failure and the new
31606         loop on success.
31607         (versionable_outer_loop_p): Don't version outer loop if it has
31608         dont_vectorized bit set.
31609         (tree_if_conversion): When versioning outer loop, ensure
31610         tree_if_conversion is performed also on the inner loop of the
31611         non-vectorizable outer loop copy.
31612         * tree-vectorizer.c (set_uid_loop_bbs): Formatting fix.  Fold
31613         LOOP_VECTORIZED in inner loop of the scalar outer loop and
31614         prevent vectorization of it.
31615         (vectorize_loops): For outer + inner LOOP_VECTORIZED, ensure
31616         the outer loop vectorization of the non-scalar version is attempted
31617         before vectorization of the inner loop in scalar version.  If
31618         outer LOOP_VECTORIZED guarded loop is not vectorized, prevent
31619         vectorization of its inner loop.
31620         * tree-vect-loop-manip.c (rename_variables_in_bb): If outer_loop
31621         has 2 inner loops, rename also on edges from bb whose single pred
31622         is outer_loop->header.  Fix typo in function comment.
31624 2017-01-09  Martin Sebor  <msebor@redhat.com>
31626         PR bootstrap/79033
31627         * asan.c (asan_emit_stack_protection): Increase local buffer size
31628         to avoid snprintf truncation warning.
31630 2017-01-09  Andrew Pinski  <apinski@cavium.com>
31632         * config/aarch64/aarch64-cores.def: Add thunderx2t99.  Change vulcan
31633         to reference thunderx2t99 for the tuning structure
31634         * config/aarch64/aarch64-cost-tables.h (vulcan_extra_costs):
31635         Rename to ...
31636         (thunderx2t99_extra_costs): This.
31637         * config/aarch64/aarch64-tune.md: Regenerate.
31638         * config/aarch64/aarch64.c (vulcan_addrcost_table): Rename to ...
31639         (vulcan_addrcost_table): This.
31640         (vulcan_regmove_cost): Rename to ...
31641         (thunderx2t99_regmove_cost): This.
31642         (vulcan_vector_cost): Rename to ...
31643         (thunderx2t99_vector_cost): this.
31644         (vulcan_branch_cost): Rename to ...
31645         (thunderx2t99_branch_cost): This.
31646         (vulcan_tunings): Rename to ...
31647         (thunderx2t99_tunings): This and s/vulcan/thunderx2t99 .
31648         * doc/invoke.texi (AARCH64/mtune): Add thunderx2t99.
31650 2017-01-09  Martin Jambor  <mjambor@suse.cz>
31652         PR ipa/78365
31653         PR ipa/78599
31654         * ipa-prop.h (ipa_jump_func): Swap positions of vr_known and m_vr.
31655         * ipa-cp.c (ipa_vr_operation_and_type_effects): New function.
31656         (propagate_vr_accross_jump_function): Use the above function for all
31657         value range computations for pass-through jump functions and type
31658         converasion from explicit value range values.
31659         (ipcp_propagate_stage): Do not attempt to deduce types of formal
31660         parameters from TYPE_ARG_TYPES.
31661         * ipa-prop.c (ipa_write_jump_function): Remove trailing whitespace.
31662         (ipa_write_node_info): Stream type of the actual argument.
31663         (ipa_read_node_info): Likewise. Also remove trailing whitespace.
31665 2017-01-09  Martin Liska  <mliska@suse.cz>
31667         PR pch/78970
31668         * gcc.c (driver_handle_option): Handle OPT_E and set have_E.
31669         (lookup_compiler): Do not show error message with have_E.
31671 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
31673         PR tree-optimization/78938
31674         * tree-vect-stmts.c (vectorizable_condition): For non-masked COND_EXPR
31675         where comp_vectype is VECTOR_BOOLEAN_TYPE_P, use
31676         BIT_{NOT,XOR,AND,IOR}_EXPR on the comparison operands instead of
31677         {EQ,NE,GE,GT,LE,LT}_EXPR directly inside of VEC_COND_EXPR.  Formatting
31678         fixes.
31680 2017-01-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
31682         * tree-ssa-address.c (gen_addr_rtx): Don't handle index if it
31683         is const0_rtx.
31685 2017-01-09  Richard Biener  <rguenther@suse.de>
31687         PR tree-optimization/78997
31688         * tree-vect-slp.c (vect_mask_constant_operand_p): Handle SSA
31689         name condition properly.
31691 2017-01-09  Richard Biener  <rguenther@suse.de>
31693         PR debug/79000
31694         * dwarf2out.c (is_cxx): New overload with context.
31695         (is_naming_typedef_decl): Use it.
31697 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
31699         * invoke.texi (Option Summary): Correct spacing in option lists
31700         and add line breaks to fix over-long lines.
31702 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
31704         PR middle-end/17660
31706         * extend.texi (Common Variable Attributes): Add xref to GCC
31707         Internals manual to explain mode attribute keywords.
31709 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
31711         PR other/16519
31712         * doc/invoke.texi (Option Summary): Move -pthread to Linker Options
31713         and Preprocessor Options.
31714         (Options for Linking): Document -pthread here....
31715         (RS/6000 and PowerPC Options): ...not here.
31716         (Solaris 2 Options): ...or here.
31717         * doc/cppopts.texi: Document -pthread.
31719 2017-01-08  Martin Sebor  <msebor@redhat.com>
31721         PR middle-end/77708
31722         * doc/invoke.texi (Warning Options): Document -Wformat-truncation.
31723         * gimple-ssa-sprintf.c (call_info::reval_used, call_info::warnopt):
31724         New member functions.
31725         (format_directive): Used them.
31726         (add_bytes): Same.
31727         (pass_sprintf_length::handle_gimple_call): Same.
31728         * graphite-sese-to-poly.c (tree_int_to_gmp): Increase buffer size
31729         to avoid truncation for any argument.
31730         (extract_affine_mul): Same.
31731         * tree.c (get_file_function_name): Same.
31733 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
31735         PR middle-end/77484
31736         * predict.def (PRED_INDIR_CALL): Set to 86.
31738 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
31740         PR preprocessor/54124
31741         * doc/cppopts.texi: Reformat -d subtable to list the full name
31742         of the options.  Add cross-reference to the docs for the general
31743         compiler -d options.
31744         * doc/invoke.texi (Developer Options): Add cross-reference to the
31745         preprocessor-specific -d option documentation.
31747 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
31749         PR preprocessor/13498
31750         * doc/cpp.texi (Search Path): Rewrite to remove obsolete and
31751         redudant material, and reflect new command-line options.
31752         (System Headers): Likewise.
31754 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
31756         * doc/cppdiropts.texi: Merge documentation of -I, -iquote,
31757         -isystem, and -idirafter.  Copy-edit.
31758         * doc/cppopts.texi: Copy-edit.  Remove contradiction about
31759         default for -ftrack-macro-expansion.  Delete obsolete and
31760         badly-formatted implementation details about -fdebug-cpp output.
31761         * doc/cppwarnopts.texi: Copy-edit.
31763 2017-01-07  David Malcolm  <dmalcolm@redhat.com>
31765         PR c++/72803
31766         * input.c (selftest::test_accessing_ordinary_linemaps): Verify
31767         that the transition from a max line width >= 1<<10 to narrower
31768         lines works correctly.
31770 2017-01-07  Alexandre Oliva <aoliva@redhat.com>
31772         * doc/options.texi (PerFunction): New.
31773         * opt-functions.awk (switch_flags): Map both Optimization and
31774         PerFunction to CL_OPTIMIZATION.
31775         * opth-gen.awk: Test for PerFunction flag along with
31776         Optimization.
31777         * optc-save-gen.awk: Likewise.  Introduce var_opt_hash and set
31778         it only when the latter is present.  Skip those that don't in
31779         the hash function generator.
31780         * common.opt (fvar-tracking): Mark as PerFunction instead of
31781         Optimization.
31782         (fvar-tracking-assignments): Likewise.
31783         (fvar-tracking-assignments-toggle): Likewise.
31784         (fvar-tracking-uninit): Likewise.
31786 2017-01-07  Jakub Jelinek  <jakub@redhat.com>
31788         PR translation/79018
31789         * params.def (PARAM_MAX_STORES_TO_MERGE): Add missing space between
31790         the and store.
31792 2017-01-06  Mikael Pettersson  <mikpelinux@gmail.com>
31794         PR target/57583
31795         * config/m68k/m68k.opt (LONG_JUMP_TABLE_OFFSETS): New option.
31796         * config/m68k/linux.h (ASM_RETURN_CASE_JUMP): Handle
31797         TARGET_LONG_JUMP_TABLE_OFFSETS.
31798         * config/m68k/m68kelf.h (ASM_RETURN_CASE_JUMP): Likewise.
31799         * config/m68k/netbsd-elf.h (ASM_RETURN_CASE_JUMP): Likewise.
31800         * config/m68k/m68k.h (CASE_VECTOR_MODE): Likewise.
31801         (ASM_OUTPUT_ADDR_DIFF_ELF): Likewise.
31802         * config/m68k/m68k.md (tablejump expander): Likewise.
31803         (*tablejump_pcrel_hi): Renamed from unnamed insn, reject
31804         TARGET_LONG_JUMP_TABLE_OFFSETS.
31805         (*tablejump_pcrel_si): New insn, handle TARGET_LONG_JUMP_TABLE_OFFSETS.
31806         * doc/invoke.texi (M68K options): Add -mlong-jump-table-offsets.
31808 2017-01-06  Edgar E. Iglesias <edgar.iglesias@xilinx.com>
31809             David Holsgrove <david.holsgrove@xilinx.com>
31811         * common/config/microblaze/microblaze-common.c
31812         (TARGET_EXCEPT_UNWIND_INFO): Remove.
31813         * config/microblaze/microblaze-protos.h (microblaze_eh_return):
31814         New prototype.
31815         * config/microblaze/microblaze.c (microblaze_must_save_register)
31816         (microblaze_expand_epilogue, microblaze_return_addr): Handle
31817         calls_eh_return.
31818         (microblaze_eh_return): New function.
31819         * config/microblaze/microblaze.h (RETURN_ADDR_OFFSET)
31820         (EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM)
31821         (EH_RETURN_STACKADJ_RTX, ASM_PREFERRED_EH_DATA_FORMAT): New macros.
31822         * config/microblaze/microblaze.md (eh_return): New pattern.
31824 2017-01-06  Jakub Jelinek  <jakub@redhat.com>
31826         * system.h (GCC_DIAGNOSTIC_PUSH_IGNORED, GCC_DIAGNOSTIC_POP,
31827         GCC_DIAGNOSTIC_STRINGIFY): Define.
31829         * read-rtl.c (rtx_reader::read_rtx_code): Avoid -Wsign-compare warning.
31831 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
31833         * config/arm/arm.md (<mcrr>): New.
31834         (<mrrc>): New.
31835         * config/arm/arm.c (arm_arch5te): New.
31836         (arm_option_override): Set arm_arch5te.
31837         (arm_coproc_builtin_available): Add support for mcrr, mcrr2, mrrc
31838         and mrrc2.
31839         * config/arm/arm-builtins.c (MCRR_QUALIFIERS): Define to...
31840         (arm_mcrr_qualifiers): ... this. New.
31841         (MRRC_QUALIFIERS): Define to...
31842         (arm_mrrc_qualifiers): ... this. New.
31843         * config/arm/arm_acle.h (__arm_mcrr, __arm_mcrr2, __arm_mrrc,
31844         __arm_mrrc2): New.
31845         * config/arm/arm_acle_builtins.def (mcrr, mcrr2, mrrc, mrrc2): New.
31846         * config/arm/iterators.md (MCRRI, mcrr, MCRR): New.
31847         (MRRCI, mrrc, MRRC): New.
31848         * config/arm/unspecs.md (VUNSPEC_MCRR, VUNSPEC_MCRR2, VUNSPEC_MRRC,
31849         VUNSPEC_MRRC2): New.
31851 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
31853         * config/arm/arm.md (<mcr>): New.
31854         (<mrc>): New.
31855         * config/arm/arm.c (arm_coproc_builtin_available): Add
31856         support for mcr, mrc, mcr2 and mrc2.
31857         * config/arm/arm-builtins.c (MCR_QUALIFIERS): Define to...
31858         (arm_mcr_qualifiers): ... this. New.
31859         (MRC_QUALIFIERS): Define to ...
31860         (arm_mrc_qualifiers): ... this. New.
31861         (MCR_QUALIFIERS): Define to ...
31862         (arm_mcr_qualifiers): ... this. New.
31863         * config/arm/arm_acle.h (__arm_mcr, __arm_mrc, __arm_mcr2,
31864         __arm_mrc2): New.
31865         * config/arm/arm_acle_builtins.def (mcr, mcr2, mrc, mrc2): New.
31866         * config/arm/iterators.md (MCRI, mcr, MCR, MRCI, mrc, MRC): New.
31867         * config/arm/unspecs.md (VUNSPEC_MCR, VUNSPEC_MCR2, VUNSPEC_MRC,
31868         VUNSPEC_MRC2): New.
31870 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
31872         * config/arm/arm.md (*ldc): New.
31873         (*stc): New.
31874         (<ldc>): New.
31875         (<stc>): New.
31876         * config/arm/arm.c (arm_coproc_builtin_available): Add
31877         support for ldc,ldcl,stc,stcl,ldc2,ldc2l,stc2 and stc2l.
31878         (arm_coproc_ldc_stc_legitimate_address): New.
31879         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
31880         'qualifier_const_pointer'.
31881         (LDC_QUALIFIERS): Define to...
31882         (arm_ldc_qualifiers): ... this. New.
31883         (STC_QUALIFIERS): Define to...
31884         (arm_stc_qualifiers): ... this. New.
31885         * config/arm/arm-protos.h
31886         (arm_coproc_ldc_stc_legitimate_address): New.
31887         * config/arm/arm_acle.h (__arm_ldc, __arm_ldcl, __arm_stc,
31888         __arm_stcl, __arm_ldc2, __arm_ldc2l, __arm_stc2, __arm_stc2l): New.
31889         * config/arm/arm_acle_builtins.def (ldc, ldc2, ldcl, ldc2l, stc,
31890         stc2, stcl, stc2l): New.
31891         * config/arm/constraints.md (Uz): New.
31892         * config/arm/iterators.md (LDCI, STCI, ldc, stc, LDC STC): New.
31893         * config/arm/unspecs.md (VUNSPEC_LDC, VUNSPEC_LDC2, VUNSPEC_LDCL,
31894         VUNSPEC_LDC2L, VUNSPEC_STC, VUNSPEC_STC2, VUNSPEC_STCL,
31895         VUNSPEC_STC2L): New.
31897 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
31899         * config/arm/arm.md (<cdp>): New.
31900         * config/arm/arm.c (neon_const_bounds): Rename this ...
31901         (arm_const_bounds): ... this.
31902         (arm_coproc_builtin_available): New.
31903         * config/arm/arm-builtins.c (SIMD_MAX_BUILTIN_ARGS): Increase.
31904         (arm_type_qualifiers): Add 'qualifier_unsigned_immediate'.
31905         (CDP_QUALIFIERS): Define to...
31906         (arm_cdp_qualifiers): ... this. New.
31907         (void_UP): Define.
31908         (arm_expand_builtin_args): Add case for 6 arguments.
31909         * config/arm/arm-protos.h (neon_const_bounds): Rename this ...
31910         (arm_const_bounds): ... this.
31911         (arm_coproc_builtin_available): New.
31912         * config/arm/arm_acle.h (__arm_cdp): New.
31913         (__arm_cdp2): New.
31914         * config/arm/arm_acle_builtins.def (cdp): New.
31915         (cdp2): New.
31916         * config/arm/iterators.md (CDPI,CDP,cdp): New.
31917         * config/arm/neon.md: Rename all 'neon_const_bounds' to
31918         'arm_const_bounds'.
31919         * config/arm/types.md (coproc): New.
31920         * config/arm/unspecs.md (VUNSPEC_CDP, VUNSPEC_CDP2): New.
31921         * doc/extend.texi (ACLE): Add a mention of Coprocessor intrinsics.
31922         * doc/sourcebuild.texi (arm_coproc1_ok, arm_coproc2_ok,
31923         arm_coproc3_ok, arm_coproc4_ok): Document new effective targets.
31925 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
31927         * config/arm/arm-builtins.c (arm_unsigned_binop_qualifiers): New.
31928         (UBINOP_QUALIFIERS): New.
31929         (si_UP): Define.
31930         (acle_builtin_data): New. Change comment.
31931         (arm_builtins): Remove ARM_BUILTIN_CRC32B, ARM_BUILTIN_CRC32H,
31932         ARM_BUILTIN_CRC32W, ARM_BUILTIN_CRC32CB, ARM_BUILTIN_CRC32CH,
31933         ARM_BUILTIN_CRC32CW. Add ARM_BUILTIN_ACLE_BASE and include
31934         arm_acle_builtins.def.
31935         (ARM_BUILTIN_ACLE_PATTERN_START): Define.
31936         (arm_init_acle_builtins): New.
31937         (CRC32_BUILTIN): Remove.
31938         (bdesc_2arg): Remove entries for crc32b, crc32h, crc32w,
31939         crc32cb, crc32ch and crc32cw.
31940         (arm_init_crc32_builtins): Remove.
31941         (arm_init_builtins): Use arm_init_acle_builtins rather
31942         than arm_init_crc32_builtins.
31943         (arm_expand_acle_builtin): New.
31944         (arm_expand_builtin): Use 'arm_expand_acle_builtin'.
31945         * config/arm/arm_acle_builtins.def: New.
31947 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
31949         * config/arm/arm-builtins.c (neon_builtin_datum): Rename to ..
31950         (arm_builtin_datum): ... this.
31951         (arm_init_neon_builtin): Rename to ...
31952         (arm_init_builtin): ... this. Add a new parameters PREFIX
31953         and USE_SIG_IN_NAME.
31954         (arm_init_neon_builtins): Replace 'arm_init_neon_builtin' with
31955         'arm_init_builtin'. Replace type 'neon_builtin_datum' with
31956         'arm_builtin_datum'.
31957         (arm_init_vfp_builtins): Likewise.
31958         (builtin_arg): Rename enum's replacing 'NEON_ARG' with
31959         'ARG_BUILTIN' and add a 'ARG_BUILTIN_NEON_MEMORY.
31960         (arm_expand_neon_args): Rename to ...
31961         (arm_expand_builtin_args): ... this. Rename builtin_arg
31962         enum values and differentiate between ARG_BUILTIN_MEMORY
31963         and ARG_BUILTIN_NEON_MEMORY.
31964         (arm_expand_neon_builtin_1): Rename to ...
31965         (arm_expand_builtin_1): ... this. Rename builtin_arg enum
31966         values, arm_expand_builtin_args and add bool parameter NEON.
31967         (arm_expand_neon_builtin): Use arm_expand_builtin_1.
31968         (arm_expand_vfp_builtin): Likewise.
31969         (NEON_MAX_BUILTIN_ARGS): Remove, it was unused.
31971 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
31973         PR middle-end/77484
31974         * predict.def (PRED_POLYMORPHIC_CALL): Set to 59.
31975         * predict.c (tree_estimate_probability_bb): Reverse direction of
31976         polymorphic call predictor.
31978 2017-01-06  David Malcolm  <dmalcolm@redhat.com>
31980         * passes.c (execute_one_pass): Split out pass-skipping logic into...
31981         (determine_pass_name_match): ...this new function and...
31982         (should_skip_pass_p): ...this new function.
31984 2017-01-06  Nathan Sidwell  <nathan@acm.org>
31986         * ipa-visibility.c (function_and_variable_visibility): Reformat
31987         comments and long lines.  Remove extrneous if.
31988         * symtab.c (symtab_node::make_decl_local): Fix code format.
31989         (symtab_node::set_section_for_node): Fix comment typo.
31991 2017-01-06  Martin Liska  <mliska@suse.cz>
31993         PR bootstrap/79003
31994         * lra-constraints.c: Rename invariant to lra_invariant.
31995         * predict.c (set_even_probabilities): Initialize e to NULL.
31997 2017-01-05  Martin Sebor  <msebor@redhat.com>
31999         PR tree-optimization/78910
32000         * gimple-ssa-sprintf.c (tree_digits): Add an argument.
32001         (format_integer): Correct off-by-one error in the handling
32002         of precision with negative numbers in signed conversions..
32004 2017-01-05  Eric Botcazou  <ebotcazou@adacore.com>
32006         * doc/invoke.texi (C Dialect Options): Adjust -fsso-struct entry.
32008 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
32010         PR tree-optimization/71016
32011         * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Pass cond_stmt to
32012         factor_out_conditional_conversion.  Formatting fix.
32013         (factor_out_conditional_conversion): Add cond_stmt argument.
32014         If arg1 is INTEGER_CST, punt if new_arg0 is not any operand of
32015         cond_stmt and if arg0_def_stmt is not the only stmt in its bb.
32016         Formatting fix.
32018 2017-01-05  David Malcolm  <dmalcolm@redhat.com>
32020         * Makefile.in (OBJS): Add read-md.o, read-rtl.o,
32021         read-rtl-function.o, and selftest-rtl.o.
32022         * config/aarch64/aarch64.c: Include selftest.h and selftest-rtl.h.
32023         (selftest::aarch64_test_loading_full_dump): New function.
32024         (selftest::aarch64_run_selftests): New function.
32025         (TARGET_RUN_TARGET_SELFTESTS): Wire it up to
32026         selftest::aarch64_run_selftests.
32027         * config/i386/i386.c
32028         (selftest::ix86_test_loading_dump_fragment_1): New function.
32029         (selftest::ix86_test_loading_call_insn): New function.
32030         (selftest::ix86_test_loading_full_dump): New function.
32031         (selftest::ix86_test_loading_unspec): New function.
32032         (selftest::ix86_run_selftests): Call the new functions.
32033         * emit-rtl.c (maybe_set_max_label_num): New function.
32034         * emit-rtl.h (maybe_set_max_label_num): New decl.
32035         * function.c (instantiate_decls): Guard call to
32036         instantiate_decls_1 with if (DECL_INITIAL (fndecl)).
32037         * function-tests.c (selftest::verify_three_block_rtl_cfg): Remove
32038         "static".
32039         * gensupport.c (gen_reader::gen_reader): Pass "false"
32040         for new "compact" param of rtx_reader.
32041         * print-rtl.c (rtx_writer::print_rtx_operand): Print "(nil)"
32042         rather than an empty string for NULL strings.
32043         * read-md.c: Potentially include config.h rather than bconfig.h.
32044         Wrap include of errors.h with #ifdef GENERATOR_FILE.
32045         (have_error): New global, copied from errors.c.
32046         (md_reader::read_name): Rename to...
32047         (md_reader::read_name_1): ...this, adding "out_loc" param,
32048         and converting "missing name or number" to returning false, rather
32049         than failing.
32050         (md_reader::read_name): Reimplement in terms of read_name_1.
32051         (md_reader::read_name_or_nil): New function.
32052         (md_reader::read_string): Handle "(nil)" by returning NULL.
32053         (md_reader::md_reader): Add new param "compact".
32054         (md_reader::read_md_files): Wrap with #ifdef GENERATOR_FILE.
32055         (md_reader::read_file): New method.
32056         * read-md.h (md_reader::md_reader): Add new param "compact".
32057         (md_reader::read_file): New method.
32058         (md_reader::is_compact): New accessor.
32059         (md_reader::read_name): Convert return type from void to file_location.
32060         (md_reader::read_name_or_nil): New decl.
32061         (md_reader::read_name_1): New decl.
32062         (md_reader::m_compact): New field.
32063         (noop_reader::noop_reader): Pass "false" for new "compact" param
32064         of rtx_reader.
32065         (rtx_reader::rtx_reader): Add new "compact" param.
32066         (rtx_reader::read_rtx_operand): Make virtual and convert return
32067         type from void to rtx.
32068         (rtx_reader::read_until): New decl.
32069         (rtx_reader::handle_any_trailing_information): New virtual function.
32070         (rtx_reader::postprocess): New virtual function.
32071         (rtx_reader::finalize_string): New virtual function.
32072         (rtx_reader::m_in_call_function_usage): New field.
32073         (rtx_reader::m_reuse_rtx_by_id): New field.
32074         * read-rtl-function.c: New file.
32075         * selftest-rtl.c (selftest::assert_rtx_ptr_eq_at): New function.
32076         * selftest-rtl.h (ASSERT_RTX_PTR_EQ): New macro.
32077         (selftest::verify_three_block_rtl_cfg): New decl.
32078         * read-rtl-function.h: New file.
32079         * read-rtl.c: Potentially include config.h rather than bconfig.h.
32080         For host, include function.h, memmodel.h, and emit-rtl.h.
32081         (one_time_initialization): New function.
32082         (struct compact_insn_name): New struct.
32083         (compact_insn_names): New array.
32084         (find_code): Handle insn codes in compact dumps.
32085         (apply_subst_iterator): Wrap with #ifdef GENERATOR_FILE.
32086         (bind_subst_iter_and_attr): Likewise.
32087         (add_condition_to_string): Likewise.
32088         (add_condition_to_rtx): Likewise.
32089         (apply_attribute_uses): Likewise.
32090         (add_current_iterators): Likewise.
32091         (apply_iterators): Likewise.
32092         (initialize_iterators): Guard usage of apply_subst_iterator with
32093         #ifdef GENERATOR_FILE.
32094         (read_conditions): Wrap with #ifdef GENERATOR_FILE.
32095         (md_reader::read_mapping): Likewise.
32096         (add_define_attr_for_define_subst): Likewise.
32097         (add_define_subst_attr): Likewise.
32098         (read_subst_mapping): Likewise.
32099         (check_code_iterator): Likewise.
32100         (rtx_reader::read_rtx): Likewise.  Move one-time initialization
32101         logic to...
32102         (one_time_initialization): New function.
32103         (rtx_reader::read_until): New method.
32104         (read_flags): New function.
32105         (parse_reg_note_name): New function.
32106         (rtx_reader::read_rtx_code): Initialize "iterator" to NULL.
32107         Handle reuse_rtx ids.
32108         Wrap iterator lookup within #ifdef GENERATOR_FILE.
32109         Add parsing support for RTL dumps, mirroring the special-cases in
32110         print_rtx, by calling read_flags, reading REG_NOTE names, INSN_UID
32111         values, and calling handle_any_trailing_information.
32112         (rtx_reader::read_rtx_operand): Convert return type from void
32113         to rtx, returning return_rtx.  Handle case 'e'.  Call
32114         finalize_string on XSTR and XTMPL fields.
32115         (rtx_reader::read_nested_rtx):  Handle dumps in which trailing
32116          "(nil)" values were omitted.  Call the postprocess vfunc on the
32117         return_rtx.
32118         (rtx_reader::rtx_reader): Add new "compact" param and pass to base
32119         class ctor.  Initialize m_in_call_function_usage.  Call
32120         one_time_initialization.
32121         * rtl-tests.c (selftest::test_uncond_jump): Call
32122         set_new_first_and_last_insn.
32123         * rtl.h (read_rtx): Wrap decl with #ifdef GENERATOR_FILE.
32124         * selftest-rtl.c: New file.
32125         * selftest-rtl.h (class selftest::rtl_dump_test): New class.
32126         (selftest::get_insn_by_uid): New decl.
32127         * selftest-run-tests.c (selftest::run_tests): Call
32128         read_rtl_function_c_tests.
32129         * selftest.h  (selftest::read_rtl_function_c_tests): New decl.
32130         * tree-dfa.c (ssa_default_def): Return NULL_TREE for rtl function
32131         dumps.
32133 2017-01-05  Uros Bizjak  <ubizjak@gmail.com>
32135         * config/i386/i386.md (*testqi_ext_3): No need to handle memory
32136         operands in a special way.  Assert that pos+len <= mode precision.
32138 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
32140         * common.opt (fvect-cost-model): Remove RejectNegative flag, use
32141         3 argument Alias with unlimited for the negative form.
32142         (fno-vect-cost-model): Removed.
32144 2017-01-05  Martin Liska  <mliska@suse.cz>
32146         * hsa-gen.c (gen_hsa_divmod): New function.
32147         (gen_hsa_insn_for_internal_fn_call): Use the function for IFN_DIVMOD.
32149 2017-01-05  Martin Liska  <mliska@suse.cz>
32151         PR pch/78970
32152         * gcc.c (lookup_compiler): Reject '-' filename for a precompiled
32153         header.
32155 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32157         * config/s390/s390.c (s390_expand_setmem): Unroll the loop for
32158         small constant length operands.
32160 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
32162         * config/s390/s390.c (s390_expand_setmem): Avoid overlapping bytes
32163         between loop iterations.
32165 2017-01-05  Martin Liska  <mliska@suse.cz>
32167         PR sanitizer/78815
32168         * gimplify.c (gimplify_decl_expr): Compare to
32169         asan_poisoned_variables instread of checking flags.
32170         (gimplify_target_expr): Likewise.
32171         (gimplify_expr): Likewise.
32172         (gimplify_function_tree): Conditionally initialize
32173         asan_poisoned_variables.
32175 2017-01-04  Jeff Law  <law@redhat.com>
32177         PR tree-optimizatin/78812
32178         * rtl.h (contains_mem_rtx_p): Prototype.
32179         * ifcvt.c (containts_mem_rtx_p): Move from here to...
32180         * rtlanal.c (contains_mem_rtx_p): Here and remove static linkage.
32181         * gcse.c (prune_expressions): Use contains_mem_rtx_p to discover
32182         and prune MEMs that are not at the toplevel of a SET_SRC rtx.  Look
32183         through ZERO_EXTEND and SIGN_EXTEND when trying to avoid pruning MEMs.
32185 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
32187         * input.c (assert_char_at_range): Default-initialize actual_range.
32189 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
32191         * df-scan.c (df_ref_create_structure): Make regno unsigned,
32192         to match the caller.
32194 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
32196         * cfgexpand.c (expand_gimple_basic_block): Disregard debug
32197         insns after final jump in test to emit dummy move.
32199 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
32201         * gimple-iterator.h (gsi_one_nondebug_before_end_p): New.
32202         * tree-eh.c (cleanup_empty_eh): Skip more debug stmts.
32204 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
32206         * multiple_target.c (create_dispatcher_calls): Init e_next.
32207         * tree-ssa-loop-split.c (split_loop): Init border.
32208         * tree-vect-loop.c (vect_determine_vectorization_factor): Init
32209         scalar_type.
32211 2017-01-04  Michael Meissner  <meissner@linux.vnet.ibm.com>
32213         PR target/71977
32214         PR target/70568
32215         PR target/78823
32216         * config/rs6000/predicates.md (sf_subreg_operand): New predicate.
32217         (altivec_register_operand): Do not return true if the operand
32218         contains a SUBREG mixing SImode and SFmode.
32219         (vsx_register_operand): Likewise.
32220         (vsx_reg_sfsubreg_ok): New predicate.
32221         (vfloat_operand): Do not return true if the operand contains a
32222         SUBREG mixing SImode and SFmode.
32223         (vint_operand): Likewise.
32224         (vlogical_operand): Likewise.
32225         (gpc_reg_operand): Likewise.
32226         (int_reg_operand): Likewise.
32227         * config/rs6000/rs6000-protos.h (valid_sf_si_move): Add declaration.
32228         * config/rs6000/rs6000.c (valid_sf_si_move): New function to
32229         determine if a MOVSI or MOVSF operation contains SUBREGs that mix
32230         SImode and SFmode.
32231         (rs6000_emit_move_si_sf_subreg): New helper function.
32232         (rs6000_emit_move): Call rs6000_emit_move_si_sf_subreg to possbily
32233         fixup SUBREGs involving SImode and SFmode.
32234         * config/rs6000/vsx.md (SFBOOL_*): New constants that are operand
32235         numbers for the new peephole2 optimization.
32236         (peephole2 for SFmode unions): New peephole2 to optimize cases in
32237         the GLIBC math library that do AND/IOR/XOR operations on single
32238         precision floating point.
32239         * config/rs6000/rs6000.h (TARGET_NO_SF_SUBREG): New internal
32240         target macros to say whether we need to avoid SUBREGs mixing
32241         SImode and SFmode.
32242         (TARGET_ALLOW_SF_SUBREG): Likewise.
32243         * config/rs6000/rs6000.md (UNSPEC_SF_FROM_SI): New unspecs.
32244         (UNSPEC_SI_FROM_SF): Likewise.
32245         (iorxor): Change spacing.
32246         (and_ior_xor): New iterator for AND, IOR, and XOR.
32247         (movsi_from_sf): New insns for SImode/SFmode SUBREG support.
32248         (movdi_from_sf_zero_ext): Likewise.
32249         (mov<mode>_hardfloat, FMOVE32 iterator): Use register_operand
32250         instead of gpc_reg_operand.  Add SImode/SFmode SUBREG support.
32251         (movsf_from_si): New insn for SImode/SFmode SUBREG support.
32252         (fma<mode>4): Use gpc_reg_operand instead of register_operand.
32253         (fms<mode>4): Likewise.
32254         (fnma<mode>4): Likewise.
32255         (fnms<mode>4): Likewise.
32256         (nfma<mode>4): Likewise.
32257         (nfms<mode>4): Likewise.
32259 2017-01-04  Marek Polacek  <polacek@redhat.com>
32261         PR c++/64767
32262         * doc/invoke.texi: Document -Wpointer-compare.
32264 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
32266         * optc-gen.awk: Emit #error for -W*/-f*/-m* Enum without
32267         RejectNegative.
32269         * dwarf2out.c (output_loc_list): Don't throw away 64K+ location
32270         descriptions for -gdwarf-5 and emit them as uleb128 instead of
32271         2-byte data.
32273 2017-01-04  Kelvin Nilsen  <kelvin@gcc.gnu.org>
32275         PR target/78056
32276         * doc/sourcebuild.texi (PowerPC-specific attributes): Add
32277         documentation of the powerpc_popcntb_ok attribute.
32278         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
32279         code to issue warning messages if a requested CPU configuration is
32280         not supported by the binary (assembler and loader) toolchain.
32281         (spe_init_builtins): Add two assertions to prevent ICE if attempt is
32282         made to define a built-in function that has been disabled.
32283         (paired_init_builtins): Add assertion to prevent ICE if attempt is
32284         made to define a built-in function that has been disabled.
32285         (altivec_init_builtins): Add comment explaining why definition
32286         of the DST built-in functions is not preceded by an assertion
32287         check.  Add assertions to prevent ICE if attempts are made to
32288         define an altivec predicate or an abs* built-in function that has
32289         been disabled.
32290         (htm_init_builtins): Add comment explaining why definition of the
32291         htm built-in functions is not preceded by an assertion check.
32293 2017-01-04  Jeff Law  <law@redhat.com>
32295         PR tree-optimizatin/67955
32296         * tree-ssa-alias.c (same_addr_size_stores_p): Check offsets first.
32297         Allow any SSA_VAR_P as the base objects.  Use integer_zerop.  Verify
32298         the points-to solution does not include pt_null.  Use DECL_PT_UID
32299         unconditionally.
32301 2017-01-04  Uros Bizjak  <ubizjak@gmail.com>
32303         * config/i386/i386.md (HI/SImode test with imm to QImode splitters):
32304         Use gen_int_mode instead of gen_lopwart for const_int operands.
32306 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
32308         PR tree-optimization/71563
32309         * match.pd: Simplify X << Y into X if Y is known to be 0 or
32310         out of range value - has low bits known to be zero.
32312 2017-01-04  Alan Modra  <amodra@gmail.com>
32314         * Makefile.in (aclocal_deps): Update and order as per aclocal.m4.
32315         * configure: Regenerate.
32316         * config.in: Regenerate.
32318 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
32320         PR bootstrap/77569
32321         * input.c (ebcdic_execution_charset::on_error): Don't use strstr for
32322         a substring of the message, but strcmp with the whole message.  Ifdef
32323         ENABLE_NLS, translate the message first using dgettext.
32325 2017-01-03  Jeff Law  <law@redhat.com>
32327         PR tree-optimizatin/78856
32328         * tree-ssa-threadupdate.c: Include tree-vectorizer.h.
32329         (mark_threaded_blocks): Remove code to truncate thread paths that
32330         cross multiple loop headers.  Instead invalidate the cached loop
32331         iteration information and handle case of a thread path walking
32332         into an irreducible region.
32334 2017-01-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
32336         PR target/78900
32337         * config/rs6000/rs6000.c (rs6000_split_signbit): Change some
32338         assertions.  Add support for doing the signbit if the IEEE 128-bit
32339         floating point value is in a GPR.
32340         * config/rs6000/rs6000.md (Fsignbit): Delete.
32341         (signbit<mode>2_dm): Delete using <Fsignbit> and just use "wa".
32342         Update the length attribute if the value is in a GPR.
32343         (signbit<mode>2_dm_<su>ext): Add combiner pattern to eliminate
32344         the sign or zero extension instruction, since the value is always 0/1.
32345         (signbit<mode>2_dm2): Delete using <Fsignbit>.
32347         PR target/78953
32348         * config/rs6000/vsx.md (vsx_extract_<mode>_store_p9): If we are
32349         extracting SImode to a GPR register so that we can generate a
32350         store, limit the vector to be in a traditional Altivec register
32351         for the vextuwrx instruction.
32353 2017-01-03  Ian Lance Taylor  <iant@google.com>
32355         * godump.c (go_format_type): Treat ENUMERAL_TYPE like INTEGER_TYPE.
32357 2017-01-03  Martin Sebor  <msebor@redhat.com>
32359         PR tree-optimization/78696
32360         * gimple-ssa-sprintf.c (format_floating): Correct handling of
32361         precision.  Use MPFR for %f for greater fidelity.  Correct handling
32362         of %g.
32363         (pass_sprintf_length::compute_format_length): Set width and precision
32364         specified by asrerisk to void_node for vararg functions.
32365         (try_substitute_return_value): Adjust dump output.
32367 2017-01-03  David Edelsohn  <dje.gcc@gmail.com>
32369         * doc/invoke.texi (RS6000 options): LRA is enabled by default.
32371 2017-01-03  Eric Botcazou  <ebotcazou@adacore.com>
32373         * doc/invoke.texi (SPARC options): Document -mlra as the default.
32374         * config/sparc/sparc.c (sparc_option_override): Force LRA unless
32375         -mlra/-mno-lra was passed to the compiler.
32377 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
32379         PR rtl-optimization/65618
32380         * emit-rtl.c (try_split): Move initialization of "before" and
32381         "after" to just before the call to emit_insn_after_setloc.
32383 2017-01-03  Gerald Pfeifer  <gerald@pfeifer.com>
32385         * doc/md.texi (Standard Names): Remove reference to Java frontend.
32387 2017-01-03  Pierre-Marie de Rodat  <derodat@adacore.com>
32389         * dwarf2out.c (gen_enumeration_type_die): When
32390         -gno-strict-dwarf, add a DW_AT_encoding attribute.
32392 2017-01-03  Jakub Jelinek  <jakub@redhat.com>
32394         PR tree-optimization/78965
32395         * gimple-ssa-sprintf.c (pass_sprintf_length::compute_format_length):
32396         Change first argument from const call_info & to call_info &.  For %n
32397         set info.nowrite to false.
32399         PR middle-end/78901
32400         * gimple-ssa-sprintf.c (try_substitute_return_value): Don't change
32401         possibly throwing calls.
32403         * genmatch.c (dt_node::gen_kids_1): If generic_exprs include SSA_NAME
32404         and exprs_len || fns_len, emit the code for SSA_NAME next to the exprs
32405         and fns handling, rather than in a separate case SSA_NAME.
32407 2017-01-02  Jeff Law  <law@redhat.com>
32409         * config/darwin-driver.c (darwin_driver_init): Const-correctness
32410         fixes for first_period and second_period variables.
32412 2017-01-02  Uros Bizjak  <ubizjak@gmail.com>
32414         PR target/78967
32415         * config/i386/i386.md (UNSPEC_NOREX_MEM): New unspec.
32416         (*insvqi_1): New insn pattern.
32417         (*insvqi_1_mem_rex64): Ditto.
32418         (*insvqi_2): Ditto.
32419         (*insvqi_3): Rename from *insvqi.
32421         (*extzvqi_mem_rex64): Add UNSPEC_NOREX_MEM tag.
32423 2017-01-02  Gerald Pfeifer  <gerald@pfeifer.com>
32425         * doc/cfg.texi (Edges): Remove reference to Java.
32426         (Maintaining the CFG): Ditto.
32428 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
32430         PR middle-end/77674
32431         * symtab.c (symtab_node::binds_to_current_def_p): Fix handling of
32432         transparent aliases.
32434 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
32436         PR middle-end/77484
32437         * predict.def (PRED_CALL): Update hitrate.
32438         (PRED_INDIR_CALL, PRED_POLYMORPHIC_CALL): New predictors.
32439         * predict.c (tree_estimate_probability_bb): Split CALL predictor
32440         into direct/indirect/polymorphic variants.
32442 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
32444         Update copyright years.
32446         * gcc.c (process_command): Update copyright notice dates.
32447         * gcov-dump.c (print_version): Ditto.
32448         * gcov.c (print_version): Ditto.
32449         * gcov-tool.c (print_version): Ditto.
32450         * gengtype.c (create_file): Ditto.
32451         * doc/cpp.texi: Bump @copying's copyright year.
32452         * doc/cppinternals.texi: Ditto.
32453         * doc/gcc.texi: Ditto.
32454         * doc/gccint.texi: Ditto.
32455         * doc/gcov.texi: Ditto.
32456         * doc/install.texi: Ditto.
32457         * doc/invoke.texi: Ditto.
32459 Copyright (C) 2017 Free Software Foundation, Inc.
32461 Copying and distribution of this file, with or without modification,
32462 are permitted in any medium without royalty provided the copyright
32463 notice and this notice are preserved.