* asan.c (handle_builtin_alloca): Deal with all alloca variants.
[official-gcc.git] / gcc / ChangeLog
blobc63d73424a73343e228a795748e87664ed33aed1
1 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
3         * asan.c (handle_builtin_alloca): Deal with all alloca variants.
4         (get_mem_refs_of_builtin_call): Likewise.
5         * builtins.c (expand_builtin_apply): Adjust call to
6         allocate_dynamic_stack_space.
7         (expand_builtin_alloca): For __builtin_alloca_with_align_and_max, pass
8         the third argument to allocate_dynamic_stack_space, otherwise -1.
9         (expand_builtin): Deal with all alloca variants.
10         (is_inexpensive_builtin): Likewise.
11         * builtins.def (BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX): New.
12         * calls.c (special_function_p): Deal with all alloca variants.
13         (initialize_argument_information): Adjust call to
14         allocate_dynamic_stack_space.
15         (expand_call): Likewise.
16         * cfgexpand.c (expand_call_stmt): Deal with all alloca variants.
17         * doc/extend.texi (Built-ins): Add __builtin_alloca_with_align_and_max
18         * explow.c (allocate_dynamic_stack_space): Add MAX_SIZE parameter and
19         use it for the stack usage computation.
20         * explow.h (allocate_dynamic_stack_space): Adjust prototype.
21         * function.c (gimplify_parameters): Turn BUILT_IN_ALLOCA_WITH_ALIGN
22         into BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX and pass maximum size.
23         * gimple-ssa-warn-alloca.c (alloca_call_type): Simplify control flow.
24         Take into account 3rd argument of __builtin_alloca_with_align_and_max.
25         (in_loop_p): Remove first argument and useless check.
26         (pass_walloca::execute): Remove useless test and adjust call to above.
27         * gimple.c (gimple_build_call_from_tree): Deal with all alloc variants
28         * gimplify.c (gimplify_vla_decl): Turn BUILT_IN_ALLOCA_WITH_ALIGN into
29         BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX and pass maximum size.
30         (gimplify_call_expr): Deal with all alloca variants.
31         * hsa-gen.c (gen_hsa_alloca): Likewise.
32         (gen_hsa_insns_for_call): Likewise.
33         * ipa-pure-const.c (special_builtin_state): Likewise.
34         * tree-chkp.c (chkp_build_returned_bound): Likewise.
35         * tree-object-size.c (alloc_object_size): Likewise.
36         * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Likewise.
37         (call_may_clobber_ref_p_1): Likewise.
38         * tree-ssa-ccp.c (evaluate_stmt): Likewise.
39         (ccp_fold_stmt): Likewise.
40         (optimize_stack_restore): Likewise.
41         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
42         (mark_all_reaching_defs_necessary_1): Likewise.
43         (propagate_necessity): Likewise.
44         (eliminate_unnecessary_stmts): Likewise.
45         * tree.c (build_common_builtin_nodes): Build
46         BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX.
47         * tree.h (ALLOCA_FUNCTION_CODE_P): New macro.
48         (CASE_BUILT_IN_ALLOCA): Likewise.
49         * varasm.c (incorporeal_function_p): Deal with all alloca variants.
51 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
53         PR debug/82509
54         * dwarf2out.c (new_die_raw): New static inline function.
55         (new_die): Use it to create the DIE.
56         (add_AT_external_die_ref): Likewise.
57         (clone_die): Likewise.
58         (clone_as_declaration): Likewise.
59         (dwarf2out_vms_debug_main_pointer): Likewise.
60         (base_type_die): Likewise.  Remove early return for corner cases.
61         Do not call add_pubtype on the DIE here.
62         (is_base_type): Remove ERROR_MARK and return 0 for VOID_TYPE.
63         (modified_type_die): Adjust the lookup for reverse order DIEs.  Skip
64         typedefs for base types with DW_AT_endianity.  Make sure a DIE with
65         native order exists for base types, attach the DIE manually and call
66         add_pubtype on it.  Do not equate a reverse order DIE to the type.
68 2017-10-19  Richard Earnshaw  <rearnsha@arm.com>
70         * config/arm/arm.c (align_ok_ldrd_strd): New function.
71         (mem_ok_for_ldrd_strd): New parameter align.  Extract the alignment of
72         the mem into it.
73         (gen_operands_ldrd_strd): Validate the alignment of the accesses.
75 2017-10-19  Jakub Jelinek  <jakub@redhat.com>
77         * flag-types.h (enum sanitize_code): Add SANITIZE_BUILTIN.  Or
78         SANITIZE_BUILTIN into SANITIZE_UNDEFINED.
79         * sanitizer.def (BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN,
80         BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN_ABORT): New builtins.
81         * opts.c (sanitizer_opts): Add builtin.
82         * ubsan.c (instrument_builtin): New function.
83         (pass_ubsan::execute): Call it.
84         (pass_ubsan::gate): Enable even for SANITIZE_BUILTIN.
85         * doc/invoke.texi: Document -fsanitize=builtin.
87         * ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch
88         builtins, store max (log2 (align), 0) into uchar field instead of
89         align into uptr field.
90         (ubsan_expand_objsize_ifn): Use _v1 suffixed type mismatch builtins,
91         store uchar 0 field instead of uptr 0 field.
92         (instrument_nonnull_return): Use _v1 suffixed nonnull return builtin,
93         instead of passing one address of struct with 2 locations pass
94         two addresses of structs with 1 location each.
95         * sanitizer.def (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH,
96         BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_ABORT,
97         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN,
98         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_ABORT): Removed.
99         (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1,
100         BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1_ABORT,
101         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1,
102         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1_ABORT): New builtins.
104 2017-10-19  Martin Liska  <mliska@suse.cz>
106         PR driver/81829
107         * file-find.c (remove_prefix): Remove.
108         * file-find.h (remove_prefix): Likewise.
109         * gcc-ar.c: Remove smartness of lookup.
111 2017-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
113         * config/rs6000/rs6000.md (*call_indirect_aix<mode>,
114         *call_value_indirect_aix<mode>, *call_indirect_elfv2<mode>,
115         *call_value_indirect_elfv2<mode>): Add correct mode to the unspec.
117 2017-10-19  Jakub Jelinek  <jakub@redhat.com>
119         PR target/82580
120         * config/i386/i386.md (setcc + movzbl to xor + setcc): New peephole2.
121         (setcc + and to xor + setcc): New peephole2.
123 2017-10-19  Tom de Vries  <tom@codesourcery.com>
125         * doc/sourcebuild.texi (Test Directives, Variants of
126         dg-require-support): Add dg-require-stack-size.
128 2017-10-19  Martin Liska  <mliska@suse.cz>
130         PR sanitizer/82517
131         * gimplify.c (gimplify_decl_expr): Do not instrument variables
132         that have a large alignment.
133         (gimplify_target_expr): Likewise.
135 2017-10-18  Segher Boessenkool  <segher@kernel.crashing.org>
137         PR rtl-optimization/82602
138         * ira.c (rtx_moveable_p): Return false for volatile asm.
140 2017-10-18  Uros Bizjak  <ubizjak@gmail.com>
142         PR target/82580
143         * config/i386/i386-modes.def (CCGZ): New CC mode.
144         * config/i386/i386.md (sub<mode>3_carry_ccgz): New insn pattern.
145         * config/i386/predicates.md (ix86_comparison_operator):
146         Handle CCGZmode.
147         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>:
148         Emulate LE, LEU, GT, GTU, LT, LTU, GE and GEU double-word comparisons
149         with double-word subtraction.
150         (put_condition_code): Handle CCGZmode.
152 2017-10-18  Aldy Hernandez  <aldyh@redhat.com>
154         * wide-int.cc (debug (const wide_int &)): New.
155         (debug (const wide_int *)): New.
156         (debug (const widest_int &)): New.
157         (debug (const widest_int *)): New.
159 2017-10-18  Vladimir Makarov  <vmakarov@redhat.com>
161         PR middle-end/82556
162         * lra-constraints.c (curr_insn_transform): Use non-input operand
163         instead of output one for matched reload.
165 2017-10-18  Bin Cheng  <bin.cheng@arm.com>
167         * tree-loop-distribution.c (INCLUDE_ALGORITHM): New header file.
168         (tree-ssa-loop-ivopts.h): New header file.
169         (struct builtin_info): New fields.
170         (classify_builtin_1): Compute and record base and offset parts for
171         memset builtin partition by calling strip_offset.
172         (offset_cmp, fuse_memset_builtins): New functions.
173         (finalize_partitions): Fuse adjacent memset partitions by calling
174         above function.
175         * tree-ssa-loop-ivopts.c (strip_offset): Delete static declaration.
176         Expose the interface.
177         * tree-ssa-loop-ivopts.h (strip_offset): New declaration.
179 2017-10-18  Bin Cheng  <bin.cheng@arm.com>
181         PR tree-optimization/82574
182         * tree-loop-distribution.c (find_single_drs): New parameter.  Check
183         that data reference must be executed exactly once per iteration
184         against the outermost loop in nest.
185         (classify_partition): Update call to above function.
187 2017-10-18  Richard Biener  <rguenther@suse.de>
189         PR tree-optimization/82591
190         * graphite.c (graphite_transform_loops): Move code gen message
191         printing ...
192         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
193         Here.  Handle scop_to_isl_ast failing.
194         (scop_to_isl_ast): Limit the number of ISL operations.
196 2017-10-18  Richard Biener  <rguenther@suse.de>
198         * graphite-isl-ast-to-gimple.c
199         (translate_isl_ast_to_gimple::set_rename): Simplify.
200         (translate_isl_ast_to_gimple::set_rename_for_each_def): Inline...
201         (graphite_copy_stmts_from_block): ... here.
202         (copy_bb_and_scalar_dependences): Simplify.
203         (add_parameters_to_ivs_params): Canonicalize.
204         (generate_entry_out_of_ssa_copies): Simplify.
205         * graphite-sese-to-poly.c (extract_affine_name): Simplify
206         by passing in ISL dimension.
207         (parameter_index_in_region_1): Rename to ...
208         (parameter_index_in_region): ... this.
209         (extract_affine): Adjust assert, pass down parameter index.
210         (add_param_constraints): Use range-info when available.
211         (build_scop_context): Adjust.
212         * sese.c (new_sese_info): Adjust.
213         (free_sese_info): Likewise.
214         * sese.h (bb_map_t, rename_map_t, phi_rename, init_back_edge_pair_t):
215         Remove unused typedefs.
216         (struct sese_info_t): Simplify rename_map, remove incomplete_phis.
218 2017-10-18  Martin Liska  <mliska@suse.cz>
220         * combine.c (simplify_compare_const): Add gcc_fallthrough.
222 2017-10-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
224         * config/s390/s390.c (s390_bb_fallthru_entry_likely): New function.
225         (s390_sched_init): Do not reset s390_sched_state if we entered the
226         current basic block via a fallthru edge and all others are unlikely.
228 2017-10-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
230         * config/s390/s390.c (NUM_SIDES): New variable.
231         (LONGRUNNING_THRESHOLD): New variable.
232         (LATENCY_FACTOR): New variable.
233         (s390_sched_score): Decrease score for long-running instructions on
234         wrong side.
235         (s390_sched_variable_issue): Perform bookkeeping for long-running
236         instructions.
238 2017-10-18  Richard Biener  <rguenther@suse.de>
240         * graphite-isl-ast-to-gimple.c (gcc_expression_from_isl_ast_expr_id):
241         Simplify with removal of the parameter rename map.
242         (set_rename): Likewise.
243         (should_copy_to_new_region): Likewise.
244         (graphite_copy_stmts_from_block): Likewise.
245         (copy_bb_and_scalar_dependences): Remove initialization of
246         unused copied_bb_map.
247         (copy_def): Remove.
248         (copy_internal_parameters): Likewise.
249         (graphite_regenerate_ast_isl): Do not call copy_internal_parameters.
250         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
251         Use INTEGRAL_TYPE_P.
252         (parameter_index_in_region_1): Rename to ...
253         (assign_parameter_index_in_region): ... this.  Assert we have
254         a parameter we handle.
255         (scan_tree_for_params): Adjust.
256         * sese.h (parameter_rename_map_t): Remove.
257         (struct sese_info_t): Remove unused parameter_rename_map and
258         copied_bb_map members.
259         * sese.c (new_sese_info): Adjust.
260         (free_sese_info): Likewise.
262 2017-10-18  Martin Liska  <mliska@suse.cz>
264         PR sanitizer/82545
265         * asan.c (asan_expand_poison_ifn): Do not put gimple stmt
266         on an abnormal edge.
268 2017-10-18  Sebastian Huber  <sebastian.huber@embedded-brains.de>
270         * doc/invoke.texi (ffunction-sections and fdata-sections):
271         Update.
273 2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>
275         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Bail out only if
276         the use statement can throw internally.
278 2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>
280         * config/visium/visium.c (visium_select_cc_mode): Return CCmode for
281         any RTX present on the RHS of a SET.
282         * compare-elim.c (try_eliminate_compare): Restore comment.
284 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
286         * langhooks.h (struct lang_hooks): Document that tree_size langhook
287         may be also called on tcc_type nodes.
288         * langhooks.c (lhd_tree_size): Likewise.
290 2017-10-17  David Malcolm  <dmalcolm@redhat.com>
292         * gimple-ssa-sprintf.c (fmtwarn): Update for changed signature of
293         format_warning_at_substring.
294         (maybe_warn): Convert source_range * param to a location_t.  Pass
295         UNKNOWN_LOCATION rather than NULL to fmtwarn.
296         (format_directive): Remove code to extract source_ranges and
297         source_range * in favor of just a location_t.
298         (parse_directive): Pass UNKNOWN_LOCATION rather than NULL to
299         fmtwarn.
300         * substring-locations.c (format_warning_va): Convert
301         source_range * param to a location_t.
302         (format_warning_at_substring): Likewise.
303         * substring-locations.h (format_warning_va): Likewise.
304         (format_warning_at_substring): Likewise.
306 2017-10-17  Jan Hubicka  <hubicka@ucw.cz>
308         * target.h (enum vect_cost_for_stmt): Add vec_gather_load and
309         vec_scatter_store
310         * tree-vect-stmts.c (record_stmt_cost): Make difference between normal
311         and scatter/gather ops.
313         * aarch64/aarch64.c (aarch64_builtin_vectorization_cost): Add
314         vec_gather_load and vec_scatter_store.
315         * arm/arm.c (arm_builtin_vectorization_cost): Likewise.
316         * powerpcspe/powerpcspe.c (rs6000_builtin_vectorization_cost): Likewise.
317         * rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Likewise.
318         * s390/s390.c (s390_builtin_vectorization_cost): Likewise.
319         * spu/spu.c (spu_builtin_vectorization_cost): Likewise.
320         * i386/i386.c (x86_builtin_vectorization_cost): Likewise.
322 2017-10-17  Uros Bizjak  <ubizjak@gmail.com>
324         * reg-stack.c (compare_for_stack_reg): Add bool argument.
325         Detect FTST instruction and handle its register pops.  Only pop
326         second operand if can_pop_second_op is true.
327         (subst_stack_regs_pat) <case COMPARE>: Detect FCOMI instruction to
328         set can_pop_second_op to false in the compare_for_stack_reg call.
330         * config/i386/i386.md (*cmpi<FPCMP:unord><MODEF:mode>): Only call
331         output_fp_compare for stack register operands.
332         * config/i386/i386.c (output_fp_compare): Do not output SSE compare
333         instructions here.  Do not emit stack register pops here.  Assert
334         that FCOMPP pops next to top stack register.  Rewrite function.
336 2017-10-17  Nathan Sidwell  <nathan@acm.org>
338         PR middle-end/82577
339         * alias.c (compare_base_decls): Check HAS_DECL_ASSEMBLER_NAME_P,
340         use DECL_ASSEMBLER_NAME_RAW.
342         PR middle-end/82546
343         * tree.c (tree_code_size): Reformat.  Punt to lang hook for unknown
344         TYPE nodes.
346 2017-10-17  Qing Zhao <qing.zhao@oracle.com>
347             Wilco Dijkstra <wilco.dijkstra@arm.com>
349         * builtins.c (expand_builtin_update_setjmp_buf): Add a
350         converstion to Pmode from the buf_addr.
352 2017-10-17  Richard Biener  <rguenther@suse.de>
354         * graphite-dependences.c (scop_get_reads_and_writes): Change
355         output parameters to references.
357 2017-10-17  Jackson Woodruff  <jackson.woodruff@arm.com>
359         PR 71026/tree-optimization
360         * fold-const.c (distribute_real_division): Removed.
361         (fold_binary_loc): Remove calls to distribute_real_divison.
363 2017-10-17  Richard Biener  <rguenther@suse.de>
365         * graphite-scop-detection.c
366         (scop_detection::stmt_has_simple_data_refs_p): Always use
367         the full nest as region.
368         (try_generate_gimple_bb): Likewise.
369         * sese.c (scalar_evolution_in_region): Simplify now that
370         SCEV can handle instantiation in regions.
371         * tree-scalar-evolution.c (instantiate_scev_name): Also instantiate
372         in the non-loop part of a function if requested.
374 2017-10-17  Richard Biener  <rguenther@suse.de>
376         PR tree-optimization/82563
377         * graphite-isl-ast-to-gimple.c (generate_entry_out_of_ssa_copies):
378         New function.
379         (graphite_regenerate_ast_isl): Call it.
380         * graphite-scop-detection.c (build_scops): Remove entry edge split.
382 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
384         PR tree-optimization/82549
385         * fold-const.c (optimize_bit_field_compare, fold_truth_andor_1):
386         Formatting fixes.  Instead of calling make_bit_field_ref with negative
387         bitpos return 0.
389 2017-10-17  Olga Makhotina  <olga.makhotina@intel.com>
391         * config/i386/avx512dqintrin.h (_mm_mask_reduce_sd,
392         _mm_maskz_reduce_sd, _mm_mask_reduce_ss,=20
393         _mm_maskz_reduce_ss): New.
394         * config/i386/i386-builtin.def (__builtin_ia32_reducesd_mask,
395         __builtin_ia32_reducess_mask): Ditto..
396         (__builtin_ia32_reducesd, __builtin_ia32_reducess): Remove.
397         * config/i386/sse.md (reduces<mode>): Renamed to ...
398         (reduces<mode><mask_scalar_name>): ... this.
399         (vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0|%0, %1, %2, %3}): Changed
400         to ...
401         (vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0<mask_scalar_operand4>|
402         %0<mask_scalar_operand4>, %1, %2, %3}): ... this.
404 2017-10-16  David Malcolm  <dmalcolm@redhat.com>
406         * Makefile.in (OBJS): Add unique-ptr-tests.o.
407         * selftest-run-tests.c (selftest::run_tests): Call
408         selftest::unique_ptr_tests_cc_tests.
409         * selftest.h (selftest::unique_ptr_tests_cc_tests): New decl.
410         * unique-ptr-tests.cc: New file.
412 2017-10-16  Vladimir Makarov  <vmakarov@redhat.com>
414         PR sanitizer/82353
415         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
416         locations.
417         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
418         (make_hard_regno_born, make_hard_regno_dead): Update
419         bb_killed_pseudos and bb_gen_pseudos for fixed regs.
421 2017-10-16  Jeff Law  <law@redhat.com>
423         * tree-ssa-dse.c (live_bytes_read): Fix thinko.
425 2017-10-16  Jan Hubicka  <hubicka@ucw.cz>
427         * x86-tune-costs.h (znver1_cost): Fix move cost tables.
429 2017-10-16  Olivier Hainque  <hainque@adacore.com>
431         * gcc/config.gcc (powerpc*-*-*spe*): Pick 8548 as the default
432         with_cpu if we were configured for an e500v2 target cpu name.
434 2017-10-16  Thomas Preud'homme  <thomas.preudhomme@arm.com>
436         * config/arm/arm-cpus.in (cortex-m33): Add nodsp option.
437         * doc/invoke.texi: Document +nodsp as a valid extension for
438         -mcpu=cortex-m33.
440 2017-10-16  Martin Liska  <mliska@suse.cz>
442         * sbitmap.c (bitmap_bit_in_range_p_checking): New function.
443         (test_set_range): Likewise.
444         (test_range_functions): Rename to ...
445         (test_bit_in_range): ... this.
446         (sbitmap_c_tests): Add new test.
448 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
450         * config/aarch64/arm_neon.h (vdot_u32, vdotq_u32, vdot_s32, vdotq_s32): New.
451         (vdot_lane_u32, vdot_laneq_u32, vdotq_lane_u32, vdotq_laneq_u32): New.
452         (vdot_lane_s32, vdot_laneq_s32, vdotq_lane_s32, vdotq_laneq_s32): New.
454 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
456         * config/aarch64/aarch64-builtins.c
457         (aarch64_types_quadopu_lane_qualifiers): New.
458         (TYPES_QUADOPU_LANE): New.
459         * config/aarch64/aarch64-simd.md (aarch64_<sur>dot<vsi2qi>): New.
460         (<sur>dot_prod<vsi2qi>, aarch64_<sur>dot_lane<vsi2qi>): New.
461         (aarch64_<sur>dot_laneq<vsi2qi>): New.
462         * config/aarch64/aarch64-simd-builtins.def (sdot, udot): New.
463         (sdot_lane, udot_lane, sdot_laneq, udot_laneq): New.
464         * config/aarch64/iterators.md (sur): Add UNSPEC_SDOT, UNSPEC_UDOT.
465         (Vdottype, DOTPROD): New.
466         (sur): Add SDOT and UDOT.
468 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
470         * config/aarch64/aarch64.h (AARCH64_FL_DOTPROD): New.
471         (AARCH64_ISA_DOTPROD, TARGET_DOTPROD): New.
472         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Add TARGET_DOTPROD.
473         * config/aarch64/aarch64-option-extensions.def (dotprod): New.
474         * config/aarch64/aarch64-cores.def (cortex-a55, cortex-a75): Enable TARGET_DOTPROD.
475         (cortex-a75.cortex-a55): Likewise.
476         * doc/invoke.texi (aarch64-feature-modifiers): Document dotprod.
478 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
480         * config/arm/arm-builtins.c (arm_unsigned_uternop_qualifiers): New.
481         (UTERNOP_QUALIFIERS, arm_umac_lane_qualifiers, UMAC_LANE_QUALIFIERS): New.
482         * config/arm/arm_neon_builtins.def (sdot, udot, sdot_lane, udot_lane): new.
483         * config/arm/iterators.md (DOTPROD, VSI2QI, vsi2qi): New.
484         (UNSPEC_DOT_S, UNSPEC_DOT_U, opsuffix): New.
485         * config/arm/neon.md (neon_<sup>dot<vsi2qi>): New.
486         (neon_<sup>dot_lane<vsi2qi>, <sup>dot_prod<vsi2qi>): New.
487         * config/arm/types.md (neon_dot, neon_dot_q): New.
488         * config/arm/unspecs.md (sup): Add UNSPEC_DOT_S, UNSPEC_DOT_U.
490 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
492         * config/arm/arm.h (TARGET_DOTPROD): New.
493         * config/arm/arm.c (arm_arch_dotprod): New.
494         (arm_option_reconfigure_globals): Add arm_arch_dotprod.
495         * config/arm/arm-c.c (__ARM_FEATURE_DOTPROD): New.
496         * config/arm/arm-cpus.in (armv8.2-a): Enabled +dotprod.
497         (feature dotprod, group dotprod, ALL_SIMD_INTERNAL): New.
498         (ALL_FPU_INTERNAL): Use ALL_SIMD_INTERNAL.
499         * config/arm/t-multilib (v8_2_a_simd_variants): Add dotprod.
500         * doc/invoke.texi (armv8.2-a): Document dotprod
502 2017-10-14  Jan Hubicka  <hubicka@ucw.cz>
504         * i386.c (ix86_vec_cost): New function.
505         (ix86_rtx_costs): Handle vector operations better.
506         * i386.h (struct processor_costs): Add sse_op, fmasd, fmass.
507         * x86-tune-costs.h: Add new costs to all tables.
509 2017-10-14  Jan Hubicka  <hubicka@ucw.cz>
511         * i386.c (ix86_rtx_costs): Make difference between x87 and SSE
512         operations.
513         * i386.h (struct processor_costs): Add addss, mulss, mulsd, divss,
514         divsd, sqrtss and sqrtsd
515         * x86-tune-costs.h: Add new entries to all costs.
516         (znver1_cost): Fix to match real instruction latencies.
518 2017-10-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
519             Michael Collison <michael.collison@arm.com>
521         * compare-elim.c: Include emit-rtl.h.
522         (can_merge_compare_into_arith): New function.
523         (try_validate_parallel): Likewise.
524         (try_merge_compare): Likewise.
525         (try_eliminate_compare): Call the above when no previous clobber
526         is available.
527         (execute_compare_elim_after_reload): Add DF_UD_CHAIN and DF_DU_CHAIN
528         dataflow problems.
530 2017-10-14  Jakub Jelinek  <jakub@redhat.com>
532         PR middle-end/62263
533         PR middle-end/82498
534         * tree-ssa-phiopt.c (value_replacement): Comment fix.  Handle
535         up to 2 preparation statements for ASSIGN in MIDDLE_BB.
537         PR middle-end/62263
538         PR middle-end/82498
539         * tree-ssa-forwprop.c (simplify_rotate): Allow def_arg1[N]
540         to be any operand_equal_p operands.  For & (B - 1) require
541         B to be power of 2.  Recognize
542         (X << (Y & (B - 1))) | (X >> ((-Y) & (B - 1))) and similar patterns.
544 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
546         PR bootstrap/82553
547         * optabs.c (expand_memory_blockage): Fix call of
548         targetm.have_memory_blockage.
550 2017-10-14  Jakub Jelinek  <jakub@redhat.com>
552         PR bootstrap/82548
553         * config.gcc (*-*-solaris2*, i[34567]86-*-cygwin*,
554         x86_64-*-cygwin*, i[34567]86-*-mingw* | x86_64-*-mingw*): Append
555         objects to extra_objs instead of overwriting it.
557 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
559         * config/i386/sync.md (FILD_ATOMIC/FIST_ATOMIC FP load peephole2):
560         Use any_fp_register_operand as operand[3] predicate.  Simplify
561         equality test for operands[2] and operands[4] memory location.
562         (LDX_ATOMIC/STX_ATOMIC FP load peephole2): Ditto.
563         (FILD_ATOMIC/FIST_ATOMIC FP load peephole2 with mem blockage): New.
564         (LDX_ATOMIC/LDX_ATOMIC FP load peephole2 with mem blockage): Ditto.
565         (FILD_ATOMIC/FIST_ATOMIC FP store peephole2): Use
566         any_fp_register_operand as operand[1] predicate.  Simplify
567         equality test for operands[0] and operands[3] memory location.
568         (LDX_ATOMIC/STX_ATOMIC FP store peephole2): Ditto.
569         (FILD_ATOMIC/FIST_ATOMIC FP store peephole2 with mem blockage): New.
570         (LDX_ATOMIC/LDX_ATOMIC FP storepeephole2 with mem blockage): Ditto.
572 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
574         * target-insns.def: Add memory_blockage.
575         * optabs.c (expand_memory_blockage): New function.
576         (expand_asm_memory_barrier): Rename ...
577         (expand_asm_memory_blockage): ... to this.
578         (expand_mem_thread_fence): Call expand_memory_blockage
579         instead of expand_asm_memory_barrier.
580         (expand_mem_singnal_fence): Ditto.
581         (expand_atomic_load): Ditto.
582         (expand_atomic_store): Ditto.
583         * doc/md.texi (Standard Pattern Names For Generation):
584         Document memory_blockage instruction pattern.
586 2017-10-13  Sebastian Perta  <sebastian.perta@renesas.com>
588         * config/rl78/rl78.c (rl78_emit_libcall): New function.
589         * config/rl78/rl78-protos.h (rl78_emit_libcall): New function.
590         * config/rl78/rl78.md: New define_expand "adddi3".
592 2017-10-13  Jan Hubicka  <hubicka@ucw.cz>
594         * cfghooks.c (verify_flow_info): Disable check that all probabilities
595         are set correctly.
597 2017-10-13  Jeff Law  <law@redhat.com>
599         * tree-ssa-reassoc.c (reassociate_bb): Clarify code slighly.
601 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
603         PR target/82274
604         * internal-fn.c (expand_mul_overflow): If both operands have
605         the same highpart of -1 or 0 and the topmost bit of lowpart
606         is different, overflow is if res <= 0 rather than res < 0.
608 2017-10-13  Pat Haugen  <pthaugen@us.ibm.com>
610         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Remove
611         TARGET_P9_VECTOR code for unaligned_load case.
613 2017-10-13  Jan Hubicka  <hubicka@ucw.cz>
615         * cfghooks.c (verify_flow_info): Check that edge probabilities are set.
617 2017-10-13  Nathan Sidwell  <nathan@acm.org>
619         * tree-core.h (tree_contains_struct): Make bool.
620         * tree.c (tree_contains_struct): Likewise.
621         * tree.h (MARK_TS_BASE): Remove do ... while (0) idiom.
622         (MARK_TS_TYPED, MARK_TS_COMMON, MARK_TS_TYPE_COMMON,
623         MARK_TS_TYPE_WITH_LANG_SPECIFIC, MARK_TS_DECL_MINIMAL,
624         MARK_TS_DECL_COMMON, MARK_TS_DECL_WRTL, MARK_TS_DECL_WITH_VIS,
625         MARK_TS_DECL_NON_COMMON): Likewise, use comma operator.
627 2017-10-13  Richard Biener  <rguenther@suse.de>
629         * graphite-isl-ast-to-gimple.c
630         (translate_isl_ast_to_gimple::get_rename_from_scev): Remove unused
631         parameters and dominance check.
632         (translate_isl_ast_to_gimple::graphite_copy_stmts_from_block): Adjust.
633         (translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences): Likewise.
634         (translate_isl_ast_to_gimple::graphite_regenerate_ast_isl):
635         Do not update SSA form here or do intermediate IL verification.
636         * graphite.c: Include tree-ssa.h and tree-into-ssa.h.
637         (graphite_initialize): Remove check on the number of loops in
638         the function and inline into graphite_transform_loops.
639         (graphite_finalize): Inline into graphite_transform_loops.
640         (graphite_transform_loops): Perform SSA update and IL verification
641         here.
642         * params.def (PARAM_GRAPHITE_MIN_LOOPS_PER_FUNCTION): Remove.
644 2017-10-13  Richard Biener  <rguenther@suse.de>
646         * graphite-isl-ast-to-gimple.c (max_mode_int_precision,
647         graphite_expression_type_precision): Avoid global constructor
648         by moving ...
649         (translate_isl_ast_to_gimple::translate_isl_ast_to_gimple): Here.
650         (translate_isl_ast_to_gimple::graphite_expr_type): Add type member.
651         (translate_isl_ast_to_gimple::translate_isl_ast_node_for): Use it.
652         (translate_isl_ast_to_gimple::build_iv_mapping): Likewise.
653         (translate_isl_ast_to_gimple::graphite_create_new_guard): Likewise.
654         * graphite-sese-to-poly.c (build_original_schedule): Return nothing.
656 2017-10-13  H.J. Lu  <hongjiu.lu@intel.com>
658         PR target/82499
659         * config/i386/i386.h (ix86_red_zone_size): New.
660         * config/i386/i386.md (push peephole2s): Replace
661         "!ix86_using_red_zone ()" with "ix86_red_zone_size == 0".
663 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
664             Alan Hayward  <alan.hayward@arm.com>
665             David Sherwood  <david.sherwood@arm.com>
667         * combine.c (can_change_dest_mode): Reject changes in
668         REGMODE_NATURAL_SIZE.
670 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
671             Alan Hayward  <alan.hayward@arm.com>
672             David Sherwood  <david.sherwood@arm.com>
674         * cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_BITSIZE.
675         (expand_debug_source_expr): Likewise.
676         * combine.c (combine_simplify_rtx): Likewise.
677         * cse.c (fold_rtx): Likewise.
678         * fwprop.c (canonicalize_address): Likewise.
679         * targhooks.c (default_shift_truncation_mask): Likewise.
681 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
682             Alan Hayward  <alan.hayward@arm.com>
683             David Sherwood  <david.sherwood@arm.com>
685         * optabs.c (add_equal_note): Use GET_MODE_UNIT_SIZE.
686         (widened_mode): Likewise.
687         (expand_unop): Likewise.
688         * ree.c (transform_ifelse): Likewise.
689         (merge_def_and_ext): Likewise.
690         (combine_reaching_defs): Likewise.
691         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
693 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
694             Alan Hayward  <alan.hayward@arm.com>
695             David Sherwood  <david.sherwood@arm.com>
697         * caller-save.c (replace_reg_with_saved_mem): Use byte_lowpart_offset.
698         * combine.c (gen_lowpart_for_combine): Likewise.
699         * dwarf2out.c (rtl_for_decl_location): Likewise.
700         * final.c (alter_subreg): Likewise.
701         * rtlhooks.c (gen_lowpart_general): Likewise.
702         (gen_lowpart_if_possible): Likewise.
704 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
705             Alan Hayward  <alan.hayward@arm.com>
706             David Sherwood  <david.sherwood@arm.com>
708         * calls.c (expand_call): Use subreg_lowpart_offset.
709         * cse.c (cse_insn): Likewise.
710         * regcprop.c (copy_value): Likewise.
711         (copyprop_hardreg_forward_1): Likewise.
713 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
715         PR target/82524
716         * config/i386/i386.md (addqi_ext_1, andqi_ext_1,
717         *andqi_ext_1_cc, *<code>qi_ext_1, *xorqi_ext_1_cc): Change
718         =Q constraints to +Q and into insn condition add check
719         that operands[0] and operands[1] are equal.
720         (*addqi_ext_2, *andqi_ext_2, *<code>qi_ext_2): Change
721         =Q constraints to +Q and into insn condition add check
722         that operands[0] is equal to either operands[1] or operands[2].
724         PR target/82498
725         * fold-const.c (fold_binary_loc) <bit_rotate>: Code cleanups,
726         instead of handling MINUS_EXPR twice (once for each argument),
727         canonicalize operand order and handle just once, use rtype where
728         possible.  Handle (A << B) | (A >> (-B & (Z - 1))).
730         PR target/82498
731         * config/i386/ia32intrin.h (__rold, __rord, __rolq, __rorq): Allow
732         any values of __C while still being pattern recognizable as a simple
733         rotate instruction.
735 2017-10-13  Richard Biener  <rguenther@suse.de>
737         PR tree-optimization/82451
738         Revert
739         2017-10-02  Richard Biener  <rguenther@suse.de>
741         PR tree-optimization/82355
742         * graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
743         a mapping for the enclosing loop but avoid generating one for
744         the loop tree root.
745         (copy_bb_and_scalar_dependences): Remove premature codegen
746         error on PHIs in blocks duplicated into multiple places.
747         * graphite-scop-detection.c
748         (scop_detection::stmt_has_simple_data_refs_p): For a loop not
749         in the region use it as loop and nest to analyze the DR in.
750         (try_generate_gimple_bb): Likewise.
751         * graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
752         (add_loop_constraints): For blocks in a loop not in the region
753         create a dimension with a single iteration.
754         * sese.h (gbb_loop_at_index): Remove assert.
756         * cfgloop.c (loop_preheader_edge): For the loop tree root
757         return the single successor of the entry block.
758         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
759         Reset the SCEV hashtable and niters.
760         * graphite-scop-detection.c
761         (scop_detection::graphite_can_represent_scev): Add SCOP parameter,
762         assert that we only have POLYNOMIAL_CHREC that vary in loops
763         contained in the region.
764         (scop_detection::graphite_can_represent_expr): Adjust.
765         (scop_detection::stmt_has_simple_data_refs_p): For loops
766         not in the region set loop to NULL.  The nest is now the
767         entry edge to the region.
768         (try_generate_gimple_bb): Likewise.
769         * sese.c (scalar_evolution_in_region): Adjust for
770         instantiate_scev change.
771         * tree-data-ref.h (graphite_find_data_references_in_stmt):
772         Make nest parameter the edge into the region.
773         (create_data_ref): Likewise.
774         * tree-data-ref.c (dr_analyze_indices): Make nest parameter an
775         entry edge into a region and adjust instantiate_scev calls.
776         (create_data_ref): Likewise.
777         (graphite_find_data_references_in_stmt): Likewise.
778         (find_data_references_in_stmt): Pass the loop preheader edge
779         from the nest argument.
780         * tree-scalar-evolution.h (instantiate_scev): Make instantiate_below
781         parameter the edge into the region.
782         (instantiate_parameters): Use the loop preheader edge as entry.
783         * tree-scalar-evolution.c (analyze_scalar_evolution): Handle
784         NULL loop.
785         (get_instantiated_value_entry): Make instantiate_below parameter
786         the edge into the region.
787         (instantiate_scev_name): Likewise.  Adjust dominance checks,
788         when we cannot use loop-based instantiation instantiate by
789         walking use-def chains.
790         (instantiate_scev_poly): Adjust.
791         (instantiate_scev_binary): Likewise.
792         (instantiate_scev_convert): Likewise.
793         (instantiate_scev_not): Likewise.
794         (instantiate_array_ref): Remove.
795         (instantiate_scev_3): Likewise.
796         (instantiate_scev_2): Likewise.
797         (instantiate_scev_1): Likewise.
798         (instantiate_scev_r): Do not blindly handle N-operand trees.
799         Do not instantiate array-refs.  Handle all constants and invariants.
800         (instantiate_scev): Make instantiate_below parameter
801         the edge into the region.
802         (resolve_mixers): Use the loop preheader edge for the region
803         parameter to instantiate_scev_r.
804         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Adjust.
806 2017-10-13  Richard Biener  <rguenther@suse.de>
808         PR tree-optimization/82525
809         * graphite-isl-ast-to-gimple.c
810         (translate_isl_ast_to_gimple::widest_int_from_isl_expr_int): Split
811         out from ...
812         (translate_isl_ast_to_gimple::gcc_expression_from_isl_expr_int): Here.
813         Fail code generation when we cannot represent the isl integer.
814         (binary_op_to_tree): Elide modulo operations that are no-ops
815         in the type we code generate.  Remove now superfluous code
816         generation errors.
818 2017-10-13  Richard Biener  <rguenther@suse.de>
820         * graphite-scop-detection.c (loop_ivs_can_be_represented): Remove.
821         (scop_detection::harmful_loop_in_region): Remove premature
822         IV type restriction.
823         (scop_detection::graphite_can_represent_scev): We can handle
824         pointer IVs just fine.
826 2017-10-13  Alan Modra  <amodra@gmail.com>
828         * doc/extend.texi (Extended Asm <Clobbers>): Rename to
829         "Clobbers and Scratch Registers".  Add paragraph on
830         alternative to clobbers for scratch registers and OpenBLAS
831         example.
833 2017-10-13  Alan Modra  <amodra@gmail.com>
835         * doc/extend.texi (Clobbers): Correct vax example.  Delete old
836         example of a memory input for a string of known length.  Move
837         commentary out of table.  Add a number of new examples
838         covering array memory inputs.
840 2017-10-12  Martin Liska  <mliska@suse.cz>
842         PR tree-optimization/82493
843         * sbitmap.c (bitmap_bit_in_range_p): Fix the implementation.
844         (test_range_functions): New function.
845         (sbitmap_c_tests): Likewise.
846         * selftest-run-tests.c (selftest::run_tests): Run new tests.
847         * selftest.h (sbitmap_c_tests): New function.
849         * tree-ssa-dse.c (live_bytes_read): Fix thinko.
851 2017-10-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
853         * config/rs6000/amo.h: Fix spacing issue.
855 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
857         PR target/82498
858         * config/i386/i386.md (*ashl<mode>3_mask_1,
859         *<shift_insn><mode>3_mask_1, *<rotate_insn><mode>3_mask_1,
860         *<btsc><mode>_mask_1, *btr<mode>_mask_1): New define_insn_and_split
861         patterns.
863 2017-10-12  Jan Hubicka  <hubicka@ucw.cz>
865         * profile-count.h (safe_scale_64bit): Fix GCC4.x path.
866         (profile_probability): Set max_probability
867         to (uint32_t) 1 << (n_bits - 2) and update accessors to avoid overlfows
868         in temporaries.
869         * profile-count.c (profile_probability::differs_from_p): Do not
870         rely on max_probaiblity == 10000
872 2017-10-12  Jeff Law  <law@redhat.com>
874         * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject ao_refs with
875         negative offsets.
877 2017-10-12  Martin Sebor  <msebor@redhat.com>
879         PR other/82301
880         PR c/82435
881         * cgraphunit.c (maybe_diag_incompatible_alias): New function.
882         (handle_alias_pairs): Call it.
883         * common.opt (-Wattribute-alias): New option.
884         * doc/extend.texi (ifunc attribute): Discuss C++ specifics.
885         * doc/invoke.texi (-Wattribute-alias): Document.
887 2017-10-12  Vladimir Makarov  <vmakarov@redhat.com>
889         Revert
890         2017-10-11  Vladimir Makarov  <vmakarov@redhat.com>
891         PR sanitizer/82353
892         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
893         locations.
894         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
895         (make_hard_regno_born, make_hard_regno_dead): Update
896         bb_killed_pseudos and bb_gen_pseudos.
898 2017-10-12  Jan Hubicka  <hubicka@ucw.cz>
900         * config/i386/x86-tune-sched.c (ix86_adjust_cost): Fix Zen support.
902 2017-10-12  Uros Bizjak  <ubizjak@gmail.com>
904         * config/alpha/alpha.c (alpha_split_conditional_move):
905         Use std::swap instead of manually swapping.
906         (alpha_stdarg_optimize_hook): Ditto.
907         (alpha_canonicalize_comparison): Ditto.
909 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
911         * tree-loop-distribution.c (struct builtin_info): New struct.
912         (struct partition): Refactor fields into struct builtin_info.
913         (partition_free): Free struct builtin_info.
914         (build_size_arg_loc, build_addr_arg_loc): Delete.
915         (generate_memset_builtin, generate_memcpy_builtin): Get memory range
916         information from struct builtin_info.
917         (find_single_drs): New function refactored from classify_partition.
918         Also moved builtin validity checks to this function.
919         (compute_access_range, alloc_builtin): New functions.
920         (classify_builtin_st, classify_builtin_ldst): New functions.
921         (classify_partition): Refactor code into functions find_single_drs,
922         classify_builtin_st and classify_builtin_ldst.
923         (distribute_loop): Don't do runtime alias check when distributing
924         loop nest.
925         (find_seed_stmts_for_distribution): New function.
926         (pass_loop_distribution::execute): Refactor code finding seed
927         stmts into above function.  Support distribution for the innermost
928         two-level loop nest.  Adjust dump information.
930 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
932         * tree-loop-distribution.c: Adjust the general comment.
933         (NUM_PARTITION_THRESHOLD): New macro.
934         (ssa_name_has_uses_outside_loop_p): Support loop nest distribution.
935         (classify_partition): Skip builtin pattern of loop nest's inner loop.
936         (merge_dep_scc_partitions): New parameter ignore_alias_p and use it
937         in call to build_partition_graph.
938         (finalize_partitions): New parameter.  Make loop distribution more
939         conservative by fusing more partitions.
940         (distribute_loop): Don't do runtime alias check in case of loop nest
941         distribution.
942         (find_seed_stmts_for_distribution): New function.
943         (prepare_perfect_loop_nest): New function.
944         (pass_loop_distribution::execute): Refactor code finding seed stmts
945         and loop nest into above functions.  Support loop nest distribution.
946         Adjust dump information accordingly.
948 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
950         * tree-loop-distribution.c (break_alias_scc_partitions): Add comment
951         and set PTYPE_SEQUENTIAL for merged partition.
953 2017-10-12  Richard Biener  <rguenther@suse.de>
955         PR tree-optimization/69728
956         Revert
957         2017-09-19  Richard Biener  <rguenther@suse.de>
959         PR tree-optimization/69728
960         * graphite-sese-to-poly.c (schedule_error): New global.
961         (add_loop_schedule): Handle empty domain by failing the
962         schedule.
963         (build_original_schedule): Handle schedule_error.
965         * graphite-sese-to-poly.c (add_loop_schedule): Handle empty
966         domain by returning an unchanged schedule.
968 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
970         * genrecog.c (validate_pattern): For VEC_SELECT verify that
971         CONST_INT selectors are 0 to GET_MODE_NUNITS (imode) - 1.
973 2017-10-12  Aldy Hernandez  <aldyh@redhat.com>
975         * Makefile.in (TAGS): Merge all the *.def files into one pattern.
976         Handle params.def.
978 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
980         PR c++/82159
981         * expr.c (store_field): Don't optimize away bitsize == 0 store
982         from CALL_EXPR with addressable return type.
984 2017-10-11  Segher Boessenkool  <segher@kernel.crashing.org>
986         * config/rs6000/rs6000.h (TARGET_ISEL64): Delete.
987         * config/rs6000/rs6000.md (sel): Delete mode attribute.
988         (mov<mode>cc, isel_signed_<mode>, isel_unsigned_<mode>,
989         *isel_reversed_signed_<mode>, *isel_reversed_unsigned_<mode>): Use
990         TARGET_ISEL instead of TARGET_ISEL<sel>.
992 2017-10-11  David Edelsohn  <dje.gcc@gmail.com>
994         * config/rs6000/rs6000.c
995         (rs6000_xcoff_asm_output_aligned_decl_common): Test for NULL decl.
997 2017-10-11  Segher Boessenkool  <segher@kernel.crashing.org>
999         * config/rs6000/predicates.md (zero_constant, all_ones_constant):
1000         Move up in file.
1001         (reg_or_cint_operand): Fix comment.
1002         (reg_or_zero_operand): New predicate.
1003         * config/rs6000/rs6000-protos.h (output_isel): Delete.
1004         * config/rs6000/rs6000.c (output_isel): Delete.
1005         * config/rs6000/rs6000.md (isel_signed_<mode>): Use reg_or_zero_operand
1006         instead of reg_or_cint_operand.  Output instruction directly (not via
1007         output_isel).
1008         (isel_unsigned_<mode>): Ditto.
1009         (*isel_reversed_signed_<mode>): Use reg_or_zero_operand instead of
1010         gpc_reg_operand.  Add an instruction alternative for this.  Output
1011         instruction directly.
1012         (*isel_reversed_unsigned_<mode>): Ditto.
1014 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
1016         * config/i386/i386.c (ix86_canonicalize_comparison): New function.
1017         (TARGET_CANONICALIZE_COMPARISON): Define.
1019 2017-10-11  Qing Zhao  <qing.zhao@oracle.com>
1021         PR target/81422
1022         * config/aarch64/aarch64.c (aarch64_load_symref_appropriately):
1023         Check whether the dest is REG before adding REG_EQUIV note.
1025 2017-10-11  Vladimir Makarov  <vmakarov@redhat.com>
1027         PR sanitizer/82353
1028         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
1029         locations.
1030         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
1031         (make_hard_regno_born, make_hard_regno_dead): Update
1032         bb_killed_pseudos and bb_gen_pseudos.
1034 2017-10-11  Nathan Sidwell  <nathan@acm.org>
1036         * incpath.h (enum incpath_kind): Name enum, prefix values.
1037         (add_path, add_cpp_dir_path, get_added_cpp_dirs): Use incpath_kind.
1038         * incpath.c (heads, tails): Use INC_MAX.
1039         (add_env_var_paths, add_standard_paths): Use incpath_kind.
1040         (merge_include_chains, split_quote_chain,
1041         register_include_chains): Update incpath_kind names.
1042         (add_cpp_dir_path, add_path, get_added_cpp_dirs): Use incpath_kind.
1043         * config/darwin-c.c (add_system_framework_path): Update incpath_kind
1044         names.
1045         (add_framework_path, darwin_register_objc_includes): Likewise.
1046         * config/vms/vms-c.c (vms_c_register_includes): Likewise.
1048 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
1050         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
1051         Do not use float_operator operator predicate.
1052         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
1053         * config/i386/predicates.md (float_operator): Remove predicate.
1055 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
1057         * config/i386/i386.md (*jcc<mode>_0_i387): Remove insn pattern.
1058         (*jccxf_i387): Ditto.
1059         (*jcc<mode>_i387): Ditto.
1060         (*jccu<mode>_i387): Ditto.
1061         (*jcc<X87MODEF:mode>_<SWI24:mode>_i387): Ditto.
1062         (*jcc_*_i387 splitters): Remove.
1063         * config/i386/i386-protos.h (ix86_split_fp_branch): Remove prototype.
1064         * config/i386/i386.c (ix86_split_fp_branch): Remove.
1065         * config/i386/predicates.md (ix86_swapped_fp_comparison_operator):
1066         Remove predicate.
1068 2017-10-11  Jan Hubicka  <hubicka@ucw.cz>
1070         * profile-count.h (slow_safe_scale_64bit): New function.
1071         (safe_scale_64bit): New inline.
1072         (profile_count::max_safe_multiplier): Remove; use safe_scale_64bit.
1073         * profile-count.c: Include wide-int.h
1074         (slow_safe_scale_64bit): New.
1076 2017-10-11  Nathan Sidwell  <nathan@acm.org>
1078         * tree.h (DECL_ASSEMBLER_NAME_SET_P): Don't check
1079         HAS_DECL_ASSEMBLER_NAME_P.
1080         * gimple-expr.c (gimple_decl_printable_name: Check
1081         HAS_DECL_ASSEMBLER_NAME_P too.
1082         * ipa-utils.h (type_in_anonymous_namespace_p): Check
1083         DECL_ASSEMBLER_NAME_SET_P of TYPE_NAME.
1084         (odr_type_p): No need to assert TYPE_NAME is a TYPE_DECL.
1085         * passes.c (rest_of_decl_compilation): Check
1086         HAS_DECL_ASSEMBLER_NAME_P too.
1087         * recog.c (verify_changes): Likewise.
1088         * tree-pretty-print.c (dump_decl_name): Likewise.
1089         * tree-ssa-structalias.c (alias_get_name): Likewise.  Reimplement.
1091         * tree.h (DECL_ASSEMBLER_NAME_RAW): New.
1092         (SET_DECL_ASSEMBLER_NAME): Use it.
1093         (DECL_ASSEMBLER_NAME_SET_P): Likewise.
1094         (COPY_DECL_ASSEMBLER_NAME): Likewise.
1095         * tree.c (decl_assembler_name): Use DECL_ASSEMBLER_NAME_RAW.
1097 2017-10-11  Jan Hubicka  <hubicka@ucw.cz>
1099         * config.gcc (i386, x86_64): Add extra objects.
1100         * config/i386/i386-protos.h (ix86_rip_relative_addr_p): Declare.
1101         (ix86_min_insn_size): Declare.
1102         (ix86_issue_rate): Declare.
1103         (ix86_adjust_cost): Declare.
1104         (ia32_multipass_dfa_lookahead): Declare.
1105         (ix86_macro_fusion_p): Declare.
1106         (ix86_macro_fusion_pair_p): Declare.
1107         (ix86_bd_has_dispatch): Declare.
1108         (ix86_bd_do_dispatch): Declare.
1109         (ix86_core2i7_init_hooks): Declare.
1110         (ix86_atom_sched_reorder): Declare.
1111         * config/i386/i386.c Move all CPU cost tables to x86-tune-costs.h.
1112         (COSTS_N_BYTES): Move to x86-tune-costs.h.
1113         (DUMMY_STRINGOP_ALGS):Move to x86-tune-costs.h.
1114         (rip_relative_addr_p): Rename to ...
1115         (ix86_rip_relative_addr_p): ... this one; export.
1116         (memory_address_length): Update.
1117         (ix86_issue_rate): Move to x86-tune-sched.c.
1118         (ix86_flags_dependent): Move to x86-tune-sched.c.
1119         (ix86_agi_dependent): Move to x86-tune-sched.c.
1120         (exact_dependency_1): Move to x86-tune-sched.c.
1121         (exact_store_load_dependency): Move to x86-tune-sched.c.
1122         (ix86_adjust_cost): Move to x86-tune-sched.c.
1123         (ia32_multipass_dfa_lookahead): Move to x86-tune-sched.c.
1124         (ix86_macro_fusion_p): Move to x86-tune-sched.c.
1125         (ix86_macro_fusion_pair_p): Move to x86-tune-sched.c.
1126         (do_reorder_for_imul): Move to x86-tune-sched-atom.c.
1127         (swap_top_of_ready_list): Move to x86-tune-sched-atom.c.
1128         (ix86_sched_reorder): Move to x86-tune-sched-atom.c.
1129         (core2i7_first_cycle_multipass_init): Move to x86-tune-sched-core.c.
1130         (core2i7_dfa_post_advance_cycle): Move to x86-tune-sched-core.c.
1131         (min_insn_size): Rename to ...
1132         (ix86_min_insn_size): ... this one; export.
1133         (core2i7_first_cycle_multipass_begin): Move to x86-tune-sched-core.c.
1134         (core2i7_first_cycle_multipass_issue): Move to x86-tune-sched-core.c.
1135         (core2i7_first_cycle_multipass_backtrack): Move to
1136         x86-tune-sched-core.c.
1137         (core2i7_first_cycle_multipass_end): Move to x86-tune-sched-core.c.
1138         (core2i7_first_cycle_multipass_fini): Move to x86-tune-sched-core.c.
1139         (ix86_sched_init_global): Break up logic to ix86_core2i7_init_hooks.
1140         (ix86_avoid_jump_mispredicts): Update.
1141         (TARGET_SCHED_DISPATCH): Move to ix86-tune-sched-bd.c.
1142         (TARGET_SCHED_DISPATCH_DO): Move to ix86-tune-sched-bd.c.
1143         (TARGET_SCHED_REORDER): Move to ix86-tune-sched-bd.c.
1144         (DISPATCH_WINDOW_SIZE): Move to ix86-tune-sched-bd.c.
1145         (MAX_DISPATCH_WINDOWS): Move to ix86-tune-sched-bd.c.
1146         (MAX_INSN): Move to ix86-tune-sched-bd.c.
1147         (MAX_IMM): Move to ix86-tune-sched-bd.c.
1148         (MAX_IMM_SIZE): Move to ix86-tune-sched-bd.c.
1149         (MAX_IMM_32): Move to ix86-tune-sched-bd.c.
1150         (MAX_IMM_64): Move to ix86-tune-sched-bd.c.
1151         (MAX_LOAD): Move to ix86-tune-sched-bd.c.
1152         (MAX_STORE): Move to ix86-tune-sched-bd.c.
1153         (BIG): Move to ix86-tune-sched-bd.c.
1154         (enum dispatch_group): Move to ix86-tune-sched-bd.c.
1155         (enum insn_path): Move to ix86-tune-sched-bd.c.
1156         (get_mem_group): Move to ix86-tune-sched-bd.c.
1157         (is_cmp): Move to ix86-tune-sched-bd.c.
1158         (dispatch_violation): Move to ix86-tune-sched-bd.c.
1159         (is_branch): Move to ix86-tune-sched-bd.c.
1160         (is_prefetch): Move to ix86-tune-sched-bd.c.
1161         (init_window): Move to ix86-tune-sched-bd.c.
1162         (allocate_window): Move to ix86-tune-sched-bd.c.
1163         (init_dispatch_sched): Move to ix86-tune-sched-bd.c.
1164         (is_end_basic_block): Move to ix86-tune-sched-bd.c.
1165         (process_end_window): Move to ix86-tune-sched-bd.c.
1166         (allocate_next_window): Move to ix86-tune-sched-bd.c.
1167         (find_constant): Move to ix86-tune-sched-bd.c.
1168         (get_num_immediates): Move to ix86-tune-sched-bd.c.
1169         (has_immediate): Move to ix86-tune-sched-bd.c.
1170         (get_insn_path): Move to ix86-tune-sched-bd.c.
1171         (get_insn_group): Move to ix86-tune-sched-bd.c.
1172         (count_num_restricted): Move to ix86-tune-sched-bd.c.
1173         (fits_dispatch_window): Move to ix86-tune-sched-bd.c.
1174         (add_insn_window): Move to ix86-tune-sched-bd.c.
1175         (add_to_dispatch_window): Move to ix86-tune-sched-bd.c.
1176         (debug_dispatch_window_file): Move to ix86-tune-sched-bd.c.
1177         (debug_dispatch_window): Move to ix86-tune-sched-bd.c.
1178         (debug_insn_dispatch_info_file): Move to ix86-tune-sched-bd.c.
1179         (debug_ready_dispatch): Move to ix86-tune-sched-bd.c.
1180         (do_dispatch): Move to ix86-tune-sched-bd.c.
1181         (has_dispatch): Move to ix86-tune-sched-bd.c.
1182         * config/i386/t-i386: Add new object files.
1183         * config/i386/x86-tune-costs.h: New file.
1184         * config/i386/x86-tune-sched-atom.c: New file.
1185         * config/i386/x86-tune-sched-bd.c: New file.
1186         * config/i386/x86-tune-sched-core.c: New file.
1187         * config/i386/x86-tune-sched.c: New file.
1189 2017-10-11  Liu Hao  <lh_mouse@126.com>
1191         * pretty-print.c [_WIN32] (colorize_init): Remove.  Use
1192         the generic version below instead.
1193         (should_colorize): Recognize Windows consoles as terminals
1194         for MinGW targets.
1195         * pretty-print.c [__MINGW32__] (write_all): New function.
1196         [__MINGW32__] (find_esc_head): Likewise.
1197         [__MINGW32__] (find_esc_terminator): Likewise.
1198         [__MINGW32__] (eat_esc_sequence): Likewise.
1199         [__MINGW32__] (mingw_ansi_fputs): New function that handles
1200         ANSI escape codes.
1201         (pp_write_text_to_stream): Use mingw_ansi_fputs instead of fputs
1202         for MinGW targets.
1204 2017-10-11  Richard Biener  <rguenther@suse.de>
1206         * tree-ssa-loop-niter.c (infer_loop_bounds_from_pointer_arith):
1207         Properly call analyze_scalar_evolution with the loop of the stmt.
1209 2017-10-11  Richard Biener  <rguenther@suse.de>
1211         * tree.def (POLYNOMIAL_CHREC): Remove CHREC_VARIABLE tree operand.
1212         * tree-core.h (tree_base): Add chrec_var union member.
1213         * tree.h (CHREC_VAR): Remove.
1214         (CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): Adjust.
1215         * tree-chrec.h (build_polynomial_chrec): Adjust.
1216         * tree-chrec.c (reset_evolution_in_loop): Use build_polynomial_chrec.
1217         * tree-pretty-print.c (dump_generic_node): Use CHREC_VARIABLE.
1219 2017-10-11  Marc Glisse  <marc.glisse@inria.fr>
1221         * fold-const.c (fold_binary_loc) [X +- Y CMP X]: Move ...
1222         * match.pd: ... here.
1223         ((T) X == (T) Y): Relax condition.
1225 2017-10-11  Bin Cheng  <bin.cheng@arm.com>
1227         PR tree-optimization/82472
1228         * tree-loop-distribution.c (sort_partitions_by_post_order): Refine
1229         comment.
1230         (break_alias_scc_partitions): Update postorder number.
1232 2017-10-11  Martin Liska  <mliska@suse.cz>
1234         PR sanitizer/82490
1235         * opts.c (parse_no_sanitize_attribute): Do not use error_value
1236         variable.
1237         * opts.h (parse_no_sanitize_attribute): Remove last argument.
1239 2017-10-11  Martin Liska  <mliska@suse.cz>
1241         * print-rtl.c (print_insn): Move declaration of idbuf
1242         to same scope as name.
1244 2017-10-11  Martin Liska  <mliska@suse.cz>
1246         Revert r253637:
1248         PR sanitizer/82484
1249         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
1250         volatile arguments.
1252 2017-10-11  Martin Liska  <mliska@suse.cz>
1254         PR sanitizer/82484
1255         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
1256         volatile arguments.
1258 2017-10-11  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
1260         * config.gcc (default_gnu_indirect_function): Default to yes for
1261         arm*-*-linux* with glibc.
1263 2017-10-11  Richard Biener  <rguenther@suse.de>
1265         * tree-scalar-evolution.c (get_scalar_evolution): Handle
1266         default-defs and types we do not want to analyze.
1267         (interpret_loop_phi): Replace unreachable code with an assert.
1268         (compute_scalar_evolution_in_loop): Remove and inline ...
1269         (analyze_scalar_evolution_1): ... here, replacing condition with
1270         what makes the intent clearer.  Remove handling of cases
1271         get_scalar_evolution now handles.
1273 2017-10-10  Jim Wilson  <wilson@tuliptree.org>
1275         PR rtl-optimization/81434
1276         * haifa-sched.c (prune_ready_list): Init min_cost_group to 0.  Update
1277         comment for main loop.  In sched_group_found if, also add checks for
1278         pass and min_cost_group.
1280 2017-10-10  Segher Boessenkool  <segher@kernel.crashing.org>
1282         * config/rs6000/rs6000.c (TARGET_INSN_COST): New.
1283         (rs6000_insn_cost): New function.
1284         * config/rs6000/rs6000.md (cost): New attribute.
1286 2017-10-10  Jakub Jelinek  <jakub@redhat.com>
1287             H.J. Lu  <hongjiu.lu@intel.com>
1289         PR target/79565
1290         PR target/82483
1291         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Add
1292         OPTION_MASK_ISA_MMX for __builtin_ia32_maskmovq,
1293         __builtin_ia32_vec_ext_v4hi and __builtin_ia32_vec_set_v4hi.
1294         (ix86_expand_builtin): Treat OPTION_MASK_ISA_MMX similarly
1295         to OPTION_MASK_ISA_AVX512VL - builtins that have both
1296         OPTION_MASK_ISA_MMX and some other bit set require both
1297         mmx and the ISAs without the mmx bit.
1298         * config/i386/i386-builtin.def (__builtin_ia32_cvtps2pi,
1299         __builtin_ia32_cvttps2pi, __builtin_ia32_cvtpi2ps,
1300         __builtin_ia32_pavgb, __builtin_ia32_pavgw, __builtin_ia32_pmulhuw,
1301         __builtin_ia32_pmaxub, __builtin_ia32_pmaxsw, __builtin_ia32_pminub,
1302         __builtin_ia32_pminsw, __builtin_ia32_psadbw, __builtin_ia32_pmovmskb,
1303         __builtin_ia32_pshufw, __builtin_ia32_cvtpd2pi,
1304         __builtin_ia32_cvttpd2pi, __builtin_ia32_cvtpi2pd,
1305         __builtin_ia32_pmuludq, __builtin_ia32_pabsb, __builtin_ia32_pabsw,
1306         __builtin_ia32_pabsd, __builtin_ia32_phaddw, __builtin_ia32_phaddd,
1307         __builtin_ia32_phaddsw, __builtin_ia32_phsubw, __builtin_ia32_phsubd,
1308         __builtin_ia32_phsubsw, __builtin_ia32_pmaddubsw,
1309         __builtin_ia32_pmulhrsw, __builtin_ia32_pshufb, __builtin_ia32_psignb,
1310         __builtin_ia32_psignw, __builtin_ia32_psignd, __builtin_ia32_movntq,
1311         __builtin_ia32_paddq, __builtin_ia32_psubq, __builtin_ia32_palignr):
1312         Add OPTION_MASK_ISA_MMX.
1314 2017-10-10  Andreas Tobler  <andreast@gcc.gnu.org>
1316         * config.gcc (armv7*-*-freebsd*): New target.
1317         (armv6*-*-freebsd*): Remove obsolete TARGET_FREEBSD_ARMv6 define.
1319 2017-10-10  Jan Hubicka  <hubicka@ucw.cz>
1321         * x86-tune.def (X86_TUNE_AVOID_FALSE_DEP_FOR_BMI,
1322         X86_TUNE_ADJUST_UNROLL, X86_TUNE_ONE_IF_CONV_INSN): Move to right
1323         spot in the file.
1325 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
1327         * wide-int.h (wide_int_ref_storage): Make host_dependent_precision
1328         a template parameter.
1329         (WIDE_INT_REF_FOR): Update accordingly.
1330         * tree.h (wi::int_traits <const_tree>): Delete.
1331         (wi::tree_to_widest_ref, wi::tree_to_offset_ref): New typedefs.
1332         (wi::to_widest, wi::to_offset): Use them.  Expand commentary.
1333         (wi::tree_to_wide_ref): New typedef.
1334         (wi::to_wide): New function.
1335         * calls.c (get_size_range): Use wi::to_wide when operating on
1336         trees as wide_ints.
1337         * cgraph.c (cgraph_node::create_thunk): Likewise.
1338         * config/i386/i386.c (ix86_data_alignment): Likewise.
1339         (ix86_local_alignment): Likewise.
1340         * dbxout.c (stabstr_O): Likewise.
1341         * dwarf2out.c (add_scalar_info, gen_enumeration_type_die): Likewise.
1342         * expr.c (const_vector_from_tree): Likewise.
1343         * fold-const-call.c (host_size_t_cst_p, fold_const_call_1): Likewise.
1344         * fold-const.c (may_negate_without_overflow_p, negate_expr_p)
1345         (fold_negate_expr_1, int_const_binop_1, const_binop)
1346         (fold_convert_const_int_from_real, optimize_bit_field_compare)
1347         (all_ones_mask_p, sign_bit_p, unextend, extract_muldiv_1)
1348         (fold_div_compare, fold_single_bit_test, fold_plusminus_mult_expr)
1349         (pointer_may_wrap_p, expr_not_equal_to, fold_binary_loc)
1350         (fold_ternary_loc, multiple_of_p, fold_negate_const, fold_abs_const)
1351         (fold_not_const, round_up_loc): Likewise.
1352         * gimple-fold.c (gimple_fold_indirect_ref): Likewise.
1353         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Likewise.
1354         (alloca_call_type): Likewise.
1355         * gimple.c (preprocess_case_label_vec_for_gimple): Likewise.
1356         * godump.c (go_output_typedef): Likewise.
1357         * graphite-sese-to-poly.c (tree_int_to_gmp): Likewise.
1358         * internal-fn.c (get_min_precision): Likewise.
1359         * ipa-cp.c (ipcp_store_vr_results): Likewise.
1360         * ipa-polymorphic-call.c
1361         (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Likewise.
1362         * ipa-prop.c (ipa_print_node_jump_functions_for_edge): Likewise.
1363         (ipa_modify_call_arguments): Likewise.
1364         * match.pd: Likewise.
1365         * omp-low.c (scan_omp_1_op, lower_omp_ordered_clauses): Likewise.
1366         * print-tree.c (print_node_brief, print_node): Likewise.
1367         * stmt.c (expand_case): Likewise.
1368         * stor-layout.c (layout_type): Likewise.
1369         * tree-affine.c (tree_to_aff_combination): Likewise.
1370         * tree-cfg.c (group_case_labels_stmt): Likewise.
1371         * tree-data-ref.c (dr_analyze_indices): Likewise.
1372         (prune_runtime_alias_test_list): Likewise.
1373         * tree-dump.c (dequeue_and_dump): Likewise.
1374         * tree-inline.c (remap_gimple_op_r, copy_tree_body_r): Likewise.
1375         * tree-predcom.c (is_inv_store_elimination_chain): Likewise.
1376         * tree-pretty-print.c (dump_generic_node): Likewise.
1377         * tree-scalar-evolution.c (iv_can_overflow_p): Likewise.
1378         (simple_iv_with_niters): Likewise.
1379         * tree-ssa-address.c (addr_for_mem_ref): Likewise.
1380         * tree-ssa-ccp.c (ccp_finalize, evaluate_stmt): Likewise.
1381         * tree-ssa-loop-ivopts.c (constant_multiple_of): Likewise.
1382         * tree-ssa-loop-niter.c (split_to_var_and_offset)
1383         (refine_value_range_using_guard, number_of_iterations_ne_max)
1384         (number_of_iterations_lt_to_ne, number_of_iterations_lt)
1385         (get_cst_init_from_scev, record_nonwrapping_iv)
1386         (scev_var_range_cant_overflow): Likewise.
1387         * tree-ssa-phiopt.c (minmax_replacement): Likewise.
1388         * tree-ssa-pre.c (compute_avail): Likewise.
1389         * tree-ssa-sccvn.c (vn_reference_fold_indirect): Likewise.
1390         (vn_reference_maybe_forwprop_address, valueized_wider_op): Likewise.
1391         * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Likewise.
1392         * tree-ssa-uninit.c (is_pred_expr_subset_of): Likewise.
1393         * tree-ssanames.c (set_nonzero_bits, get_nonzero_bits): Likewise.
1394         * tree-switch-conversion.c (collect_switch_conv_info, array_value_type)
1395         (dump_case_nodes, try_switch_expansion): Likewise.
1396         * tree-vect-loop-manip.c (vect_gen_vector_loop_niters): Likewise.
1397         (vect_do_peeling): Likewise.
1398         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
1399         * tree-vect-stmts.c (vectorizable_load): Likewise.
1400         * tree-vrp.c (compare_values_warnv, vrp_int_const_binop): Likewise.
1401         (zero_nonzero_bits_from_vr, ranges_from_anti_range): Likewise.
1402         (extract_range_from_binary_expr_1, adjust_range_with_scev): Likewise.
1403         (overflow_comparison_p_1, register_edge_assert_for_2): Likewise.
1404         (is_masked_range_test, find_switch_asserts, maybe_set_nonzero_bits)
1405         (vrp_evaluate_conditional_warnv_with_ops, intersect_ranges): Likewise.
1406         (range_fits_type_p, two_valued_val_range_p, vrp_finalize): Likewise.
1407         (evrp_dom_walker::before_dom_children): Likewise.
1408         * tree.c (cache_integer_cst, real_value_from_int_cst, integer_zerop)
1409         (integer_all_onesp, integer_pow2p, integer_nonzerop, tree_log2)
1410         (tree_floor_log2, tree_ctz, mem_ref_offset, tree_int_cst_sign_bit)
1411         (tree_int_cst_sgn, get_unwidened, int_fits_type_p): Likewise.
1412         (get_type_static_bounds, num_ending_zeros, drop_tree_overflow)
1413         (get_range_pos_neg): Likewise.
1414         * ubsan.c (ubsan_expand_ptr_ifn): Likewise.
1415         * config/darwin.c (darwin_mergeable_constant_section): Likewise.
1416         * config/aarch64/aarch64.c (aapcs_vfp_sub_candidate): Likewise.
1417         * config/arm/arm.c (aapcs_vfp_sub_candidate): Likewise.
1418         * config/avr/avr.c (avr_fold_builtin): Likewise.
1419         * config/bfin/bfin.c (bfin_local_alignment): Likewise.
1420         * config/msp430/msp430.c (msp430_attr): Likewise.
1421         * config/nds32/nds32.c (nds32_insert_attributes): Likewise.
1422         * config/powerpcspe/powerpcspe-c.c
1423         (altivec_resolve_overloaded_builtin): Likewise.
1424         * config/powerpcspe/powerpcspe.c (rs6000_aggregate_candidate)
1425         (rs6000_expand_ternop_builtin): Likewise.
1426         * config/rs6000/rs6000-c.c
1427         (altivec_resolve_overloaded_builtin): Likewise.
1428         * config/rs6000/rs6000.c (rs6000_aggregate_candidate): Likewise.
1429         (rs6000_expand_ternop_builtin): Likewise.
1430         * config/s390/s390.c (s390_handle_hotpatch_attribute): Likewise.
1432 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
1434         * tree-vect-loop-manip.c (rename_variables_in_bb): Rename PHI nodes
1435         when copying loop nest with only one inner loop.
1437 2017-10-10  Richard Biener  <rguenther@suse.de>
1439         * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Avoid compacting
1440         blocks if SCEV is active.
1441         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Remove
1442         dead code.
1443         (analyze_scalar_evolution): Handle cached evolutions the obvious way.
1444         (scev_initialize): Assert we are not yet initialized.
1446 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
1448         * tree-loop-distribution.c (generate_loops_for_partition): Remove
1449         inner loop's exit stmt by making it always exit the loop, otherwise
1450         we would generate an infinite empty loop.
1452 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
1454         * tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg): Skip
1455         renaming variables in new preheader if it's deleted.
1457 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
1459         * tree-loop-distribution.c (struct partition): Remove unused field
1460         loops of the structure.
1461         (partition_alloc, partition_free): Ditto.
1462         (build_rdg_partition_for_vertex): Ditto.
1464 2017-10-09  Jeff Law  <law@redhat.com>
1466         * targhooks.c (default_stack_clash_protection_final_dynamic_probe): Fix
1467         return type to match prototype and documentation.
1469 2010-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
1471         * config/rs6000/rs6000.c (processor_costs): Move to ...
1472         * config/rs6000/rs6000.h: ... here.
1473         (rs6000_cost): Declare.
1475 2017-10-09  Eric Botcazou  <ebotcazou@adacore.com>
1477         * except.c (setjmp_fn): New global variable.
1478         (init_eh): Initialize it if DONT_USE_BUILTIN_SETJMP is defined.
1479         (sjlj_emit_function_enter): Call it instead of BUILTIN_SETJMP
1480         if DONT_USE_BUILTIN_SETJMP is defined.
1482 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
1484         * target.def (insn_cost): New hook.
1485         * doc/tm.texi.in (TARGET_INSN_COST): New hook.
1486         * doc/tm.texi: Regenerate.
1487         * rtlanal.c (insn_cost): Use the new hook.
1489 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
1491         * combine.c (combine_validate_cost): Compute the new insn_cost,
1492         not just pattern_cost.
1493         (try_combine): Adjust comment.
1495 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
1497         * cfgrtl.c (rtl_account_profile_record): Replace insn_rtx_cost with
1498         insn_cost.
1499         * combine.c (uid_insn_cost): Adjust comment.
1500         (combine_validate_cost): Adjust comment.  Use pattern_cost instead
1501         of insn_rtx_cost
1502         (combine_instructions): Use insn_cost instead of insn_rtx_cost.
1503         * dse.c (find_shift_sequence): Ditto.
1504         * ifcvt.c (cheap_bb_rtx_cost_p): Ditto.
1505         (bb_valid_for_noce_process_p): Use pattern_cost.
1506         * rtl.h (insn_rtx_cost): Delete.
1507         (pattern_cost): New prototype.
1508         (insn_cost): New prototype.
1509         * rtlanal.c (insn_rtx_cost): Rename to...
1510         (pattern_cost): ... this.
1511         (insn_cost): New.
1513 2017-10-09  Uros Bizjak  <ubizjak@gmail.com>
1515         * config/i386/i386.md (*jcc_2): Remove insn pattern.
1516         (*jcc<mode>_0_r_i387): Ditto.
1517         (*jccxf_r_i387): Ditto.
1518         (*jcc<mode>_r_i387): Ditto.
1519         (*jccu<mode>_r_i387): Ditto.
1520         (*jcc<X87MODEF:mode>_<SWI24:mode>_r_i387): Ditto.
1521         (*jcc): Rename from *jcc_1.
1523 2017-10-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
1525         * config/rs6000/rs6000-p8swap.c (rs6000_analyze_swaps): Process
1526         deferred rescans after the lvx/stvx recombination pre-pass.
1528 2017-10-09  Michael Meissner  <meissner@linux.vnet.ibm.com>
1530         * config/rs6000/amo.h: New include file to provide ISA 3.0 atomic
1531         memory operation instruction support.
1532         * config.gcc (powerpc*-*-*): Include amo.h as an extra header.
1533         (rs6000-ibm-aix[789]*): Likewise.
1534         * doc/extend.texi (PowerPC Atomic Memory Operation Functions):
1535         Document new functions.
1537 2017-10-09  Richard Biener  <rguenther@suse.de>
1539         PR tree-optimization/82397
1540         * tree-data-ref.c (data_ref_compare_tree): Make sure to return
1541         equality only for semantically equal trees.
1543 2017-10-09  Richard Biener  <rguenther@suse.de>
1545         PR tree-optimization/82449
1546         * sese.c (scev_analyzable_p): Check whether the SCEV is linear.
1547         * tree-chrec.h (evolution_function_is_constant_p): Adjust to
1548         allow constant addresses.
1549         * tree-chrec.c (scev_is_linear_expression): Constant evolutions
1550         are linear.
1552 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1554         * config/s390/s390-builtins.def (vec_nabs, vec_vfi): Fix builtin
1555         flags.
1557 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1559         PR target/82463
1560         * config/s390/vecintrin.h (vec_madd, vec_msub): Fix macro
1561         definitions.
1563 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1565         PR target/82465
1566         * config/s390/s390-builtins.def (vec_sqrt): Fix builtin flags.
1568 2017-10-09  Jakub Jelinek  <jakub@redhat.com>
1570         PR target/82464
1571         * config/s390/s390-builtins.def (s390_vec_xor_flt_a,
1572         s390_vec_xor_flt_b, s390_vec_xor_flt_c): New.
1574 2017-10-09  Richard Sandiford  <richard.sandiford@linaro.org>
1576         * wide-int.h (WI_BINARY_OPERATOR_RESULT): New macro.
1577         (WI_BINARY_PREDICATE_RESULT): Likewise.
1578         (wi::binary_traits::operator_result): New type.
1579         (wi::binary_traits::predicate_result): Likewise.
1580         (generic_wide_int::operator~, unary generic_wide_int::operator-)
1581         (generic_wide_int::operator==, generic_wide_int::operator!=)
1582         (generic_wide_int::operator&, generic_wide_int::and_not)
1583         (generic_wide_int::operator|, generic_wide_int::or_not)
1584         (generic_wide_int::operator^, generic_wide_int::operator+
1585         (binary generic_wide_int::operator-, generic_wide_int::operator*):
1586         Delete.
1587         (operator~, unary operator-, operator==, operator!=, operator&)
1588         (operator|, operator^, operator+, binary operator-, operator*): New
1589         functions.
1590         * expr.c (get_inner_reference): Use wi::bit_and_not.
1591         * fold-const.c (fold_binary_loc): Likewise.
1592         * ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise.
1593         * tree-ssa-ccp.c (get_value_from_alignment): Likewise.
1594         (bit_value_binop): Likewise.
1595         * tree-ssa-math-opts.c (find_bswap_or_nop_load): Likewise.
1596         * tree-vrp.c (zero_nonzero_bits_from_vr): Likewise.
1597         (extract_range_from_binary_expr_1): Likewise.
1598         (masked_increment): Likewise.
1599         (simplify_bit_ops_using_ranges): Likewise.
1601 2017-10-09  Martin Jambor  <mjambor@suse.cz>
1603         PR hsa/82416
1604         * hsa-common.h (hsa_op_with_type): New method extend_int_to_32bit.
1605         * hsa-gen.c (hsa_extend_inttype_to_32bit): New function.
1606         (hsa_type_for_scalar_tree_type): Use it.  Always force min32int for
1607         COMPLEX types.
1608         (hsa_fixup_mov_insn_type): New function.
1609         (hsa_op_with_type::get_in_type): Use it.
1610         (hsa_build_append_simple_mov): Likewise.  Allow sub-32bit
1611         immediates in an assert.
1612         (hsa_op_with_type::extend_int_to_32bit): New method.
1613         (gen_hsa_insns_for_bitfield): Fixup instruction and intermediary
1614         types.  Convert to dest type if necessary.
1615         (gen_hsa_insns_for_bitfield_load): Fixup load type if necessary.
1616         (reg_for_gimple_ssa): Pass false as min32int to
1617         hsa_type_for_scalar_tree_type.
1618         (gen_hsa_addr): Fixup type when creating addresable temporary.
1619         (gen_hsa_cmp_insn_from_gimple): Extend operands if necessary.
1620         (gen_hsa_unary_operation): Extend operands and convert to dest type if
1621         necessary.  Call hsa_fixup_mov_insn_type.
1622         (gen_hsa_binary_operation): Changed operand types to hsa_op_with_type,
1623         extend operands and convert to dest type if necessary.
1624         (gen_hsa_insns_for_operation_assignment): Extend operands and convert
1625         to dest type if necessary.
1626         (set_output_in_type): Call hsa_fixup_mov_insn_type.  Just ude dest
1627         if conversion nt necessary and size matches.
1628         (gen_hsa_insns_for_load): Call hsa_fixup_mov_insn_type, convert
1629         to dest type if necessary.
1630         (gen_hsa_insns_for_store): Call hsa_fixup_mov_insn_type.
1631         (gen_hsa_insns_for_switch_stmt): Likewise. Also extend operands if
1632         necessary.
1633         (gen_hsa_clrsb): Likewise.
1634         (gen_hsa_ffs): Likewise.
1635         (gen_hsa_divmod): Extend operands and convert to dest type if
1636         necessary.
1637         (gen_hsa_atomic_for_builtin): Change type of op to hsa_op_with_type.
1639 2017-10-08  Segher Boessenkool  <segher@kernel.crashing.org>
1641         * config/rs6000/rs6000.md (conditional branch): Clean up formatting.
1642         Remove empty default arguments.  Use a brace block as output
1643         statement.
1644         (conditional return): Ditto.
1645         (jump): Ditto.
1646         (indirect_jump): Ditto.  Use b%T0 instead of bctr/blr.
1647         (tablejump, tablejumpsi, tablejumpdi, *tablejump<mode>_internal1):
1648         Ditto.
1649         (group_ending_nop): Ditto.
1650         (doloop_end): Ditto.
1651         (ctr<mode>, ctr<mode>_internal1, ctr<mode>_internal2): Ditto.
1652         (splitters for those): Ditto.
1654 2017-10-08  Segher Boessenkool  <segher@kernel.crashing.org>
1656         * config/rs6000/rs6000-string.c (expand_strncmp_align_check): Invert
1657         a conditional jump (and the compare for it) so that pc_rtx is the
1658         last operand.
1659         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Adjust
1660         for the deleted and renamed ctr<mode>_internal[234] patterns.
1661         * config/rs6000/rs6000.md: Delete second conditional branch pattern.
1662         Delete second conditional return pattern.
1663         (ctr<mode>_internal2): Delete this second bdnz pattern.
1664         (ctr<mode>_internal3): Rename to ctr<mode>_internal2.
1665         (ctr<mode>_internal4): Delete this second bdz pattern.
1667 2017-10-08  Eric Botcazou  <ebotcazou@adacore.com>
1669         * tree-outof-ssa.h (ssaexpand): Add partitions_for_undefined_values.
1670         (always_initialized_rtx_for_ssa_name_p): New predicate.
1671         * tree-outof-ssa.c (remove_ssa_form): Initialize new field of SA.
1672         (finish_out_of_ssa): Free new field of SA.
1673         * tree-ssa-coalesce.h (get_undefined_value_partitions): Declare.
1674         * tree-ssa-coalesce.c: Include tree-ssa.h.
1675         (get_parm_default_def_partitions): Remove extern keyword.
1676         (get_undefined_value_partitions): New function.
1677         * expr.c (expand_expr_real_1) <expand_decl_rtl>: For a SSA_NAME, do
1678         not set SUBREG_PROMOTED_VAR_P on the sub-register if it may contain
1679         uninitialized bits.
1680         * loop-iv.c (iv_get_reaching_def): Disqualify all subregs.
1682 2017-10-08  Eric Botcazou  <ebotcazou@adacore.com>
1684         * builtins.def (BUILT_IN_SETJMP): Revert latest change.
1686 2017-10-08  Jan Hubicka  <hubicka@ucw.cz>
1688         * config/i386/i386.c (ix86_expand_set_or_movmem): Disable 512bit loops
1689         for targets that preffer 128bit.
1691 2017-10-08  Jan Hubicka  <hubicka@ucw.cz>
1693         * config/i386/i386.c (has_dispatch): Disable for Ryzen.
1695 2017-10-08  Olivier Hainque  <hainque@adacore.com>
1697         * config/arm/arm.c (arm_set_return_address): Use MEM_VOLATILE_P
1698         on the target mem instead of RTX_FRAME_RELATED_P on the insn to
1699         prevent DSE.
1700         (thumb_set_return_address): Likewise.
1702 2017-10-08  Olivier Hainque  <hainque@adacore.com>
1704         * common/config/arm/arm-common.c (arm_except_unwind_info):
1705         Handle DWARF2_UNWIND_INFO.
1707 2017-10-07  Michael Collison <michael.collison@arm.com>
1709         * config/aarch64/aarch64.md (*aarch64_reg_<optab>_minus<mode>3):
1710         New pattern.
1712 2017-10-07  Eric Botcazou  <ebotcazou@adacore.com>
1714         * builtins.def (BUILT_IN_SETJMP): Declare as library builtin instead
1715         of GCC builtin if DONT_USE_BUILTIN_SETJMP is defined.
1716         * except.c (sjlj_emit_function_enter): If DONT_USE_BUILTIN_SETJMP is
1717         defined, force the creation of a new block for a dispatch label.
1719 2017-10-07  Jan Hubicka  <hubicka@ucw.cz>
1721         * invoke.texi (Wsuggest-attribute=cold): Document.
1722         * common.opt (Wsuggest-attribute=cold): New
1723         * ipa-pure-const.c (warn_function_cold): New function.
1724         * predict.c (compute_function_frequency): Use it.
1725         * predict.h (warn_function_cold): Declare.
1727 2017-10-06  Jan Hubicka  <hubicka@ucw.cz>
1729         * tree-switch-conversion.c (do_jump_if_equal, emit_cmp_and_jump_insns):
1730         Update profile.
1732 2017-10-06  Martin Liska  <mliska@suse.cz>
1734         * sanopt.c (struct sanopt_tree_triplet_hash): Remove inline
1735         keyword for member functions.
1736         (struct sanopt_tree_couple): New struct.
1737         (struct sanopt_tree_couple_hash): New function.
1738         (struct sanopt_ctx): Add new hash_map.
1739         (has_dominating_ubsan_ptr_check): New function.
1740         (record_ubsan_ptr_check_stmt): Likewise.
1741         (maybe_optimize_ubsan_ptr_ifn): Likewise.
1742         (sanopt_optimize_walker): Handle IFN_UBSAN_PTR.
1743         (pass_sanopt::execute): Handle also SANITIZE_POINTER_OVERFLOW.
1745 2017-10-06  Sudakshina Das  <sudi.das@arm.com>
1747         PR target/82440
1748         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Only call
1749         aarch64_simd_valid_immediate on CONST_VECTORs.
1750         (aarch64_reg_or_bic_imm): Likewise.
1752 2017-10-06  Wilco Dijkstra  <wdijkstr@arm.com>
1754         PR rtl-optimization/82396
1755         * haifa-sched.c (ready_sort_real): Disable qsort checking.
1757 2017-10-06  Sebastian Pop  <sebpop@gmail.com>
1759         * graphite-dependences.c (scop_get_reads): Move code to...
1760         (scop_get_must_writes): Move code to...
1761         (scop_get_may_writes): Move code to...
1762         (scop_get_reads_and_writes): ... here.
1763         (scop_get_dependences): Call scop_get_reads_and_writes.
1765 2017-10-06  Jakub Jelinek  <jakub@redhat.com>
1767         PR tree-optimization/82434
1768         * fold-const.h (can_native_encode_type_p,
1769         can_native_encode_string_p): Remove.
1770         * fold-const.c (native_encode_int): Formatting fixes.  If ptr is NULL,
1771         don't encode anything, just return what would be otherwise returned.
1772         (native_encode_fixed, native_encode_complex, native_encode_vector):
1773         Likewise.
1774         (native_encode_string): Likewise.  Inline by hand
1775         can_native_encode_string_p.
1776         (can_native_encode_type_p): Remove.
1777         (can_native_encode_string_p): Remove.
1778         * tree-vect-stmts.c (vectorizable_store): Instead of testing just
1779         STRING_CSTs using can_native_encode_string_p, test all
1780         CONSTANT_CLASS_P values using native_encode_expr with NULL ptr.
1781         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Remove last
1782         argument from native_encode_expr.
1783         (rhs_valid_for_store_merging_p): Use native_encode_expr with NULL ptr.
1784         (pass_store_merging::execute): Don't unnecessarily look for 3 stmts,
1785         but just 2.
1787 2017-10-06  Richard Biener  <rguenther@suse.de>
1789         PR tree-optimization/82397
1790         * tree-vect-data-refs.c (dr_group_sort_cmp): Do not use
1791         operand_equal_p but rely on data_ref_compare_tree for detecting
1792         equalities.
1793         (vect_analyze_data_ref_accesses): Use data_ref_compare_tree
1794         to match up with dr_group_sort_cmp.
1796 2017-10-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1798         PR target/82322
1799         * config/s390/s390-builtins.def (s390_vfi): Define new overloaded
1800         builtin.
1801         * config/s390/s390-builtin-types.def: Regenerate.
1803 2017-10-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1805         PR target/82317
1806         * config/s390/s390-builtin-types.def: Regenerate.
1807         * config/s390/s390-builtins.def (s390_vfmaxdb_4, s390_vfmindb_4):
1808         Change flag from B_VXE to B_VX.
1809         (s390_vec_min_dbl): Remove B_VXE flag.
1811 2017-10-06  Richard Biener  <rguenther@suse.de>
1813         * graphite-isl-ast-to-gimple.c: Include ssa.h and tree-ssa.h.
1814         (translate_isl_ast_to_gimple::translate_pending_phi_nodes,
1815         translate_isl_ast_to_gimple::is_valid_rename,
1816         translate_isl_ast_to_gimple::get_rename,
1817         translate_isl_ast_to_gimple::get_def_bb_for_const,
1818         translate_isl_ast_to_gimple::get_new_name,
1819         translate_isl_ast_to_gimple::collect_all_ssa_names,
1820         translate_isl_ast_to_gimple::copy_loop_phi_args,
1821         translate_isl_ast_to_gimple::collect_all_ssa_names,
1822         translate_isl_ast_to_gimple::copy_loop_phi_args,
1823         translate_isl_ast_to_gimple::copy_loop_phi_nodes,
1824         translate_isl_ast_to_gimple::add_close_phis_to_merge_points,
1825         translate_isl_ast_to_gimple::add_close_phis_to_outer_loops,
1826         translate_isl_ast_to_gimple::copy_loop_close_phi_args,
1827         translate_isl_ast_to_gimple::copy_loop_close_phi_nodes,
1828         translate_isl_ast_to_gimple::copy_cond_phi_args,
1829         translate_isl_ast_to_gimple::copy_cond_phi_nodes,
1830         translate_isl_ast_to_gimple::edge_for_new_close_phis,
1831         translate_isl_ast_to_gimple::add_phi_arg_for_new_expr,
1832         translate_isl_ast_to_gimple::rename_uses,
1833         translate_isl_ast_to_gimple::rename_all_uses): Remove.
1834         (translate_isl_ast_to_gimple::get_rename_from_scev): Simplify.
1835         (set_rename_for_each_def): Likewise.
1836         (graphite_copy_stmts_from_block): Handle debug stmt resetting
1837         here.  Handle rewriting SCEV analyzable uses here.
1838         (copy_bb_and_scalar_dependences): Generate code for PHI
1839         copy-in/outs.
1840         (graphite_regenerate_ast_isl): Adjust.
1841         * graphite-scop-detection.c (trivially_empty_bb_p): Move to sese.[ch].
1842         (add_write, add_read): New functions.
1843         (build_cross_bb_scalars_def): Use it and simplify.
1844         (build_cross_bb_scalars_use): Likewise.
1845         (graphite_find_cross_bb_scalar_vars): Inline into...
1846         (try_generate_gimple_bb): ...here.  Add dependences for PHIs,
1847         simulating out-of-SSA.  Compute liveout and add dependencies.
1848         (build_scops): Force an empty entry block.
1849         * sese.h (sese_info_t::liveout, sese_info_t::debug_liveout): New
1850         members.
1851         (sese_build_liveouts): Declare.
1852         (sese_trivially_empty_bb_p): Likewise.
1853         * sese.c (sese_build_liveouts_bb): Properly handle PHIs,
1854         compute liveout and debug_liveout.
1855         (sese_bad_liveouts_use): Remove.
1856         (sese_reset_debug_liveouts_bb): Likewise.
1857         (sese_reset_debug_liveouts): Rewrite in terms of debug_liveout.
1858         (sese_build_liveouts): Build liveout and debug_liveout and store
1859         it in region.
1860         (new_sese_info): Adjust.
1861         (free_sese_info): Likewise.
1862         (sese_insert_phis_for_liveouts): Reset debug stmts from here,
1863         do not build liveout here.
1864         (move_sese_in_condition): Adjust region entry.
1865         (scev_analyzable_p): Match up with chrec_apply requirements.
1866         (sese_trivially_empty_bb_p): New.
1867         * tree-into-ssa.c (get_reaching_def): Properly support generating
1868         default-defs for incremental rewrite of anonymous names.
1870 2017-10-06  Richard Biener  <rguenther@suse.de>
1872         * graphite-sese-to-poly.c (extract_affine): For casts increasing
1873         precision do not perform modulo reduction.
1875 2017-10-06  Richard Biener  <rguenther@suse.de>
1877         PR tree-optimization/82436
1878         * tree-vect-slp.c (vect_supported_load_permutation_p): More
1879         conservatively choose the vectorization factor when checking
1880         whether we can perform the required load permutation.
1881         (vect_transform_slp_perm_load): Assert when we may not fail.
1883 2017-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
1885         * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Correct error
1886         message for incompatible -msdata=* and -mcall-* options.
1888 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
1890         * config/i386/i386.c (ia32_multipass_dfa_lookahead): Default to issue
1891         rate for post-reload scheduling.
1893 2017-10-05  Tamar Christina  <tamar.christina@arm.com>
1895         * doc/sourcebuild.texi (vect_sizes_16B_8B, vect_sizes_32B_16B): New.
1897 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
1899         * config/i386/i386.c (znver1_cost): Set branch_cost to 3 (instead of 2)
1900         to improve monte carlo in scimark.
1902 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
1904         * config/i386/i386.c (ix86_size_cost, i386_cost, i486_cost,
1905         pentium_cost, lakemont_cost, pentiumpro_cost, geode_cost, k6_cost,
1906         athlon_cost, k8_cost, amdfam10_cost, btver1_cost, btver2_cost,
1907         pentium4_cost, nocona_cost): Set reassociation width to 1.
1908         (bdver1_cost, bdver2_cost, bdver3_cost, bdver4_cost): Set reassociation
1909         width to 2 for fp operations and 1 otherwise.
1910         (znver1_cost): Set scalar reassoc width to 4 and vector to 3 and 6
1911         for int and fp.
1912         (atom_cost): Set reassociation width to 2.
1913         (slm_cost, generic_cost): Set fp reassociation width
1914         to 2 and 1 otherwise.
1915         (intel_cost): Set fp reassociation width to 4 and 1 otherwise.
1916         (core_cost): Set fp reassociation width to 4 and vector to 2.
1917         (ix86_reassociation_width): Rewrite using cost table; special case
1918         plus/minus on Zen; honor X86_TUNE_SSE_SPLIT_REGS
1919         and TARGET_AVX128_OPTIMAL.
1920         * config/i386/i386.h (processor_costs): Add
1921         reassoc_int, reassoc_fp, reassoc_vec_int, reassoc_vec_fp.
1922         (TARGET_VECTOR_PARALLEL_EXECUTION, TARGET_REASSOC_INT_TO_PARALLEL,
1923         TARGET_REASSOC_FP_TO_PARALLEL): Remove.
1924         * x86-tune.def (X86_TUNE_REASSOC_INT_TO_PARALLEL): Remove.
1925         (X86_TUNE_REASSOC_FP_TO_PARALLEL): Remove.
1926         (X86_TUNE_VECTOR_PARALLEL_EXECUTION):  Remove.
1928 2017-10-05  Nathan Sidwell  <nathan@acm.org>
1930         * doc/invoke.texi (Wparentheses): Document C++ MVP behaviour.
1932 2017-10-05  Tamar Christina  <tamar.christina@arm.com>
1934         * config/arm/arm.c (arm_test_fpu_data): New.
1935         (arm_run_selftests): Call arm_test_fpu_data.
1937 2017-10-04  Nathan Sidwell  <nathan@acm.org>
1939         * toplev.c (toplev::main): Remove excess parens on pretty_printer
1940         decl.
1941         * caller-save.c (insert_save): Remove excess parens on TO_SAVE parm.
1943 2017-10-04  Sudakshina Das  <sudi.das@arm.com>
1945         * config/aarch64/aarch64-protos.h (enum simd_immediate_check): New
1946         check type for aarch64_simd_valid_immediate.
1947         (aarch64_output_simd_mov_immediate): Update prototype.
1948         (aarch64_simd_valid_immediate): Update prototype.
1949         * config/aarch64/aarch64-simd.md (orr<mode>3): modified pattern to add
1950         support for ORR-immediate.
1951         (and<mode>3): modified pattern to add support for BIC-immediate.
1952         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Function
1953         now checks for valid immediate for BIC and ORR based on new enum
1954         argument.
1955         (aarch64_output_simd_mov_immediate): Function now used to output
1956         BIC/ORR imm as well based on new enum argument.
1957         * config/aarch64/constraints.md (Do): New vector immediate constraint.
1958         (Db) : Likewise.
1959         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): New predicate.
1960         (aarch64_reg_or_bic_imm): Likewise.
1962 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1964         * config/s390/vx-builtins.md ("vec_mergeh<mode>")
1965         ("vec_mergel<mode>"): Change mode iterator to V_128_NOSINGLE.
1967 2017-10-04  Wilco Dijkstra  <wdijkstr@arm.com>
1969         Revert r253399:
1971         PR rtl-optimization/82396
1972         * haifa-sched.c (autopref_multipass_init): Simplify
1973         initialization.
1974         (autopref_rank_data): Simplify sort order.
1975         * sched-int.h (autopref_multipass_data_): Remove
1976         multi_mem_insn_p, min_offset and max_offset.
1978 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1980         * doc/sourcebuild.texi: Document vect_peeling_profitable.
1982 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1984         * doc/sourcebuild.texi: Document vect_intdouble_cvt and
1985         vect_doubleint_cvt.
1987 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1989         * doc/sourcebuild.texi: Document vect_long_mult.
1991 2017-10-04  Richard Sandiford  <richard.sandiford@linaro.org>
1993         PR tree-optimization/82413
1994         * fold-const.c (build_range_check): Use widest_int when comparing
1995         the maximum ETYPE value with HIGH.
1997 2017-10-04  Wilco Dijkstra  <wdijkstr@arm.com>
1999         PR rtl-optimization/82396
2000         * haifa-sched.c (autopref_multipass_init): Simplify
2001         initialization.
2002         (autopref_rank_data): Simplify sort order.
2003         * sched-int.h (autopref_multipass_data_): Remove
2004         multi_mem_insn_p, min_offset and max_offset.
2006 2017-10-04  Jakub Jelinek  <jakub@redhat.com>
2008         PR tree-optimization/82381
2009         * tree-ssa-reassoc.c (sort_by_operand_rank): Check for different
2010         oeN->rank first.  Return 1 or -1 if one op is SSA_NAME and the other
2011         is not.
2013         PR tree-optimization/82374
2014         * omp-low.c (create_omp_child_function): Copy DECL_ATTRIBUTES,
2015         DECL_FUNCTION_SPECIFIC_OPTIMIZATION,
2016         DECL_FUNCTION_SPECIFIC_TARGET and DECL_FUNCTION_VERSIONED from
2017         current_function_decl to the new decl.
2019 2017-10-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
2021         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_2_HW): Define new
2022         helper macro for IEEE float128 hardware built-in functions.
2023         (SQRTF128_ODD): Add built-in functions with the round-to-odd
2024         semantics.
2025         (TRUNCF128_ODD): Likewise.
2026         (ADDF128_ODD): Likewise.
2027         (SUBF128_ODD): Likewise.
2028         (MULF128_ODD): Likewise.
2029         (DIVF128_ODD): Likewise.
2030         (FMAF128_ODD): Likewise.
2031         * config/rs6000/rs6000.md (UNSPEC_ROUND_TO_ODD): Rename to
2032         UNSPEC_TRUNC_ROUND_TO_ODD.
2033         (UNSPEC_TRUNC_ROUND_TO_ODD): Likewise.
2034         (UNSPEC_ADD_ROUND_TO_ODD): New unspec codes for the IEEE 128-bit
2035         floating point round to odd instructions.
2036         (UNSPEC_SUB_ROUND_TO_ODD): Likewise.
2037         (UNSPEC_MUL_ROUND_TO_ODD): Likewise.
2038         (UNSPEC_DIV_ROUND_TO_ODD): Likewise.
2039         (UNSPEC_FMA_ROUND_TO_ODD): Likewise.
2040         (UNSPEC_SQRT_ROUND_TO_ODD): Likewise.
2041         (trunc<mode>sf2_hw): Change the truncate with round to odd
2042         expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.
2043         (add<mode>3_odd): Add insns for IEEE 128-bit floating point round
2044         to odd hardware instructions.
2045         (sub<mode>3_odd): Likewise.
2046         (mul<mode>3_odd): Likewise.
2047         (div<mode>3_odd): Likewise.
2048         (sqrt<mode>2_odd): Likewise.
2049         (fma<mode>4_odd): Likewise.
2050         (fms<mode>4_odd): Likewise.
2051         (nfma<mode>4_odd): Likewise.
2052         (nfms<mode>4_odd): Likewise.
2053         (trunc<mode>df2_odd): Change the truncate with round to odd
2054         expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.  Add a generator
2055         function.
2056         * doc/extend.texi (PowerPC built-in functions): Update documentation
2057         for existing IEEE float128-bit built-in functions.  Add built-in
2058         functions that generate the IEEE 128-bit floating point round to
2059         odd instructions.
2061 2017-10-03  Segher Boessenkool  <segher@kernel.crashing.org>
2063         PR rtl-optimization/77729
2064         * simplify-rtx.c (simplify_binary_operation_1): Delete the (X&C1)|C2
2065         to (X&(C1&~C2))|C2 transformations.
2067 2017-10-03  Martin Jambor  <mjambor@suse.cz>
2069         PR tree-optimization/82363
2070         * tree-sra.c (propagate_subaccesses_across_link): In unrecoverable
2071         mismatch, mark lacc written regardless of racc.
2073 2017-10-03  Jakub Jelinek  <jakub@redhat.com>
2075         PR tree-optimization/82381
2076         * tree-ssa-reassoc.c (sort_by_operand_rank): Don't check
2077         stmt_to_insert nor wheather SSA_NAMEs are default defs.
2078         Return 1 or -1 if one of bba and bbb is NULL. If bb_rank is equal,
2079         fallthrough into reassoc_stmt_dominates_stmt_p.
2081         PR target/82386
2082         * combine.c (combine_instructions): Don't combine in unreachable
2083         basic blocks.
2085 2017-08-18  Peter Bergner  <bergner@vnet.ibm.com>
2087         PR target/80210
2088         * config/rs6000/rs6000.c (rs6000_option_override_internal): Rewrite
2089         function to not use the have_cpu variable.  Do not set cpu_index,
2090         rs6000_cpu_index or rs6000_tune_index if we end up using TARGET_DEFAULT
2091         or the default cpu.
2092         (rs6000_valid_attribute_p): Remove duplicate initializations of
2093         old_optimize and func_optimize.
2094         (rs6000_pragma_target_parse): Call rs6000_activate_target_options ().
2095         (rs6000_activate_target_options): Make global.
2096         * config/rs6000/rs6000-protos.h (rs6000_activate_target_options): Add
2097         prototype.
2099 2017-10-02  Jakub Jelinek  <jakub@redhat.com>
2101         * tree-dfa.c (get_ref_base_and_extent): Set *pmax_size to -1
2102         if *poffset + *pmax_size overflows in HOST_WIDE_INT.
2103         Set *poffset to 0 and *psize and *pmax_size to -1 if
2104         *poffset + *psize overflows in HOST_WIDE_INT.
2106         PR tree-optimization/82387
2107         PR tree-optimization/82388
2108         PR tree-optimization/82389
2109         * tree-ssa-dse.c (dse_classify_store): Test byte_tracking_enabled
2110         instead of live_bytes non-NULL.
2112 2017-10-02  Georg-Johann Lay  <avr@gjlay.de>
2114         PR target/41076
2115         * confg/avr/avr.md (*iorhi3.ashift8-ext.zerox): Add "r,r,0"
2116         alternative.
2118 2017-10-02  Richard Biener  <rguenther@suse.de>
2120         * graphite-isl-ast-to-gimple.c (set_codegen_error): With
2121         -fchecking and --param graphite-allow-codegen-errors=0 ICE.
2122         * params.def (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): New param.
2124 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
2126         * tree.h (wi::int_traits <const_tree>::decompose): Assert that the
2127         requested precision matches the type's.
2128         * calls.c (alloc_max_size): Calculate the new candidate size as
2129         a widest_int and use wi::to_widest when comparing it with the
2130         current candidate size.
2131         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Compare with
2132         zero rather than integer_zero_node.
2133         * match.pd: Check for a no-op conversion before using wi::add
2134         rather than after.  Use tree_to_uhwi when summing small shift
2135         counts into an unsigned int.
2137 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
2138             Alan Hayward  <alan.hayward@arm.com>
2139             David Sherwood  <david.sherwood@arm.com>
2141         PR target/71307
2142         * config/aarch64/aarch64.h (POINTER_AND_FP_REGS): New reg class.
2143         (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update accordingly.
2144         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
2145         POINTER_AND_FP_REGS.
2147 2017-10-02  Richard Biener  <rguenther@suse.de>
2149         PR tree-optimization/82355
2150         * graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
2151         a mapping for the enclosing loop but avoid generating one for
2152         the loop tree root.
2153         (copy_bb_and_scalar_dependences): Remove premature codegen
2154         error on PHIs in blocks duplicated into multiple places.
2155         * graphite-scop-detection.c
2156         (scop_detection::stmt_has_simple_data_refs_p): For a loop not
2157         in the region use it as loop and nest to analyze the DR in.
2158         (try_generate_gimple_bb): Likewise.
2159         * graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
2160         (add_loop_constraints): For blocks in a loop not in the region
2161         create a dimension with a single iteration.
2162         * sese.h (gbb_loop_at_index): Remove assert.
2164 2017-10-01  Kevin Buettner  <kevinb@redhat.com>
2166         * omp-expand.c (adjust_context_scope): New function.
2167         (expand_parallel_call): Call adjust_context_scope.
2169 2017-10-01  Jeff Law  <law@redhat.com>
2171         * tree-ssa-dom.c (optimize_stmt): Make this a method within the
2172         dom_opt_dom_walker class with direct access to private members.
2173         Add comments.  Call test_for_singularity.
2174         (dom_opt_dom_walker::before_dom_children): Corresponding changes.
2175         (dom_opt_dom_walker::after_dom_children): Do not lazily initialize
2176         m_dummy_cond anymore.
2177         (class dom_opt_dom_walker): Initialize m_dummy_cond member in the
2178         class ctor.
2179         (pass_dominator:execute): Build the dummy_cond here and pass it
2180         to the dom_opt_dom_walker ctor.
2181         (test_for_singularity): New function.
2183 2017-09-30  Krister Walfridsson  <krister.walfridsson@gmail.com>
2184             Maya Rashish  <coypu@sdf.org>
2186         * config.gcc (*-*-netbsd*): New variable nbsd_tm_file containing
2187         netbsd.h, netbsd-stdint.h, and netbsd-elf.h.
2188         (alpha*-*-netbsd*) Use nbsd_tm_file.
2189         (arm*-*-netbsdelf*) Likewise.
2190         (i[34567]86-*-netbsdelf*) Likewise.
2191         (x86_64-*-netbsd*) Likewise.
2192         (mips*-*-netbsd*) Likewise.
2193         (powerpc-*-netbsd*) Likewise.
2194         (sh*-*-netbsd*) Likewise.
2195         (sparc-*-netbsdelf*) Likewise.
2196         (sparc64-*-netbsd*) Likewise.
2197         (m68k*-*-netbsdelf*) Use nbsd_tm_file and add CHAR_FAST8/SHORT_FAST16
2198         to tm_defines.
2199         (vax-*-netbsdelf*) Likewise.
2200         * config/netbsd-stdint.h (INT_FAST8_TYPE): Check CHAR_FAST8.
2201         (UINT_FAST8_TYPE) Likewise.
2202         (INT_FAST16_TYPE) Check CHAR_FAST16.
2203         (UINT_FAST16_TYPE) Likewise.
2205 2017-09-30  Jakub Jelinek  <jakub@redhat.com>
2207         PR target/82361
2208         * config/i386/i386.md
2209         (TARGET_USE_8BIT_IDIV zext divmodsi4 splitter): New define_split.
2210         (divmodsi4_zext_1, divmodsi4_zext_2, *divmodsi4_zext_1,
2211         *divmodsi4_zext_2): New define_insn_and_split.
2212         (*divmodsi4_noext_zext_1, *divmodsi4_noext_zext_2): New define_insn.
2213         (TARGET_USE_8BIT_IDIV zext udivmodsi4 splitter): New define_split.
2214         (udivmodsi4_zext_1, udivmodsi4_zext_2, *udivmodsi4_zext_1,
2215         *udivmodsi4_zext_2, *udivmodsi4_pow2_zext_1, *udivmodsi4_pow2_zext_2):
2216         New define_insn_and_split.
2217         (*udivmodsi4_noext_zext_1, *udivmodsi4_noext_zext_2): New define_insn.
2218         * config/i386/i386.c (ix86_split_idivmod): Handle operands[0] or
2219         operands[1] having DImode when mode is SImode.
2221         * config/i386/i386.c (ix86_split_idivmod): Use mode instead of
2222         always SImode for DIV and MOD in REG_EQUAL notes.
2224 2017-09-29  Yury Gribov  <tetra2005@gmail.com>
2226         PR middle-end/82319
2227         * match.pd: Fix handling of NaNs in pattern.
2229 2017-09-29  Jeff Law  <law@redhat.com>
2231         * sbitmap.c (bitmap_bit_in_range_p): New function.
2232         * sbitmap.h (bitmap_bit_in_range_p): Prototype.
2233         * tree-ssa-dse.c (live_bytes_read): New function.
2234         (dse_classify_store): Ignore reads of dead bytes.
2236         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Fix
2237         typos and whitespace errors.
2238         * config/i386/predicates.md (address_no_seg_operand): Likewise.
2239         * config/s390/s390.c (s390_emit_prologue): Likewise.
2241 2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>
2243         PR target/81481
2244         * ira-costs.c (scan_one_insn): Don't take into account PIC equiv
2245         with a symbol for LRA.
2247 2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>
2249         PR rtl-optimization/82338
2250         * lra-constraints.c (inherit_in_ebb): Check usage_insns check.
2252 2017-09-29  Alexander Monakov  <amonakov@ispras.ru>
2254         * genmodes.c (calc_wider_mode): Suppress qsort macro.
2255         * system.h [CHECKING_P] (qsort): Redirect to qsort_chk.
2256         (qsort_chk): Declare.
2257         * vec.c [CHECKING_P] (qsort_chk_error): New static function.
2258         (qsort_chk): New function.
2260 2017-09-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
2262         PR tree-optimization/82337
2263         * gimple-ssa-strength-reduction.c (find_phi_def): Don't record a
2264         phi definition if the PHI result appears in an abnormal PHI.
2265         (find_basis_for_base_expr): Don't record a basis if the LHS of the
2266         basis appears in an abnormal PHI.
2268 2017-09-29  Richard Biener  <rguenther@suse.de>
2270         * graphite-isl-ast-to-gimple.c
2271         (translate_isl_ast_to_gimple::set_codegen_error): New function.
2272         (binary_op_to_tree): Use it.
2273         (get_rename_from_scev): Likewise.
2274         (copy_loop_phi_nodes): Likewise.
2275         (copy_bb_and_scalar_dependences): Likewise.
2276         (translate_pending_phi_nodes): Likewise.
2278 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
2280         PR target/82339
2281         * config/i386/i386.md (*movdi_internal peephole2): New -Os peephole
2282         for movabsq $(i32 << shift), r64.
2284 2017-09-28  Uros Bizjak  <ubizjak@gmail.com>
2286         * config/i386/i386.c (ix86_print_operand_address_as): Do not check
2287         index when encoding %esp as %rsp to avoid 0x67 prefix.
2289 2017-09-28  Sergey Shalnov  <Sergey.Shalnov@intel.com>
2291         * config/i386/i386.md (*movsf_internal, *movdf_internal):
2292         Return 256-bit AVX modes for TARGET_PREFER_AVX256.
2294 2017-09-28  Thomas Preud'homme  <thomas.preudhomme@arm.com>
2296         * config/arm/arm.c (arm_option_override): Forbid ARMv8-M Security
2297         Extensions with more than 16 double VFP registers.
2298         (cmse_nonsecure_entry_clear_before_return): Remove second entry of
2299         to_clear_mask and all code related to it.  Replace the remaining
2300         entry by a sbitmap and adapt code accordingly.
2302 2017-09-28  Henry Linjamäki  <henry.linjamaki@parmance.com>
2304         * brig-builtins.def: Change pure attributes to const.
2306 2017-09-28  Joseph Myers  <joseph@codesourcery.com>
2308         * config.gcc (default_gnu_indirect_function): Default to yes for
2309         sparc*-*-linux* with glibc.
2311 2017-09-28  Joseph Myers  <joseph@codesourcery.com>
2313         * config/aarch64/aarch64.c (aarch64_elf_asm_constructor)
2314         (aarch64_elf_asm_destructor): Pass SECTION_NOTYPE to get_section
2315         when creating .init_array and .fini_array sections with priority
2316         specified.
2318 2017-09-27  Christophe Lyon  <christophe.lyon@linaro.org>
2320         PR target/71727
2321         * config/aarch64/aarch64.c
2322         (aarch64_builtin_support_vector_misalignment): Always return false
2323         when misalignment is unknown.
2325 2017-09-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2327         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Revise
2328         this function to return false if the definition used by the swap
2329         instruction is artificial, or if the memory address from which the
2330         constant value is loaded is not represented by a base address held
2331         in a register or if the base address register is a frame or stack
2332         pointer.  Additionally, return false if the base address of the
2333         loaded constant is a SYMBOL_REF but is not considered to be a
2334         constant.
2335         (replace_swapped_load_constant): New function.
2336         (rs6000_analyze_swaps): Add a new pass to replace a swap of a
2337         loaded constant vector with a load of a swapped constant vector.
2339 2017-09-27  Carl Love  <cel@us.ibm.com>
2341         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
2342         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
2343         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
2344         fctiw instruction.
2346 2017-09-27  Alexander Monakov  <amonakov@ispras.ru>
2348         * haifa-sched.c (autopref_rank_for_schedule): Order 'irrelevant' insns
2349         first, always call autopref_rank_data otherwise.
2351 2017-09-27  Richard Biener  <rguenther@suse.de>
2353         * graphite-scop-detection.c (find_scop_parameters): Move
2354         loop bound handling ...
2355         (gather_bbs::before_dom_children): ... here, avoiding the need
2356         to build scop_info->loop_nest.
2357         (record_loop_in_sese): Remove.
2358         * sese.h (sese_info_t::loop_nest): Remove.
2359         * sese.c (new_sese_info): Do not allocate loop_nest.
2360         (free_sese_info): Do not free loop_nest.
2362 2017-09-27  Jakub Jelinek  <jakub@redhat.com>
2364         PR c++/82159
2365         * gimplify.c (gimplify_modify_expr): Don't optimize away zero sized
2366         lhs from calls if the lhs has addressable type.
2368 2017-09-27  Richard Biener  <rguenther@suse.de>
2370         * graphite.h (scop::max_alias_set): New member.
2371         * graphite-scop-detection.c: Remove references to non-existing
2372         --param in comments.
2373         (build_alias_sets): Record the maximum alias set used for drs.
2374         (build_scops): Support zero as unlimited for
2375         --param graphite-max-arrays-per-scop.
2376         * graphite-sese-to-poly.c (add_scalar_version_numbers): Remove
2377         and inline into ...
2378         (build_poly_sr_1): ... here.  Compute alias set based on the
2379         maximum alias set used for drs rather than
2380         PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP
2382 2017-09-27  Richard Biener  <rguenther@suse.de>
2384         * graphite-optimize-isl.c (get_schedule_for_node_st): Allow
2385         --param loop-block-tile-size=0 to disable tiling.
2387 2017-09-27  Richard Biener  <rguenther@suse.de>
2389         * doc/invoke.texi (graphite-max-bbs-per-function): Remove.
2390         (graphite-max-nb-scop-params): Document special value zero.
2391         * domwalk.h (dom_walker::STOP): New symbolical constant.
2392         (dom_walker::dom_walker): Add optional parameter for bb to
2393         RPO mapping.
2394         (dom_walker::~dom_walker): Declare.
2395         (dom_walker::before_dom_children): Document STOP return value.
2396         (dom_walker::m_user_bb_to_rpo): New member.
2397         (dom_walker::m_bb_to_rpo): Likewise.
2398         * domwalk.c (dom_walker::dom_walker): Compute bb to RPO
2399         mapping here if not provided by the user.
2400         (dom_walker::~dom_walker): Free bb to RPO mapping if not
2401         provided by the user.
2402         (dom_walker::STOP): Define.
2403         (dom_walker::walk): Do not compute bb to RPO mapping here.
2404         Support STOP return value from before_dom_children to stop
2405         walking.
2406         * graphite-optimize-isl.c (optimize_isl): If the schedule
2407         is the same still generate code if -fgraphite-identity
2408         or -floop-parallelize-all are given.
2409         * graphite-scop-detection.c: Include cfganal.h.
2410         (gather_bbs::gather_bbs): Get and pass through bb to RPO
2411         mapping.
2412         (gather_bbs::before_dom_children): Return STOP for BBs
2413         not in the region.
2414         (build_scops): Compute bb to RPO mapping and pass it to
2415         the domwalk.  Treat --param graphite-max-nb-scop-params=0
2416         as not limiting the number of params.
2417         * graphite.c (graphite_initialize): Remove limit on the
2418         number of basic-blocks in a function.
2419         * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Remove.
2420         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Adjust to documented
2421         default value of 10.
2423 2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
2425         * config/rs6000/vsx.md (peephole for optimizing move SF to GPR):
2426         Adjust code to eliminate needing to do the shift right 32-bits
2427         operation after XSCVDPSPN.
2429 2017-09-26  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2431         * match.pd ((X / Y) == 0 -> X < Y): New pattern.
2432         ((X / Y) != 0 -> X >= Y): Likewise.
2434 2017-09-26  Carl Love  <cel@us.ibm.com>
2436         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_XL_LEN_R,
2437         P9V_BUILTIN_VEC_XST_LEN_R): Add support for builtins
2438         vector unsigned char vec_xl_len_r (unsigned char *, size_t);
2439         void vec_xst_len_r (vector unsigned char, unsigned char *, size_t);
2440         * config/rs6000/altivec.h (vec_xl_len_r, vec_xst_len_r): Add defines.
2441         * config/rs6000/rs6000-builtin.def (XL_LEN_R, XST_LEN_R): Add
2442         definitions and overloading.
2443         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case
2444         statement for P9V_BUILTIN_XST_LEN_R.
2445         (altivec_init_builtins): Add def_builtin for P9V_BUILTIN_STXVLL.
2446         * config/rs6000/vsx.md (lxvll, stxvll, xl_len_r, xst_len_r): Add
2447         define_expand and define_insn for the instructions and builtins.
2448         * doc/extend.texi: Update the built-in documentation file for the new
2449         built-in functions.
2450         * config/rs6000/altivec.md (altivec_lvsl_reg, altivec_lvsr_reg): Add
2451         define_insn for the instructions
2453 2017-09-26  Krister Walfridsson  <krister.walfridsson@gmail.com>
2455         PR target/39570
2456         * gcc/config/netbsd-protos.h: New file.
2457         * gcc/config/netbsd.c: New file.
2458         * gcc/config/netbsd.h (SUBTARGET_INIT_BUILTINS): Define.
2459         * gcc/config/t-netbsd: New file.
2460         * gcc/config.gcc (tm_p_file): Add netbsd-protos.h.
2461         (tmake_file) Add t-netbsd.
2462         (extra_objs) Add netbsd.o.
2464 2017-09-26  Janus Weil  <janus@gcc.gnu.org>
2466         PR fortran/82143
2467         PR fortran/82324
2468         * doc/sourcebuild.texi: Document fortran_real_10 and fortran_real_16.
2470 2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
2472         * config/rs6000/rs6000.md (extendsi<mode>2): Add a splitter to do
2473         sign extension from a vector register to a GPR by doing a 32-bit
2474         direct move and then an EXTSW.
2475         (extendsi<mode>2 splitter): Likewise.
2476         (movsi_from_sf): Adjust code to eliminate doing a 32-bit shift
2477         right or vector extract after doing XSCVDPSPN.  Use
2478         zero_extendsidi2 instead of p8_mfvsrd_4_disf to move the value to
2479         the GPRs.
2480         (movdi_from_sf_zero_ext): Likewise.
2481         (reload_gpr_from_vsxsf): Likewise.
2482         (p8_mfvsrd_4_disf): Delete, no longer used.
2483         (movsi_from_df): Optimize converting a DFmode to a SFmode, and
2484         then needing to move the SFmode to a GPR to use the XSCVDPSP
2485         instruction instead of FRSP and XSCVDPSPN.
2486         * config/rs6000/vsx.md (vsx_xscvspdp_scalar2): Move insn so that
2487         it is adjacent to the other XSCVSPDP insns.
2488         (vsx_xscvdpsp_scalar): Use "ww" constraint instead of "f" to allow
2489         SFmode to be in traditional Altivec registers.
2490         (vsx_xscvdpspn): Eliminate useless alternative constraint.
2491         (vsx_xscvspdpn): Likewise.
2492         (vsx_xscvspdpn_scalar): Likewise.
2494 2017-09-26  Martin Jambor  <mjambor@suse.cz>
2496         * tree-sra.c (compare_access_positions): Put integral types first,
2497         stabilize sorting of integral types, remove conditions putting
2498         non-full-precision integers last.
2499         (sort_and_splice_var_accesses): Disable scalarization if a
2500         non-integert would be represented by a non-full-precision integer.
2502 2017-09-26  Joseph Myers  <joseph@codesourcery.com>
2504         * config/microblaze/linux.h (TARGET_ASM_FILE_END): Likewise.
2505         * config/pa/pa.h (NEED_INDICATE_EXEC_STACK): Likewise.
2506         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Likewise.
2507         * config/pa/pa.c (pa_hpux_file_end): Rename to pa_file_end.
2508         Define unconditionally, with [ASM_OUTPUT_EXTERNAL_REAL]
2509         conditionals inside the function instead of around it.  Call
2510         file_end_indicate_exec_stack if NEED_INDICATE_EXEC_STACK.
2511         (TARGET_ASM_FILE_END): Define unconditionally to pa_file_end.
2513 2017-09-26  Richard Biener  <rguenther@suse.de>
2515         * graphite-scop-detection.c (scop_detection::build_scop_depth): Rewrite,
2516         fold in ...
2517         (scop_detection::build_scop_breadth): ... this.  Removed.
2518         (scop_detection::loop_is_valid_in_scop): Fold into single caller.
2519         (scop_detection::harmful_stmt_in_bb): Likewise.
2520         (scop_detection::graphite_can_represent_stmt): Likewise.
2521         (scop_detection::loop_body_is_valid_scop): Likewise.  Remove recursion.
2522         (scop_detection::can_represent_loop): Remove recursion, fold in ...
2523         (scop_detection::can_represent_loop_1): ... this.  Removed.
2524         (scop_detection::harmful_loop_in_region): Simplify after inlining
2525         the above and remove more quadraticness.
2526         (build_scops): Adjust.
2527         * tree-data-ref.c (loop_nest_has_data_refs): Remove pointless
2528         quadraticness.
2530 2017-09-26  Jakub Jelinek  <jakub@redhat.com>
2532         PR target/82267
2533         * config/i386/i386.c (ix86_print_operand_address_as): Only test
2534         REGNO (base) == SP_REG if base is a REG.
2536         PR middle-end/35691
2537         * tree-ssa-reassoc.c (update_range_test): Dump r->exp each time
2538         if it is different SSA_NAME.
2539         (optimize_range_tests_cmp_bitwise): New function.
2540         (optimize_range_tests): Call it.
2542 2017-09-26  Richard Biener  <rguenther@suse.de>
2544         PR tree-optimization/82321
2545         * graphite.c (canonicalize_loop_closed_ssa): Properly check
2546         for the def being inside the loop.
2548 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2550         * config/s390/vx-builtins.md ("vmslg"): Add missing operand in
2551         assembler output.
2552         * config/s390/s390-builtins.def: Fix constraint on op4.
2554 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2556         * config/s390/s390.c (s390_expand_vec_compare): Use the new mode
2557         independent expanders.
2558         * config/s390/vector.md ("vec_cmpuneq", "vec_cmpltgt")
2559         ("vec_ordered", "vec_unordered"): New expanders.
2561 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2563         * config/s390/s390.c (s390_preferred_simd_mode): Return V4SFmode
2564         for SFmode.
2566 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2568         * config/s390/vector.md ("vec_unpacks_low_v16qi"): Rename to
2569         vec_unpacks_lo_v16qi.
2570         ("vec_unpacku_low_v16qi"): Rename to vec_unpacku_lo_v16qi.
2572 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2574         * config/s390/vector.md ("vec_unpacks_lo_v4sf")
2575         ("vec_unpacks_hi_v4sf", "vec_unpacks_lo_v2df")
2576         ("vec_unpacks_hi_v2df", "vec_pack_trunc_v2df"): New expanders.
2578 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2580         * config/s390/predicates.md ("const_shift_by_byte_operand"): New
2581         predicate.
2582         * config/s390/vector.md ("*vec_srb<mode>"): Change modes to V_128
2583         and V16QI.
2584         ("*vec_slb<mode>"): New insn pattern.
2585         ("vec_shr_<mode>"): New expander.
2586         * config/s390/vx-builtins.md ("vec_slb<mode>"): Turn into expander
2587         and force the shift count operand to V16QImode.
2588         ("vec_srb<mode>"): Set shift count mode to V16QI.
2590 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2592         * config/s390/vector.md ("vec_widen_umult_lo_<mode>")
2593         ("vec_widen_umult_hi_<mode>", "vec_widen_smult_lo_<mode>")
2594         ("vec_widen_smult_hi_<mode>"): New expander definitions.
2596 2017-09-26  Richard Earnshaw  <rearnsha@arm.com>
2598         PR target/82175
2599         * config/arm/arm.h (DRIVER_SELF_SPECS): Separate sub-rules with commas.
2601 2017-09-26  Richard Biener  <rguenther@suse.de>
2603         PR tree-optimization/82320
2604         * tree-ssa-sccvn.c (set_ssa_val_to): Changing undef to undef
2605         isn't a change.
2607 2017-09-25  Jeff Law  <law@redhat.com>
2609         * config/rs6000/rs6000-protos.h (output_probe_stack_range): Update
2610         prototype for new argument.
2611         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack_1): New function,
2612         mostly extracted from rs6000_emit_allocate_stack.
2613         (rs6000_emit_probe_stack_range_stack_clash): New function.
2614         (rs6000_emit_allocate_stack): Call
2615         rs6000_emit_probe_stack_range_stack_clash as needed.
2616         (rs6000_emit_probe_stack_range): Add additional argument
2617         to call to gen_probe_stack_range{si,di}.
2618         (output_probe_stack_range): New.
2619         (output_probe_stack_range_1): Renamed from output_probe_stack_range.
2620         (output_probe_stack_range_stack_clash): New.
2621         (rs6000_emit_prologue): Emit notes into dump file as requested.
2622         * rs6000.md (allocate_stack): Handle -fstack-clash-protection.
2623         (probe_stack_range<P:mode>): Operand 0 is now early-clobbered.
2624         Add additional operand and pass it to output_probe_stack_range.
2626 2017-09-25  Bin Cheng  <bin.cheng@arm.com>
2628         PR tree-optimization/82163
2629         * tree-ssa-loop-manip.h (verify_loop_closed_ssa): New parameter.
2630         (checking_verify_loop_closed_ssa): New parameter.
2631         * tree-ssa-loop-manip.c (check_loop_closed_ssa_use): Delete.
2632         (check_loop_closed_ssa_stmt): Delete.
2633         (check_loop_closed_ssa_def, check_loop_closed_ssa_bb): New functions.
2634         (verify_loop_closed_ssa): Check loop closed ssa form for LOOP.
2635         (tree_transform_and_unroll_loop): Check loop closed ssa form only for
2636         changed loops.
2638 2017-09-25  Pekka Jaaskelainen <pekka@parmance.com>
2640         * brig-builtins.def: Treat HSAIL barrier builtins as
2641         setjmp/longjump style functions.
2643 2017-09-25  Richard Sandiford  <richard.sandiford@linaro.org>
2645         * target.def (constant_alignment): New hook.
2646         * defaults.h (CONSTANT_ALIGNMENT): Delete.
2647         * doc/tm.texi.in (CONSTANT_ALIGNMENT): Replace with...
2648         (TARGET_CONSTANT_ALIGNMENT): ...this new hook.
2649         * doc/tm.texi: Regenerate.
2650         * targhooks.h (default_constant_alignment): Declare.
2651         (constant_alignment_word_strings): Likewise.
2652         * targhooks.c (default_constant_alignment): New function.
2653         (constant_alignment_word_strings): Likewise.
2654         * builtins.c (get_object_alignment_2): Use targetm.constant_alignment
2655         instead of CONSTANT_ALIGNMENT.
2656         * varasm.c (align_variable, get_variable_align, build_constant_desc)
2657         (force_const_mem): Likewise.
2658         * config/aarch64/aarch64.h (CONSTANT_ALIGNMENT): Delete.
2659         * config/aarch64/aarch64.c (aarch64_constant_alignment): New function.
2660         (aarch64_classify_address): Call it instead of CONSTANT_ALIGNMENT.
2661         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2662         * config/alpha/alpha.h (CONSTANT_ALIGNMENT): Delete commented-out
2663         definition.
2664         * config/arc/arc.h (CONSTANT_ALIGNMENT): Delete.
2665         * config/arc/arc.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2666         constant_alignment_word_strings.
2667         * config/arm/arm.h (CONSTANT_ALIGNMENT_FACTOR): Delete.
2668         (CONSTANT_ALIGNMENT): Likewise.
2669         * config/arm/arm.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2670         (arm_constant_alignment): New function.
2671         * config/bfin/bfin.h (CONSTANT_ALIGNMENT): Delete.
2672         * config/bfin/bfin.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2673         constant_alignment_word_strings.
2674         * config/cr16/cr16.h (CONSTANT_ALIGNMENT): Delete.
2675         * config/cr16/cr16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2676         constant_alignment_word_strings.
2677         * config/cris/cris.h (CONSTANT_ALIGNMENT): Delete.
2678         * config/cris/cris.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2679         (cris_constant_alignment): New function.
2680         * config/epiphany/epiphany.h (CONSTANT_ALIGNMENT): Delete.
2681         * config/epiphany/epiphany.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2682         (epiphany_constant_alignment): New function.
2683         * config/fr30/fr30.h (CONSTANT_ALIGNMENT): Delete.
2684         * config/fr30/fr30.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2685         constant_alignment_word_strings.
2686         * config/frv/frv.h (CONSTANT_ALIGNMENT): Delete.
2687         * config/frv/frv.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2688         constant_alignment_word_strings.
2689         * config/ft32/ft32.h (CONSTANT_ALIGNMENT): Delete.
2690         * config/ft32/ft32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2691         constant_alignment_word_strings.
2692         * config/i386/i386.h (CONSTANT_ALIGNMENT): Delete.
2693         * config/i386/i386-protos.h (ix86_constant_alignment): Delete.
2694         * config/i386/i386.c (ix86_constant_alignment): Make static.
2695         Use the same interface as the target hook.
2696         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2697         * config/ia64/ia64.h (CONSTANT_ALIGNMENT): Delete.
2698         * config/ia64/ia64.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2699         constant_alignment_word_strings.
2700         * config/iq2000/iq2000.h (CONSTANT_ALIGNMENT): Delete.
2701         * config/iq2000/iq2000.c (iq2000_constant_alignment): New function.
2702         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2703         * config/lm32/lm32.h (CONSTANT_ALIGNMENT): Delete.
2704         * config/lm32/lm32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2705         constant_alignment_word_strings.
2706         * config/m32r/m32r.h (CONSTANT_ALIGNMENT): Delete.
2707         * config/m32r/m32r.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2708         constant_alignment_word_strings.
2709         * config/mcore/mcore.h (CONSTANT_ALIGNMENT): Delete.
2710         * config/mcore/mcore.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2711         constant_alignment_word_strings.
2712         * config/microblaze/microblaze.h (CONSTANT_ALIGNMENT): Delete.
2713         * config/microblaze/microblaze.c (microblaze_constant_alignment):
2714         New function.
2715         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2716         * config/mips/mips.h (CONSTANT_ALIGNMENT): Delete.
2717         * config/mips/mips.c (mips_constant_alignment): New function.
2718         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2719         * config/mmix/mmix.h (CONSTANT_ALIGNMENT): Delete.
2720         * config/mmix/mmix-protos.h (mmix_constant_alignment): Delete.
2721         * config/mmix/mmix.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2722         (mmix_constant_alignment): Make static.  Use the same interface
2723         as the target hook.
2724         * config/moxie/moxie.h (CONSTANT_ALIGNMENT): Delete.
2725         * config/moxie/moxie.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2726         constant_alignment_word_strings.
2727         * config/nios2/nios2.h (CONSTANT_ALIGNMENT): Delete.
2728         * config/nios2/nios2.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2729         constant_alignment_word_strings.
2730         * config/pa/pa.h (CONSTANT_ALIGNMENT): Delete.
2731         * config/pa/pa.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2732         constant_alignment_word_strings.
2733         * config/powerpcspe/powerpcspe.h (CONSTANT_ALIGNMENT): Delete.
2734         * config/powerpcspe/powerpcspe.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2735         (rs6000_constant_alignment): New function.
2736         * config/riscv/riscv.h (CONSTANT_ALIGNMENT): Delete.
2737         * config/riscv/riscv.c (riscv_constant_alignment): New function.
2738         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2739         * config/rs6000/rs6000.h (CONSTANT_ALIGNMENT): Delete.
2740         * config/rs6000/rs6000.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2741         (rs6000_constant_alignment): New function.
2742         * config/s390/s390.h (CONSTANT_ALIGNMENT): Delete.
2743         * config/s390/s390.c (s390_constant_alignment): New function.
2744         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2745         * config/sh/sh.h (CONSTANT_ALIGNMENT): Delete.
2746         * config/sh/sh.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2747         constant_alignment_word_strings.
2748         * config/sparc/sparc.h (CONSTANT_ALIGNMENT): Delete.
2749         * config/sparc/sparc.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2750         (sparc_constant_alignment): New function.
2751         * config/spu/spu.h (CONSTANT_ALIGNMENT): Delete.
2752         * config/spu/spu.c (spu_constant_alignment): New function.
2753         (TARGET_CONSTANT_ALIGNMENT): Redefine.
2754         * config/stormy16/stormy16.h (CONSTANT_ALIGNMENT): Delete.
2755         * config/stormy16/stormy16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2756         constant_alignment_word_strings.
2757         * config/tilegx/tilegx.h (CONSTANT_ALIGNMENT): Delete.
2758         * config/tilegx/tilegx.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2759         constant_alignment_word_strings.
2760         * config/tilepro/tilepro.h (CONSTANT_ALIGNMENT): Delete.
2761         * config/tilepro/tilepro.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
2762         constant_alignment_word_strings.
2763         * config/visium/visium.h (CONSTANT_ALIGNMENT): Delete.
2764         * config/visium/visium.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2765         (visium_constant_alignment): New function.
2766         * config/xtensa/xtensa.h (CONSTANT_ALIGNMENT): Delete.
2767         * config/xtensa/xtensa.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
2768         (xtensa_constant_alignment): New function.
2769         * system.h (CONSTANT_ALIGNMENT): Poison.
2771 2017-09-25  Will Schmidt  <will_schmidt@vnet.ibm.com>
2773         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
2774         for early folding of vector stores (ALTIVEC_BUILTIN_ST_*).
2775         (rs6000_builtin_valid_without_lhs): New helper function.
2776         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
2777         Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_ST.
2779 2017-09-25  Richard Sandiford  <richard.sandiford@linaro.org>
2781         * target.h (vec_perm_indices): Use unsigned short rather than
2782         unsigned char.
2783         (auto_vec_perm_indices): Likewise.
2784         * config/aarch64/aarch64.c (aarch64_vectorize_vec_perm_const_ok):
2785         Use unsigned int rather than unsigned char.
2786         * config/arm/arm.c (arm_vectorize_vec_perm_const_ok): Likewise.
2788 2017-09-25  Richard Biener  <rguenther@suse.de>
2790         * cfgloop.h (sort_sibling_loops): Declare.
2791         * cfgloop.c (sort_sibling_loops_cmp): New helper.
2792         (sort_sibling_loops): New function sorting the sibling loop list
2793         in RPO order.
2794         * graphite.c (graphite_transform_loops): Sort sibling loops.
2796 2017-09-25  Richard Sandiford  <richard.sandifird@linaro.org>
2798         * target.def (vec_perm_const_ok): Change sel parameter to
2799         vec_perm_indices.
2800         * optabs-query.c (can_vec_perm_p): Update accordingly.
2801         * doc/tm.texi: Regenerate.
2802         * config/aarch64/aarch64.c (expand_vec_perm_d): Change perm to
2803         auto_vec_perm_indices and remove separate nelt field.
2804         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
2805         (aarch64_evpc_ext, aarch64_evpc_rev, aarch64_evpc_dup)
2806         (aarch64_evpc_tbl, aarch64_expand_vec_perm_const_1)
2807         (aarch64_expand_vec_perm_const): Update accordingly.
2808         (aarch64_vectorize_vec_perm_const_ok): Likewise.  Change sel
2809         to vec_perm_indices.
2810         * config/arm/arm.c (expand_vec_perm_d): Change perm to
2811         auto_vec_perm_indices and remove separate nelt field.
2812         (arm_evpc_neon_vuzp, arm_evpc_neon_vzip, arm_evpc_neon_vrev)
2813         (arm_evpc_neon_vtrn, arm_evpc_neon_vext, arm_evpc_neon_vtbl)
2814         (arm_expand_vec_perm_const_1, arm_expand_vec_perm_const): Update
2815         accordingly.
2816         (arm_vectorize_vec_perm_const_ok): Likewise.  Change sel
2817         to vec_perm_indices.
2818         * config/i386/i386.c (ix86_vectorize_vec_perm_const_ok): Change
2819         sel to vec_perm_indices.
2820         * config/ia64/ia64.c (ia64_vectorize_vec_perm_const_ok): Likewise.
2821         * config/mips/mips.c (mips_vectorize_vec_perm_const_ok): Likewise.
2822         * config/powerpcspe/powerpcspe.c (rs6000_vectorize_vec_perm_const_ok):
2823         Likewise.
2824         * config/rs6000/rs6000.c (rs6000_vectorize_vec_perm_const_ok):
2825         Likewise.
2827 2017-09-25  Pierre-Marie de Rodat  <derodat@adacore.com>
2829         PR debug/82155
2830         * dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl
2831         on the FUNCTION_DECL function context if it has a DIE that is a
2832         declaration.
2834 2017-09-25  Richard Biener  <rguenther@suse.de>
2836         PR tree-optimization/82285
2837         * tree-vect-patterns.c (vect_recog_bool_pattern): Also handle
2838         enumeral types.
2840 2017-09-25  Tom de Vries  <tom@codesourcery.com>
2842         PR target/80035
2843         PR target/81069
2844         * config/nvptx/nvptx.c (nvptx_output_call_insn): Add exit after call to
2845         noreturn function.
2847 2017-09-25  Richard Biener  <rguenther@suse.de>
2849         * graphite-optimize-isl.c (optimize_isl): Fail and dump if
2850         ISL errors other than isl_error_quota happen.  Dump if the
2851         schedule is the same.
2852         * graphite-sese-to-poly.c (build_poly_scop): Fail on ISL
2853         errors instead of aborting inside ISL.
2855 2017-09-25  Iain Sandoe  <iain@codesourcery.com>
2857         PR target/80556
2858         * config/i386/darwin.h (REAL_LIB_SPEC): New; put libSystem ahead
2859         of libgcc_eh for m64.
2860         * config/i386/darwin64.h: Likewise.
2862 2017-09-25  Richard Biener  <rguenther@suse.de>
2864         PR middle-end/82144
2865         * dwarf2out.c (gen_enumeration_type_die): Do not add alignment
2866         attribute for incomplete types nor twice for complete ones.
2868 2017-09-24  Uros Bizjak  <ubizjak@gmail.com>
2870         PR target/82267
2871         * config/i386/i386.c (ix86_print_operand_address_as): Encode
2872         %esp as %rsp to avoid 0x67 prefix if there is no index or base
2873         register.
2875 2017-09-23  Uros Bizjak  <ubizjak@gmail.com>
2877         PR bootstrap/82306
2878         * config/i386/i386.opt (mprefer-avx256): Use
2879         ix86_target_flags variable.
2880         * config/i386/i386.c (ix86_target_string): Move
2881         -mprefer-avx256 to flag2_opts.
2883 2017-09-22  Jakub Jelinek  <jakub@redhat.com>
2885         PR middle-end/35691
2886         * match.pd: Simplify x == -1 & y == -1 into (x & y) == -1
2887         and x != -1 | y != -1 into (x & y) != -1.
2889 2017-09-22  Steve Ellcey  <sellcey@cavium.com>
2891         * config.gcc: Add new case statement to set
2892         default_gnu_indirect_function.  Remove it from x86_64-*-linux*,
2893         i[34567]86-*, powerpc*-*-linux*spe*, powerpc*-*-linux*, s390-*-linux*,
2894         s390x-*-linux* case statements.   Added aarch64 to the list of
2895         supported architectures.
2897 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
2899         PR tree-optimization/82289
2900         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Check
2901         STMT_VINFO_RELEVANT_P.
2903 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
2904             Alan Hayward  <alan.hayward@arm.com>
2905             David Sherwood  <david.sherwood@arm.com>
2907         * tree-vrp.c (extract_range_from_multiplicative_op_1): Assert
2908         for VR_RANGE only; don't allow VR_ANTI_RANGE.
2909         (extract_range_from_binary_expr_1): Don't call
2910         extract_range_from_multiplicative_op_1 if !range_int_cst_p.
2912 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
2913             Alan Hayward  <alan.hayward@arm.com>
2914             David Sherwood  <david.sherwood@arm.com>
2916         * target.def (preferred_vector_alignment): New hook.
2917         * doc/tm.texi.in (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): New
2918         hook.
2919         * doc/tm.texi: Regenerate.
2920         * targhooks.h (default_preferred_vector_alignment): Declare.
2921         * targhooks.c (default_preferred_vector_alignment): New function.
2922         * tree-vectorizer.h (dataref_aux): Add a target_alignment field.
2923         Expand commentary.
2924         (DR_TARGET_ALIGNMENT): New macro.
2925         (aligned_access_p): Update commentary.
2926         (vect_known_alignment_in_bytes): New function.
2927         * tree-vect-data-refs.c (vect_calculate_required_alignment): New
2928         function.
2929         (vect_compute_data_ref_alignment): Set DR_TARGET_ALIGNMENT.
2930         Calculate the misalignment based on the target alignment rather than
2931         the vector size.
2932         (vect_update_misalignment_for_peel): Use DR_TARGET_ALIGMENT
2933         rather than TYPE_ALIGN / BITS_PER_UNIT to update the misalignment.
2934         (vect_enhance_data_refs_alignment): Mask the byte misalignment with
2935         the target alignment, rather than masking the element misalignment
2936         with the number of elements in a vector.  Also use the target
2937         alignment when calculating the maximum number of peels.
2938         (vect_find_same_alignment_drs): Use vect_calculate_required_alignment
2939         instead of TYPE_ALIGN_UNIT.
2940         (vect_duplicate_ssa_name_ptr_info): Remove stmt_info parameter.
2941         Measure DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT.
2942         (vect_create_addr_base_for_vector_ref): Update call accordingly.
2943         (vect_create_data_ref_ptr): Likewise.
2944         (vect_setup_realignment): Realign by ANDing with
2945         -DR_TARGET_MISALIGNMENT.
2946         * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Calculate
2947         the number of peels based on DR_TARGET_ALIGNMENT.
2948         * tree-vect-stmts.c (get_group_load_store_type): Compare the gap
2949         with the guaranteed alignment boundary when deciding whether
2950         overrun is OK.
2951         (vectorizable_mask_load_store): Interpret DR_MISALIGNMENT
2952         relative to DR_TARGET_ALIGNMENT instead of TYPE_ALIGN_UNIT.
2953         (ensure_base_align): Remove stmt_info parameter.  Get the
2954         target base alignment from DR_TARGET_ALIGNMENT.
2955         (vectorizable_store): Update call accordingly.   Interpret
2956         DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT instead of
2957         TYPE_ALIGN_UNIT.
2958         (vectorizable_load): Likewise.
2960 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
2961             Alan Hayward  <alan.hayward@arm.com>
2962             David Sherwood  <david.sherwood@arm.com>
2964         * tree-vectorizer.h (vect_get_scalar_dr_size): New function.
2965         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Use it.
2966         (vect_enhance_data_refs_alignment): Likewise.
2968 2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>
2970         * config/arm/parsecpu.awk (fatal): Note that we've encountered an
2971         error.  Only quit immediately if parsing is complete.
2972         (BEGIN): Initialize fatal_err and parse_done.
2973         (begin fpu, end fpu): Check number of arguments.
2974         (begin arch, end arch): Likewise.
2975         (begin cpu, end cpu): Likewise.
2976         (cname, tune for, tune flags, architecture, fpu, option): Likewise.
2977         (optalias): Likewise.
2979 2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>
2981         * config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
2982         * config/arm/arm-isa.h: Delete.  Move definitions to ...
2983         * arm-cpus.in: ... here.  Use new feature and fgroup values.
2984         * config/arm/arm.c (arm_option_override): Use lower case for feature
2985         bit names.
2986         * config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
2987         (TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
2988         * config/arm/parsecpu.awk (END): Add new command 'isa'.
2989         (isa_pfx): Delete.
2990         (print_isa_bits_for): New function.
2991         (gen_isa): New function.
2992         (gen_comm_data): Use print_isa_bits_for.
2993         (define feature): New keyword.
2994         (define fgroup): New keyword.
2995         * config/arm/t-arm (TM_H): Remove.
2996         (GTM_H): Add arm-isa.h.
2997         (arm-isa.h): Add rule to generate file.
2998         * common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
2999         case for feature bit names.
3001 2017-09-22  Richard Biener  <rguenther@suse.de>
3003         * graphite-isl-ast-to-gimple.c (graphite_verify): Inline into
3004         single caller.
3005         (graphite_regenerate_ast_isl): Do not reset SCEV.  Move debug
3006         print of no dependency loops ...
3007         * graphite.c (graphite_transform_loops): ... here.
3008         (canonicalize_loop_closed_ssa_form): Work from inner to outer
3009         loops.
3010         (same_close_phi_node, remove_duplicate_close_phi,
3011         make_close_phi_nodes_unique, defined_in_loop_p): Fold into ...
3012         (canonicalize_loop_closed_ssa): ... here and simplify.
3013         * graphite-optimize-isl.c: Include tree-vectorizer.h.
3014         (optimize_isl): Use dump_printf_loc to tell when we stopped
3015         optimizing because of an ISL timeout.
3017 2017-09-22  Richard Biener  <rguenther@suse.de>
3019         PR tree-optimization/82291
3020         * tree-if-conv.c (predicate_mem_writes): Make sure to
3021         remove writes in blocks predicated with false.
3023 2017-09-22  Richard Biener  <rguenther@suse.de>
3025         * sese.c: Include cfganal.h.
3026         (if_region_set_false_region): Remove.
3027         (create_if_region_on_edge): Likewise.
3028         (move_sese_in_condition): Re-implement without destroying
3029         dominators.
3031 2017-09-22  Richard Biener  <rguenther@suse.de>
3033         * graphite-isl-ast-to-gimple.c (translate_pending_phi_nodes):
3034         Verify both BBs contain loop PHI nodes before dispatching to
3035         copy_loop_phi_args.
3036         (graphite_regenerate_ast_isl): Do not recompute dominators,
3037         do not verify three times.  Restructure for clarity.
3038         * graphite-scop-detection.c (same_close_phi_node,
3039         remove_duplicate_close_phi, make_close_phi_nodes_unique,
3040         defined_in_loop_p, canonicalize_loop_closed_ssa,
3041         canonicalize_loop_closed_ssa_form): Simplify, remove excess
3042         checking and SSA rewrite, move to ...
3043         * graphite.c: ... here.  Include ssa.h and tree-ssa-loop-manip.h.
3044         (graphite_initialize): Do not pass in ctx, do not reset the
3045         SCEV cache, compute only dominators.
3046         (graphite_transform_loops): Allocate ISL ctx after
3047         graphite_initialize.  Call canonicalize_loop_closed_ssa_form.
3048         Maintain post-dominators only around build_scops.
3049         * sese.c (if_region_set_false_region): Make static.  Free
3050         and recompute dominators.
3051         (move_sese_in_condition): Assert we don't get called with
3052         post-dominators computed.
3053         * sese.h (if_region_set_false_region): Remove.
3055 2017-09-22  Sergey Shalnov  <sergey.shalnov@intel.com>
3057         * config/i386/sse.md ("mov<mode>_internal"): Use <sseinsnmode>
3058         mode attribute for TARGET_AVX512VL.
3060 2017-09-21  Sergey Shalnov  <sergey.shalnov@intel.com>
3062         * config/i386/i386.opt (mprefer-avx256): New option.
3063         * config/i386/i386.c (ix86_target_string): Add -mprefer-avx256
3064         to flag_opts.
3065         (ix86_preferred_simd_mode): Return 256-bit AVX modes
3066         for TARGET_PREFER_AVX256.
3067         * doc/invoke.texi (x86 Options): Document -mprefer-avx256.
3069 2017-09-21  Jeff Law  <law@redhat.com>
3071         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash):
3072         Fix dump output if the only stack space is for pushed registers.
3074 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
3076         * config/spu/spu.c (spu_sched_adjust_cost): Update after renaming
3077         of insn_cost.
3079 2017-09-21  Martin Sebor  <msebor@redhat.com>
3081         PR c/81882
3082         * doc/extend.texi (attribute ifunc): Avoid relying on ill-formed
3083         code (in C++) or code that triggers warnings.
3085 2017-09-21  Eric Botcazou  <ebotcazou@adacore.com>
3087         * stor-layout.c (bit_from_pos): Do not distribute the conversion.
3089 2017-09-21  Segher Boessenkool  <segher@kernel.crashing.org>
3091         * haifa-sched.c: Rename insn_cost to insn_sched_cost.
3092         * sched-rgn.c: Ditto.
3093         * sel-sched-ir.c: Ditto.
3095 2017-09-21  Alexander Monakov  <amonakov@ispras.ru>
3097         * toplev.h (set_random_seed): Adjust return type.
3098         * toplev.c (init_local_tick): Move eager initialization of random_seed
3099         to get_random_seed.  Adjust comment.
3100         (init_random_seed): Inline to get_random_seed, delete.
3101         (get_random_seed): Initialize random_seed lazily.
3102         (set_random_seed): Do not return previous value.
3103         (print_switch_value): Do not call get_random_seed.
3105 2017-09-21  Evgeny Kudryashov  <kudryashov@ispras.ru>
3107         * cgraph.c (delete_function_version): New, broken out from...
3108         (cgraph_node::delete_function_version): ...here.  Rename to
3109         cgraph_node::delete_function_version_by_decl.  Update all uses.
3110         (cgraph_node::remove): Call delete_function_version.
3112 2017-09-21  Jakub Jelinek  <jakub@redhat.com>
3114         PR sanitizer/81715
3115         * tree-inline.c (expand_call_inline): Emit clobber stmts for
3116         VAR_DECLs to which addressable non-volatile parameters are mapped
3117         and for id->retvar after the return value assignment.  Clear
3118         id->retval and id->retbnd after inlining.
3120 2017-09-21  Richard Biener  <rguenther@suse.de>
3122         PR tree-optimization/82276
3123         PR tree-optimization/82244
3124         * tree-vrp.c (build_assert_expr_for): Set
3125         SSA_NAME_OCCURS_IN_ABNORMAL_PHI if the variable we assert on
3126         has it set.
3127         (remove_range_assertions): Revert earlier change.
3129 2017-09-21  Wilco Dijkstra  <wdijkstr@arm.com>
3131         PR target/71951
3132         * config/aarch64/aarch64.h (LIBGCC2_UNWIND_ATTRIBUTE): Define.
3134 2017-09-21  Richard Biener  <rguenther@suse.de>
3136         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
3137         Restore valid IL after code generation errors.
3138         * graphite.c (graphite_transform_loops): Diagnose code
3139         generation issues as MSG_MISSED_OPTIMIZATION and continue
3140         with processing SCOPs.
3142 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
3143             Alan Hayward  <alan.hayward@arm.com>
3144             David Sherwood  <david.sherwood@arm.com>
3146         * calls.c (compute_argument_addresses): Use simplify_gen_binary
3147         rather than choosing between plus_constant and gen_rtx_<CODE>.
3148         * expr.c (emit_push_insn): Likewise.
3149         (expand_expr_real_2): Likewise.
3151 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
3152             Alan Hayward  <alan.hayward@arm.com>
3153             David Sherwood  <david.sherwood@arm.com>
3155         * loop-unroll.c (split_iv): Call copy_rtx on the step.
3157 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
3158             Alan Hayward  <alan.hayward@arm.com>
3159             David Sherwood  <david.sherwood@arm.com>
3161         * tree.c (find_atomic_core_type): Check tree_fits_uhwi_p before
3162         calling tree_to_uhwi.
3164 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
3165             Alan Hayward  <alan.hayward@arm.com>
3166             David Sherwood  <david.sherwood@arm.com>
3168         * tree-ssa-ccp.c (get_value_for_expr): Use a positive test for
3169         INTEGER_CST rather than a negative test for ADDR_EXPR.
3171 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
3172             Alan Hayward  <alan.hayward@arm.com>
3173             David Sherwood  <david.sherwood@arm.com>
3175         * tree-vrp.c (extract_range_from_binary_expr_1): Check
3176         int_cst_rangeN before calling value_range_constant_singleton (&vrN).
3178 2017-09-21  Richard Biener  <rguenther@suse.de>
3180         PR tree-optimization/71351
3181         * graphite-isl-ast-to-gimple.c (translate_isl_ast_to_gimple::
3182         graphite_create_new_loop_guard): Remove, fold remaining parts
3183         into caller ...
3184         (translate_isl_ast_node_for): ... here and simplify.
3186 2017-09-21  Jakub Jelinek  <jakub@redhat.com>
3188         PR target/82260
3189         * config/i386/i386.md (*movqi_internal): Replace (=q,q) alternative
3190         with (=Q,Q), (=R,R) and (=r,r) alternatives, only enable the
3191         latter two for 64-bit, renumber alternatives, for -Os imov (=q,n)
3192         alternative always use QI mode, for -Os imov (=R,R) alternative
3193         always use SI mode, for imov (=Q,Q) or (=r,r) alternatives
3194         ignore -Os.
3196 2017-09-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
3197             Jeff Law  <law@redhat.com>
3199         * config/s390/s390.c (MIN_UNROLL_PROBES): Define.
3200         (allocate_stack_space): New function, partially extracted from
3201         s390_emit_prologue.
3202         (s390_emit_prologue): Track offset to most recent stack probe.
3203         Code to allocate space moved into allocate_stack_space.
3204         Dump actions when no stack is allocated.
3205         (s390_prologue_plus_offset): New function.
3206         (s390_emit_stack_probe): Likewise.
3208 2017-09-20  Alexandre Oliva <aoliva@redhat.com>
3210         * common.opt (Wa, Wl, Wp, g, gz=): Add
3211         RejectNegative.
3212         (gno-column-info): Remove.
3213         (gcolumn-info): Drop RejectNegative.
3214         (gno-): New prefix.
3215         (gno-record-gcc-switches): Remove.
3216         (grecord-gcc-switches): Drop RejectNegative.
3217         (gno-split-dwarf): Remove.
3218         (gsplit-dwarf): Drop RejectNegative.
3219         (gno-strict-dwarf): Remove.
3220         (gstrict-dwarf): Drop RejectNegative.
3221         * config/darwin.opt (gfull, gused): Add RejectNegative.
3222         * dwarf2out.c (gen_producer_string): Drop
3223         gno-record-gcc-switches handler.
3224         * optc-gen.awk: Add g to prefixes with negative forms.
3225         * opts-common.c (remapping_prefix_p): New.
3226         (find_opt): Check it.
3227         (generate_canonical_option): Test g prefix.
3228         (option_map): Add -gno- mapping.
3229         (add_misspelling_candidates): Check remapping_prefix_p.
3231 2017-09-20  Jeff Law  <law@redhat.com>
3233         * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Fix
3234         thinko in stack clash protection support.
3236         * explow.c (compute_stack_clash_protection_loop_data): Use
3237         CONST_INT_P instead of explicit test.  Verify object is a
3238         CONST_INT_P before looking at INTVAL.
3239         (anti_adjust_stack_and_probe_stack_clash): Use CONST_INT_P
3240         instead of explicit test.
3242 2017-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
3244         PR target/77687
3245         * config/rs6000/rs6000.md (stack_restore_tie): Store to a scratch
3246         address instead of to r1 and r11.
3248 2017-09-20  Sebastian Peryt  <sebastian.peryt@intel.com>
3250         * config.gcc: Support "knm".
3251         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "knm".
3252         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
3253         PROCESSOR_KNM.
3254         * config/i386/i386.c (m_KNM): Define.
3255         (processor_target_table): Add "knm".
3256         (PTA_KNM): Define.
3257         (ix86_option_override_internal): Add "knm".
3258         (ix86_issue_rate): Add PROCESSOR_KNM.
3259         (ix86_adjust_cost): Ditto.
3260         (ia32_multipass_dfa_lookahead): Ditto.
3261         (get_builtin_code_for_version): Handle PROCESSOR_KNM.
3262         (fold_builtin_cpu): Add M_INTEL_KNM.
3263         * config/i386/i386.h (processor_costs): Define TARGET_KNM.
3264         (processor_type): Add PROCESSOR_KNM.
3265         * config/i386/x86-tune.def: Add m_KNM.
3266         * doc/invoke.texi: Add knm as x86 -march=/-mtune= CPU type.
3268 2017-09-20  Richard Biener  <rguenther@suse.de>
3270         PR tree-optimization/80213
3271         * graphite-scop-detection.c (trivially_empty_bb_p): Labels
3272         are allowed in empty BBs as well.
3273         (canonicalize_loop_closed_ssa): Also look for other complex
3274         edges.
3275         (scop_detection::get_sese): Include the loop-closed PHI block
3276         in loop SESEs.
3277         (scop_detection::merge_sese): Remove code adding extra blocks.
3278         (scop_detection::region_has_one_loop): Adjust for get_sese changes.
3279         (build_scops): Assert the final returned scop is invalid.
3281 2017-09-20  Richard Biener  <rguenther@suse.de>
3283         PR tree-optimization/82264
3284         * tree-ssa-sccvn.c (vn_phi_eq): Use safe_dyn_cast to check
3285         for GIMPLE_CONDs.
3286         (vn_phi_lookup): Likewise.
3287         (vn_phi_insert): Likewise.
3289 2017-09-20  Jakub Jelinek  <jakub@redhat.com>
3291         * dwarf2out.c (tree_add_const_value_attribute): For INTEGER_CST
3292         that fits into uhwi or shwi, add DW_AT_const_value regardless
3293         of early_dwarf without going through RTL, using add_AT_unsigned
3294         or add_AT_int.
3296         * dwarf2out.c (DEBUG_LTO_DWO_INFO_SECTION): Reorder defines.
3297         (DEBUG_LTO_ABBREV_SECTION): Likewise.
3298         (DEBUG_LTO_MACINFO_SECTION): Likewise.
3299         (DEBUG_MACRO_SECTION): Likewise.
3300         (DEBUG_LTO_MACRO_SECTION): Likewise.
3301         (DEBUG_STR_DWO_SECTION): Likewise.
3302         (DEBUG_LTO_STR_DWO_SECTION): Likewise.
3303         (DEBUG_LTO_LINE_SECTION): Drop .dwo suffix from the name.
3304         (DEBUG_LTO_DWO_LINE_SECTION): Define.
3305         (DEBUG_LTO_LINE_STR_SECTION): Define.
3306         (init_sections_and_labels): Initialize debug_line_str_section
3307         variable.  Initialize debug_loc_section for -gdwarf-5 to
3308         DEBUG_LOCLISTS_SECTION.  Formatting fixes.
3310 2017-09-20  Richard Biener  <rguenther@suse.de>
3312         * graphite-sese-to-poly.c (extract_affine): Properly handle
3313         POINTER_PLUS_EXPR, BIT_NOT_EXPR and conversion to signed.
3315 2017-09-20  Richard Biener  <rguenther@suse.de>
3317         PR tree-optimization/81373
3318         * graphite-scop-detection.c (build_cross_bb_scalars_def):
3319         Force SESE live-out defs to be handled even if they are
3320         scev_analyzable_p.
3322 2017-09-19  Jeff Law  <law@redhat.com>
3324         * combine-stack-adj.c (combine_stack_adjustments_for_block): Do
3325         nothing for stack adjustments with REG_STACK_CHECK.
3326         * sched-deps.c (parse_add_or_inc): Reject insns with
3327         REG_STACK_CHECK from dependency breaking.
3328         * config/i386/i386.c (pro_epilogue_adjust_stack): Return insn.
3329         (ix86_adjust_satck_and_probe_stack_clash): Add REG_STACK_NOTEs.
3330         * reg-notes.def (STACK_CHECK): New note.
3332         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): New.
3333         (ix86_expand_prologue): Dump stack clash info as needed.
3334         Call ix86_adjust_stack_and_probe_stack_clash as needed.
3336         * function.c (dump_stack_clash_frame_info): New function.
3337         * function.h (dump_stack_clash_frame_info): Prototype.
3338         (enum stack_clash_probes): New enum.
3340         * config/alpha/alpha.c (alpha_expand_prologue): Also check
3341         flag_stack_clash_protection.
3342         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Likewise.
3343         (arm_expand_prologue, thumb1_expand_prologue): Likewise.
3344         (arm_frame_pointer_required): Likewise.
3345         * config/ia64/ia64.c (ia64_compute_frame_size): Likewise.
3346         (ia64_expand_prologue): Likewise.
3347         * config/mips/mips.c (mips_expand_prologue): Likewise.
3348         * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Likewise.
3349         * config/sparc/sparc.c (sparc_expand_prologue): Likewise.
3350         (sparc_flat_expand_prologue): Likewise.
3351         * config/spu/spu.c (spu_expand_prologue): Likewise.
3353         * explow.c: Include "params.h".
3354         (anti_adjust_stack_and_probe_stack_clash): New function.
3355         (get_stack_check_protect): Likewise.
3356         (compute_stack_clash_protection_loop_data): Likewise.
3357         (emit_stack_clash_protection_loop_start): Likewise.
3358         (emit_stack_clash_protection_loop_end): Likewise.
3359         (allocate_dynamic_stack_space): Use get_stack_check_protect.
3360         Use anti_adjust_stack_and_probe_stack_clash.
3361         * explow.h (compute_stack_clash_protection_loop_data): Prototype.
3362         (emit_stack_clash_protection_loop_start): Likewise.
3363         (emit_stack_clash_protection_loop_end): Likewise.
3364         * rtl.h (get_stack_check_protect): Prototype.
3365         * target.def (stack_clash_protection_final_dynamic_probe): New hook.
3366         * targhooks.c (default_stack_clash_protection_final_dynamic_probe): New.
3367         * targhooks.h (default_stack_clash_protection_final_dynamic_probe):
3368         Prototype.
3369         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE):
3370         Add @hook.
3371         * doc/tm.texi: Rebuilt.
3372         * config/aarch64/aarch64.c (aarch64_expand_prologue): Use
3373         get_stack_check_protect.
3374         * config/alpha/alpha.c (alpha_expand_prologue): Likewise.
3375         * config/arm/arm.c (arm_expand_prologue): Likewise.
3376         (arm_frame_pointer_required): Likewise.
3377         * config/i386/i386.c (ix86_expand_prologue): Likewise.
3378         * config/ia64/ia64.c (ia64_expand_prologue): Likewise.
3379         * config/mips/mips.c (mips_expand_prologue): Likewise.
3380         * config/powerpcspe/powerpcspe.c (rs6000_emit_prologue): Likewise.
3381         * config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise.
3382         * config/sparc/sparc.c (sparc_expand_prologue): Likewise.
3383         (sparc_flat_expand_prologue): Likewise.
3385         * common.opt (-fstack-clash-protection): New option.
3386         * flag-types.h (enum stack_check_type): Note difference between
3387         -fstack-check= and -fstack-clash-protection.
3388         * params.def (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE): New PARAM.
3389         (PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Likewise.
3390         * toplev.c (process_options): Issue warnings/errors for cases
3391         not handled with -fstack-clash-protection.
3392         * doc/invoke.texi (-fstack-clash-protection): Document new option.
3393         (-fstack-check): Note additional problem with -fstack-check=generic.
3394         Note that -fstack-check is primarily for Ada and refer users
3395         to -fstack-clash-protection for stack-clash-protection.
3396         Document new params for stack clash protection.
3398 2017-09-19  Uros Bizjak  <ubizjak@gmail.com>
3400         * config/i386/i386.c (ix86_split_long_move): Do not handle
3401         address used for LEA in a special way.
3403 2017-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
3405         * simplify-rtx.c (simplify_binary_operation_1): Fix typo in comment.
3407 2017-09-19  Martin Sebor  <msebor@redhat.com>
3409         PR c/81854
3410         * cgraphunit.c (handle_alias_pairs): Reject aliases between functions
3411         of incompatible types.
3413 2017-09-19  Will Schmidt  <will_schmidt@vnet.ibm.com>
3415         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
3416         for early folding of vector loads (ALTIVEC_BUILTIN_LVX_*).
3417         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
3418         Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_LD.
3420 2017-09-19  Richard Biener  <rguenther@suse.de>
3422         PR tree-optimization/82244
3423         * tree-vrp.c (remove_range_assertions): Do not propagate
3424         a constant to abnormals but replace the assert with a copy.
3426 2017-09-19  Alexander Monakov  <amonakov@ispras.ru>
3428         PR rtl-optimization/57878
3429         PR rtl-optimization/68988
3430         * lra-assigns.c (reload_pseudo_compare_func): Remove fragmentation
3431         avoidance test involving non_reload_pseudos.  Move frequency test
3432         below the general fragmentation avoidance test.
3434 2017-09-19  Richard Biener  <rguenther@suse.de>
3436         PR tree-optimization/69728
3437         * graphite-sese-to-poly.c (schedule_error): New global.
3438         (add_loop_schedule): Handle empty domain by failing the
3439         schedule.
3440         (build_original_schedule): Handle schedule_error.
3442 2017-09-19  Richard Biener  <rguenther@suse.de>
3444         * graphite-scop-detection.c (scop_detection::can_represent_loop):
3445         Do not iterate to sibling loops but only to siblings of inner
3446         loops.
3448 2017-09-18  Andreas Schwab  <schwab@linux-m68k.org>
3450         PR target/81613
3451         * config/m68k/m68k.md (moveq feeding equality comparison): Check
3452         that the registers are different.
3454 2017-09-18  Uros Bizjak  <ubizjak@gmail.com>
3456         * config/i386/i386.c (fold_builtin_cpu): Add M_AMDFAM17H
3457         to processor_model and "amdfam17h" to arch_names_table.
3458         * doc/extend.texi (__builtin_cpu_is): Document amdfam17h CPU name.
3460 2017-09-18  Jakub Jelinek  <jakub@redhat.com>
3462         PR c/82234
3463         * doc/extend.texi: Add @findex entry for __builtin_shuffle.
3465 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
3466             Alan Hayward  <alan.hayward@arm.com>
3467             David Sherwood  <david.sherwood@arm.com>
3469         * tree-vectorizer.h (vect_slp_analyze_operations): Replace parameters
3470         with a vec_info *.
3471         * tree-vect-loop.c (vect_analyze_loop_operations): Update call
3472         accordingly.
3473         * tree-vect-slp.c (vect_slp_analyze_node_operations): Add vec_info *
3474         parameter.  Set SLP_TREE_NUMBER_OF_VEC_STMTS here rather than in
3475         vect_schedule_slp_instance.
3476         (vect_slp_analyze_operations): Replace parameters with a vec_info *.
3477         Update call to vect_slp_analyze_node_operations.  Simplify return
3478         value.
3479         (vect_slp_analyze_bb_1): Update call accordingly.
3480         (vect_schedule_slp_instance): Remove vectorization_factor parameter.
3481         Don't calculate SLP_TREE_NUMBER_OF_VEC_STMTS here.
3482         (vect_schedule_slp): Update call accordingly.
3484 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
3485             Alan Hayward  <alan.hayward@arm.com>
3486             David Sherwood  <david.sherwood@arm.com>
3488         * tree-vect-data-refs.c (vect_get_smallest_scalar_type): Cope
3489         with types that aren't in fact scalar.
3491 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
3493         * tree-vect-slp.c (vect_record_max_nunits): New function,
3494         split out from...
3495         (vect_build_slp_tree_1): ...here.
3496         (vect_build_slp_tree_2): Call it for phis too.
3498 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
3500         * tree-vect-stmts.c (vectorizable_mask_load_store): Pass mask_vectype
3501         to vect_get_vec_def_for_operand when getting the mask operand.
3503 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
3504             Alan Hayward  <alan.hayward@arm.com>
3505             David Sherwood  <david.sherwood@arm.com>
3507         * tree-vect-loop.c (vectorizable_live_operation): Fix type of
3508         bitstart.
3510 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
3511             Alan Hayward  <alan.hayward@arm.com>
3512             David Sherwood  <david.sherwood@arm.com>
3514         * tree-vect-loop.c (vectorizable_live_operation): Fix element size
3515         calculation for vector booleans.
3517 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
3518             Alan Hayward  <alan.hayward@arm.com>
3519             David Sherwood  <david.sherwood@arm.com>
3521         * tree-vect-stmts.c (can_vectorize_live_stmts): New function,
3522         split out from...
3523         (vect_transform_stmt): ...here.
3524         (vect_analyze_stmt): Use it instead of calling
3525         vectorizable_live_operation directly.
3527 2017-09-18  Cesar Philippidis  <cesar@codesourcery.com>
3529         * omp-offload.c (oacc_xform_loop): Enable SIMD vectorization on
3530         non-SIMT targets in acc vector loops.
3532 2017-09-18  Claudiu Zissulescu  <claziss@synopsys.com>
3534         * configure.ac: Add arc and check if assembler supports gdwarf2.
3535         * configure: Regenerate.
3537 2017-09-18  Richard Biener  <rguenther@suse.de>
3539         PR tree-optimization/82220
3540         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Exclude
3541         epilogue niters from the min_profitable_iters compute.
3543 2017-09-18  Jakub Jelinek  <jakub@redhat.com>
3545         PR target/82145
3546         * config/i386/i386.c (ix86_init_large_pic_reg): Revert 2017-09-01
3547         changes.  Turn CODE_LABEL into NOTE_INSN_DELETED_LABEL immediately.
3548         (ix86_init_pic_reg): Revert 2017-09-01 changes.
3550 2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
3552         PR target/81361
3553         * dwarf2cfi.c (add_cfis_to_fde): Do not generate DW_CFA_set_loc after
3554         switching to a new text section.
3556 2017-09-18  Richard Biener  <rguenther@suse.de>
3558         * graphite-scop-detection.c (scop_detection::stmt_has_simple_data_ref):
3559         Simplify.
3560         (build_alias_set): Reject aliases with no access function.
3562 2017-09-18  Richard Biener  <rguenther@suse.de>
3564         PR tree-optimization/79622
3565         * graphite-scop-detection.c (build_cross_bb_scalars_def): Properly
3566         handle PHIs.
3567         (build_cross_bb_scalars_use): Likewise.
3569 2017-09-18  Pierre-Marie de Rodat  <derodat@adacore.com>
3571         * cgraph.h (cgraph_thunk_info): Fix a typo in a comment.
3573 2017-09-18  Alan Modra  <amodra@gmail.com>
3575         PR target/81996
3576         * gcc/config/rs6000/rs6000.c (rs6000_return_addr): Use
3577         stack_pointer_rtx for count 0.  Update comments.  Break up
3578         large rtl expression.
3580 2017-09-17  Daniel Santos  <daniel.santos@pobox.com>
3582         * config/i386/i386.c (xlogue_layout::STUB_NAME_MAX_LEN):
3583         Increase to 20 bytes.
3584         (xlogue_layout::s_stub_names): Add an additional size-2 diminsion.
3585         (xlogue_layout::get_stub_name): Modify to select the appropairate sse
3586         or avx version of the stub.
3588 2017-09-17  H.J. Lu  <hongjiu.lu@intel.com>
3590         PR target/82166
3591         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Properly
3592         compute the minimum stack alignment.  Also update preferred stack
3593         boundary for leaf functions.
3595 2017-09-16  Richard Sandiford  <richard.sandiford@linaro.org>
3597         PR tree-optimization/82228
3598         * tree-vect-loop.c (vectorizable_live_operation): Move initialization
3599         of ncopies.
3601 2017-09-16  Chung-Ju Wu  <jasonwucj@gmail.com>
3603         * common/config/nds32/nds32-common.c
3604         (nds32_option_optimization_table): Refine formatting.
3605         (nds32_option_optimization_table): Use -fsched-pressure and
3606         -fomit-frame-pointer for specific optimization level.
3608 2017-09-16  Chung-Ju Wu  <jasonwucj@gmail.com>
3610         * config/nds32/nds32.c: Refine formatting and comments.
3611         * config/nds32/nds32.h: Likewise.
3612         * config/nds32/nds32.md: Likewise.
3613         * config/nds32/nds32-cost.c: Likewise.
3614         * config/nds32/nds32-isr.c: Likewise.
3615         * config/nds32/nds32-md-auxiliary.c: Likewise.
3616         * config/nds32/nds32-multiple.md: Likewise.
3617         * config/nds32/nds32-predicates.c: Likewise.
3619 2017-09-15  Andrew Sutton  <andrew.n.sutton@gmail.com>
3620             Jakub Jelinek  <jakub@redhat.com>
3622         Add support for -std=c++2a.
3623         * doc/cpp.texi (__cplusplus): Document value for -std=c++2a
3624         or -std=gnu+2a.
3625         * doc/invoke.texi: Document -std=c++2a and -std=gnu++2a.
3627 2017-09-15  Steve Ellcey  <sellcey@cavium.com>
3629         PR target/82066
3630         * doc/extend.texi (Common Function Attributes): Add 
3631         references to ARM, AArch64, and S/390 specific attributes.
3632         (Function Specific Option Pragmas): Add AArch64 and S/390
3633         to list of back ends that support the target pragma.
3635 2017-09-15  Nathan Sidwell  <nathan@acm.org>
3637         * doc/standards.texi: Fix C++17 description.  Update URLs for
3638         C++11 & 14.
3640 2017-09-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3642         * common.opt (Wcast-align=strict): New warning option.
3643         * doc/invoke.texi: Document -Wcast-align=strict. 
3645 2017-09-15  Pierre-Marie de Rodat  <derodat@adacore.com>
3647         * cgraph.h (cgraph_thunk_info): Add comments.
3648         * cgraph.c (cgraph_node::create_thunk): Adjust comment, make
3649         assert for VIRTUAL_* arguments stricter.
3651 2017-09-15  Jackson Woodruff  <jackson.woodruff@arm.com>
3653         PR tree-optimization/71026
3654         * match.pd: Move RDIV patterns from fold-const.c
3655         * fold-const.c (distribute_real_division): Removed.
3656         (fold_binary_loc): Remove calls to distribute_real_divison.
3658 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
3660         * doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document
3661         c++1z and gnu++1z as deprecated.  Change other references to
3662         -std=c++1z to -std=c++17 and -std=gnu++1z to -std=gnu++17.
3663         Change -Wc++1z-compat to -Wc++17-compat.
3664         * doc/cpp.texi: Document -std=c++17 defines __cplusplus 201703L.
3665         * dwarf2out.c (highest_c_language): Handle C++17.
3666         (gen_compile_unit_die): Likewise.
3668 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
3670         PR rtl-optimization/82192
3671         * combine.c (make_extraction): Don't look through non-paradoxical
3672         SUBREGs or TRUNCATE if pos + len is or might be bigger than
3673         inner's mode.
3675 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
3676             Alan Hayward  <alan.hayward@arm.com>
3677             David Sherwood  <david.sherwood@arm.com>
3679         * target.def (function_arg_offset): New hook.
3680         * targhooks.h (default_function_arg_offset): Declare.
3681         * targhooks.c (default_function_arg_offset): New function.
3682         * function.c (locate_and_pad_parm): Use
3683         targetm.calls.function_arg_offset instead of FUNCTION_ARG_OFFSET.
3684         * doc/tm.texi.in (FUNCTION_ARG_OFFSET): Replace with...
3685         (TARGET_FUNCTION_ARG_OFFSET): ...this.
3686         * doc/tm.texi: Regenerate.
3687         * config/spu/spu.h (FUNCTION_ARG_OFFSET): Delete.
3688         * config/spu/spu.c (spu_function_arg_offset): New function.
3689         (TARGET_FUNCTION_ARG_OFFSET): Redefine.
3690         * system.h (FUNCTION_ARG_OFFSET): Poison.
3692 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
3693             Alan Hayard  <alan.hayward@arm.com>
3694             David Sherwood  <david.sherwood@arm.com>
3696         * target.def (truly_noop_truncation): New hook.
3697         (mode_rep_extended): Refer to TARGET_TRULY_NOOP_TRUNCATION rather
3698         than TRULY_NOOP_TRUNCATION.
3699         * hooks.h (hook_bool_uint_uint_true): Declare.
3700         * hooks.c (hook_bool_uint_uint_true): New function.
3701         * doc/tm.texi.in (TRULY_NOOP_TRUNCATION): Replace with...
3702         (TARGET_TRULY_NOOP_TRUNCATION): ...this.
3703         * doc/tm.texi: Regenerate.
3704         * combine.c (make_extraction): Refer to TARGET_TRULY_NOOP_TRUNCATION
3705         rather than TRULY_NOOP_TRUNCATION in comments.
3706         (simplify_comparison): Likewise.
3707         (record_truncated_value): Likewise.
3708         * expmed.c (extract_bit_field_1): Likewise.
3709         (extract_split_bit_field): Likewise.
3710         * convert.c (convert_to_integer_1): Use targetm.truly_noop_truncation
3711         instead of TRULY_NOOP_TRUNCATION.
3712         * function.c (assign_parm_setup_block): Likewise.
3713         * machmode.h (TRULY_NOOP_TRUNCATION_MODES_P): Likewise.
3714         * rtlhooks.c: Include target.h.
3715         * config/aarch64/aarch64.h (TRULY_NOOP_TRUNCATION): Delete.
3716         * config/alpha/alpha.h (TRULY_NOOP_TRUNCATION): Delete.
3717         * config/arc/arc.h (TRULY_NOOP_TRUNCATION): Delete.
3718         * config/arm/arm.h (TRULY_NOOP_TRUNCATION): Delete.
3719         * config/avr/avr.h (TRULY_NOOP_TRUNCATION): Delete.
3720         * config/bfin/bfin.h (TRULY_NOOP_TRUNCATION): Delete.
3721         * config/c6x/c6x.h (TRULY_NOOP_TRUNCATION): Delete.
3722         * config/cr16/cr16.h (TRULY_NOOP_TRUNCATION): Delete.
3723         * config/cris/cris.h (TRULY_NOOP_TRUNCATION): Delete.
3724         * config/epiphany/epiphany.h (TRULY_NOOP_TRUNCATION): Delete.
3725         * config/fr30/fr30.h (TRULY_NOOP_TRUNCATION): Delete.
3726         * config/frv/frv.h (TRULY_NOOP_TRUNCATION): Delete.
3727         * config/ft32/ft32.h (TRULY_NOOP_TRUNCATION): Delete.
3728         * config/h8300/h8300.h (TRULY_NOOP_TRUNCATION): Delete.
3729         * config/i386/i386.h (TRULY_NOOP_TRUNCATION): Delete.
3730         * config/ia64/ia64.h (TRULY_NOOP_TRUNCATION): Delete.
3731         * config/iq2000/iq2000.h (TRULY_NOOP_TRUNCATION): Delete.
3732         * config/lm32/lm32.h (TRULY_NOOP_TRUNCATION): Delete.
3733         * config/m32c/m32c.h (TRULY_NOOP_TRUNCATION): Delete.
3734         * config/m32r/m32r.h (TRULY_NOOP_TRUNCATION): Delete.
3735         * config/m68k/m68k.h (TRULY_NOOP_TRUNCATION): Delete.
3736         * config/mcore/mcore.h (TRULY_NOOP_TRUNCATION): Delete.
3737         * config/microblaze/microblaze.h (TRULY_NOOP_TRUNCATION): Delete.
3738         * config/mips/mips.h (TRULY_NOOP_TRUNCATION): Delete.
3739         * config/mips/mips.c (mips_truly_noop_truncation): New function.
3740         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
3741         * config/mips/mips.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
3742         rather than TRULY_NOOP_TRUNCATION in comments.
3743         * config/mmix/mmix.h (TRULY_NOOP_TRUNCATION): Delete.
3744         * config/mn10300/mn10300.h (TRULY_NOOP_TRUNCATION): Delete.
3745         * config/moxie/moxie.h (TRULY_NOOP_TRUNCATION): Delete.
3746         * config/msp430/msp430.h (TRULY_NOOP_TRUNCATION): Delete.
3747         * config/nds32/nds32.h (TRULY_NOOP_TRUNCATION): Delete.
3748         * config/nios2/nios2.h (TRULY_NOOP_TRUNCATION): Delete.
3749         * config/nvptx/nvptx.h (TRULY_NOOP_TRUNCATION): Delete.
3750         * config/pa/pa.h (TRULY_NOOP_TRUNCATION): Delete.
3751         * config/pdp11/pdp11.h (TRULY_NOOP_TRUNCATION): Delete.
3752         * config/powerpcspe/powerpcspe.h (TRULY_NOOP_TRUNCATION): Delete.
3753         * config/riscv/riscv.h (TRULY_NOOP_TRUNCATION): Delete.
3754         * config/riscv/riscv.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
3755         rather than TRULY_NOOP_TRUNCATION in comments.
3756         * config/rl78/rl78.h (TRULY_NOOP_TRUNCATION): Delete.
3757         * config/rs6000/rs6000.h (TRULY_NOOP_TRUNCATION): Delete.
3758         * config/rx/rx.h (TRULY_NOOP_TRUNCATION): Delete.
3759         * config/s390/s390.h (TRULY_NOOP_TRUNCATION): Delete.
3760         * config/sh/sh.h (MAYBE_BASE_REGISTER_RTX_P): Remove
3761         TRULY_NOOP_TRUNCATION condition.
3762         (MAYBE_INDEX_REGISTER_RTX_P): Likewise.
3763         (TRULY_NOOP_TRUNCATION): Delete.
3764         * config/sparc/sparc.h (TRULY_NOOP_TRUNCATION): Delete.
3765         * config/spu/spu.h (TRULY_NOOP_TRUNCATION): Delete.
3766         * config/spu/spu.c (spu_truly_noop_truncation): New function.
3767         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
3768         * config/stormy16/stormy16.h (TRULY_NOOP_TRUNCATION): Delete.
3769         * config/tilegx/tilegx.h (TRULY_NOOP_TRUNCATION): Delete.
3770         * config/tilegx/tilegx.c (tilegx_truly_noop_truncation): New fuction.
3771         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
3772         * config/tilegx/tilegx.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
3773         rather than TRULY_NOOP_TRUNCATION in comments.
3774         * config/tilepro/tilepro.h (TRULY_NOOP_TRUNCATION): Delete.
3775         * config/v850/v850.h (TRULY_NOOP_TRUNCATION): Delete.
3776         * config/vax/vax.h (TRULY_NOOP_TRUNCATION): Delete.
3777         * config/visium/visium.h (TRULY_NOOP_TRUNCATION): Delete.
3778         * config/xtensa/xtensa.h (TRULY_NOOP_TRUNCATION): Delete.
3779         * system.h (TRULY_NOOP_TRUNCATION): Poison.
3781 2017-09-15  Christophe Lyon  <christophe.lyon@linaro.org>
3783         PR target/67591
3784         * config/arm/arm.md (*cmp_and): Add enabled_for_depr_it attribute.
3785         (*cmp_ior): Likewise.
3786         (*ior_scc_scc): Add alternative for enabled_for_depr_it attribute.
3787         (*ior_scc_scc_cmp): Likewise.
3788         (*and_scc_scc): Likewise.
3789         (*and_scc_scc_cmp): Likewise.
3791 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
3792             Alan Hayard  <alan.hayward@arm.com>
3793             David Sherwood  <david.sherwood@arm.com>
3795         * target.def (can_change_mode_class): New hook.
3796         (mode_rep_extended): Refer to it instead of CANNOT_CHANGE_MODE_CLASS.
3797         (hard_regno_nregs): Likewise.
3798         * hooks.h (hook_bool_mode_mode_reg_class_t_true): Declare.
3799         * hooks.c (hook_bool_mode_mode_reg_class_t_true): New function.
3800         * doc/tm.texi.in (CANNOT_CHANGE_MODE_CLASS): Replace with...
3801         (TARGET_CAN_CHANGE_MODE_CLASS): ...this.
3802         (LOAD_EXTEND_OP): Update accordingly.
3803         * doc/tm.texi: Regenerate.
3804         * doc/rtl.texi: Refer to TARGET_CAN_CHANGE_MODE_CLASS instead of
3805         CANNOT_CHANGE_MODE_CLASS.
3806         * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): Replace with...
3807         (REG_CAN_CHANGE_MODE_P): ...this new macro.
3808         * combine.c (simplify_set): Update accordingly.
3809         * emit-rtl.c (validate_subreg): Likewise.
3810         * recog.c (general_operand): Likewise.
3811         * regcprop.c (mode_change_ok): Likewise.
3812         * reload1.c (choose_reload_regs): Likewise.
3813         (inherit_piecemeal_p): Likewise.
3814         * rtlanal.c (simplify_subreg_regno): Likewise.
3815         * postreload.c (reload_cse_simplify_set): Use REG_CAN_CHANGE_MODE_P
3816         instead of CANNOT_CHANGE_MODE_CLASS.
3817         (reload_cse_simplify_operands): Likewise.
3818         * reload.c (push_reload): Use targetm.can_change_mode_class
3819         instead of CANNOT_CHANGE_MODE_CLASS.
3820         (push_reload): Likewise.  Also use REG_CAN_CHANGE_MODE_P instead of
3821         REG_CANNOT_CHANGE_MODE_P.
3822         * config/alpha/alpha.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3823         * config/alpha/alpha.c (alpha_can_change_mode_class): New function.
3824         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3825         * config/arm/arm.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3826         * config/arm/arm.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3827         (arm_can_change_mode_class): New function.
3828         * config/arm/neon.md: Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
3829         than CANNOT_CHANGE_MODE_CLASS in comments.
3830         * config/i386/i386.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3831         * config/i386/i386-protos.h (ix86_cannot_change_mode_class): Delete.
3832         * config/i386/i386.c (ix86_cannot_change_mode_class): Replace with...
3833         (ix86_can_change_mode_class): ...this new function, inverting the
3834         sense of the return value.
3835         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3836         * config/ia64/ia64.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3837         * config/ia64/ia64.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3838         (ia64_can_change_mode_class): New function.
3839         * config/m32c/m32c.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3840         * config/m32c/m32c-protos.h (m32c_cannot_change_mode_class): Delete.
3841         * config/m32c/m32c.c (m32c_cannot_change_mode_class): Replace with...
3842         (m32c_can_change_mode_class): ...this new function, inverting the
3843         sense of the return value.
3844         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3845         * config/mips/mips.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3846         * config/mips/mips-protos.h (mips_cannot_change_mode_class): Delete.
3847         * config/mips/mips.c (mips_cannot_change_mode_class): Replace with...
3848         (mips_can_change_mode_class): ...this new function, inverting the
3849         sense of the return value.
3850         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3851         * config/msp430/msp430.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3852         * config/msp430/msp430.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3853         (msp430_can_change_mode_class): New function.
3854         * config/nvptx/nvptx.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3855         * config/nvptx/nvptx.c (nvptx_can_change_mode_class): New function.
3856         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3857         * config/pa/pa32-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3858         * config/pa/pa64-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3859         * config/pa/pa-protos.h (pa_cannot_change_mode_class): Delete.
3860         * config/pa/pa.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3861         (pa_cannot_change_mode_class): Replace with...
3862         (pa_can_change_mode_class): ...this new function, inverting the
3863         sense of the return value.
3864         (pa_modes_tieable_p): Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
3865         than CANNOT_CHANGE_MODE_CLASS in comments.
3866         * config/pdp11/pdp11.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3867         * config/pdp11/pdp11-protos.h (pdp11_cannot_change_mode_class): Delete.
3868         * config/pdp11/pdp11.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3869         (pdp11_cannot_change_mode_class): Replace with...
3870         (pdp11_can_change_mode_class): ...this new function, inverting the
3871         sense of the return value.
3872         * config/powerpcspe/powerpcspe.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3873         * config/powerpcspe/powerpcspe-protos.h
3874         (rs6000_cannot_change_mode_class_ptr): Delete.
3875         * config/powerpcspe/powerpcspe.c
3876         (rs6000_cannot_change_mode_class_ptr): Delete.
3877         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3878         (rs6000_option_override_internal): Assign to
3879         targetm.can_change_mode_class instead of
3880         rs6000_cannot_change_mode_class_ptr.
3881         (rs6000_cannot_change_mode_class): Replace with...
3882         (rs6000_can_change_mode_class): ...this new function, inverting the
3883         sense of the return value.
3884         (rs6000_debug_cannot_change_mode_class): Replace with...
3885         (rs6000_debug_can_change_mode_class): ...this new function.
3886         * config/riscv/riscv.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3887         * config/riscv/riscv.c (riscv_can_change_mode_class): New function.
3888         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3889         * config/rs6000/rs6000.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3890         * config/rs6000/rs6000-protos.h (rs6000_cannot_change_mode_class_ptr):
3891         Delete.
3892         * config/rs6000/rs6000.c (rs6000_cannot_change_mode_class_ptr): Delete.
3893         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3894         (rs6000_option_override_internal): Assign to
3895         targetm.can_change_mode_class instead of
3896         rs6000_cannot_change_mode_class_ptr.
3897         (rs6000_cannot_change_mode_class): Replace with...
3898         (rs6000_can_change_mode_class): ...this new function, inverting the
3899         sense of the return value.
3900         (rs6000_debug_cannot_change_mode_class): Replace with...
3901         (rs6000_debug_can_change_mode_class): ...this new function.
3902         * config/s390/s390.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3903         * config/s390/s390-protos.h (s390_cannot_change_mode_class): Delete.
3904         * config/s390/s390.c (s390_cannot_change_mode_class): Replace with...
3905         (s390_can_change_mode_class): ...this new function, inverting the
3906         sense of the return value.
3907         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3908         * config/sh/sh.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3909         * config/sh/sh-protos.h (sh_cannot_change_mode_class): Delete.
3910         * config/sh/sh.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3911         (sh_cannot_change_mode_class): Replace with...
3912         (sh_can_change_mode_class): ...this new function, inverting the
3913         sense of the return value.
3914         * config/sparc/sparc.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3915         * config/sparc/sparc.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3916         (sparc_can_change_mode_class): New function.
3917         * config/spu/spu.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3918         * config/spu/spu.c (spu_can_change_mode_class): New function.
3919         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3920         * config/visium/visium.h (CANNOT_CHANGE_MODE_CLASS): Delete.
3921         * config/visium/visium.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
3922         (visium_can_change_mode_class): New function.
3923         * system.h (CANNOT_CHANGE_MODE_CLASS): Poison.
3925 2017-09-15  Richard Biener  <rguenther@suse.de>
3927         PR tree-optimization/82217
3928         * tree-ssa-sccvn.c (visit_phi): Properly handle all VN_TOP
3929         but not undefined case.
3931 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
3933         PR target/82145
3934         * postreload.c (reload_cse_simplify_operands): Skip
3935         NOTE_INSN_DELETED_LABEL similarly to skipping CODE_LABEL.
3937 2017-09-15  Richard Biener  <rguenther@suse.de>
3939         PR tree-optimization/68823
3940         * graphite-scop-detection.c (build_alias_set): If we have a
3941         possible dependence check whether we can handle them by just
3942         looking at the DRs DR_ACCESS_FNs.
3943         (build_scops): If build_alias_set fails, fail the SCOP.
3945 2017-09-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
3947         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_1_HW): New macros
3948         to support float128 built-in functions that require the ISA 3.0
3949         hardware.
3950         (BU_FLOAT128_3_HW): Likewise.
3951         (SQRTF128): Add support for the IEEE 128-bit square root and fma
3952         built-in functions.
3953         (FMAF128): Likewise.
3954         (FMAQ): Likewise.
3955         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
3956         support for built-in functions that need the ISA 3.0 IEEE 128-bit
3957         floating point instructions.
3958         (rs6000_invalid_builtin): Likewise.
3959         (rs6000_builtin_mask_names): Likewise.
3960         * config/rs6000/rs6000.h (MASK_FLOAT128_HW): Likewise.
3961         (RS6000_BTM_FLOAT128_HW): Likewise.
3962         (RS6000_BTM_COMMON): Likewise.
3963         * config/rs6000/rs6000.md (fma<mode>4_hw): Add a generator
3964         function.
3965         * doc/extend.texi (RS/6000 built-in functions): Document the
3966         IEEE 128-bit floating point square root and fused multiply-add
3967         built-in functions.
3969 2017-09-14  Pat Haugen  <pthaugen@us.ibm.com>
3971         * config/rs6000/rs6000.c (rs6000_set_up_by_prologue): Make sure the TOC
3972         reg (r2) isn't in the set of registers defined in the prologue.
3974 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
3975             Alan Hayward  <alan.hayward@arm.com>
3976             David Sherwood  <david.sherwood@arm.com>
3978         * tree-vectorizer.h (_loop_vec_info): Add max_vectorization_factor.
3979         (LOOP_VINFO_MAX_VECT_FACTOR): New macro.
3980         (LOOP_VINFO_ORIG_VECT_FACTOR): Replace with...
3981         (LOOP_VINFO_ORIG_MAX_VECT_FACTOR): ...this new macro.
3982         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Update
3983         accordingly.
3984         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
3985         max_vectorization_factor.
3986         (vect_analyze_loop_2): Set LOOP_VINFO_MAX_VECT_FACTOR.
3988 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
3989             Alan Hayward  <alan.hayward@arm.com>
3990             David Sherwood  <david.sherwood@arm.com>
3992         * tree-vectorizer.h (vect_min_worthwhile_factor): Delete.
3993         (vect_worthwhile_without_simd_p): Declare.
3994         * tree-vect-loop.c (vect_worthwhile_without_simd_p): New function.
3995         (vectorizable_reduction): Use it.
3996         * tree-vect-stmts.c (vectorizable_shift): Likewise.
3997         (vectorizable_operation): Likewise.
3999 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
4000             Alan Hayward  <alan.hayward@arm.com>
4001             David Sherwood  <david.sherwood@arm.com>
4003         * tree-vectorizer.h (vect_get_num_copies): New function.
4004         * tree-vect-data-refs.c (vect_get_data_access_cost): Use it.
4005         * tree-vect-loop.c (vectorizable_reduction): Likewise.
4006         (vectorizable_induction): Likewise.
4007         (vectorizable_live_operation): Likewise.
4008         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
4009         (vectorizable_bswap): Likewise.
4010         (vectorizable_call): Likewise.
4011         (vectorizable_conversion): Likewise.
4012         (vectorizable_assignment): Likewise.
4013         (vectorizable_shift): Likewise.
4014         (vectorizable_operation): Likewise.
4015         (vectorizable_store): Likewise.
4016         (vectorizable_load): Likewise.
4017         (vectorizable_condition): Likewise.
4018         (vectorizable_comparison): Likewise.
4019         (vect_analyze_stmt): Pass the slp node to vectorizable_live_operation.
4021 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
4022             Alan Hayward  <alan.hayward@arm.com>
4023             David Sherwood  <david.sherwood@arm.com>
4025         * tree-vect-loop.c (vectorizable_induction): Use gimple_build instead
4026         of vect_init_vector.
4028 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
4029             Alan Hayward  <alan.hayward@arm.com>
4030             David Sherwood  <david.sherwood@arm.com>
4032         * gimple-fold.h (gimple_build_vector_from_val): Declare, and provide
4033         an inline wrapper that provides a location.
4034         (gimple_build_vector): Likewise.
4035         * gimple-fold.c (gimple_build_vector_from_val): New function.
4036         (gimple_build_vector): Likewise.
4037         * tree-vect-loop.c (get_initial_def_for_reduction): Use the new
4038         functions to build the initial value.  Always return a gimple value.
4039         (get_initial_defs_for_reduction): Likewise.  Only compute
4040         neutral_vec once.
4041         (vect_create_epilog_for_reduction): Don't call force_gimple_operand or
4042         vect_init_vector on the results from get_initial_def(s)_for_reduction.
4043         (vectorizable_induction): Use gimple_build_vector rather than
4044         vect_init_vector.
4046 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
4047             Alan Hayward  <alan.hayward@arm.com>
4048             David Sherwood  <david.sherwood@arm.com>
4050         * target.h (vec_perm_indices): New typedef.
4051         (auto_vec_perm_indices): Likewise.
4052         * optabs-query.h: Include target.h
4053         (can_vec_perm_p): Take a vec_perm_indices *.
4054         * optabs-query.c (can_vec_perm_p): Likewise.
4055         (can_mult_highpart_p): Update accordingly.  Use auto_vec_perm_indices.
4056         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
4057         * tree-vect-generic.c (lower_vec_perm): Likewise.
4058         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
4059         (vect_grouped_load_supported): Likewise.
4060         (vect_shift_permute_load_chain): Likewise.
4061         (vect_permute_store_chain): Use auto_vec_perm_indices.
4062         (vect_permute_load_chain): Likewise.
4063         * fold-const.c (fold_vec_perm): Take vec_perm_indices.
4064         (fold_ternary_loc): Update accordingly.  Use auto_vec_perm_indices.
4065         Update uses of can_vec_perm_p.
4066         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Replace the
4067         mode with a number of elements.  Take a vec_perm_indices *.
4068         (vect_create_epilog_for_reduction): Update accordingly.
4069         Use auto_vec_perm_indices.
4070         (have_whole_vector_shift): Likewise.  Update call to can_vec_perm_p.
4071         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
4072         (vect_transform_slp_perm_load): Likewise.
4073         (vect_schedule_slp_instance): Use auto_vec_perm_indices.
4074         * tree-vectorizer.h (vect_gen_perm_mask_any): Take a vec_perm_indices.
4075         (vect_gen_perm_mask_checked): Likewise.
4076         * tree-vect-stmts.c (vect_gen_perm_mask_any): Take a vec_perm_indices.
4077         (vect_gen_perm_mask_checked): Likewise.
4078         (vectorizable_mask_load_store): Use auto_vec_perm_indices.
4079         (vectorizable_store): Likewise.
4080         (vectorizable_load): Likewise.
4081         (perm_mask_for_reverse): Likewise.  Update call to can_vec_perm_p.
4082         (vectorizable_bswap): Likewise.
4084 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
4085             Alan Hayward  <alan.hayward@arm.com>
4086             David Sherwood  <david.sherwood@arm.com>
4088         * tree.h (build_vector): Take a vec<tree> instead of a tree *.
4089         * tree.c (build_vector): Likewise.
4090         (build_vector_from_ctor): Update accordingly.
4091         (build_vector_from_val): Likewise.
4092         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
4093         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
4094         * tree-vect-generic.c (add_rshift): Likewise.
4095         (expand_vector_divmod): Likewise.
4096         (optimize_vector_constructor): Likewise.
4097         * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
4098         (vect_transform_slp_perm_load): Likewise.
4099         (vect_schedule_slp_instance): Likewise.
4100         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
4101         (vectorizable_call): Likewise.
4102         (vect_gen_perm_mask_any): Likewise.  Add elements in order.
4103         * expmed.c (make_tree): Likewise.
4104         * fold-const.c (fold_negate_expr_1): Use auto_vec<tree> when building
4105         a vector passed to build_vector.
4106         (fold_convert_const): Likewise.
4107         (exact_inverse): Likewise.
4108         (fold_ternary_loc): Likewise.
4109         (fold_relational_const): Likewise.
4110         (const_binop): Likewise.  Use VECTOR_CST_ELT directly when operating
4111         on VECTOR_CSTs, rather than going through vec_cst_ctor_to_array.
4112         (const_unop): Likewise.  Store the reduction accumulator in a
4113         variable rather than an array.
4114         (vec_cst_ctor_to_array): Take the number of elements as a parameter.
4115         (fold_vec_perm): Update calls accordingly.  Use auto_vec<tree> for
4116         the new vector, rather than constructing it after the input arrays.
4117         (native_interpret_vector): Use auto_vec<tree> when building
4118         a vector passed to build_vector.  Add elements in order.
4119         * tree-vect-loop.c (get_initial_defs_for_reduction): Use
4120         auto_vec<tree> when building a vector passed to build_vector.
4121         (vect_create_epilog_for_reduction): Likewise.
4122         (vectorizable_induction): Likewise.
4123         (get_initial_def_for_reduction): Likewise.  Fix indentation of
4124         case statements.
4125         * config/sparc/sparc.c (sparc_handle_vis_mul8x16): Change n_elts
4126         to a vec<tree> *.
4127         (sparc_fold_builtin): Use auto_vec<tree> when building a vector
4128         passed to build_vector.
4130 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
4131             Alan Hayward  <alan.hayward@arm.com>
4132             David Sherwood  <david.sherwood@arm.com>
4134         * tree-core.h (tree_base::u): Add an "nelts" field.
4135         (tree_vector): Use VECTOR_CST_NELTS as the length.
4136         * tree.c (tree_size): Likewise.
4137         (make_vector): Initialize VECTOR_CST_NELTS.
4138         * tree.h (VECTOR_CST_NELTS): Use the u.nelts field.
4139         * cfgexpand.c (expand_debug_expr): Use VECTOR_CST_NELTS instead of
4140         TYPE_VECTOR_SUBPARTS.
4141         * expr.c (const_vector_mask_from_tree): Consistently use "units"
4142         as the number of units, setting it from VECTOR_CST_NELTS.
4143         (const_vector_from_tree): Likewise.
4144         * fold-const.c (negate_expr_p): Use VECTOR_CST_NELTS instead of
4145         TYPE_VECTOR_SUBPARTS for the number of elements in a VECTOR_CST.
4146         (fold_negate_expr_1): Likewise.
4147         (fold_convert_const): Likewise.
4148         (const_binop): Likewise.  Differentiate the number of output and
4149         input elements.
4150         (const_unop): Likewise.
4151         (fold_ternary_loc): Use VECTOR_CST_NELTS for the number of elements
4152         in a VECTOR_CST, asserting that it is the same as TYPE_VECTOR_SUBPARTS
4153         in cases that did the opposite.
4155 2017-09-14  Richard Biener  <rguenther@suse.de>
4157         * tree-ssa-sccvn.c (visit_phi): Merge undefined values similar
4158         to VN_TOP.
4160 2017-09-14  Eric Botcazou  <ebotcazou@adacore.com>
4162         * dwarf2out.c (dwarf2out_source_line): Remove superfluous test.
4164 2017-09-14  Jakub Jelinek  <jakub@redhat.com>
4166         PR target/81325
4167         * cfgbuild.c (find_bb_boundaries): Ignore debug insns in decisions
4168         if and where to split a bb, except for splitting before debug insn
4169         sequences followed by non-label real insn.  Delete debug insns
4170         in between basic blocks.
4172         * combine.c (make_compound_operation_int): Formatting fixes.
4174         * config/alpha/elf.h (LINK_EH_SPEC): Add -static-pie support.
4175         * config/alpha/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
4176         * config/netbsd.h (LINK_EH_SPEC): Likewise.
4177         * config/sol2.h (LINK_EH_SPEC): Likewise.
4178         * config/arm/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
4179         * config/s390/linux.h (LINK_SPEC): Likewise.
4180         * config/freebsd.h (LINK_EH_SPEC): Likewise.
4181         * config/openbsd.h (LINK_EH_SPEC): Likewise.
4182         * config/lm32/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
4183         * config/aarch64/aarch64-linux.h (LINUX_TARGET_LINK_SPEC): Likewise.
4184         * config/powerpcspe/sysv4.h (LINK_EH_SPEC): Likewise.
4185         * config/bfin/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
4186         * config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Fix a typo.
4187         * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Formatting fix.
4189 2017-09-13  Jakub Jelinek  <jakub@redhat.com>
4191         * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Add -static-pie
4192         support.
4193         (ENDFILE_LINUX_SPEC): Likewise.
4194         (LINK_EH_SPEC): Likewise.
4195         * config/rs6000/linux64.h (LINK_SHLIB_SPEC): Likewise.
4196         (LINK_OS_LINUX_SPEC32): Likewise.
4197         (LINK_OS_LINUX_SPEC64): Likewise.
4198         * config/rs6000/linux.h (LINK_SHLIB_SPEC): Likewise.
4199         (LINK_OS_LINUX_SPEC): Likewise.
4201 2017-09-13  Martin Liska  <mliska@suse.cz>
4203         PR middle-end/82154
4204         * stmt.c (expand_sjlj_dispatch_table): Use CASE_LOW when
4205         CASE_HIGH is NULL_TREE.
4207 2017-09-13  Richard Sandiford  <richard.sandiford@linaro.org>
4208             Alan Hayward  <alan.hayward@arm.com>
4209             David Sherwood  <david.sherwood@arm.com>
4211         * target.def (secondary_memory_needed): New hook.
4212         (secondary_reload): Refer to TARGET_SECONDARY_MEMORY_NEEDED
4213         instead of SECONDARY_MEMORY_NEEDED.
4214         (secondary_memory_needed_mode): Likewise.
4215         * hooks.h (hook_bool_mode_reg_class_t_reg_class_t_false): Declare.
4216         * hooks.c (hook_bool_mode_reg_class_t_reg_class_t_false): New function.
4217         * doc/tm.texi.in (SECONDARY_MEMORY_NEEDED): Replace with...
4218         (TARGET_SECONDARY_MEMORY_NEEDED): ...this.
4219         (SECONDARY_MEMORY_NEEDED_RTX): Update reference accordingly.
4220         * doc/tm.texi: Regenerate.
4221         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED): Delete.
4222         * config/alpha/alpha.c (alpha_secondary_memory_needed): New function.
4223         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4224         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED): Delete.
4225         * config/i386/i386-protos.h (ix86_secondary_memory_needed): Delete.
4226         * config/i386/i386.c (inline_secondary_memory_needed): Put the
4227         mode argument first and change the reg_class arguments to reg_class_t.
4228         (ix86_secondary_memory_needed): Likewise.  Remove the strict parameter.
4229         Make static.  Update the call to inline_secondary_memory_needed.
4230         (ix86_register_move_cost): Update the call to
4231         inline_secondary_memory_needed.
4232         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4233         * config/ia64/ia64.h (SECONDARY_MEMORY_NEEDED): Delete commented-out
4234         definition.
4235         * config/ia64/ia64.c (spill_xfmode_rfmode_operand): Refer to
4236         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
4237         in comment.
4238         * config/mips/mips.h (SECONDARY_MEMORY_NEEDED): Delete.
4239         * config/mips/mips-protos.h (mips_secondary_memory_needed): Delete.
4240         * config/mips/mips.c (mips_secondary_memory_needed): Make static
4241         and match hook interface.  Add comment from mips.h.
4242         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4243         * config/mmix/mmix.md (truncdfsf2): Refer to
4244         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
4245         in comment.
4246         * config/pa/pa-64.h (SECONDARY_MEMORY_NEEDED): Rename to...
4247         (PA_SECONDARY_MEMORY_NEEDED): ...this, and put the mode argument first.
4248         * config/pa/pa.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4249         (pa_secondary_memory_needed): New function.
4250         * config/pdp11/pdp11.h (SECONDARY_MEMORY_NEEDED): Delete.
4251         * config/pdp11/pdp11-protos.h (pdp11_secondary_memory_needed): Delete.
4252         * config/pdp11/pdp11.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4253         (pdp11_secondary_memory_needed): Make static and match hook interface.
4254         * config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED): Delete.
4255         * config/powerpcspe/powerpcspe-protos.h
4256         (rs6000_secondary_memory_needed_ptr): Delete.
4257         * config/powerpcspe/powerpcspe.c (rs6000_secondary_memory_needed_ptr):
4258         Delete.
4259         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4260         (rs6000_option_override_internal): Assign to
4261         targetm.secondary_memory_needed rather than
4262         rs6000_secondary_memory_needed_ptr.
4263         (rs6000_secondary_memory_needed): Match hook interface.
4264         (rs6000_debug_secondary_memory_needed): Likewise.
4265         * config/riscv/riscv.h (SECONDARY_MEMORY_NEEDED): Delete.
4266         * config/riscv/riscv.c (riscv_secondary_memory_needed): New function.
4267         (riscv_register_move_cost): Use it instead of SECONDARY_MEMORY_NEEDED.
4268         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4269         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED): Delete.
4270         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_ptr):
4271         Delete.
4272         * config/rs6000/rs6000.c (rs6000_secondary_memory_needed_ptr): Delete.
4273         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4274         (rs6000_option_override_internal): Assign to
4275         targetm.secondary_memory_needed rather than
4276         rs6000_secondary_memory_needed_ptr.
4277         (rs6000_secondary_memory_needed): Match hook interface.
4278         (rs6000_debug_secondary_memory_needed): Likewise.
4279         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED): Delete.
4280         * config/s390/s390.c (s390_secondary_memory_needed): New function.
4281         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4282         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED): Delete.
4283         * config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
4284         (sparc_secondary_memory_needed): New function.
4285         * lra-constraints.c (check_and_process_move): Refer to
4286         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
4287         in comment.
4288         (curr_insn_transform): Likewise.
4289         (process_alt_operands): Use targetm.secondary_memory_needed
4290         instead of TARGET_SECONDARY_MEMORY_NEEDED.
4291         (check_secondary_memory_needed_p): Likewise.
4292         (choose_split_class): Likewise.
4293         * reload.c: Unconditionally include code that was previously
4294         conditional on SECONDARY_MEMORY_NEEDED.
4295         (push_secondary_reload): Use targetm.secondary_memory_needed
4296         instead of TARGET_SECONDARY_MEMORY_NEEDED.
4297         (push_reload): Likewise.
4298         * reload1.c: Unconditionally include code that was previously
4299         conditional on SECONDARY_MEMORY_NEEDED.
4300         (choose_reload_regs): Use targetm.secondary_memory_needed
4301         instead of TARGET_SECONDARY_MEMORY_NEEDED.
4302         (gen_reload): Likewise.
4303         * system.h (SECONDARY_MEMORY_NEEDED): Poison.
4305 2017-09-13  Richard Sandiford  <richard.sandiford@linaro.org>
4306             Alan Hayward  <alan.hayward@arm.com>
4307             David Sherwood  <david.sherwood@arm.com>
4309         * target.def (secondary_memory_needed_mode): New hook:
4310         * targhooks.c (default_secondary_memory_needed_mode): Declare.
4311         * targhooks.h (default_secondary_memory_needed_mode): New function.
4312         * doc/tm.texi.in (SECONDARY_MEMORY_NEEDED_MODE): Replace with...
4313         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): ...this.
4314         * doc/tm.texi: Regenerate.
4315         * lra-constraints.c (check_and_process_move): Use
4316         targetm.secondary_memory_needed_mode instead of
4317         TARGET_SECONDARY_MEMORY_NEEDED_MODE.
4318         (curr_insn_transform): Likewise.
4319         * reload.c (get_secondary_mem): Likewise.
4320         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
4321         * config/alpha/alpha.c (alpha_secondary_memory_needed_mode): New
4322         function.
4323         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
4324         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
4325         * config/i386/i386.c (ix86_secondary_memory_needed_mode): New function.
4326         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
4327         * config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED_MODE):
4328         Delete.
4329         * config/powerpcspe/powerpcspe-protos.h
4330         (rs6000_secondary_memory_needed_mode): Delete.
4331         * config/powerpcspe/powerpcspe.c
4332         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
4333         (rs6000_secondary_memory_needed_mode): Make static.
4334         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
4335         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_mode):
4336         Delete.
4337         * config/rs6000/rs6000.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
4338         Redefine.
4339         (rs6000_secondary_memory_needed_mode): Make static.
4340         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
4341         * config/s390/s390.c (s390_secondary_memory_needed_mode): New function.
4342         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
4343         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
4344         * config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
4345         Redefine.
4346         (sparc_secondary_memory_needed_mode): New function.
4347         * system.h (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Poison.
4349 2017-09-13  Jackson Woodruff  <jackson.woodruff@arm.com>
4351         * config/aarch64/constraints.md (Umq): New constraint.
4352         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>):
4353         Change to use Umq.
4354         (mov<mode>): Update condition.
4356 2017-09-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4358         * gimple-ssa-store-merging.c (sort_by_bitpos): Compare store order
4359         when bitposition is the same.
4361 2017-09-13  Richard Biener  <rguenther@suse.de>
4363         * dwarf2out.c (output_die_symbol): Remove.
4364         (output_die): Do not output a DIEs symbol.
4366 2017-09-13  Richard Biener  <rguenther@suse.de>
4368         PR middle-end/82128
4369         * gimple-fold.c (gimple_fold_call): Update SSA name in-place to
4370         default-def to avoid breaking iterator update with the weird
4371         interaction with cgraph_update_edges_for_call_stmt_node.
4373 2017-09-13  Richard Biener  <rguenther@suse.de>
4375         * tree-cfg.c (verify_gimple_assign_binary): Add verification
4376         for WIDEN_SUM_EXPR, VEC_WIDEN_MULT_{HI,LO,EVEN,ODD}_EXPR,
4377         VEC_PACK_{TRUNC,SAT,FIX_TRUNC}_EXPR.
4378         (verify_gimple_assign_ternary): Add verification for DOT_PROD_EXPR.
4380 2017-09-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
4382         * config/aarch64/aarch64.c (aarch64_override_options_after_change_1):
4383         Disable pc relative literal load irrespective of
4384         TARGET_FIX_ERR_A53_84341 for default.
4386 2017-09-12  Eric Botcazou  <ebotcazou@adacore.com>
4388         * config/sparc/sparc.c (output_return): Output the source location of
4389         the insn in the delay slot, if any.
4390         (output_sibcall): Likewise.
4392 2017-09-12  H.J. Lu  <hongjiu.lu@intel.com>
4394         PR driver/81498
4395         * common.opt (-static-pie): New alias.
4396         (shared): Negate static-pie.
4397         (-no-pie): Update help text.
4398         (-pie): Likewise.
4399         (static-pie): New option.
4400         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Add
4401         -static-pie support.
4402         (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
4403         (LINK_EH_SPEC): Likewise.
4404         (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
4405         * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
4406         * config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
4407         * gcc.c (LINK_COMMAND_SPEC): Likewise.
4408         (init_gcc_specs): Likewise.
4409         (init_spec): Likewise.
4410         (display_help): Update help message for -pie.
4411         * doc/invoke.texi: Update -pie, -no-pie and -static.  Document
4412         -static-pie.
4414 2017-09-12  Wilco Dijkstra  <wdijkstr@arm.com>
4416         * config/aarch64/aarch64.md (movsi_aarch64): Remove all '*'.
4417         (movdi_aarch64): Likewise.
4418         (movti_aarch64): Likewise.
4420 2017-09-12 Simon Wright <simon@pushface.org>
4422         PR target/80204
4423         * config/darwin-driver.c (darwin_find_version_from_kernel): Eliminate
4424         calculation of the minor version, always output as 0.
4426 2017-09-12  Jakub Jelinek  <jakub@redhat.com>
4428         PR target/82112
4429         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
4430         ALTIVEC_BUILTIN_VEC_LD if arg1 has array type call default_conversion
4431         on it early, rather than manual conversion late.  For
4432         ALTIVEC_BUILTIN_VEC_ST if arg2 has array type call default_conversion
4433         instead of performing manual conversion.
4435 2017-09-12  Carl Love  <cel@us.ibm.com>
4437         * config/rs6000/altivec.md (vec_widen_umult_even_v4si,
4438         vec_widen_smult_even_v4si): Add define expands for vmuleuw, vmulesw,
4439         vmulouw, vmulosw.
4440         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
4441         VMULOSW): Add definitions.
4442         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
4443         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
4444         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
4445         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
4446         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
4448 2017-09-12  James Greenhalgh  <james.greenhalgh@arm.com>
4450         * config/aarch64/aarch64.md (movdi_aarch64): Set load/store
4451         types correctly.
4452         (movti_aarch64): Likewise.
4453         (movdf_aarch64): Likewise.
4454         (movtf_aarch64): Likewise.
4455         (load_pairdi): Likewise.
4456         (store_pairdi): Likewise.
4457         (load_pairdf): Likewise.
4458         (store_pairdf): Likewise.
4459         (loadwb_pair<GPI:mode>_<P:mode>): Likewise.
4460         (storewb_pair<GPI:mode>_<P:mode>): Likewise.
4461         (ldr_got_small_<mode>): Likewise.
4462         (ldr_got_small_28k_<mode>): Likewise.
4463         (ldr_got_tiny): Likewise.
4464         * config/aarch64/iterators.md (ldst_sz): New.
4465         (ldpstp_sz): Likewise.
4466         * config/aarch64/thunderx.md (thunderx_storepair): Split store_8
4467         to store_16.
4468         (thunderx_load): Split load_8 to load_16.
4469         * config/aarch64/thunderx2t99.md (thunderx2t99_loadpair): Split
4470         load_8 to load_16.
4471         (thunderx2t99_storepair_basic): Split store_8 to store_16.
4472         * config/arm/xgene1.md (xgene1_load_pair): Split load_8 to load_16.
4473         (xgene1_store_pair): Split store_8 to store_16.
4474         * config/aarch64/falkor.md (falkor_ld_3_ld): Split load_8 to load_16.
4475         (falkor_st_0_st_sd): Split store_8 to store_16.
4477 2017-09-12  James Greenhalgh  <james.greenhalgh@arm.com>
4479         * config/arm/types.md (type): Rename load1/2/3/4 to load_4/8/12/16
4480         and store1/2/3/4 to store_4/8/12/16.
4481         * config/aarch64/aarch64.md: Update for rename.
4482         * config/arm/arm.md: Likewise.: Likewise.
4483         * config/arm/arm.c: Likewise.
4484         * config/arm/thumb1.md: Likewise.
4485         * config/arm/thumb2.md: Likewise.
4486         * config/arm/vfp.md: Likewise.
4487         * config/arm/arm-generic.md: Likewise.
4488         * config/arm/arm1020e.md: Likewise.
4489         * config/arm/arm1026ejs.md: Likewise.
4490         * config/arm/arm1136jfs.md: Likewise.
4491         * config/arm/arm926ejs.md: Likewise.
4492         * config/arm/cortex-a15.md: Likewise.
4493         * config/arm/cortex-a17.md: Likewise.
4494         * config/arm/cortex-a5.md: Likewise.
4495         * config/arm/cortex-a53.md: Likewise.
4496         * config/arm/cortex-a57.md: Likewise.
4497         * config/arm/cortex-a7.md: Likewise.
4498         * config/arm/cortex-a8.md: Likewise.
4499         * config/arm/cortex-a9.md: Likewise.
4500         * config/arm/cortex-m4.md: Likewise.
4501         * config/arm/cortex-m7.md: Likewise.
4502         * config/arm/cortex-r4.md: Likewise.
4503         * config/arm/exynos-m1.md: Likewise.
4504         * config/arm/fa526.md: Likewise.
4505         * config/arm/fa606te.md: Likewise.
4506         * config/arm/fa626te.md: Likewise.
4507         * config/arm/fa726te.md: Likewise.
4508         * config/arm/fmp626.md: Likewise.
4509         * config/arm/iwmmxt.md: Likewise.
4510         * config/arm/ldmstm.md: Likewise.
4511         * config/arm/marvell-pj4.md: Likewise.
4512         * config/arm/xgene1.md: Likewise.
4513         * config/aarch64/thunderx.md: Likewise.
4514         * config/aarch64/thunderx2t99.md: Likewise.
4515         * config/aarch64/falkor.md: Likewise.
4517 2017-09-12  Martin Liska  <mliska@suse.cz>
4519         * attribs.c (private_lookup_attribute): New function.
4520         * attribs.h (private_lookup_attribute): Declared here.
4521         (lookup_attribute): Called from this place.
4523 2017-09-12  Richard Biener  <rguenther@suse.de>
4525         PR tree-optimization/82157
4526         * tree-ssa-pre.c (remove_dead_inserted_code): Do not remove
4527         stmts with side-effects.
4529 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
4530             Alan Hayward  <alan.hayward@arm.com>
4531             David Sherwood <david.sherwood@arm.com>
4533         * target.def (hard_regno_nregs): New hook.
4534         (class_max_nregs): Refer to it instead of HARD_REGNO_NREGS.
4535         * targhooks.h (default_hard_regno_nregs): Declare.
4536         * targhooks.c (default_hard_regno_nregs): New function.
4537         * doc/tm.texi.in (HARD_REGNO_NREGS): Replace with...
4538         (TARGET_HARD_REGNO_NREGS): ...this hook.
4539         (HARD_REGNO_NREGS_HAS_PADDING): Update accordingly.
4540         (CLASS_MAX_NREGS): Likewise.
4541         * doc/tm.texi: Regenerate.
4542         * reginfo.c (init_reg_modes_target): Use targetm.hard_regno_nregs
4543         instead of HARD_REGNO_NREGS.
4544         * rtl.h (REG_NREGS): Refer to TARGET_HARD_REGNO_NREGS rather than
4545         HARD_REGNO_NREGS in the comment.
4546         * config/aarch64/aarch64.h (HARD_REGNO_NREGS): Delete.
4547         * config/aarch64/aarch64-protos.h (aarch64_hard_regno_nregs): Delete.
4548         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs): Make static.
4549         Return an unsigned int.
4550         (TARGET_HARD_REGNO_NREGS): Redefine.
4551         * config/alpha/alpha.h (HARD_REGNO_NREGS): Delete.
4552         * config/arc/arc.h (HARD_REGNO_NREGS): Delete.
4553         * config/arc/arc.c (TARGET_HARD_REGNO_NREGS): Redefine.
4554         (arc_hard_regno_nregs): New function.
4555         * config/arm/arm.h (HARD_REGNO_NREGS): Delete.
4556         * config/arm/arm.c (TARGET_HARD_REGNO_NREGS): Redefine.
4557         (arm_hard_regno_nregs): New function.
4558         * config/avr/avr.h (HARD_REGNO_NREGS): Delete.
4559         * config/bfin/bfin.h (HARD_REGNO_NREGS): Delete.
4560         * config/bfin/bfin.c (bfin_hard_regno_nregs): New function.
4561         (TARGET_HARD_REGNO_NREGS): Redefine.
4562         * config/c6x/c6x.h (HARD_REGNO_NREGS): Delete.
4563         * config/cr16/cr16.h (LONG_REG_P): Use targetm.hard_regno_nregs.
4564         (HARD_REGNO_NREGS): Delete.
4565         * config/cr16/cr16.c (TARGET_HARD_REGNO_NREGS): Redefine.
4566         (cr16_hard_regno_nregs): New function.
4567         (cr16_memory_move_cost): Use it instead of HARD_REGNO_NREGS.
4568         * config/cris/cris.h (HARD_REGNO_NREGS): Delete.
4569         * config/cris/cris.c (TARGET_HARD_REGNO_NREGS): Redefine.
4570         (cris_hard_regno_nregs): New function.
4571         * config/epiphany/epiphany.h (HARD_REGNO_NREGS): Delete.
4572         * config/fr30/fr30.h (HARD_REGNO_NREGS): Delete.
4573         (CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
4574         * config/frv/frv.h (HARD_REGNO_NREGS): Delete.
4575         (CLASS_MAX_NREGS): Remove outdated copy of documentation.
4576         * config/frv/frv-protos.h (frv_hard_regno_nregs): Delete.
4577         * config/frv/frv.c (TARGET_HARD_REGNO_NREGS): Redefine.
4578         (frv_hard_regno_nregs): Make static.  Take and return an
4579         unsigned int.
4580         (frv_class_max_nregs): Remove outdated copy of documentation.
4581         * config/ft32/ft32.h (HARD_REGNO_NREGS): Delete.
4582         * config/h8300/h8300.h (HARD_REGNO_NREGS): Delete.
4583         * config/h8300/h8300-protos.h (h8300_hard_regno_nregs): Delete.
4584         * config/h8300/h8300.c (h8300_hard_regno_nregs): Delete.
4585         * config/i386/i386.h (HARD_REGNO_NREGS): Delete.
4586         * config/i386/i386.c (ix86_hard_regno_nregs): New function.
4587         (TARGET_HARD_REGNO_NREGS): Redefine.
4588         * config/ia64/ia64.h (HARD_REGNO_NREGS): Delete.
4589         (CLASS_MAX_NREGS): Update comment.
4590         * config/ia64/ia64.c (TARGET_HARD_REGNO_NREGS): Redefine.
4591         (ia64_hard_regno_nregs): New function.
4592         * config/iq2000/iq2000.h (HARD_REGNO_NREGS): Delete.
4593         * config/lm32/lm32.h (HARD_REGNO_NREGS): Delete.
4594         * config/m32c/m32c.h (HARD_REGNO_NREGS): Delete.
4595         * config/m32c/m32c-protos.h (m32c_hard_regno_nregs): Delete.
4596         * config/m32c/m32c.c (m32c_hard_regno_nregs_1): Take and return
4597         an unsigned int.
4598         (m32c_hard_regno_nregs): Likewise.  Make static.
4599         (TARGET_HARD_REGNO_NREGS): Redefine.
4600         * config/m32r/m32r.h (HARD_REGNO_NREGS): Delete.
4601         * config/m68k/m68k.h (HARD_REGNO_NREGS): Delete.
4602         * config/m68k/m68k.c (TARGET_HARD_REGNO_NREGS): Redefine.
4603         (m68k_hard_regno_nregs): New function.
4604         * config/mcore/mcore.h (HARD_REGNO_NREGS): Delete.
4605         * config/microblaze/microblaze.h (HARD_REGNO_NREGS): Delete.
4606         * config/mips/mips.h (HARD_REGNO_NREGS): Delete.
4607         * config/mips/mips-protos.h (mips_hard_regno_nregs): Delete.
4608         * config/mips/mips.c (mips_hard_regno_nregs): Make static.
4609         Take and return an unsigned int.
4610         (TARGET_HARD_REGNO_NREGS): Redefine.
4611         * config/mmix/mmix.h (HARD_REGNO_NREGS): Delete.
4612         (CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
4613         * config/mn10300/mn10300.h (HARD_REGNO_NREGS): Delete.
4614         * config/moxie/moxie.h (HARD_REGNO_NREGS): Delete.
4615         * config/msp430/msp430.h (HARD_REGNO_NREGS): Delete.
4616         * config/msp430/msp430-protos.h (msp430_hard_regno_nregs): Delete.
4617         * config/msp430/msp430.c (TARGET_HARD_REGNO_NREGS): Redefine.
4618         (msp430_hard_regno_nregs): Make static.  Take and return an
4619         unsigned int.
4620         * config/nds32/nds32.h (HARD_REGNO_NREGS): Delete.
4621         * config/nds32/nds32-protos.h (nds32_hard_regno_nregs): Delete.
4622         * config/nds32/nds32.c (nds32_hard_regno_nregs): Delete.
4623         (nds32_hard_regno_mode_ok): Use targetm.hard_regno_nregs.
4624         * config/nios2/nios2.h (HARD_REGNO_NREGS): Delete.
4625         * config/nvptx/nvptx.h (HARD_REGNO_NREGS): Delete.
4626         * config/nvptx/nvptx.c (nvptx_hard_regno_nregs): New function.
4627         (TARGET_HARD_REGNO_NREGS): Redefine.
4628         * config/pa/pa32-regs.h (HARD_REGNO_NREGS): Rename to...
4629         (PA_HARD_REGNO_NREGS): ...this.
4630         * config/pa/pa64-regs.h (HARD_REGNO_NREGS): Rename to...
4631         (PA_HARD_REGNO_NREGS): ...this.
4632         * config/pa/pa.c (TARGET_HARD_REGNO_NREGS): Redefine.
4633         (pa_hard_regno_nregs): New function.
4634         * config/pdp11/pdp11.h (HARD_REGNO_NREGS): Delete.
4635         * config/pdp11/pdp11.c (TARGET_HARD_REGNO_NREGS): Redefine.
4636         (pdp11_hard_regno_nregs): New function.
4637         * config/powerpcspe/powerpcspe.h (HARD_REGNO_NREGS): Delete.
4638         * config/powerpcspe/powerpcspe.c (TARGET_HARD_REGNO_NREGS): Redefine.
4639         (rs6000_hard_regno_nregs_hook): New function.
4640         * config/riscv/riscv.h (HARD_REGNO_NREGS): Delete.
4641         * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): Delete.
4642         * config/riscv/riscv.c (riscv_hard_regno_nregs): Make static.
4643         Take and return an unsigned int.  Move earlier in file.
4644         (TARGET_HARD_REGNO_NREGS): Redefine.
4645         * config/rl78/rl78.h (HARD_REGNO_NREGS): Delete.
4646         * config/rl78/rl78-protos.h (rl78_hard_regno_nregs): Delete.
4647         * config/rl78/rl78.c (TARGET_HARD_REGNO_NREGS): Reefine.
4648         (rl78_hard_regno_nregs): Make static.  Take and return an
4649         unsigned int.
4650         * config/rs6000/rs6000.h (HARD_REGNO_NREGS): Delete.
4651         * config/rs6000/rs6000.c (TARGET_HARD_REGNO_NREGS): Redefine.
4652         (rs6000_hard_regno_nregs_hook): New function.
4653         * config/rx/rx.h (HARD_REGNO_NREGS): Delete.
4654         * config/rx/rx.c (rx_hard_regno_nregs): New function.
4655         (TARGET_HARD_REGNO_NREGS): Redefine.
4656         * config/s390/s390.h (HARD_REGNO_NREGS): Delete.
4657         * config/s390/s390.c (REGNO_PAIR_OK): Use s390_hard_regno_nregs
4658         instead of HARD_REGNO_NREGS.
4659         (s390_hard_regno_nregs): New function.
4660         (s390_hard_regno_mode_ok): Add comment from s390.h.
4661         (TARGET_HARD_REGNO_NREGS): Redefine.
4662         * config/sh/sh.h (HARD_REGNO_NREGS): Delete.
4663         * config/sh/sh.c (TARGET_HARD_REGNO_NREGS): Redefine.
4664         (sh_hard_regno_nregs): New function.
4665         (sh_pass_in_reg_p): Use it.
4666         * config/sparc/sparc.h (HARD_REGNO_NREGS): Delete.
4667         * config/sparc/sparc.c (TARGET_HARD_REGNO_NREGS): Redefine.
4668         (sparc_hard_regno_nregs): New function.
4669         * config/spu/spu.h (HARD_REGNO_NREGS): Delete.
4670         * config/spu/spu.c (spu_hard_regno_nregs): New function.
4671         (spu_function_arg_advance): Use it, supplying a valid register number.
4672         (TARGET_HARD_REGNO_NREGS): Redefine.
4673         * config/stormy16/stormy16.h (HARD_REGNO_NREGS): Delete.
4674         * config/tilegx/tilegx.h (HARD_REGNO_NREGS): Delete.
4675         * config/tilepro/tilepro.h (HARD_REGNO_NREGS): Delete.
4676         * config/v850/v850.h (HARD_REGNO_NREGS): Delete.
4677         * config/vax/vax.h (HARD_REGNO_NREGS): Delete.
4678         * config/visium/visium.h (HARD_REGNO_NREGS): Delete.
4679         (CLASS_MAX_NREGS): Remove copy of old documentation.
4680         * config/visium/visium.c (TARGET_HARD_REGNO_NREGS): Redefine.
4681         (visium_hard_regno_nregs): New function.
4682         (visium_hard_regno_mode_ok): Use it instead of HARD_REGNO_NREGS.
4683         * config/xtensa/xtensa.h (HARD_REGNO_NREGS): Delete.
4684         * config/xtensa/xtensa.c (TARGET_HARD_REGNO_NREGS): Redefine.
4685         xtensa_hard_regno_nregs): New function.
4686         * system.h (HARD_REGNO_NREGS): Poison.
4688 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
4690         * config/arm/arm.h (THUMB_SECONDARY_INPUT_RELOAD_CLASS): Use
4691         hard_regno_nregs instead of HARD_REGNO_NREGS.
4692         (THUMB_SECONDARY_OUTPUT_RELOAD_CLASS): Likewise.
4693         * config/c6x/c6x.c (c6x_expand_prologue): Likewise.
4694         (c6x_expand_epilogue): Likewise.
4695         * config/frv/frv.c (frv_alloc_temp_reg): Likewise.
4696         (frv_read_iacc_argument): Likewise.
4697         * config/sh/sh.c: Include regs.h.
4698         (sh_print_operand): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
4699         (regs_used): Likewise.
4700         (output_stack_adjust): Likewise.
4701         * config/xtensa/xtensa.c (xtensa_copy_incoming_a7): Likewise.
4702         * expmed.c: Include regs.h.
4703         (store_bit_field_1): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
4704         * ree.c: Include regs.h.
4705         (combine_reaching_defs): Use hard_regno_nregs instead of
4706         HARD_REGNO_NREGS.
4707         (add_removable_extension): Likewise.
4709 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
4711         * regs.h (hard_regno_nregs): Turn into a function.
4712         (end_hard_regno): Update accordingly.
4713         * caller-save.c (setup_save_areas): Likewise.
4714         (save_call_clobbered_regs): Likewise.
4715         (replace_reg_with_saved_mem): Likewise.
4716         (insert_restore): Likewise.
4717         (insert_save): Likewise.
4718         * combine.c (can_change_dest_mode): Likewise.
4719         (move_deaths): Likewise.
4720         (distribute_notes): Likewise.
4721         * config/mips/mips.c (mips_hard_regno_call_part_clobbered): Likewise.
4722         * config/powerpcspe/powerpcspe.c (rs6000_cannot_change_mode_class)
4723         (rs6000_split_multireg_move): Likewise.
4724         (rs6000_register_move_cost): Likewise.
4725         (rs6000_memory_move_cost): Likewise.
4726         * config/rs6000/rs6000.c (rs6000_cannot_change_mode_class): Likewise.
4727         (rs6000_split_multireg_move): Likewise.
4728         (rs6000_register_move_cost): Likewise.
4729         (rs6000_memory_move_cost): Likewise.
4730         * cselib.c (cselib_reset_table): Likewise.
4731         (cselib_lookup_1): Likewise.
4732         * emit-rtl.c (set_mode_and_regno): Likewise.
4733         * function.c (aggregate_value_p): Likewise.
4734         * ira-color.c (setup_profitable_hard_regs): Likewise.
4735         (check_hard_reg_p): Likewise.
4736         (calculate_saved_nregs): Likewise.
4737         (assign_hard_reg): Likewise.
4738         (improve_allocation): Likewise.
4739         (calculate_spill_cost): Likewise.
4740         * ira-emit.c (modify_move_list): Likewise.
4741         * ira-int.h (ira_hard_reg_set_intersection_p): Likewise.
4742         (ira_hard_reg_in_set_p): Likewise.
4743         * ira.c (setup_reg_mode_hard_regset): Likewise.
4744         (clarify_prohibited_class_mode_regs): Likewise.
4745         (check_allocation): Likewise.
4746         * lra-assigns.c (find_hard_regno_for_1): Likewise.
4747         (lra_setup_reg_renumber): Likewise.
4748         (setup_try_hard_regno_pseudos): Likewise.
4749         (spill_for): Likewise.
4750         (assign_hard_regno): Likewise.
4751         (setup_live_pseudos_and_spill_after_risky_transforms): Likewise.
4752         * lra-constraints.c (in_class_p): Likewise.
4753         (lra_constraint_offset): Likewise.
4754         (simplify_operand_subreg): Likewise.
4755         (lra_constraints): Likewise.
4756         (split_reg): Likewise.
4757         (split_if_necessary): Likewise.
4758         (invariant_p): Likewise.
4759         (inherit_in_ebb): Likewise.
4760         * lra-lives.c (process_bb_lives): Likewise.
4761         * lra-remat.c (reg_overlap_for_remat_p): Likewise.
4762         (get_hard_regs): Likewise.
4763         (do_remat): Likewise.
4764         * lra-spills.c (assign_spill_hard_regs): Likewise.
4765         * mode-switching.c (create_pre_exit): Likewise.
4766         * postreload.c (reload_combine_recognize_pattern): Likewise.
4767         * recog.c (peep2_find_free_register): Likewise.
4768         * regcprop.c (kill_value_regno): Likewise.
4769         (set_value_regno): Likewise.
4770         (copy_value): Likewise.
4771         (maybe_mode_change): Likewise.
4772         (find_oldest_value_reg): Likewise.
4773         (copyprop_hardreg_forward_1): Likewise.
4774         * regrename.c (check_new_reg_p): Likewise.
4775         (regrename_do_replace): Likewise.
4776         * reload.c (push_reload): Likewise.
4777         (combine_reloads): Likewise.
4778         (find_dummy_reload): Likewise.
4779         (operands_match_p): Likewise.
4780         (find_reloads): Likewise.
4781         (find_equiv_reg): Likewise.
4782         (reload_adjust_reg_for_mode): Likewise.
4783         * reload1.c (count_pseudo): Likewise.
4784         (count_spilled_pseudo): Likewise.
4785         (find_reg): Likewise.
4786         (clear_reload_reg_in_use): Likewise.
4787         (free_for_value_p): Likewise.
4788         (allocate_reload_reg): Likewise.
4789         (choose_reload_regs): Likewise.
4790         (reload_adjust_reg_for_temp): Likewise.
4791         (emit_reload_insns): Likewise.
4792         (delete_output_reload): Likewise.
4793         * rtlanal.c (subreg_get_info): Likewise.
4794         * sched-deps.c (sched_analyze_reg): Likewise.
4795         * sel-sched.c (init_regs_for_mode): Likewise.
4796         (mark_unavailable_hard_regs): Likewise.
4797         (choose_best_reg_1): Likewise.
4798         (verify_target_availability): Likewise.
4799         * valtrack.c (dead_debug_insert_temp): Likewise.
4800         * var-tracking.c (track_loc_p): Likewise.
4801         (emit_note_insn_var_location): Likewise.
4802         * varasm.c (make_decl_rtl): Likewise.
4803         * reginfo.c (choose_hard_reg_mode): Likewise.
4804         (init_reg_modes_target): Refer directly to
4805         this_target_regs->x_hard_regno_nregs.
4807 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
4809         * ira-costs.c (record_operand_costs): Use in_hard_reg_set_p
4810         instead of hard_regno_nregs.
4812 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
4814         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Use
4815         end_hard_regno instead of hard_regno_nregs.
4816         * config/s390/s390.c (s390_reg_clobbered_rtx): Likewise.
4817         * config/sparc/sparc.h (ASM_DECLARE_REGISTER_GLOBAL): Likewise.
4818         * config/visium/visium.c (visium_hard_regno_mode_ok): Likewise.
4819         * ira-color.c (improve_allocation): Likewise.
4820         * lra-assigns.c (find_hard_regno_for_1): Likewise.
4821         * lra-lives.c (mark_regno_live): Likewise.
4822         (mark_regno_dead): Likewise.
4823         * lra-remat.c (operand_to_remat): Likewise.
4824         * lra.c (collect_non_operand_hard_regs): Likewise.
4825         * postreload.c (reload_combine_note_store): Likewise.
4826         (move2add_valid_value_p): Likewise.
4827         * reload.c (regno_clobbered_p): Likewise.
4829 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
4831         * config/frv/frv.c (FOR_EACH_REGNO): Use END_REGNO instead of
4832         hard_regno_nregs.
4833         * config/v850/v850.c (v850_reorg): Likewise.
4834         * reload.c (refers_to_regno_for_reload_p): Likewise.
4835         (find_equiv_reg): Likewise.
4836         * reload1.c (reload_reg_reaches_end_p): Likewise.
4838 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
4840         * caller-save.c (add_used_regs): Use REG_NREGS instead of
4841         hard_regno_nregs.
4842         * config/aarch64/aarch64.c (aarch64_split_combinev16qi): Likewise.
4843         * config/arm/arm.c (output_move_neon): Likewise.
4844         (arm_attr_length_move_neon): Likewise.
4845         (neon_split_vcombine): Likewise.
4846         * config/c6x/c6x.c (c6x_mark_reg_read): Likewise.
4847         (c6x_mark_reg_written): Likewise.
4848         (c6x_dwarf_register_span): Likewise.
4849         * config/i386/i386.c (ix86_save_reg): Likewise.
4850         * config/ia64/ia64.c (mark_reg_gr_used_mask): Likewise.
4851         (rws_access_reg): Likewise.
4852         * config/s390/s390.c (s390_call_saved_register_used): Likewise.
4853         * mode-switching.c (create_pre_exit): Likewise.
4854         * ree.c (combine_reaching_defs): Likewise.
4855         (add_removable_extension): Likewise.
4856         * regcprop.c (find_oldest_value_reg): Likewise.
4857         (copyprop_hardreg_forward_1): Likewise.
4858         * reload.c (reload_inner_reg_of_subreg): Likewise.
4859         (push_reload): Likewise.
4860         (combine_reloads): Likewise.
4861         (find_dummy_reload): Likewise.
4862         (reload_adjust_reg_for_mode): Likewise.
4863         * reload1.c (find_reload_regs): Likewise.
4864         (forget_old_reloads_1): Likewise.
4865         (reload_reg_free_for_value_p): Likewise.
4866         (reload_adjust_reg_for_temp): Likewise.
4867         (emit_reload_insns): Likewise.
4868         (delete_output_reload): Likewise.
4869         * sel-sched.c (choose_best_reg_1): Likewise.
4870         (choose_best_pseudo_reg): Likewise.
4872 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
4873             Alan Hayward  <alan.hayward@arm.com>
4874             David Sherwood <david.sherwood@arm.com>
4876         * defaults.h (SLOW_UNALIGNED_ACCESS): Delete.
4877         * target.def (slow_unaligned_access): New hook.
4878         * targhooks.h (default_slow_unaligned_access): Declare.
4879         * targhooks.c (default_slow_unaligned_access): New function.
4880         * doc/tm.texi.in (SLOW_UNALIGNED_ACCESS): Replace with...
4881         (TARGET_SLOW_UNALIGNED_ACCESS): ...this.
4882         * doc/tm.texi: Regenerate.
4883         * config/alpha/alpha.h (SLOW_UNALIGNED_ACCESS): Delete.
4884         * config/arm/arm.h (SLOW_UNALIGNED_ACCESS): Delete.
4885         * config/i386/i386.h (SLOW_UNALIGNED_ACCESS): Delete commented-out
4886         definition.
4887         * config/powerpcspe/powerpcspe.h (SLOW_UNALIGNED_ACCESS): Delete.
4888         * config/powerpcspe/powerpcspe.c (TARGET_SLOW_UNALIGNED_ACCESS):
4889         Redefine.
4890         (rs6000_slow_unaligned_access): New function.
4891         (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
4892         (expand_block_compare): Likewise.
4893         (expand_strn_compare): Likewise.
4894         (rs6000_rtx_costs): Likewise.
4895         * config/riscv/riscv.h (SLOW_UNALIGNED_ACCESS): Delete.
4896         (riscv_slow_unaligned_access): Likewise.
4897         * config/riscv/riscv.c (riscv_slow_unaligned_access): Rename to...
4898         (riscv_slow_unaligned_access_p): ...this and make static.
4899         (riscv_option_override): Update accordingly.
4900         (riscv_slow_unaligned_access): New function.
4901         (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
4902         * config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Delete.
4903         * config/rs6000/rs6000.c (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
4904         (rs6000_slow_unaligned_access): New function.
4905         (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
4906         (rs6000_rtx_costs): Likewise.
4907         * config/rs6000/rs6000-string.c (expand_block_compare)
4908         (expand_strn_compare): Use targetm.slow_unaligned_access instead
4909         of SLOW_UNALIGNED_ACCESS.
4910         * config/tilegx/tilegx.h (SLOW_UNALIGNED_ACCESS): Delete.
4911         * config/tilepro/tilepro.h (SLOW_UNALIGNED_ACCESS): Delete.
4912         * calls.c (expand_call): Use targetm.slow_unaligned_access instead
4913         of SLOW_UNALIGNED_ACCESS.
4914         * expmed.c (simple_mem_bitfield_p): Likewise.
4915         * expr.c (alignment_for_piecewise_move): Likewise.
4916         (emit_group_load_1): Likewise.
4917         (emit_group_store): Likewise.
4918         (copy_blkmode_from_reg): Likewise.
4919         (emit_push_insn): Likewise.
4920         (expand_assignment): Likewise.
4921         (store_field): Likewise.
4922         (expand_expr_real_1): Likewise.
4923         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
4924         * lra-constraints.c (simplify_operand_subreg): Likewise.
4925         * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
4926         * gimple-ssa-store-merging.c: Likewise in block comment at start
4927         of file.
4928         * tree-ssa-strlen.c: Include target.h.
4929         (handle_builtin_memcmp): Use targetm.slow_unaligned_access instead
4930         of SLOW_UNALIGNED_ACCESS.
4931         * system.h (SLOW_UNALIGNED_ACCESS): Poison.
4933 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
4935         PR rtl-optimization/82185
4936         * expmed.c (emit_store_flag_int): Only test tem if it has been
4937         initialized.
4939 2017-09-12  Richard Biener  <rguenther@suse.de>
4941         PR middle-end/82149
4942         * match.pd ((FTYPE) N CMP CST): Fix typo.
4944 2017-09-12  Simon Atanasyan  <simon.atanasyan@imgtec.com>
4946         * config/mips/mips.c (mips_attribute_table): Add 'short_call'
4947         attribute.
4948         (mips_near_type_p): Add 'short_call' attribute as a synonym
4949         for 'near'.
4950         * doc/extend.texi (short_call): Document new function attribute.
4952 2017-09-12  Jakub Jelinek  <jakub@redhat.com>
4954         PR target/82112
4955         * c-common.c (sync_resolve_size): Instead of c_dialect_cxx ()
4956         assertion check that in the condition.
4957         (get_atomic_generic_size): Likewise.  Before testing if parameter
4958         has pointer type, if it has array type, call for C++
4959         default_conversion to perform array-to-pointer conversion.
4961 2017-09-12  Richard Biener  <rguenther@suse.de>
4963         * tree-vect-generic.c (expand_vector_operations_1): Do nothing
4964         for operations we cannot scalarize.
4966 2017-09-12  Aldy Hernandez  <aldyh@redhat.com>
4968         * tree-ssa-threadbackward.c (fsm_find_thread_path): Make GC
4969         vectors heap vectors.  Clean up comments.
4970         Make visited_bbs a reference.
4971         (profitable_jump_thread_path): Make GC
4972         vectors heap vectors.  Clean up comments.
4973         Misc cleanups.
4974         (convert_and_register_jump_thread_path): Make GC vectors heap
4975         vectors.
4976         (check_subpath_and_update_thread_path): Same.  Clean up comments.
4977         Make visited_bbs a reference.
4978         (handle_phi): Abstract common code to to
4979         register_jump_thread_path_if_profitable.
4980         Rename VAR_BB to DEF_BB.
4981         Update comments.
4982         Make GC vectors heap vectors.
4983         Make visited_bbs a reference.
4984         (handle_assignment): Same.
4985         (register_jump_thread_path_if_profitable): New.
4986         (fsm_find_control_statement_thread_paths): Rename VAR_BB to
4987         DEF_BB.
4988         Make GC vectors heap vectors.  Clean up comments.
4989         Make visited_bbs a reference.
4990         (find_jump_threads_backwards): Make visited_bbs live in the stack.
4991         * tree-ssa-threadupdate.c (delete_jump_thread_path): Fix typo in
4992         comment.
4994 2017-09-11  Max Filippov  <jcmvbkbc@gmail.com>
4996         PR target/82181
4997         * config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
4998         words of E_DImode object are reachable by xtensa_uimm8x4 access.
5000 2017-09-11  Vidya Praveen  <vidyapraveen@arm.com>
5002         Revert r251800 and r251799.
5004 2017-09-11  Martin Jambor  <mjambor@suse.cz>
5006         PR hsa/82119
5007         * hsa-gen.c (gen_hsa_phi_from_gimple_phi): Process ADDR_EXPRs in
5008         arguments in advance.
5009         * hsa-regalloc.c (naive_process_phi): New parameter predecessors,
5010         use it to find predecessor edges.
5011         (naive_outof_ssa): Collect vector of predecessors.
5013 2017-09-08  Jason Merrill  <jason@redhat.com>
5015         PR c++/70029 - ICE with ref-qualifier and -flto
5016         * langhooks.h (struct lang_hooks_for_types): Add
5017         copy_lang_qualifiers.
5018         * attribs.c (build_type_attribute_qual_variant): Use it.
5019         * langhooks-def.h (LANG_HOOKS_COPY_LANG_QUALIFIERS): Default to
5020         NULL.
5021         (LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
5022         * tree.c (verify_type): Re-enable TYPE_CANONICAL main variant check.
5024 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
5026         PR target/81988
5027         * config/sparc/sparc.md (mulsi3): Rename into *mulsi3_sp32.
5028         (*mulsi3_sp64): New instruction.
5029         (mulsi3): New expander.
5031 2017-09-08  Uros Bizjak  <ubizjak@gmail.com>
5033         * config/alpha/alpha.c (alpha_print_operand) <case 'S'>: Remove.
5035 2017-09-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5037         * sancov.c: Include memmodel.h.
5039 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
5041         PR target/80897
5042         * config/sparc/sparc.c (sparc_emit_set_symbolic_const64): Deal with too
5043         large offsets.
5045 2017-09-07  Carl Love  <cel@us.ibm.com>
5047         * config/rs6000/vsx.md (define_insn "*stxvl"): Add missing argument to
5048         the sldi instruction.
5050 2017-09-07  David Edelsohn  <dje.gcc@gmail.com>
5052         * sancov.c: Include tm_p.h.
5054 2017-09-07  Jakub Jelinek  <jakub@redhat.com>
5056         PR target/81979
5057         * output.h (switch_to_other_text_partition): New declaration.
5058         * varasm.c (switch_to_other_text_partition): New function.
5059         * config/rs6000/rs6000.c (uses_TOC): Return 2 if
5060         NOTE_INSN_SWITCH_TEXT_SECTIONS is seen before finding load_toc_* insn.
5061         (rs6000_elf_declare_function_name): If uses_TOC returned 2, switch
5062         to the other text partition before emitting LCL label and switch back
5063         after emitting the word after it.
5065 2017-09-07  Richard Biener  <rguenther@suse.de>
5067         * passes.def (pass_split_crit_edges): Remove instance before PRE.
5068         * tree-ssa-pre.c (pass_pre::execute): Instead manually split
5069         critical edges here, after loop init.
5070         (pass_data_pre): Remove PROP_no_crit_edges flags.
5071         * tree-ssa-sccvn.c (vn_reference_lookup_3): Use vn_valueize
5072         for valueization of call args to avoid leaking VN_TOP.
5073         (visit_use): Assert we do not visit default defs.
5074         (init_scc_vn): Use build_decl for VN_TOP to make name nicer.
5075         Use error_mark_node to more easily detect leaking VN_TOP.
5076         All default-defs are varying, not VN_TOP.  Mark them visited.
5077         (run_scc_vn): Make code match comment.
5079 2017-09-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
5081         * config/rs6000/rs6000-cpus.def (OTHER_VSX_VECTOR_MASKS): Delete
5082         OPTION_MASK_FLOAT128_KEYWORD.
5083         (POWERPC_MASKS): Likewise.
5084         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Delete
5085         support for the -mfloat128-type option, and make -mfloat128
5086         default on PowerPC Linux systems.  Define or undefine
5087         __FLOAT128__ and  __FLOAT128_HARDWARE__ for the current options.
5088         Define __float128 to be __ieee128 if IEEE 128-bit support is
5089         enabled, or undefine it.
5090         (rs6000_cpu_cpp_builtins): Delete defining __FLOAT128__ here.
5091         Delete defining __FLOAT128_TYPE__.
5092         * config/rs6000/rs6000.opt (x_TARGET_FLOAT128_TYPE): Delete the
5093         -mfloat128-type option and make -mfloat128 default on PowerPC
5094         Linux systems.
5095         (TARGET_FLOAT128_TYPE): Likewise.
5096         (-mfloat128-type): Likewise.
5097         * config/rs6000/rs6000.c (rs6000_option_override_internal):
5098         Delete the -mfloat128-type option and make -mfloat128 default on
5099         PowerPC Linux systems.  Always use __ieee128 to be the keyword for
5100         the IEEE 128-bit type, and map __float128 to __ieee128 if IEEE
5101         128-bit floating point is enabled.  Change tests from using
5102         -mfloat128-type to -mfloat128.
5103         (rs6000_mangle_type): Use the correct mangling for the __float128
5104         type even if normal long double is restricted to 64-bits.
5105         (floatn_mode): Enable the _Float128 type by default on VSX Linux
5106         systems.
5107         * config/rs6000/rs6000.h (MASK_FLOAT128_TYPE): Delete.
5108         (MASK_FLOAT128_KEYWORD): Define new shortcut macro.
5109         (RS6000BTM_FLOAT128): Define in terms of -mfloat128, not
5110         -mfloat128-type.
5111         * doc/invoke.texi (RS/6000 and PowerPC Options): Update
5112         documentation for -mfloat128.
5114 2017-09-06  Olivier Hainque  <hainque@adacore.com>
5116         * config.gcc (powerpc-wrs-vxworksspe): Now match as vxworks*spe.
5118 2017-09-06  Wish Wu  <wishwu007@gmail.com>
5119             Jakub Jelinek  <jakub@redhat.com>
5121         * asan.c (initialize_sanitizer_builtins): Add
5122         BT_FN_VOID_UINT8_UINT8, BT_FN_VOID_UINT16_UINT16,
5123         BT_FN_VOID_UINT32_UINT32, BT_FN_VOID_UINT64_UINT64,
5124         BT_FN_VOID_FLOAT_FLOAT, BT_FN_VOID_DOUBLE_DOUBLE and
5125         BT_FN_VOID_UINT64_PTR variables.
5126         * builtin-types.def (BT_FN_VOID_UINT8_UINT8): New fn type.
5127         (BT_FN_VOID_UINT16_UINT16): Likewise.
5128         (BT_FN_VOID_UINT32_UINT32): Likewise.
5129         (BT_FN_VOID_FLOAT_FLOAT): Likewise.
5130         (BT_FN_VOID_DOUBLE_DOUBLE): Likewise.
5131         (BT_FN_VOID_UINT64_PTR): Likewise.
5132         * common.opt (flag_sanitize_coverage): New variable.
5133         (fsanitize-coverage=trace-pc): Remove.
5134         (fsanitize-coverage=): Add.
5135         * flag-types.h (enum sanitize_coverage_code): New enum.
5136         * fold-const.c (fold_range_test): Disable non-short-circuit
5137         optimization if flag_sanitize_coverage.
5138         (fold_truth_andor): Likewise.
5139         * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
5140         * opts.c (COVERAGE_SANITIZER_OPT): Define.
5141         (coverage_sanitizer_opts): New array.
5142         (get_closest_sanitizer_option): Add OPTS argument, handle also
5143         OPT_fsanitize_coverage_.
5144         (parse_sanitizer_options): Adjusted to also handle
5145         OPT_fsanitize_coverage_.
5146         (common_handle_option): Add OPT_fsanitize_coverage_.
5147         * sancov.c (instrument_comparison, instrument_switch): New function.
5148         (sancov_pass): Add trace-cmp support.
5149         * sanitizer.def (BUILT_IN_SANITIZER_COV_TRACE_CMP1,
5150         BUILT_IN_SANITIZER_COV_TRACE_CMP2, BUILT_IN_SANITIZER_COV_TRACE_CMP4,
5151         BUILT_IN_SANITIZER_COV_TRACE_CMP8,
5152         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP1,
5153         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP2,
5154         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP4,
5155         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP8,
5156         BUILT_IN_SANITIZER_COV_TRACE_CMPF, BUILT_IN_SANITIZER_COV_TRACE_CMPD,
5157         BUILT_IN_SANITIZER_COV_TRACE_SWITCH): New builtins.
5158         * doc/invoke.texi: Document -fsanitize-coverage=trace-cmp.
5160 2017-09-06  Richard Earnshaw  <rearnsha@arm.com>
5162         * config/arm/parsecpu.awk (fatal): Note that we've encountered an
5163         error.  Only quit immediately if parsing is complete.
5164         (BEGIN): Initialize fatal_err and parse_done.
5165         (begin fpu, end fpu): Check number of arguments.
5166         (begin arch, end arch): Likewise.
5167         (begin cpu, end cpu): Likewise.
5168         (cname, tune for, tune flags, architecture, fpu, option): Likewise.
5169         (optalias): Likewise.
5171 2017-09-06  Richard Earnshaw  <rearnsha@arm.com>
5173         * config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
5174         * config/arm/arm-isa.h: Delete.  Move definitions to ...
5175         * arm-cpus.in: ... here.  Use new feature and fgroup values.
5176         * config/arm/arm.c (arm_option_override): Use lower case for feature
5177         bit names.
5178         * config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
5179         (TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
5180         * config/arm/parsecpu.awk (END): Add new command 'isa'.
5181         (isa_pfx): Delete.
5182         (print_isa_bits_for): New function.
5183         (gen_isa): New function.
5184         (gen_comm_data): Use print_isa_bits_for.
5185         (define feature): New keyword.
5186         (define fgroup): New keyword.
5187         * config/arm/t-arm (OPTIONS_H_EXTRA): Add arm-isa.h
5188         (arm-isa.h): Add rule to generate file.
5189         * common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
5190         case for feature bit names.
5192 2017-09-06  Richard Biener  <rguenther@suse.de>
5194         * tree-ssa-pre.c (NECESSARY): Remove.
5195         (create_expression_by_pieces): Do not touch pass-local flags.
5196         (insert_into_preds_of_block): Likewise.
5197         (do_pre_regular_insertion): Likewise.
5198         (eliminate_insert): Likewise.
5199         (eliminate_dom_walker::before_dom_children): Likewise.
5200         (fini_eliminate): Do not look at inserted_exprs.
5201         (mark_operand_necessary): Remove.
5202         (remove_dead_inserted_code): Replace with simple work-list
5203         algorithm based on inserted_exprs and SSA uses.
5204         (pass_pre::execute): Re-order fini_eliminate and
5205         remove_dead_inserted_code.
5207 2017-09-06  Olivier Hainque  <hainque@adacore.com>
5209         * config/powerpcspe/vxworks.h (VXCPU_FOR_8548): Correct definition
5210         for VxWorks 7.  Adjust surrounding comments.
5212 2017-09-06  Richard Biener  <rguenther@suse.de>
5214         * gimple-ssa-strength-reduction.c
5215         (find_candidates_dom_walker::before_dom_children): Also allow
5216         pointer types.
5218 2017-09-06  Richard Biener  <rguenther@suse.de>
5220         PR tree-optimization/82108
5221         * tree-vect-stmts.c (vectorizable_load): Fix pointer adjustment
5222         for gap in the non-permutation SLP case.
5224 2017-09-06  Martin Jambor  <mjambor@suse.cz>
5226         PR tree-optimization/82078
5227         * tree-sra.c (sort_and_splice_var_accesses): Move call to
5228         add_access_to_work_queue...
5229         (build_accesses_from_assign): ...here.
5230         (propagate_all_subaccesses): Make sure racc is the group
5231         representative, if there is one.
5233 2017-09-06  Jakub Jelinek  <jakub@redhat.com>
5235         PR middle-end/82095
5236         * varasm.c (categorize_decl_for_section): Use SECCAT_TBSS for TLS vars with
5237         NULL DECL_INITIAL.
5239 2017-09-06  Richard Biener  <rguenther@suse.de>
5241         * gimple-ssa-strength-reduction.c
5242         (find_candidates_dom_walker::before_doom_children): Use a
5243         type and not a mode check.
5245 2017-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5247         PR target/77308
5248         * config/arm/predicates.md (arm_general_adddi_operand): Create new
5249         non-vfp predicate.
5250         * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Use new predicates.
5252 2017-09-05  Jeff Law  <law@redhat.com>
5254         PR tree-optimization/64910
5255         * tree-ssa-reassoc.c (reassociate_bb): Restrict last change to
5256         cases where we have 3 or more operands.
5258 2017-09-05  Jakub Jelinek  <jakub@redhat.com>
5260         PR middle-end/81768
5261         * omp-low.c (lower_omp_for): Recompute tree invariant if
5262         gimple_omp_for_initial/final is ADDR_EXPR.
5264         PR middle-end/81768
5265         * omp-expand.c (expand_omp_simd): Force second operands of COND_EXPR
5266         into gimple val before gimplification fo the COND_EXPR.
5268 2017-09-05  Aldy Hernandez  <aldyh@redhat.com>
5270         * tree-ssa-threadupdate.c (duplicate_thread_path): Remove unused
5271         REGION_COPY argument.
5272         (thread_through_all_blocks): Remove unused argument to
5273         duplicate_thread_path.
5275 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5276             Alan Hayward  <alan.hayward@arm.com>
5277             David Sherwood  <david.sherwood@arm.com>
5279         * config/aarch64/aarch64-protos.h (aarch64_gen_adjusted_ldpstp):
5280         Take a scalar_mode rather than a machine_mode.
5281         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
5282         * config/aarch64/aarch64.c (aarch64_simd_container_mode): Likewise.
5283         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
5284         (aarch64_gen_adjusted_ldpstp): Likewise.
5285         (aarch64_expand_vector_init): Use scalar_mode instead of machine_mode.
5287 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5288             Alan Hayward  <alan.hayward@arm.com>
5289             David Sherwood  <david.sherwood@arm.com>
5291         * config/aarch64/aarch64-protos.h (aarch64_is_extend_from_extract):
5292         Take a scalar_int_mode instead of a machine_mode.
5293         (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
5294         (aarch64_output_scalar_simd_mov_immediate): Likewise.
5295         (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
5296         (aarch64_simd_attr_length_rglist): Delete.
5297         * config/aarch64/aarch64.c (aarch64_is_extend_from_extract): Take
5298         a scalar_int_mode instead of a machine_mode.
5299         (aarch64_add_offset): Likewise.
5300         (aarch64_internal_mov_immediate): Likewise
5301         (aarch64_add_constant_internal): Likewise.
5302         (aarch64_add_constant): Likewise.
5303         (aarch64_movw_imm): Likewise.
5304         (aarch64_rtx_arith_op_extract_p): Likewise.
5305         (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
5306         (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
5307         Remove assert that the mode isn't a vector.
5308         (aarch64_output_scalar_simd_mov_immediate): Likewise.
5309         (aarch64_expand_mov_immediate): Update calls after above changes.
5310         (aarch64_output_casesi): Use as_a <scalar_int_mode>.
5311         (aarch64_and_bitmask_imm): Check for scalar integer modes.
5312         (aarch64_move_imm): Likewise.
5313         (aarch64_can_const_movi_rtx_p): Likewise.
5314         (aarch64_strip_extend): Likewise.
5315         (aarch64_extr_rtx_p): Likewise.
5316         (aarch64_rtx_costs): Likewise, using wode_mode as the mode of
5317         a CONST_INT when the mode parameter is VOIDmode.
5318         (aarch64_float_const_rtx_p): Use scalar_int_mode for a temporary.
5320 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5322         * machmode.h (bitwise_mode_for_mode): Return opt_mode.
5323         * stor-layout.c (bitwise_mode_for_mode): Likewise.
5324         (bitwise_type_for_mode): Update accordingly.
5326 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5328         * stor-layout.h (mode_for_size_tree): Return an opt_mode.
5329         * stor-layout.c (mode_for_size_tree): Likewise.
5330         (mode_for_array): Update accordingly.
5331         (layout_decl): Likewise.
5332         (compute_record_mode): Likewise.  Only set the mode once.
5334 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5336         * target.def (get_mask_mode): Change return type to opt_mode.
5337         Expand commentary.
5338         * doc/tm.texi: Regenerate.
5339         * targhooks.h (default_get_mask_mode): Return an opt_mode.
5340         * targhooks.c (default_get_mask_mode): Likewise.
5341         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
5342         * optabs-query.c (can_vec_mask_load_store_p): Update use of
5343         targetm.get_mask_mode.
5344         * tree.c (build_truth_vector_type): Likewise.
5346 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5348         * machmode.h (mode_for_vector): Return an opt_mode.
5349         * stor-layout.c (mode_for_vector): Likewise.
5350         (mode_for_int_vector): Update accordingly.
5351         (layout_type): Likewise.
5352         * config/i386/i386.c (emit_memmov): Likewise.
5353         (ix86_expand_set_or_movmem): Likewise.
5354         (ix86_expand_vector_init): Likewise.
5355         (ix86_get_mask_mode): Likewise.
5356         * config/powerpcspe/powerpcspe.c (rs6000_expand_vec_perm_const_1):
5357         Likewise.
5358         * config/rs6000/rs6000.c (rs6000_expand_vec_perm_const_1): Likewise.
5359         * expmed.c (extract_bit_field_1): Likewise.
5360         * expr.c (expand_expr_real_2): Likewise.
5361         * optabs-query.c (can_vec_perm_p): Likewise.
5362         (can_vec_mask_load_store_p): Likewise.
5363         * optabs.c (expand_vec_perm): Likewise.
5364         * targhooks.c (default_get_mask_mode): Likewise.
5365         * tree-vect-stmts.c (vectorizable_store): Likewise.
5366         (vectorizable_load): Likewise.
5367         (get_vectype_for_scalar_type_and_size): Likewise.
5369 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5371         * machmode.h (mode_for_int_vector): New function.
5372         * stor-layout.c (mode_for_int_vector): Likewise.
5373         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Use it.
5374         * config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Likewise.
5375         * config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
5376         * config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
5377         (s390_expand_vcond): Likewise.
5379 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5381         * machmode.h (opt_machine_mode): New type.
5382         (opt_mode<T>): Allow construction from anything that can be
5383         converted to a T.
5384         (is_a, as_a, dyn_cast): Add overloads for opt_mode.
5385         (mode_for_size): Return an opt_machine_mode.
5386         * stor-layout.c (mode_for_size): Likewise.
5387         (mode_for_size_tree): Update call accordingly.
5388         (bitwise_mode_for_mode): Likewise.
5389         (make_fract_type): Likewise.
5390         (make_accum_type): Likewise.
5391         * caller-save.c (replace_reg_with_saved_mem): Update call
5392         accordingly.
5393         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
5394         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
5395         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
5396         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
5397         * expmed.c (extract_bit_field_1): Likewise.
5398         * reload.c (get_secondary_mem): Likewise.
5399         * varasm.c (assemble_integer): Likewise.
5400         * lower-subreg.c (simplify_subreg_concatn): Likewise.  Move
5401         early-out.
5403 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5405         * machmode.h (decimal_float_mode_for_size): New function.
5406         * real.h (REAL_VALUE_TO_TARGET_LONG_DOUBLE): Use float_mode_for_size.
5407         (REAL_VALUE_TO_TARGET_DOUBLE): Likewise.
5408         (REAL_VALUE_TO_TARGET_SINGLE): Likewise.
5409         (REAL_VALUE_TO_TARGET_DECIMAL128): Use decimal_float_mode_for_size.
5410         (REAL_VALUE_TO_TARGET_DECIMAL64): Likewise.
5411         (REAL_VALUE_TO_TARGET_DECIMAL32): Likewise.
5413 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5415         * builtins.c (expand_builtin_powi): Use int_mode_for_size.
5416         (get_builtin_sync_mode): Likewise.
5417         (expand_ifn_atomic_compare_exchange): Likewise.
5418         (expand_builtin_atomic_clear): Likewise.
5419         (expand_builtin_atomic_test_and_set): Likewise.
5420         (fold_builtin_atomic_always_lock_free): Likewise.
5421         * calls.c (compute_argument_addresses): Likewise.
5422         (emit_library_call_value_1): Likewise.
5423         (store_one_arg): Likewise.
5424         * combine.c (combine_instructions): Likewise.
5425         * config/aarch64/aarch64.c (aarch64_function_value): Likewise.
5426         * config/arm/arm.c (arm_function_value): Likewise.
5427         (aapcs_allocate_return_reg): Likewise.
5428         * config/c6x/c6x.c (c6x_expand_movmem): Likewise.
5429         * config/i386/i386.c (construct_container): Likewise.
5430         (ix86_gimplify_va_arg): Likewise.
5431         (ix86_expand_sse_cmp): Likewise.
5432         (emit_memmov): Likewise.
5433         (emit_memset): Likewise.
5434         (expand_small_movmem_or_setmem): Likewise.
5435         (ix86_expand_pextr): Likewise.
5436         (ix86_expand_pinsr): Likewise.
5437         * config/lm32/lm32.c (lm32_block_move_inline): Likewise.
5438         * config/microblaze/microblaze.c (microblaze_block_move_straight):
5439         Likewise.
5440         * config/mips/mips.c (mips_function_value_1) Likewise.
5441         (mips_block_move_straight): Likewise.
5442         (mips_expand_ins_as_unaligned_store): Likewise.
5443         * config/powerpcspe/powerpcspe.c
5444         (rs6000_darwin64_record_arg_advance_flush): Likewise.
5445         (rs6000_darwin64_record_arg_flush): Likewise.
5446         * config/rs6000/rs6000.c
5447         (rs6000_darwin64_record_arg_advance_flush): Likewise.
5448         (rs6000_darwin64_record_arg_flush): Likewise.
5449         * config/sparc/sparc.c (sparc_function_arg_1): Likewise.
5450         (sparc_function_value_1): Likewise.
5451         * config/spu/spu.c (adjust_operand): Likewise.
5452         (spu_emit_branch_or_set): Likewise.
5453         (arith_immediate_p): Likewise.
5454         * emit-rtl.c (gen_lowpart_common): Likewise.
5455         * expr.c (expand_expr_real_1): Likewise.
5456         * function.c (assign_parm_setup_block): Likewise.
5457         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Likewise.
5458         * reload1.c (alter_reg): Likewise.
5459         * stor-layout.c (mode_for_vector): Likewise.
5460         (layout_type): Likewise.
5462 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
5464         * config/spu/spu.c (exp2_immediate_p): Use int_mode_for_mode.
5465         (spu_convert_move): Likewise.
5466         * lower-subreg.c (resolve_simple_move): Likewise.
5468 2017-09-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
5470         PR target/81833
5471         * config/rs6000/altivec.md (altivec_vsum2sws): Convert from a
5472         define_insn to a define_expand.
5473         (altivec_vsum2sws_direct): New define_insn.
5474         (altivec_vsumsws): Convert from a define_insn to a define_expand.
5476 2017-09-05  Wilco Dijkstra  <wdijkstr@arm.com>
5478         * config/arm/arm.c (arm_option_params_internal): Improve setting of
5479         max_insns_skipped.
5481 2017-09-05  H.J. Lu  <hongjiu.lu@intel.com>
5483         PR target/59501
5484         PR target/81624
5485         PR target/81769
5486         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Don't
5487         realign stack if stack alignment needed is less than incoming
5488         stack boundary.
5490 2017-09-05  Marek Polacek  <polacek@redhat.com>
5492         PR sanitizer/82072
5493         * convert.c (convert_to_integer_1) <case NEGATE_EXPR>: Move the ubsan
5494         check earlier.
5496 2017-09-05  Wilco Dijkstra  <wdijkstr@arm.com>
5498         * explow.c (get_dynamic_stack_size): Improve dynamic alignment.
5500 2017-09-05  Richard Biener  <rguenther@suse.de>
5502         PR tree-optimization/82084
5503         * fold-const.c (can_native_encode_string_p): Handle wide characters.
5505 2017-09-05  Richard Biener  <rguenther@suse.de>
5507         PR tree-optimization/82102
5508         * tree-ssa-pre.c (fini_eliminate): Check if lhs is NULL.
5510 2017-09-05  Martin Liska  <mliska@suse.cz>
5512         PR tree-optimization/82032
5513         * tree-cfg.c (generate_range_test): New function.
5514         * tree-cfg.h (generate_range_test): Declared here.
5515         * tree-cfgcleanup.c (convert_single_case_switch): New function.
5516         (cleanup_control_expr_graph): Use it.
5517         * tree-switch-conversion.c (try_switch_expansion): Remove
5518         assert.
5519         (emit_case_nodes): Use generate_range_test.
5521 2017-09-04  Uros Bizjak  <ubizjak@gmail.com>
5523         PR target/82098
5524         * config/i386/i386.md (*<btsc><mode>_mask): Add
5525         TARGET_USE_BT to insn constraint.
5526         (*btr<mode>_mask): Ditto.
5528 2017-09-04  Wilco Dijkstra  <wdijkstr@arm.com>
5530         * config/arm/arm.c (arm_legitimate_index_p): Add comment.
5531         (thumb2_legitimate_index_p): Use correct range for DI/DF mode.
5533 2017-09-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5535         PR target/77308
5536         * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Split early except for
5537         TARGET_NEON and TARGET_IWMMXT.
5538         (anddi3, iordi3, xordi3, one_cmpldi2): Split while expanding except for
5539         TARGET_NEON and TARGET_IWMMXT.
5540         (*one_cmpldi2_insn): Moved the body of one_cmpldi2 here.
5542 2017-09-04  Uros Bizjak  <ubizjak@gmail.com>
5544         * config/i386/i386-protos.h (ix86_tls_address_pattern_p) New prototype.
5545         (ix86_rewrite_tls_address): Ditto.
5546         * config/i386/i386.c (ix86_tls_address_pattern_p) New function.
5547         (ix86_rewrite_tls_address_1): Ditto.
5548         (ix86_rewrite_tls_address): Ditto.
5549         * config/i386/predicates.md (tls_address_pattern): New predicate.
5550         * config/i386/i386.md (TLS address splitter): New splitter.
5552 2017-09-04  Richard Biener  <rguenther@suse.de>
5554         PR tree-optimization/82084
5555         * fold-const.h (can_native_encode_string_p): Declare.
5556         * fold-const.c (can_native_encode_string_p): Factor out from ...
5557         (native_encode_string): ... here.
5558         * tree-vect-stmts.c (vectorizable_store): Call it to avoid
5559         vectorizing stores from constants we later cannot handle.
5561 2017-09-04  Marek Polacek  <polacek@redhat.com>
5563         PR c/81783
5564         * doc/invoke.texi: Update -Wtautological-compare documentation.
5566 2017-09-04  Jeff Law  <law@redhat.com>
5568         PR tree-optimization/64910
5569         * tree-ssa-reassoc.c (reassociate_bb): For bitwise binary ops,
5570         swap the first and last operand if the last is a constant.
5572 2017-09-04  Marek Polacek  <polacek@redhat.com>
5574         PR sanitizer/82072
5575         * convert.c (do_narrow): When sanitizing signed integer overflows,
5576         bail out for signed types.
5577         (convert_to_integer_1) <case NEGATE_EXPR>: Likewise.
5579 2017-09-04  Richard Biener  <rguenther@suse.de>
5581         PR tree-optimization/82060
5582         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
5583         Move devirtualization after stmt folding and before EH/AB/noreturn
5584         cleanup to get the stmt refs canonicalized.  Use a bool instead
5585         of gimple_modified_p since that doesn't work for NOPs.  Schedule
5586         NOPs generated by folding for removal.
5588 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
5589             Alan Hayward  <alan.hayward@arm.com>
5590             David Sherwood  <david.sherwood@arm.com>
5592         * coretypes.h (pad_direction): New enum.
5593         * defaults.h (DEFAULT_FUNCTION_ARG_PADDING): Delete.
5594         (FUNCTION_ARG_PADDING): Likewise.
5595         * target.def (function_arg_padding): New hook.
5596         * targhooks.h (default_function_arg_padding): Declare.
5597         * targhooks.c (default_function_arg_padding): New function.
5598         * doc/tm.texi.in (FUNCTION_ARG_PADDING): Replace with...
5599         (TARGET_FUNCTION_ARG_PADDING): ...this.
5600         * doc/tm.texi: Regenerate.
5601         * calls.c (store_unaligned_arguments_into_pseudos): Use pad_direction
5602         instead of direction.
5603         (compute_argument_addresses): Likewise.
5604         (load_register_parameters): Likewise.
5605         (emit_library_call_value_1): Likewise.
5606         (store_one_arg): Use targetm.calls.function_arg_padding instead
5607         of FUNCTION_ARG_PADDING.
5608         (must_pass_in_stack_var_size_or_pad): Likewise.
5609         * expr.c (emit_group_load_1): Use pad_direction instead of direction.
5610         (emit_group_store): Likewise.
5611         (emit_single_push_insn_1): Use targetm.calls.function_arg_padding
5612         instead of FUNCTION_ARG_PADDING.
5613         (emit_push_insn): Likewise, and propagate enum change throughout
5614         function.
5615         * function.h (direction): Delete.
5616         (locate_and_pad_arg_data::where_pad): Use pad_direction instead
5617         of direction.
5618         * function.c (assign_parm_find_stack_rtl): Likewise.
5619         (assign_parm_setup_block_p): Likewise.
5620         (assign_parm_setup_block): Likewise.
5621         (gimplify_parameters): Likewise.
5622         (locate_and_pad_parm): Use targetm.calls.function_arg_padding
5623         instead of FUNCTION_ARG_PADDING, and propagate enum change throughout
5624         function.
5625         * config/aarch64/aarch64.h (FUNCTION_ARG_PADDING): Delete.
5626         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
5627         * config/aarch64/aarch64-protos.h (aarch64_pad_arg_upward): Delete.
5628         * config/aarch64/aarch64.c (aarch64_pad_arg_upward): Replace with...
5629         (aarch64_function_arg_padding): ...this new function.
5630         (aarch64_gimplify_va_arg_expr): Use pad_direction instead of direction.
5631         (TARGET_FUNCTION_ARG_PADDING): Redefine.
5632         * config/arm/arm.h (FUNCTION_ARG_PADDING): Delete.
5633         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
5634         * config/arm/arm-protos.h (arm_pad_arg_upward): Delete.
5635         * config/arm/arm.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
5636         (arm_pad_arg_upward): Replace with...
5637         (arm_function_arg_padding): ...this new function.
5638         * config/c6x/c6x.h (BLOCK_REG_PADDING): Use pad_direction instead
5639         of direction.
5640         * config/ia64/hpux.h (FUNCTION_ARG_PADDING): Delete.
5641         * config/ia64/ia64-protos.h (ia64_hpux_function_arg_padding): Delete.
5642         * config/ia64/ia64.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
5643         (ia64_hpux_function_arg_padding): Replace with...
5644         (ia64_function_arg_padding): ...this new function.  Use pad_direction
5645         instead of direction.  Check for TARGET_HPUX.
5646         * config/iq2000/iq2000.h (FUNCTION_ARG_PADDING): Delete.
5647         * config/iq2000/iq2000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
5648         (iq2000_function_arg_padding): New function.
5649         * config/mips/mips-protos.h (mips_pad_arg_upward): Delete.
5650         * config/mips/mips.c (mips_pad_arg_upward): Replace with...
5651         (mips_function_arg_padding): ...this new function.
5652         (mips_pad_reg_upward): Update accordingly.
5653         (TARGET_FUNCTION_ARG_PADDING): Redefine.
5654         * config/mips/mips.h (PAD_VARARGS_DOWN): Use
5655         targetm.calls.function_arg_padding.
5656         (FUNCTION_ARG_PADDING): Delete.
5657         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
5658         * config/nios2/nios2.h (FUNCTION_ARG_PADDING): Delete.
5659         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
5660         * config/nios2/nios2-protos.h (nios2_function_arg_padding): Delete.
5661         (nios2_block_reg_padding): Return pad_direction instead of direction.
5662         * config/nios2/nios2.c (nios2_block_reg_padding): Return pad_direction
5663         instead of direction.
5664         (nios2_function_arg_padding): Likewise.  Make static.
5665         (TARGET_FUNCTION_ARG_PADDING): Redefine.
5666         * config/pa/pa.h (FUNCTION_ARG_PADDING): Delete.
5667         (BLOCK_REG_PADDING): Use targetm.calls.function_arg_padding.
5668         * config/pa/pa-protos.h (pa_function_arg_padding): Delete.
5669         * config/pa/pa.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
5670         (pa_function_arg_padding): Make static.  Return pad_direction instead
5671         of direction.
5672         * config/powerpcspe/powerpcspe.h (FUNCTION_ARG_PADDING): Delete.
5673         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
5674         * config/powerpcspe/aix.h (BLOCK_REG_PADDING): Use pad_direction
5675         instead of direction.  Use targetm.calls.function_arg_padding.
5676         * config/powerpcspe/darwin.h (BLOCK_REG_PADDING): Likewise.
5677         * config/powerpcspe/freebsd64.h (BLOCK_REG_PADDING): Likewise.
5678         * config/powerpcspe/linux64.h (BLOCK_REG_PADDING): Likewise.
5679         * config/powerpcspe/powerpcspe-protos.h (function_arg_padding): Delete.
5680         * config/powerpcspe/powerpcspe.c (TARGET_FUNCTION_ARG_PADDING):
5681         Redefine.
5682         (function_arg_padding): Rename to...
5683         (rs6000_function_arg_padding): ...this.  Make static.  Return
5684         pad_direction instead of direction.
5685         (rs6000_return_in_msb): Use rs6000_function_arg_padding.
5686         * config/rs6000/rs6000.h (FUNCTION_ARG_PADDING): Delete.
5687         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
5688         * config/rs6000/aix.h (BLOCK_REG_PADDING): Use pad_direction
5689         instead of direction.  Use targetm.calls.function_arg_padding.
5690         * config/rs6000/darwin.h (BLOCK_REG_PADDING): Likewise.
5691         * config/rs6000/freebsd64.h (BLOCK_REG_PADDING): Likewise.
5692         * config/rs6000/linux64.h (BLOCK_REG_PADDING): Likewise.
5693         * config/rs6000/rs6000-protos.h (function_arg_padding): Delete.
5694         * config/rs6000/rs6000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
5695         (function_arg_padding): Rename to...
5696         (rs6000_function_arg_padding): ...this.  Make static.  Return
5697         pad_direction instead of direction.
5698         (rs6000_return_in_msb): Use rs6000_function_arg_padding.
5699         * config/s390/s390.h (FUNCTION_ARG_PADDING): Delete.
5700         * config/s390/s390.c (s390_function_arg_padding): New function.
5701         (TARGET_FUNCTION_ARG_PADDING): Redefine.
5702         * config/sparc/sparc.h (FUNCTION_ARG_PADDING): Delete.
5703         * config/sparc/sparc-protos.h (function_arg_padding): Delete.
5704         * config/sparc/sparc.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
5705         (function_arg_padding): Rename to...
5706         (sparc_function_arg_padding): ...this.  Make static.  Return
5707         pad_direction instead of direction.
5708         * config/spu/spu.h (FUNCTION_ARG_PADDING): Delete.
5709         * config/spu/spu.c (spu_function_arg_padding): New function.
5710         (TARGET_FUNCTION_ARG_PADDING): Redefine.
5711         * system.h (FUNCTION_ARG_PADDING): Poison.
5713 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
5714             Alan Hayward  <alan.hayward@arm.com>
5715             David Sherwood  <david.sherwood@arm.com>
5717         * target.def (modes_tieable_p): New hook.
5718         * doc/tm.texi (MODES_TIEABLE_P): Replace with...
5719         (TARGET_MODES_TIEABLE_P): ...this.
5720         * doc/tm.texi.in: Regenerate.
5721         * hooks.h (hook_bool_mode_mode_true): Declare.
5722         * hooks.c (hook_bool_mode_mode_true): New function.
5723         * combine.c (subst): Use targetm.modes_tieable_p instead of
5724         MODES_TIEABLE_P.
5725         * dse.c (find_shift_sequence): Likewise.
5726         * expmed.c (extract_low_bits): Likewise.
5727         * lower-subreg.c: Include target.h.
5728         (find_decomposable_subregs): Use targetm.modes_tieable_p instead of
5729         MODES_TIEABLE_P.
5730         * rtlanal.c (rtx_cost): Likewise.
5731         * config/aarch64/aarch64.h (MODES_TIEABLE_P): Delete.
5732         * config/aarch64/aarch64-protos.h (aarch64_modes_tieable_p): Delete.
5733         * config/aarch64/aarch64.c (aarch64_modes_tieable_p): Make static.
5734         (TARGET_MODES_TIEABLE_P): Redefine.
5735         * config/alpha/alpha.h (MODES_TIEABLE_P): Delete.
5736         * config/alpha/alpha.c (alpha_modes_tieable_p): New function.
5737         (TARGET_MODES_TIEABLE_P): Redefine.
5738         * config/arc/arc.h (MODES_TIEABLE_P): Delete.
5739         * config/arc/arc.c (TARGET_MODES_TIEABLE_P): Redefine.
5740         (arc_modes_tieable_p): New function.
5741         * config/arm/arm.h (MODES_TIEABLE_P): Delete.
5742         * config/arm/arm-protos.h (arm_modes_tieable_p): Delete.
5743         * config/arm/arm.c (TARGET_MODES_TIEABLE_P): Redefine.
5744         (arm_modes_tieable_p): Make static.
5745         * config/avr/avr.h (MODES_TIEABLE_P): Delete.
5746         * config/bfin/bfin.h (MODES_TIEABLE_P): Delete.
5747         * config/bfin/bfin.c (bfin_modes_tieable_p): New function.
5748         (TARGET_MODES_TIEABLE_P): Redefine.
5749         * config/c6x/c6x.h (MODES_TIEABLE_P): Delete.
5750         * config/c6x/c6x.c (c6x_modes_tieable_p): New function.
5751         (TARGET_MODES_TIEABLE_P): Redefine.
5752         * config/cr16/cr16.h (MODES_TIEABLE_P): Delete.
5753         * config/cr16/cr16.c (TARGET_MODES_TIEABLE_P): Redefine.
5754         (cr16_modes_tieable_p): New function.
5755         * config/cris/cris.h (MODES_TIEABLE_P): Delete.
5756         * config/epiphany/epiphany.h (MODES_TIEABLE_P): Delete.
5757         * config/fr30/fr30.h (MODES_TIEABLE_P): Delete.
5758         (TRULY_NOOP_TRUNCATION): Update comment.
5759         * config/frv/frv.h (MODES_TIEABLE_P): Delete.
5760         (TRULY_NOOP_TRUNCATION): Update comment.
5761         * config/frv/frv.c (TARGET_MODES_TIEABLE_P): Redefine.
5762         (frv_modes_tieable_p): New function.
5763         * config/ft32/ft32.h (MODES_TIEABLE_P): Delete.
5764         * config/h8300/h8300.h (MODES_TIEABLE_P): Delete.
5765         * config/h8300/h8300.c (h8300_modes_tieable_p): New function.
5766         (TARGET_MODES_TIEABLE_P): Redefine.
5767         * config/i386/i386.h (MODES_TIEABLE_P): Delete.
5768         * config/i386/i386-protos.h (ix86_modes_tieable_p): Delete.
5769         * config/i386/i386.c (ix86_modes_tieable_p): Make static.
5770         (TARGET_MODES_TIEABLE_P): Redefine.
5771         * config/ia64/ia64.h (MODES_TIEABLE_P): Delete.
5772         * config/ia64/ia64.c (TARGET_MODES_TIEABLE_P): Redefine.
5773         (ia64_modes_tieable_p): New function.
5774         * config/iq2000/iq2000.h (MODES_TIEABLE_P): Delete.
5775         * config/iq2000/iq2000.c (TARGET_MODES_TIEABLE_P): Redefine.
5776         (iq2000_modes_tieable_p): New function.
5777         * config/lm32/lm32.h (MODES_TIEABLE_P): Delete.
5778         * config/lm32/lm32.c (TARGET_MODES_TIEABLE_P): Redefine.
5779         (lm32_modes_tieable_p): New function.
5780         * config/m32c/m32c.h (MODES_TIEABLE_P): Delete.
5781         * config/m32c/m32c-protos.h (m32c_modes_tieable_p): Delete.
5782         * config/m32c/m32c.c (m32c_modes_tieable_p): Make static.
5783         (TARGET_MODES_TIEABLE_P): Redefine.
5784         * config/m32r/m32r.h (MODES_TIEABLE_P): Delete.
5785         * config/m32r/m32r.c (TARGET_MODES_TIEABLE_P): Redefine.
5786         (m32r_modes_tieable_p): New function.
5787         * config/m68k/m68k.h (MODES_TIEABLE_P): Delete.
5788         * config/m68k/m68k.c (TARGET_MODES_TIEABLE_P): Redefine.
5789         (m68k_modes_tieable_p): New function.
5790         * config/mcore/mcore.h (MODES_TIEABLE_P): Delete.
5791         * config/mcore/mcore.c (TARGET_MODES_TIEABLE_P): Redefine.
5792         (mcore_modes_tieable_p): New function.
5793         * config/microblaze/microblaze.h (MODES_TIEABLE_P): Delete.
5794         * config/microblaze/microblaze.c (microblaze_modes_tieable_p): New
5795         function.
5796         (TARGET_MODES_TIEABLE_P): Redefine.
5797         * config/mips/mips.h (MODES_TIEABLE_P): Delete.
5798         * config/mips/mips-protos.h (mips_modes_tieable_p): Delete.
5799         * config/mips/mips.c (mips_modes_tieable_p): Make static.
5800         (TARGET_MODES_TIEABLE_P): Redefine.
5801         * config/mmix/mmix.h (MODES_TIEABLE_P): Delete.
5802         * config/mn10300/mn10300.h (MODES_TIEABLE_P): Delete.
5803         * config/mn10300/mn10300-protos.h (mn10300_modes_tieable): Delete.
5804         * config/mn10300/mn10300.c (mn10300_modes_tieable): Rename to...
5805         (mn10300_modes_tieable_p): ...this and make static.
5806         (TARGET_MODES_TIEABLE_P): Redefine.
5807         * config/moxie/moxie.h (MODES_TIEABLE_P): Delete.
5808         * config/msp430/msp430.h (MODES_TIEABLE_P): Delete.
5809         * config/msp430/msp430-protos.h (msp430_modes_tieable_p): Delete.
5810         * config/msp430/msp430.c (TARGET_MODES_TIEABLE_P): Redefine.
5811         (msp430_modes_tieable_p): Make static.
5812         * config/nds32/nds32.h (MODES_TIEABLE_P): Delete.
5813         * config/nds32/nds32.c (nds32_modes_tieable_p): New function.
5814         (TARGET_MODES_TIEABLE_P): Redefine.
5815         * config/nios2/nios2.h (MODES_TIEABLE_P): Delete.
5816         * config/nvptx/nvptx.h (MODES_TIEABLE_P): Delete.
5817         * config/nvptx/nvptx.c (nvptx_modes_tieable_p): New function.
5818         (TARGET_MODES_TIEABLE_P): Redefine.
5819         * config/pa/pa.h (MODES_TIEABLE_P): Delete.
5820         * config/pa/pa-protos.h (pa_modes_tieable_p): Delete.
5821         * config/pa/pa.c (pa_modes_tieable_p): Make static.
5822         (TARGET_MODES_TIEABLE_P): Redefine.
5823         * config/pdp11/pdp11.h (MODES_TIEABLE_P): Delete.
5824         * config/pdp11/pdp11.c (TARGET_MODES_TIEABLE_P): Redefine.
5825         (pdp11_modes_tieable_p): New function.
5826         * config/powerpcspe/powerpcspe.h (MODES_TIEABLE_P): Delete.
5827         * config/powerpcspe/powerpcspe.c (TARGET_MODES_TIEABLE_P): Redefine.
5828         (rs6000_modes_tieable_p): New function.
5829         (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
5830         * config/powerpcspe/powerpcspe.md: Update comment.
5831         * config/riscv/riscv.h (MODES_TIEABLE_P): Delete.
5832         * config/riscv/riscv.c (riscv_modes_tieable_p): New function.
5833         (TARGET_MODES_TIEABLE_P): Redefine.
5834         * config/rl78/rl78.h (MODES_TIEABLE_P): Delete.
5835         * config/rl78/rl78.c (TARGET_MODES_TIEABLE_P): Redefine.
5836         (rl78_modes_tieable_p): New function.
5837         * config/rs6000/rs6000.h (MODES_TIEABLE_P): Delete.
5838         * config/rs6000/rs6000.c (TARGET_MODES_TIEABLE_P): Redefine.
5839         (rs6000_modes_tieable_p): New function.
5840         (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
5841         * config/rs6000/rs6000.md: Update comment.
5842         * config/rx/rx.h (MODES_TIEABLE_P): Delete.
5843         * config/rx/rx.c (rx_modes_tieable_p): New function.
5844         (TARGET_MODES_TIEABLE_P): Redefine.
5845         * config/s390/s390.h (MODES_TIEABLE_P): Delete.
5846         * config/s390/s390.c (s390_modes_tieable_p): New function.
5847         (TARGET_MODES_TIEABLE_P): Redefine.
5848         * config/sh/sh.h (MODES_TIEABLE_P): Delete.
5849         * config/sh/sh.c (TARGET_MODES_TIEABLE_P): Redefine.
5850         (sh_modes_tieable_p): New function.
5851         * config/sparc/sparc.h (MODES_TIEABLE_P): Delete.
5852         * config/sparc/sparc-protos.h (sparc_modes_tieable_p): Delete.
5853         * config/sparc/sparc.c (TARGET_MODES_TIEABLE_P): Redefine.
5854         (sparc_modes_tieable_p): Make static.
5855         * config/spu/spu.h (MODES_TIEABLE_P): Delete.
5856         * config/spu/spu.c (spu_modes_tieable_p): New function.
5857         (TARGET_MODES_TIEABLE_P): Redefine.
5858         * config/stormy16/stormy16.h (MODES_TIEABLE_P): Delete.
5859         * config/stormy16/stormy16.c (xstormy16_modes_tieable_p): New function.
5860         (TARGET_MODES_TIEABLE_P): Redefine.
5861         * config/tilegx/tilegx.h (MODES_TIEABLE_P): Delete.
5862         * config/tilepro/tilepro.h (MODES_TIEABLE_P): Delete.
5863         * config/v850/v850.h (MODES_TIEABLE_P): Delete.
5864         * config/v850/v850.c (v850_modes_tieable_p): New function.
5865         (TARGET_MODES_TIEABLE_P): Redefine.
5866         * config/vax/vax.h (MODES_TIEABLE_P): Delete.
5867         * config/visium/visium.h (MODES_TIEABLE_P): Delete.
5868         * config/visium/visium.c (TARGET_MODES_TIEABLE_P): Redefine.
5869         (visium_modes_tieable_p): New function.
5870         * config/xtensa/xtensa.h (MODES_TIEABLE_P): Delete.
5871         * config/xtensa/xtensa.c (TARGET_MODES_TIEABLE_P): Redefine.
5872         (xtensa_modes_tieable_p): New function.
5873         * system.h (MODES_TIEABLE_P): Poison.
5875 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
5876             Alan Hayward  <alan.hayward@arm.com>
5877             David Sherwood  <david.sherwood@arm.com>
5879         * target.def (hard_regno_mode_ok): New hook.
5880         * doc/tm.texi (HARD_REGNO_MODE_OK): Replace with...
5881         (TARGET_HARD_REGNO_MODE_OK): ...this.
5882         * doc/tm.texi.in: Regenerate.
5883         * hooks.h (hook_bool_uint_mode_true): Declare.
5884         * hooks.c (hook_bool_uint_mode_true): New function.
5885         * doc/md.texi: Refer to targetm.hard_regno_mode_ok instead of
5886         HARD_REGNO_MODE_OK.
5887         * genpreds.c (write_insn_preds_c): Add an include of target.h.
5888         * alias.c (init_alias_target): Use targetm.hard_regno_mode_ok
5889         instead of HARD_REGNO_MODE_OK.
5890         * caller-save.c: Include target.h.
5891         (reg_save_code): Use targetm.hard_regno_mode_ok instead of
5892         HARD_REGNO_MODE_OK.
5893         * combine.c (can_combine_p): Likewise.
5894         (combinable_i3pat): Likewise.
5895         (can_change_dest_mode): Likewise.
5896         * expr.c (init_expr_target): Likewise.
5897         (convert_move): Likewise.
5898         (convert_modes): Likewise.
5899         * ira.c (setup_prohibited_class_mode_regs): Likewise.
5900         (setup_prohibited_mode_move_regs): Likewise.
5901         * ira.h (target_ira): Likewise.
5902         * lra-assigns.c (find_hard_regno_for_1): Likewise.
5903         * lra-constraints.c (process_alt_operands): Likewise.
5904         (split_reg): Likewise.
5905         * recog.c (peep2_find_free_register): Likewise.
5906         * ree.c (combine_reaching_defs): Likewise.
5907         * regcprop.c (maybe_mode_change): Likewise.
5908         * reginfo.c (init_reg_sets_1): Likewise.
5909         (choose_hard_reg_mode): Likewise.
5910         (simplifiable_subregs): Likewise.
5911         * regrename.c (check_new_reg_p): Likewise.
5912         * reload.c (find_valid_class): Likewise.
5913         (find_valid_class_1): Likewise.
5914         (reload_inner_reg_of_subreg): Likewise.
5915         (push_reload): Likewise.
5916         (combine_reloads): Likewise.
5917         (find_dummy_reload): Likewise.
5918         (find_reloads): Likewise.
5919         * reload1.c (find_reg): Likewise.
5920         (set_reload_reg): Likewise.
5921         (allocate_reload_reg): Likewise.
5922         (choose_reload_regs): Likewise.
5923         (reload_adjust_reg_for_temp): Likewise.
5924         * rtlanal.c (subreg_size_offset_from_lsb): Likewise.
5925         (simplify_subreg_regno): Likewise.
5926         * sel-sched.c (init_regs_for_mode): Likewise.
5927         * varasm.c (make_decl_rtl): Likewise.
5928         * config/aarch64/aarch64.h (HARD_REGNO_MODE_OK): Delete.
5929         (MODES_TIEABLE_P): Use targetm.hard_regno_mode_ok instead of
5930         HARD_REGNO_MODE_OK.
5931         * config/aarch64/aarch64-protos.h (aarch64_hard_regno_mode_ok): Delete.
5932         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Make static.
5933         (TARGET_HARD_REGNO_MODE_OK): Redefine.
5934         * config/alpha/alpha.h (HARD_REGNO_MODE_OK): Delete.
5935         * config/alpha/alpha.c (alpha_hard_regno_mode_ok): New function.
5936         (TARGET_HARD_REGNO_MODE_OK): Redefine.
5937         * config/arc/arc.h (arc_hard_regno_mode_ok): Delete.
5938         (arc_mode_class): Delete.
5939         (HARD_REGNO_MODE_OK): Delete.
5940         * config/arc/arc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
5941         (arc_hard_regno_mode_ok): Rename old array to...
5942         (arc_hard_regno_mode_ok_modes): ...this.
5943         (arc_conditional_register_usage): Update accordingly.
5944         (arc_mode_class): Make static.
5945         (arc_hard_regno_mode_ok): New function.
5946         * config/arm/arm.h (HARD_REGNO_MODE_OK): Delete.
5947         * config/arm/arm-protos.h (arm_hard_regno_mode_ok): Delete.
5948         * config/arm/arm.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
5949         (arm_hard_regno_mode_ok): Make static.
5950         * config/arm/arm.md (movdi): Use targetm.hard_regno_mode_ok instead of
5951         HARD_REGNO_MODE_OK.
5952         * config/avr/avr-protos.h (avr_hard_regno_mode_ok): Delete.
5953         * config/avr/avr.h (HARD_REGNO_MODE_OK): Delete.
5954         * config/avr/avr.c (avr_hard_regno_mode_ok): Make static and
5955         return a bool.
5956         (TARGET_HARD_REGNO_MODE_OK): Redefine.
5957         * config/bfin/bfin-protos.h (hard_regno_mode_ok): Delete.
5958         * config/bfin/bfin.h (HARD_REGNO_MODE_OK): Delete.
5959         * config/bfin/bfin.c (hard_regno_mode_ok): Rename to...
5960         (bfin_hard_regno_mode_ok): ...this.  Make static and return a bool.
5961         (TARGET_HARD_REGNO_MODE_OK): Redefine.
5962         * config/bfin/predicates.md (valid_reg_operand): Use
5963         targetm.hard_regno_mode_ok instead of HARD_REGNO_MODE_OK.
5964         * config/c6x/c6x.h (HARD_REGNO_MODE_OK): Delete.
5965         * config/c6x/c6x.c (c6x_hard_regno_mode_ok): New function.
5966         (TARGET_HARD_REGNO_MODE_OK): Redefine.
5967         * config/cr16/cr16.h (HARD_REGNO_MODE_OK): Delete.
5968         * config/cr16/cr16-protos.h (cr16_hard_regno_mode_ok): Delete.
5969         * config/cr16/cr16.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
5970         (cr16_hard_regno_mode_ok): Make static and return a bool.
5971         * config/cris/cris.h (HARD_REGNO_MODE_OK): Delete.
5972         * config/cris/cris.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
5973         (cris_hard_regno_mode_ok): New function.
5974         * config/epiphany/epiphany.h (epiphany_hard_regno_mode_ok): Delete.
5975         (epiphany_mode_class): Delete.
5976         (HARD_REGNO_MODE_OK): Delete.
5977         * config/epiphany/epiphany-protos.h (hard_regno_mode_ok): Delete.
5978         * config/epiphany/epiphany.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
5979         (hard_regno_mode_ok): Rename to...
5980         (epiphany_hard_regno_mode_ok): ...this.  Make static and return a bool.
5981         * config/fr30/fr30.h (HARD_REGNO_MODE_OK): Delete.
5982         * config/fr30/fr30.md: Refer to targetm.hard_regno_mode_ok instead of
5983         HARD_REGNO_MODE_OK.
5984         * config/frv/frv.h (HARD_REGNO_MODE_OK): Delete.
5985         * config/frv/frv-protos.h (frv_hard_regno_mode_ok): Delete.
5986         * config/frv/frv.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
5987         (frv_hard_regno_mode_ok): Make static and return a bool.
5988         * config/frv/frv.md: Refer to targetm.hard_regno_mode_ok instead of
5989         HARD_REGNO_MODE_OK.
5990         * config/ft32/ft32.h (HARD_REGNO_MODE_OK): Delete.
5991         * config/h8300/h8300.h (HARD_REGNO_MODE_OK): Delete.
5992         * config/h8300/h8300-protos.h (h8300_hard_regno_mode_ok): Delete.
5993         * config/h8300/h8300.c (h8300_hard_regno_mode_ok): Make static
5994         and return a bool.
5995         (TARGET_HARD_REGNO_MODE_OK): Redefine.
5996         * config/i386/i386.h (HARD_REGNO_MODE_OK): Delete.
5997         * config/i386/i386-protos.h (ix86_hard_regno_mode_ok): Delete.
5998         * config/i386/i386.c (ix86_hard_regno_mode_ok): Make static and
5999         return a bool.
6000         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6001         * config/ia64/ia64.h (HARD_REGNO_MODE_OK): Delete.
6002         * config/ia64/ia64.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6003         (ia64_hard_regno_mode_ok): New function.
6004         * config/iq2000/iq2000.h (HARD_REGNO_MODE_OK): Delete.
6005         * config/iq2000/iq2000.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6006         (iq2000_hard_regno_mode_ok): New function.
6007         * config/lm32/lm32.h (HARD_REGNO_MODE_OK): Delete.
6008         * config/lm32/lm32.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6009         (lm32_hard_regno_mode_ok): New function.
6010         * config/m32c/m32c.h (HARD_REGNO_MODE_OK): Delete.
6011         * config/m32c/m32c-protos.h (m32c_hard_regno_ok): Delete.
6012         * config/m32c/m32c.c (class_can_hold_mode): Use m32c_hard_regno_mode_ok
6013         instead of HARD_REGNO_MODE_OK.
6014         (m32c_hard_regno_ok): Rename to...
6015         (m32c_hard_regno_mode_ok): ...this.  Make static and return a bool.
6016         (m32c_cannot_change_mode_class): Update accordingly.
6017         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6018         * config/m32r/m32r.h (m32r_hard_regno_mode_ok): Delete.
6019         (m32r_mode_class): Delete.
6020         (HARD_REGNO_MODE_OK): Delete.
6021         * config/m32r/m32r.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6022         (m32r_hard_regno_mode_ok): Rename to...
6023         (m32r_hard_regno_modes): ...this.
6024         (m32r_mode_class): Make static.
6025         (m32r_hard_regno_mode_ok): New function.
6026         * config/m68k/m68k.h (HARD_REGNO_MODE_OK): Delete.
6027         * config/m68k/m68k-protos.h (m68k_regno_mode_ok): Delete.
6028         * config/m68k/m68k.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6029         (m68k_hard_regno_mode_ok): Make static.
6030         * config/mcore/mcore.h (HARD_REGNO_MODE_OK): Delete.
6031         * config/mcore/mcore.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6032         (mcore_hard_regno_mode_ok): New function.
6033         * config/microblaze/microblaze.h (microblaze_hard_regno_mode_ok)
6034         (HARD_REGNO_MODE_OK): Delete.
6035         * config/microblaze/microblaze.c (microblaze_hard_regno_mode_ok):
6036         Rename to...
6037         (microblaze_hard_regno_mode_ok_p): ...this and make static.
6038         (microblaze_hard_regno_mode_ok): New function.
6039         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6040         * config/mips/mips.h (HARD_REGNO_MODE_OK): Delete.
6041         (mips_hard_regno_mode_ok): Delete.
6042         * config/mips/mips.c (mips_hard_regno_mode_ok): Rename to...
6043         (mips_hard_regno_mode_ok_p): ...this and make static.
6044         (mips_hard_regno_mode_ok_p): Rename to...
6045         (mips_hard_regno_mode_ok_uncached): ...this.
6046         (mips_hard_regno_mode_ok): New function.
6047         (mips_class_max_nregs): Use mips_hard_regno_mode_ok instead
6048         of HARD_REGNO_MODE_OK.
6049         (mips_option_override): Update after above name changes.
6050         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6051         * config/mmix/mmix.h (HARD_REGNO_MODE_OK): Delete.
6052         * config/mn10300/mn10300.h (HARD_REGNO_MODE_OK): Delete.
6053         * config/mn10300/mn10300-protos.h (mn10300_hard_regno_mode_ok): Delete.
6054         * config/mn10300/mn10300.c (mn10300_hard_regno_mode_ok): Make static.
6055         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6056         * config/moxie/moxie.h (HARD_REGNO_MODE_OK): Delete.
6057         * config/msp430/msp430.h (HARD_REGNO_MODE_OK): Delete.
6058         * config/msp430/msp430-protos.h (msp430_hard_regno_mode_ok): Delete.
6059         * config/msp430/msp430.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6060         (msp430_hard_regno_mode_ok): Make static and return a bool.
6061         * config/nds32/nds32.h (HARD_REGNO_MODE_OK): Delete.
6062         * config/nds32/nds32-protos.h (nds32_hard_regno_mode_ok): Delete.
6063         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Make static
6064         and return a bool.
6065         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6066         * config/nios2/nios2.h (HARD_REGNO_MODE_OK): Delete.
6067         * config/nvptx/nvptx.h (HARD_REGNO_MODE_OK): Delete.
6068         * config/pa/pa.h (MODES_TIEABLE_P): Update commentary.
6069         * config/pa/pa32-regs.h (HARD_REGNO_MODE_OK): Rename to...
6070         (PA_HARD_REGNO_MODE_OK): ...this
6071         * config/pa/pa64-regs.h (HARD_REGNO_MODE_OK): Rename to...
6072         (PA_HARD_REGNO_MODE_OK): ...this.
6073         * config/pa/pa.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6074         (pa_hard_regno_mode_ok): New function.
6075         * config/pdp11/pdp11.h (HARD_REGNO_MODE_OK): Delete.
6076         * config/pdp11/pdp11.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6077         (pdp11_hard_regno_mode_ok): New function.
6078         * config/powerpcspe/powerpcspe.h (HARD_REGNO_MODE_OK): Delete.
6079         * config/powerpcspe/powerpcspe-protos.h (rs6000_hard_regno_mode_ok_p):
6080         Delete.
6081         * config/powerpcspe/powerpcspe.c (rs6000_hard_regno_mode_ok_p):
6082         Make static.
6083         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6084         (rs6000_hard_regno_mode_ok): Rename to...
6085         (rs6000_hard_regno_mode_ok_uncached): ...this.
6086         (rs6000_init_hard_regno_mode_ok): Update accordingly.
6087         (rs6000_hard_regno_mode_ok): New function.
6088         * config/riscv/riscv.h (HARD_REGNO_MODE_OK): Delete.
6089         * config/riscv/riscv-protos.h (riscv_hard_regno_mode_ok_p): Delete.
6090         * config/riscv/riscv.c (riscv_hard_regno_mode_ok_p): Rename to...
6091         (riscv_hard_regno_mode_ok): ...this and make static.
6092         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6093         * config/rl78/rl78.h (HARD_REGNO_MODE_OK): Delete.
6094         * config/rl78/rl78-protos.h (rl78_hard_regno_mode_ok): Delete.
6095         * config/rl78/rl78.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6096         (rl78_hard_regno_mode_ok): Make static and return bool.
6097         * config/rs6000/rs6000.h (HARD_REGNO_MODE_OK): Delete.
6098         * config/rs6000/rs6000-protos.h (rs6000_hard_regno_mode_ok_p):
6099         Delete.
6100         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok_p): Make static.
6101         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6102         (rs6000_hard_regno_mode_ok): Rename to...
6103         (rs6000_hard_regno_mode_ok_uncached): ...this.
6104         (rs6000_init_hard_regno_mode_ok): Update accordingly.
6105         (rs6000_hard_regno_mode_ok): New function.
6106         * config/rx/rx.h (HARD_REGNO_MODE_OK): Delete.
6107         * config/rx/rx.c (rx_hard_regno_mode_ok): New function.
6108         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6109         * config/s390/s390.h (HARD_REGNO_MODE_OK): Delete.
6110         * config/s390/s390-protos.h (s390_hard_regno_mode_ok): Delete.
6111         * config/s390/s390.c (s390_hard_regno_mode_ok): Make static.
6112         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6113         * config/sh/sh.h (HARD_REGNO_MODE_OK): Delete.
6114         * config/sh/sh-protos.h (sh_hard_regno_mode_ok): Delete.
6115         * config/sh/sh.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6116         (sh_hard_regno_mode_ok): Make static.
6117         * config/sparc/constraints.md: Refer to targetm.hard_regno_mode_ok
6118         instead of HARD_REGNO_MODE_OK.
6119         * config/sparc/sparc.h (hard_regno_mode_classes): Delete.
6120         (sparc_mode_class): Delete.
6121         (HARD_REGNO_MODE_OK): Delete.
6122         * config/sparc/sparc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6123         (hard_regno_mode_classes): Make static.
6124         (sparc_mode_class): Likewise.
6125         (sparc_hard_regno_mode_ok): New function.
6126         * config/spu/spu.h (HARD_REGNO_MODE_OK): Delete.
6127         * config/stormy16/stormy16.h (HARD_REGNO_MODE_OK): Delete.
6128         * config/stormy16/stormy16.c (xstormy16_hard_regno_mode_ok): New
6129         function.
6130         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6131         * config/tilegx/tilegx.h (HARD_REGNO_MODE_OK): Delete.
6132         * config/tilepro/tilepro.h (HARD_REGNO_MODE_OK): Delete.
6133         * config/v850/v850.h (HARD_REGNO_MODE_OK): Delete.
6134         * config/v850/v850.c (v850_hard_regno_mode_ok): New function.
6135         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6136         * config/vax/vax.h (HARD_REGNO_MODE_OK): Delete.
6137         * config/visium/visium.h (HARD_REGNO_MODE_OK): Delete.
6138         * config/visium/visium.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
6139         (visium_hard_regno_mode_ok): New function.
6140         * config/visium/visium.md: Refer to targetm.hard_regno_mode_ok
6141         instead of HARD_REGNO_MODE_OK.
6142         * config/xtensa/xtensa.h (xtensa_hard_regno_mode_ok): Delete.
6143         (HARD_REGNO_MODE_OK): Delete.
6144         * config/xtensa/xtensa.c (xtensa_hard_regno_mode_ok): Rename to...
6145         (xtensa_hard_regno_mode_ok_p): ...this and make static.
6146         (xtensa_option_override): Update accordingly.
6147         (TARGET_HARD_REGNO_MODE_OK): Redefine.
6148         (xtensa_hard_regno_mode_ok): New function.
6149         * system.h (HARD_REGNO_MODE_OK): Poison.
6151 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
6152             Alan Hayward  <alan.hayward@arm.com>
6153             David Sherwood  <david.sherwood@arm.com>
6155         * target.def (hard_regno_call_part_clobbered): New hook.
6156         * doc/tm.texi.in (HARD_REGNO_CALL_PART_CLOBBERED): Replace with...
6157         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): ...this hook.
6158         * doc/tm.texi: Regenerate.
6159         * hooks.h (hook_bool_uint_mode_false): Declare.
6160         * hooks.c (hook_bool_uint_mode_false): New function.
6161         * regs.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6162         * cselib.c (cselib_process_insn): Use
6163         targetm.hard_regno_call_part_clobbered instead of
6164         HARD_REGNO_CALL_PART_CLOBBERED.
6165         * ira-conflicts.c (ira_build_conflicts): Likewise.
6166         * ira-costs.c (ira_tune_allocno_costs): Likewise.
6167         * lra-constraints.c (need_for_call_save_p): Likewise.
6168         * lra-lives.c: Include target.h.
6169         (check_pseudos_live_through_calls): Use
6170         targetm.hard_regno_call_part_clobbered instead of
6171         HARD_REGNO_CALL_PART_CLOBBERED.
6172         * regcprop.c: Include target.h.
6173         (copyprop_hardreg_forward_1): Use
6174         targetm.hard_regno_call_part_clobbered instead of
6175         HARD_REGNO_CALL_PART_CLOBBERED.
6176         * reginfo.c (choose_hard_reg_mode): Likewise.
6177         * regrename.c (check_new_reg_p): Likewise.
6178         * reload.c (find_equiv_reg): Likewise.
6179         * reload1.c (emit_reload_insns): Likewise.
6180         * sched-deps.c (deps_analyze_insn): Likewise.
6181         * sel-sched.c (init_regs_for_mode): Likewise.
6182         (mark_unavailable_hard_regs): Likewise.
6183         * targhooks.c (default_dwarf_frame_reg_mode): Likewise.
6184         * config/aarch64/aarch64.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6185         * config/aarch64/aarch64.c (aarch64_hard_regno_call_part_clobbered):
6186         New function.
6187         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
6188         * config/avr/avr.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6189         * config/avr/avr-protos.h (avr_hard_regno_call_part_clobbered):
6190         Delete.
6191         * config/avr/avr.c (avr_hard_regno_call_part_clobbered): Make static
6192         and return a bool.
6193         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
6194         * config/i386/i386.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6195         * config/i386/i386.c (ix86_hard_regno_call_part_clobbered): New
6196         function.
6197         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
6198         * config/mips/mips.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6199         * config/mips/mips.c (mips_hard_regno_call_part_clobbered): New
6200         function.
6201         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
6202         * config/powerpcspe/powerpcspe.h (HARD_REGNO_CALL_PART_CLOBBERED):
6203         Delete.
6204         * config/powerpcspe/powerpcspe.c
6205         (rs6000_hard_regno_call_part_clobbered): New function.
6206         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
6207         * config/rs6000/rs6000.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6208         * config/rs6000/rs6000.c (rs6000_hard_regno_call_part_clobbered):
6209         New function.
6210         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
6211         * config/s390/s390.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6212         * config/s390/s390.c (s390_hard_regno_call_part_clobbered): New
6213         function.
6214         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
6215         * config/sh/sh.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
6216         * system.h (HARD_REGNO_CALL_PART_CLOBBERED): Poison.
6218 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
6219             Alan Hayward  <alan.hayward@arm.com>
6220             David Sherwood  <david.sherwood@arm.com>
6222         * rtl.h (subreg_memory_offset): Declare.
6223         * emit-rtl.c (subreg_memory_offset): New function.
6224         * expmed.c (store_bit_field_1): Use it.
6225         * expr.c (undefined_operand_subword_p): Likewise.
6226         * simplify-rtx.c (simplify_subreg): Likewise.
6228 2017-09-04  Alexander Monakov  <amonakov@ispras.ru>
6230         PR rtl-optimization/57448
6231         PR target/67458
6232         PR target/81316
6233         * optabs.c (expand_atomic_load): Place compiler memory barriers if
6234         using atomic_load pattern.
6235         (expand_atomic_store): Likewise.
6237 2017-09-04  Jakub Jelinek  <jakub@redhat.com>
6239         PR sanitizer/81981
6240         * gimple-fold.c (gimple_fold_call): Optimize away useless UBSAN_PTR
6241         and UBSAN_BOUNDS internal calls.  Clean up IFN_UBSAN_OBJECT_SIZE
6242         handling.  Use replace_call_with_value with NULL instead of
6243         gsi_replace, unlink_stmt_vdef and release_defs.
6245         * gdbhooks.py (OptMachineModePrinter.to_string): Use 8 spaces
6246         instead of tab.
6248         * lra-remat.c (reg_overlap_for_remat_p): Fix a pasto.
6250 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
6252         PR bootstrap/82045
6253         * rtl.h (emit_library_call_value_1): Declare.
6254         (emit_library_call): Replace declaration with a series of overloads.
6255         Remove the parameter count argument.
6256         (emit_library_call_value): Likewise.
6257         * calls.c (emit_library_call_value_1): Make global.  Replace varargs
6258         with an "rtx_mode_t *".
6259         (emit_library_call_value): Delete.
6260         (emit_library_call): Likewise.
6261         * asan.c (asan_emit_stack_protection): Update calls accordingly.
6262         (asan_emit_allocas_unpoison): Likewise.
6263         * builtins.c (expand_builtin_powi): Likewise.
6264         (expand_asan_emit_allocas_unpoison): Likewise.
6265         * cfgexpand.c (expand_main_function): Likewise.
6266         * config/aarch64/aarch64.c (aarch64_trampoline_init): Likewise.
6267         * config/aarch64/aarch64.h (PROFILE_HOOK): Likewise.
6268         * config/alpha/alpha.c (alpha_trampoline_init): Likewise.
6269         * config/arm/arm.c (arm_trampoline_init): Likewise.
6270         (arm_call_tls_get_addr): Likewise.
6271         (arm_expand_divmod_libfunc): Likewise.
6272         * config/bfin/bfin.md (umulsi3_highpart): Likewise.
6273         (smulsi3_highpart): Likewise.
6274         * config/c6x/c6x.c (c6x_initialize_trampoline): Likewise.
6275         (c6x_expand_compare): Likewise.
6276         (c6x_expand_movmem): Likewise.
6277         * config/frv/frv.c (frv_trampoline_init): Likewise.
6278         * config/i386/i386.c (ix86_trampoline_init): Likewise.
6279         (ix86_expand_divmod_libfunc): Likewise.
6280         * config/ia64/ia64.c (ia64_expand_tls_address): Likewise.
6281         (ia64_expand_compare): Likewise.
6282         (ia64_profile_hook): Likewise.
6283         * config/ia64/ia64.md (save_stack_nonlocal): Likewise.
6284         (nonlocal_goto): Likewise.
6285         (restore_stack_nonlocal): Likewise.
6286         * config/m32r/m32r.c (block_move_call): Likewise.
6287         (m32r_trampoline_init): Likewise.
6288         * config/m68k/linux.h (FINALIZE_TRAMPOLINE): Likewise.
6289         * config/m68k/m68k.c (m68k_call_tls_get_addr): Likewise.
6290         (m68k_call_m68k_read_tp): Likewise.
6291         * config/microblaze/microblaze.c (microblaze_call_tls_get_addr)
6292         (microblaze_expand_divide): Likewise.
6293         * config/mips/mips.h (mips_args): Likewise.
6294         * config/mips/sdemtk.h (mips_sync_icache): Likewise.
6295         (MIPS_ICACHE_SYNC): Likewise.
6296         * config/nios2/nios2.c (nios2_emit_expensive_div): Likewise.
6297         (nios2_trampoline_init): Likewise.
6298         * config/pa/pa.c (hppa_tls_call): Likewise.
6299         (pa_trampoline_init): Likewise.
6300         * config/pa/pa.md (canonicalize_funcptr_for_compare): Likewise.
6301         * config/powerpcspe/powerpcspe.c (rs6000_legitimize_tls_address)
6302         (expand_strn_compare): Likewise.
6303         (rs6000_generate_compare): Likewise.
6304         (rs6000_expand_float128_convert): Likewise.
6305         (output_profile_hook): Likewise.
6306         (rs6000_trampoline_init): Likewise.
6307         * config/powerpcspe/powerpcspe.md (neg<mode>2): Likewise.
6308         * config/riscv/riscv.h (PROFILE_HOOK): Likewise.
6309         * config/rs6000/rs6000-string.c (expand_strn_compare): Likewise.
6310         * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise.
6311         (rs6000_generate_compare): Likewise.
6312         (rs6000_expand_float128_convert): Likewise.
6313         (output_profile_hook): Likewise.
6314         (rs6000_trampoline_init): Likewise.
6315         * config/rs6000/rs6000.md (neg<mode>2): Likewise.
6316         * config/sh/sh.c (sh_trampoline_init): Likewise.
6317         * config/sparc/sparc.c (emit_soft_tfmode_libcall): Likewise.
6318         (sparc_emit_float_lib_cmp): Likewise.
6319         (sparc32_initialize_trampoline): Likewise.
6320         (sparc64_initialize_trampoline): Likewise.
6321         (sparc_profile_hook): Likewise.
6322         * config/spu/spu.c (ea_load_store): Likewise.
6323         * config/spu/spu.md (floatunssidf2): Likewise.
6324         * config/tilegx/tilegx.c (tilegx_trampoline_init): Likewise.
6325         * config/tilepro/tilepro.c (tilepro_trampoline_init): Likewise.
6326         * config/visium/visium.c (expand_block_move_4): Likewise.
6327         (expand_block_move_2): Likewise.
6328         (expand_block_move_1): Likewise.
6329         (expand_block_set_4): Likewise.
6330         (expand_block_set_2): Likewise.
6331         (expand_block_set_1): Likewise.
6332         (visium_trampoline_init): Likewise.
6333         (visium_profile_hook): Likewise.
6334         * config/xtensa/xtensa.c (xtensa_expand_nonlocal_goto): Likewise.
6335         (xtensa_setup_frame_addresses): Likewise.
6336         (xtensa_trampoline_init): Likewise.
6337         * except.c (sjlj_emit_function_enter): Likewise.
6338         (sjlj_emit_function_exit): Likewise.
6339         * explow.c (allocate_dynamic_stack_space): Likewise.
6340         (probe_stack_range): Likewise.
6341         * expr.c (convert_mode_scalar): Likewise.
6342         * optabs.c (expand_binop): Likewise.
6343         (expand_twoval_binop_libfunc): Likewise.
6344         (expand_unop): Likewise.
6345         (prepare_cmp_insn): Likewise.
6346         (prepare_float_lib_cmp): Likewise.
6347         (expand_float): Likewise.
6348         (expand_fix): Likewise.
6349         (expand_fixed_convert): Likewise.
6350         (maybe_emit_sync_lock_test_and_set): Likewise.
6351         (expand_atomic_compare_and_swap): Likewise.
6352         (expand_mem_thread_fence): Likewise.
6353         (expand_atomic_fetch_op): Likewise.
6355 2017-09-03  Gerald Pfeifer  <gerald@pfeifer.com>
6357         * doc/generic.texi (OpenACC): Adjust URL.
6358         * doc/invoke.texi (C Dialect Options): Ditto.
6360 2017-09-03  Uros Bizjak  <ubizjak@gmail.com>
6362         * config/i386/i386.md (*bt<mode>): Use nonimmediate_operand
6363         predicate for operand 1.  Add (m,<S>) constraint.
6364         (*jcc_bt<mode>): Use nonimmediate_operand predicate for operand 1.
6365         Prevent memory operand 1 with register operand 2.
6367 2017-09-01  Segher Boessenkool  <segher@kernel.crashing.org>
6369         PR rtl-optimization/82024
6370         * combine.c (try_combine): If the combination result is a PARALLEL,
6371         and we only need to retain the SET in there that would be placed
6372         at I2, check that we can place that at I3 instead, before doing so.
6374 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
6376         PR target/81766
6377         * config/i386/i386.c (ix86_init_large_pic_reg): Return label
6378         instead of void.
6379         (ix86_init_pic_reg): Remember label from ix86_init_large_pic_reg,
6380         if non-NULL and preceded by NOTE_INSN_BASIC_BLOCK, swap the note
6381         and label.
6383 2017-09-01  Joerg Sonnenberger  <joerg@bec.de>
6384             Jeff Law  <law@redhat.com>
6386         * varasm.c (bss_initializer_p): Do not put constants into .bss
6387         (categorize_decl_for_section): Handle bss_initializer_p returning
6388         false when DECL_INITIAL is NULL.
6390 2017-09-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
6392         PR target/82012
6393         * config/s390/s390.c (s390_can_inline_p): New function.
6395 2017-09-01  Jeff Law  <law@redhat.com>
6397         PR tree-optimization/82052
6398         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
6399         Always initialize the returned slot after a hash table miss
6400         when INSERT is true.
6402 2017-09-01  Alexander Monakov  <amonakov@ispras.ru>
6404         * config/s390/s390.md (mem_signal_fence): Remove.
6405         * doc/md.texi (mem_signal_fence): Remove.
6406         * optabs.c (expand_mem_signal_fence): Remove uses of mem_signal_fence.
6407         Update comments.
6408         * target-insns.def (mem_signal_fence): Remove.
6410 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
6412         PR sanitizer/81902
6413         * doc/invoke.texi: Document -fsanitize=pointer-overflow.
6415         PR sanitizer/81923
6416         * asan.c (create_odr_indicator): Strip name encoding from assembler
6417         name before appending it after __odr_asan_.
6419 2017-09-01  Martin Liska  <mliska@suse.cz>
6421         PR tree-optimization/82059
6422         * gimple-ssa-isolate-paths.c (isolate_path): Add profile and
6423         frequency only when an edge is redirected.
6425 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
6427         * config/arc/arc-c.c (__ARC_LPC_WIDTH__): Add builtin define.
6428         * config/arc/arc.c (ARC_MAX_LOOP_LENGTH): Define.
6429         (arc_conditional_register_usage): Remove ARC600 lp_count
6430         exception.
6431         (arc_file_start): Emit Tag_ARC_CPU_variation.
6432         (arc_can_use_doloop_p): New conditions to use ZOLs.
6433         (hwloop_fail): New function.
6434         (hwloop_optimize): Likewise.
6435         (hwloop_pattern_reg): Likewise.
6436         (arc_doloop_hooks): New struct, to be used with reorg_loops.
6437         (arc_reorg_loops): New function, calls reorg_loops.
6438         (arc_reorg): Call arc_reorg_loops.  Remove old ZOL handling.
6439         (arc600_corereg_hazard): Remove ZOL checking, case handled by
6440         hwloop_optimize.
6441         (arc_loop_hazard): Remove function, functionality moved into
6442         hwloop_optimize.
6443         (arc_hazard): Remove arc_loop_hazard call.
6444         (arc_adjust_insn_length): Remove ZOL handling, functionality moved
6445         into hwloop_optimize.
6446         (arc_label_align): Remove ZOL handling.
6447         * config/arc/arc.h (LOOP_ALIGN): Changed to 0.
6448         * config/arc/arc.md (doloop_begin): Remove pattern.
6449         (doloop_begin_i): Likewise.
6450         (doloop_end_i): Likewise.
6451         (doloop_fallback): Likewise.
6452         (doloop_fallback_m): Likewise.
6453         (doloop_end): Reimplement expand.
6454         (arc_lp): New pattern for LP instruction.
6455         (loop_end): New pattern.
6456         (loop_fail): Likewise.
6457         (decrement_and_branch_until_zero): Likewise.
6458         * config/arc/arc.opt (mlpc-width): New option.
6459         * doc/invoke.texi (mlpc-width): Document option.
6461 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
6463         * config/arc/arc.c (arc_ifcvt): Remove use of merge_blocks call.
6464         (arc_ccfsm_advance): Fix checking for delay slots.
6465         (arc_reorg): Add rtl dump after each call to arc_ifcvt.
6467 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
6469         * config/arc/arc.md (movqi_insn): Add stores to save constant long
6470         immediates.
6471         (movhi_insn): Update store instruction constraint which are saving
6472         6-bit short immediates.
6473         (movsi_insn): Consider also short scaled load operations.
6474         (zero_extendhisi2_i): Use Usd constraint instead of T.
6475         (extendhisi2_i): Add q constraint.
6476         (arc_clzsi2): Add type and length attributes.
6477         (arc_ctzsi2): Likewise.
6478         * config/arc/constraints.md (Usc): Update constraint, the
6479         assembler can parse two relocations for a single instruction.
6481 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
6483         * config/arc/arc.c (arc_use_anchors_for_symbol_p): New function.
6484         (TARGET_USE_ANCHORS_FOR_SYMBOL_P): Define.
6486 2017-08-31  Olivier Hainque  <hainque@adacore.com>
6488         * config.gcc (powerpc-wrs-vxworks|vxworksae|vxworksmils): Now
6489         match as powerpc-wrs-vxworks*.
6491 2017-08-31  James Greenhalgh  <james.greenhalgh@arm.com>
6493         * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): Fix
6494         register constraint for by-element operand.
6495         (aarch64_mls_elt_merge<mode>): Likewise.
6497 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
6499         * config/arc/arc.c (arc_can_follow_jump): Check for short
6500         branches.
6502 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
6504         * config.gcc: Use g.opt for arc.
6505         * config/arc/arc.c (LEGITIMATE_SCALED_ADDRESS_P): Deleted,
6506         functionality moved to ...
6507         (legitimate_scaled_address_p): New function, ...here.
6508         (LEGITIMATE_SMALL_DATA_OFFSET_P): New define.
6509         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Use the above define.
6510         (legitimate_offset_address_p): Delete TARGET_NO_SDATA_SET
6511         condition.
6512         (arc_override_options): Handle G option.
6513         (arc_output_pic_addr_const): Correct function definition.
6514         (arc_legitimate_address_p): Use legitimate_scaled_address_p.
6515         (arc_decl_anon_ns_mem_p): Delete.
6516         (arc_in_small_data_p): Overhaul this function to take into
6517         consideration the value given via G option.
6518         (arc_rewrite_small_data_1): Renamed and corrected old
6519         arc_rewrite_small_data function.
6520         (arc_rewrite_small_data): New function.
6521         (small_data_pattern): Don't use pic_offset_table_rtx.
6522         * config/arc/arc.h (CC1_SPEC): Recognize G option.
6523         * config/arc/simdext.md (movmisalignv2hi): Use
6524         prepare_move_operands function.
6525         (mov*): Likewise.
6526         (movmisalign*): Likewise.
6527         * doc/invoke.texi (ARC options): Document -G option.
6529 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
6531         * config/arc/arc-protos.h (compact_sda_memory_operand): Update
6532         prototype.
6533         * config/arc/arc.c (arc_print_operand): Output scalled address for
6534         sdata whenever is possible.
6535         (arc_in_small_data_p): Allow sdata for 64bit datum when double
6536         load/stores are available.
6537         (compact_sda_memory_operand): Check for the alignment required by
6538         code density instructions.
6539         * config/arc/arc.md (movsi_insn): Use newly introduced Us0
6540         constraint.
6541         * config/arc/constraints.md (Usd): Update constraint.
6542         (Us0): New constraint.
6543         (Usc): Update constraint.
6545 2017-08-31  Richard Biener  <rguenther@suse.de>
6547         PR middle-end/82054
6548         * dwarf2out.c (dwarf2out_early_global_decl): Process each
6549         function only once.
6551 2017-08-31  Tamar Christina  <tamar.christina@arm.com>
6553         * config/aarch64/aarch64-builtins.c (aarch64_init_simd_builtins):
6554         Resize type_signature.
6556 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
6557             Alan Hayward  <alan.hayward@arm.com>
6558             David Sherwood  <david.sherwood@arm.com>
6560         * config/aarch64/aarch64.c (aarch64_base_register_rtx_p): Only allow
6561         subregs whose inner modes can be stored in GPRs.
6562         (aarch64_classify_index): Likewise.
6564 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
6565             Alan Hayward  <alan.hayward@arm.com>
6566             David Sherwood  <david.sherwood@arm.com>
6568         * config/aarch64/iterators.md (V_cmp_result): Rename to...
6569         (V_INT_EQUIV): ...this.
6570         (v_cmp_result): Rename to...
6571         (v_int_equiv): ...this.
6572         * config/aarch64/aarch64.md (xorsign<mode>3): Update accordingly.
6573         * config/aarch64/aarch64-simd.md (xorsign<mode>3): Likewise.
6574         (copysign<mode>3): Likewise.
6575         (aarch64_simd_bsl<mode>_internal): Likewise.
6576         (aarch64_simd_bsl<mode>): Likewise.
6577         (vec_cmp<mode><mode>): Likewise.
6578         (vcond<mode><mode>): Likewise.
6579         (vcond<v_cmp_mixed><mode>): Likewise.
6580         (vcondu<mode><v_cmp_mixed>): Likewise.
6581         (aarch64_cm<optab><mode>): Likewise.
6582         (aarch64_cmtst<mode>): Likewise.
6583         (aarch64_fac<optab><mode>): Likewise.
6584         (vec_perm_const<mode>): Likewise.
6585         (vcond_mask_<mode><v_cmp_result>): Rename to...
6586         (vcond_mask_<mode><v_int_equiv>): ...this.
6587         (vec_cmp<mode><v_cmp_result>): Rename to...
6588         (vec_cmp<mode><v_int_equiv>): ...this.
6590 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
6591             Alan Hayward  <alan.hayward@arm.com>
6592             David Sherwood  <david.sherwood@arm.com>
6594         * config/aarch64/aarch64-modes.def: Remove 32-, 48- and 64-byte
6595         vector modes.
6596         * config/aarch64/iterators.md (VRL2, VRL3, VRL4): Delete.
6597         * config/aarch64/aarch64.md (UNSPEC_LD2_DREG, UNSPEC_LD3_DREG)
6598         (UNSPEC_LD4_DREG): New unspecs.
6599         * config/aarch64/aarch64-simd.md (aarch64_ld2<mode>_dreg_le)
6600         (aarch64_ld2<mode>_dreg_be): Replace with...
6601         (aarch64_ld2<mode>_dreg): ...this pattern and use the new DREG
6602         unspec.
6603         (aarch64_ld3<mode>_dreg_le)
6604         (aarch64_ld3<mode>_dreg_be): Replace with...
6605         (aarch64_ld3<mode>_dreg): ...this pattern and use the new DREG
6606         unspec.
6607         (aarch64_ld4<mode>_dreg_le)
6608         (aarch64_ld4<mode>_dreg_be): Replace with...
6609         (aarch64_ld4<mode>_dreg): ...this pattern and use the new DREG
6610         unspec.
6612 2017-08-30  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
6614         PR tree-optimization/81987
6615         * gimple-ssa-strength-reduction.c (insert_initializers): Don't
6616         insert an initializer in a location not dominated by the stride
6617         definition.
6619 2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>
6621         * tree-eh.c (lower_try_finally_switch): Set the location of the finally
6622         on the entire header of the finally block in the fallthru case.
6624 2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>
6626         * varasm.c (decode_addr_const): Deal with INDIRECT_REF <INTEGER_CST>.
6628 2017-08-30  Pat Haugen  <pthaugen@us.ibm.com>
6630         * config/rs6000/rs6000.c (rs6000_emit_prologue_move_from_cr): Rename from
6631         rs6000_emit_move_from_cr and call renamed function.
6632         (rs6000_emit_prologue): Call renamed functions.
6633         * config/rs6000/rs6000.md (prologue_movesi_from_cr): Rename from
6634         movesi_from_cr, remove volatile CRs.
6636 2017-08-30  Jon Beniston  <jon@beniston.com>
6637             Richard Biener  <rguenther@suse.de>
6639         * tree-vect-patterns.c (vect_pattern_recog_1): Use VECTOR_TYPE_P instead
6640         of VECTOR_MODE_P check.
6641         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Allow single
6642         element vector types.
6644 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6646         * df.h (df_read_modify_subreg_p): Remove in favor of...
6647         * rtl.h (read_modify_subreg_p): ...this new function.  Take a
6648         const_rtx instead of an rtx.
6649         * cprop.c (local_cprop_find_used_regs): Update accordingly.
6650         * df-problems.c (df_word_lr_mark_ref): Likewise.
6651         * ira-lives.c (mark_pseudo_reg_live): Likewise.
6652         (mark_pseudo_reg_dead): Likewise.
6653         (mark_ref_dead): Likewise.
6654         * reginfo.c (init_subregs_of_mode): Likewise.
6655         * sched-deps.c (sched_analyze_1): Likewise.
6656         * df-scan.c (df_def_record_1): Likewise.
6657         (df_uses_record): Likewise.
6658         (df_read_modify_subreg_p): Remove in favor of...
6659         * rtlanal.c (read_modify_subreg_p): ...this new function.  Take a
6660         const_rtx instead of an rtx.
6662 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6663             Alan Hayward  <alan.hayward@arm.com>
6664             David Sherwood  <david.sherwood@arm.com>
6666         * rtl.h (partial_subreg_p): New function.
6667         * caller-save.c (save_call_clobbered_regs): Use it.
6668         * calls.c (expand_call): Likewise.
6669         * combine.c (combinable_i3pat): Likewise.
6670         (simplify_set): Likewise.
6671         (make_extraction): Likewise.
6672         (make_compound_operation_int): Likewise.
6673         (gen_lowpart_or_truncate): Likewise.
6674         (force_to_mode): Likewise.
6675         (make_field_assignment): Likewise.
6676         (reg_truncated_to_mode): Likewise.
6677         (record_truncated_value): Likewise.
6678         (move_deaths): Likewise.
6679         * cse.c (record_jump_cond): Likewise.
6680         (cse_insn): Likewise.
6681         * cselib.c (cselib_lookup_1): Likewise.
6682         * expmed.c (extract_bit_field_using_extv): Likewise.
6683         * function.c (assign_parm_setup_reg): Likewise.
6684         * ifcvt.c (noce_convert_multiple_sets): Likewise.
6685         * ira-build.c (create_insn_allocnos): Likewise.
6686         * lra-coalesce.c (merge_pseudos): Likewise.
6687         * lra-constraints.c (match_reload): Likewise.
6688         (simplify_operand_subreg): Likewise.
6689         (curr_insn_transform): Likewise.
6690         * lra-lives.c (process_bb_lives): Likewise.
6691         * lra.c (new_insn_reg): Likewise.
6692         (lra_substitute_pseudo): Likewise.
6693         * regcprop.c (mode_change_ok): Likewise.
6694         (maybe_mode_change): Likewise.
6695         (copyprop_hardreg_forward_1): Likewise.
6696         * reload.c (push_reload): Likewise.
6697         (find_reloads): Likewise.
6698         (find_reloads_subreg_address): Likewise.
6699         * reload1.c (alter_reg): Likewise.
6700         (eliminate_regs_1): Likewise.
6701         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
6703 2017-08-30  David Edelsohn  <dje.gcc@gmail.com>
6705         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Revert
6706         back to if statements, including unpack.
6708 2017-08-30  Martin Liska  <mliska@suse.cz>
6710         PR inline-asm/82001
6711         * ipa-icf-gimple.c (func_checker::compare_tree_list_operand):
6712         Rename to ...
6713         (func_checker::compare_asm_inputs_outputs): ... this function.
6714         (func_checker::compare_gimple_asm): Use the function to compare
6715         also ASM constrains.
6716         * ipa-icf-gimple.h: Rename the function.
6718 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6719             Alan Hayward  <alan.hayward@arm.com>
6720             David Sherwood  <david.sherwood@arm.com>
6722         * coretypes.h (complex_mode): New type.
6723         * gdbhooks.py (build_pretty_printer): Handle it.
6724         * machmode.h (complex_mode): New class.
6725         (complex_mode::includes_p): New function.
6726         (is_complex_int_mode): Likewise.
6727         (is_complex_float_mode): Likewise.
6728         * genmodes.c (get_mode_class): Handle complex mode classes.
6729         * function.c (expand_function_end): Use is_complex_int_mode.
6731 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6732             Alan Hayward  <alan.hayward@arm.com>
6733             David Sherwood  <david.sherwood@arm.com>
6735         * coretypes.h (scalar_mode_pod): New typedef.
6736         * gdbhooks.py (build_pretty_printer): Handle it.
6737         * machmode.h (gt_ggc_mx, gt_pch_nx): New functions.
6738         * fixed-value.h (fixed_value::mode): Change type to scalar_mode_pod.
6739         * fold-const.c (fold_convert_const_int_from_fixed): Use scalar_mode.
6740         * tree-streamer-in.c (unpack_ts_fixed_cst_value_fields): Use
6741         as_a <scalar_mode>.
6743 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6744             Alan Hayward  <alan.hayward@arm.com>
6745             David Sherwood  <david.sherwood@arm.com>
6747         * machmode.h (mode_for_vector): Take a scalar_mode instead
6748         of a machine_mode.
6749         * stor-layout.c (mode_for_vector): Likewise.
6750         * explow.c (promote_mode): Use as_a <scalar_mode>.
6751         * sdbout.c (sdbout_parms): Use is_a <scalar_mode>.
6753 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6754             Alan Hayward  <alan.hayward@arm.com>
6755             David Sherwood  <david.sherwood@arm.com>
6757         * target.def (preferred_simd_mode): Take a scalar_mode
6758         instead of a machine_mode.
6759         * targhooks.h (default_preferred_simd_mode): Likewise.
6760         * targhooks.c (default_preferred_simd_mode): Likewise.
6761         * config/arc/arc.c (arc_preferred_simd_mode): Likewise.
6762         * config/arm/arm.c (arm_preferred_simd_mode): Likewise.
6763         * config/c6x/c6x.c (c6x_preferred_simd_mode): Likewise.
6764         * config/epiphany/epiphany.c (epiphany_preferred_simd_mode): Likewise.
6765         * config/i386/i386.c (ix86_preferred_simd_mode): Likewise.
6766         * config/mips/mips.c (mips_preferred_simd_mode): Likewise.
6767         * config/nvptx/nvptx.c (nvptx_preferred_simd_mode): Likewise.
6768         * config/powerpcspe/powerpcspe.c (rs6000_preferred_simd_mode):
6769         Likewise.
6770         * config/rs6000/rs6000.c (rs6000_preferred_simd_mode): Likewise.
6771         * config/s390/s390.c (s390_preferred_simd_mode): Likewise.
6772         * config/sparc/sparc.c (sparc_preferred_simd_mode): Likewise.
6773         * config/aarch64/aarch64.c (aarch64_preferred_simd_mode): Likewise.
6774         (aarch64_simd_scalar_immediate_valid_for_move): Update accordingly.
6775         * doc/tm.texi: Regenerate.
6776         * optabs-query.c (can_vec_mask_load_store_p): Return false for
6777         non-scalar modes.
6779 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6780             Alan Hayward  <alan.hayward@arm.com>
6781             David Sherwood  <david.sherwood@arm.com>
6783         * target.def (scalar_mode_supported_p): Take a scalar_mode
6784         instead of a machine_mode.
6785         * targhooks.h (default_scalar_mode_supported_p): Likewise.
6786         * targhooks.c (default_scalar_mode_supported_p): Likewise.
6787         * config/aarch64/aarch64.c (aarch64_scalar_mode_supported_p): Likewise.
6788         * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
6789         * config/arm/arm.c (arm_scalar_mode_supported_p): Likewise.
6790         * config/avr/avr.c (avr_scalar_mode_supported_p): Likewise.
6791         * config/c6x/c6x.c (c6x_scalar_mode_supported_p): Likewise.
6792         * config/i386/i386.c (ix86_scalar_mode_supported_p): Likewise.
6793         * config/ia64/ia64.c (ia64_scalar_mode_supported_p): Likewise.
6794         * config/mips/mips.c (mips_scalar_mode_supported_p): Likewise.
6795         * config/msp430/msp430.c (msp430_scalar_mode_supported_p): Likewise.
6796         * config/pa/pa.c (pa_scalar_mode_supported_p): Likewise.
6797         * config/pdp11/pdp11.c (pdp11_scalar_mode_supported_p): Likewise.
6798         * config/powerpcspe/powerpcspe.c (rs6000_scalar_mode_supported_p):
6799         Likewise.
6800         * config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): Likewise.
6801         * config/s390/s390.c (s390_scalar_mode_supported_p): Likewise.
6802         * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
6803         * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
6804         * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p):
6805         Likewise.
6806         * doc/tm.texi: Regenerate.
6808 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6809             Alan Hayward  <alan.hayward@arm.com>
6810             David Sherwood  <david.sherwood@arm.com>
6812         * coretypes.h (opt_scalar_mode): New typedef.
6813         * gdbhooks.py (build_pretty_printers): Handle it.
6814         * machmode.h (mode_iterator::get_2xwider): Add overload for
6815         opt_mode<T>.
6816         * emit-rtl.c (init_emit_once): Use opt_scalar_mode when iterating
6817         over scalar modes.
6818         * expr.c (convert_mode_scalar): Likewise.
6819         * omp-low.c (omp_clause_aligned_alignment): Likewise.
6820         * optabs.c (expand_float): Likewise.
6821         (expand_fix): Likewise.
6822         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
6824 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6825             Alan Hayward  <alan.hayward@arm.com>
6826             David Sherwood  <david.sherwood@arm.com>
6828         * optabs.c (expand_float): Explicitly check for scalars before
6829         using a branching expansion.
6830         (expand_fix): Likewise.
6832 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6833             Alan Hayward  <alan.hayward@arm.com>
6834             David Sherwood  <david.sherwood@arm.com>
6836         * expr.c (convert_mode): Split scalar handling out into...
6837         (convert_mode_scalar): ...this new function.  Treat the modes
6838         as scalar_modes.
6840 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6841             Alan Hayward  <alan.hayward@arm.com>
6842             David Sherwood  <david.sherwood@arm.com>
6844         * omp-expand.c (expand_omp_atomic): Use is_int_mode, is_float_mode
6845         and scalar_mode.
6846         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Likewise.
6848 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6849             Alan Hayward  <alan.hayward@arm.com>
6850             David Sherwood  <david.sherwood@arm.com>
6852         * fixed-value.h (fixed_from_double_int): Take a scalar_mode
6853         rather than a machine_mode.
6854         (fixed_from_string): Likewise.
6855         (fixed_convert): Likewise.
6856         (fixed_convert_from_int): Likewise.
6857         (fixed_convert_from_real): Likewise.
6858         (real_convert_from_fixed): Likewise.
6859         * fixed-value.c (fixed_from_double_int): Likewise.
6860         (fixed_from_string): Likewise.
6861         (fixed_convert): Likewise.
6862         (fixed_convert_from_int): Likewise.
6863         (fixed_convert_from_real): Likewise.
6864         (real_convert_from_fixed): Likewise.
6865         * config/avr/avr.c (avr_out_round): Use as_a <scalar_mode>.
6867 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6868             Alan Hayward  <alan.hayward@arm.com>
6869             David Sherwood  <david.sherwood@arm.com>
6871         * emit-rtl.c (immed_double_const): Use is_a <scalar_mode> instead
6872         of separate mode class checks.  Do not allow vector modes here.
6873         (immed_wide_int_const): Use as_a <scalar_mode>.
6874         * explow.c (trunc_int_for_mode): Likewise.
6875         * rtl.h (wi::int_traits<rtx_mode_t>::get_precision): Likewise.
6876         (wi::shwi): Likewise.
6877         (wi::min_value): Likewise.
6878         (wi::max_value): Likewise.
6879         * dwarf2out.c (loc_descriptor): Likewise.
6880         * simplify-rtx.c (simplify_immed_subreg): Fix rtx_mode_t argument
6881         for CONST_WIDE_INT.
6883 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6884             Alan Hayward  <alan.hayward@arm.com>
6885             David Sherwood  <david.sherwood@arm.com>
6887         * tree.h (SCALAR_TYPE_MODE): New macro.
6888         * expr.c (expand_expr_addr_expr_1): Use it.
6889         (expand_expr_real_2): Likewise.
6890         * fold-const.c (fold_convert_const_fixed_from_fixed): Likeise.
6891         (fold_convert_const_fixed_from_int): Likewise.
6892         (fold_convert_const_fixed_from_real): Likewise.
6893         (native_encode_fixed): Likewise
6894         (native_encode_complex): Likewise
6895         (native_encode_vector): Likewise.
6896         (native_interpret_fixed): Likewise.
6897         (native_interpret_real): Likewise.
6898         (native_interpret_complex): Likewise.
6899         (native_interpret_vector): Likewise.
6900         * omp-simd-clone.c (simd_clone_adjust_return_type): Likewise.
6901         (simd_clone_adjust_argument_types): Likewise.
6902         (simd_clone_init_simd_arrays): Likewise.
6903         (simd_clone_adjust): Likewise.
6904         * stor-layout.c (layout_type): Likewise.
6905         * tree.c (build_minus_one_cst): Likewise.
6906         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
6907         * tree-inline.c (estimate_move_cost): Likewise.
6908         * tree-ssa-math-opts.c (convert_plusminus_to_widen): Likewise.
6909         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise.
6910         (vectorizable_reduction): Likewise.
6911         * tree-vect-patterns.c (vect_recog_widen_mult_pattern): Likewise.
6912         (vect_recog_mixed_size_cond_pattern): Likewise.
6913         (check_bool_pattern): Likewise.
6914         (adjust_bool_pattern): Likewise.
6915         (search_type_for_mask_1): Likewise.
6916         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
6917         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
6918         (vectorizable_load): Likewise.
6919         (vectorizable_store): Likewise.
6920         * ubsan.c (ubsan_encode_value): Likewise.
6921         * varasm.c (output_constant): Likewise.
6923 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6924             Alan Hayward  <alan.hayward@arm.com>
6925             David Sherwood  <david.sherwood@arm.com>
6927         * coretypes.h (scalar_mode): New class.
6928         * machmode.h (scalar_mode): Likewise.
6929         (scalar_mode::includes_p): New function.
6930         (mode_to_inner): Return a scalar_mode rather than a machine_mode.
6931         * gdbhooks.py (build_pretty_printers): Handle scalar_mode.
6932         * genmodes.c (get_mode_class): Handle remaining scalar modes.
6933         * cfgexpand.c (expand_debug_expr): Use scalar_mode.
6934         * expmed.c (store_bit_field_1): Likewise.
6935         (extract_bit_field_1): Likewise.
6936         * expr.c (write_complex_part): Likewise.
6937         (read_complex_part): Likewise.
6938         (emit_move_complex_push): Likewise.
6939         (expand_expr_real_2): Likewise.
6940         * function.c (assign_parm_setup_reg): Likewise.
6941         (assign_parms_unsplit_complex): Likewise.
6942         * optabs.c (expand_binop): Likewise.
6943         * rtlanal.c (subreg_get_info): Likewise.
6944         * simplify-rtx.c (simplify_immed_subreg): Likewise.
6945         * varasm.c (output_constant_pool_2): Likewise.
6947 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6948             Alan Hayward  <alan.hayward@arm.com>
6949             David Sherwood  <david.sherwood@arm.com>
6951         * expmed.c (extract_high_half): Use scalar_int_mode and remove
6952         assertion.
6953         (expmed_mult_highpart_optab): Likewise.
6954         (expmed_mult_highpart): Likewise.
6956 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
6957             Alan Hayward  <alan.hayward@arm.com>
6958             David Sherwood  <david.sherwood@arm.com>
6960         * builtins.h (builtin_strncpy_read_str): Take a scalar_int_mode
6961         instead of a machine_mode.
6962         (builtin_memset_read_str): Likewise.
6963         * builtins.c (c_readstr): Likewise.
6964         (builtin_memcpy_read_str): Likewise.
6965         (builtin_strncpy_read_str): Likewise.
6966         (builtin_memset_read_str): Likewise.
6967         (builtin_memset_gen_str): Likewise.
6968         (expand_builtin_signbit): Use scalar_int_mode for local variables.
6969         * cfgexpand.c (convert_debug_memory_address): Take a scalar_int_mode
6970         instead of a machine_mode.
6971         * combine.c (simplify_if_then_else): Use scalar_int_mode for local
6972         variables.
6973         (make_extraction): Likewise.
6974         (try_widen_shift_mode): Take and return scalar_int_modes instead
6975         of machine_modes.
6976         * config/aarch64/aarch64.c (aarch64_libgcc_cmp_return_mode): Return
6977         a scalar_int_mode instead of a machine_mode.
6978         * config/avr/avr.c (avr_addr_space_address_mode): Likewise.
6979         (avr_addr_space_pointer_mode): Likewise.
6980         * config/cr16/cr16.c (cr16_unwind_word_mode): Likewise.
6981         * config/msp430/msp430.c (msp430_addr_space_pointer_mode): Likewise.
6982         (msp430_unwind_word_mode): Likewise.
6983         * config/spu/spu.c (spu_unwind_word_mode): Likewise.
6984         (spu_addr_space_pointer_mode): Likewise.
6985         (spu_addr_space_address_mode): Likewise.
6986         (spu_libgcc_cmp_return_mode): Likewise.
6987         (spu_libgcc_shift_count_mode): Likewise.
6988         * config/rl78/rl78.c (rl78_addr_space_address_mode): Likewise.
6989         (rl78_addr_space_pointer_mode): Likewise.
6990         (fl78_unwind_word_mode): Likewise.
6991         (rl78_valid_pointer_mode): Take a scalar_int_mode instead of a
6992         machine_mode.
6993         * config/alpha/alpha.c (vms_valid_pointer_mode): Likewise.
6994         * config/ia64/ia64.c (ia64_vms_valid_pointer_mode): Likewise.
6995         * config/mips/mips.c (mips_mode_rep_extended): Likewise.
6996         (mips_valid_pointer_mode): Likewise.
6997         * config/tilegx/tilegx.c (tilegx_mode_rep_extended): Likewise.
6998         * config/ft32/ft32.c (ft32_valid_pointer_mode): Likewise.
6999         (ft32_addr_space_pointer_mode): Return a scalar_int_mode instead
7000         of a machine_mode.
7001         (ft32_addr_space_address_mode): Likewise.
7002         * config/m32c/m32c.c (m32c_valid_pointer_mode): Take a
7003         scalar_int_mode instead of a machine_mode.
7004         (m32c_addr_space_pointer_mode): Return a scalar_int_mode instead
7005         of a machine_mode.
7006         (m32c_addr_space_address_mode): Likewise.
7007         * config/powerpcspe/powerpcspe.c (rs6000_abi_word_mode): Likewise.
7008         (rs6000_eh_return_filter_mode): Likewise.
7009         * config/rs6000/rs6000.c (rs6000_abi_word_mode): Likewise.
7010         (rs6000_eh_return_filter_mode): Likewise.
7011         * config/s390/s390.c (s390_libgcc_cmp_return_mode): Likewise.
7012         (s390_libgcc_shift_count_mode): Likewise.
7013         (s390_unwind_word_mode): Likewise.
7014         (s390_valid_pointer_mode): Take a scalar_int_mode rather than a
7015         machine_mode.
7016         * target.def (mode_rep_extended): Likewise.
7017         (valid_pointer_mode): Likewise.
7018         (addr_space.valid_pointer_mode): Likewise.
7019         (eh_return_filter_mode): Return a scalar_int_mode rather than
7020         a machine_mode.
7021         (libgcc_cmp_return_mode): Likewise.
7022         (libgcc_shift_count_mode): Likewise.
7023         (unwind_word_mode): Likewise.
7024         (addr_space.pointer_mode): Likewise.
7025         (addr_space.address_mode): Likewise.
7026         * doc/tm.texi: Regenerate.
7027         * dojump.c (prefer_and_bit_test): Take a scalar_int_mode rather than
7028         a machine_mode.
7029         (do_jump): Use scalar_int_mode for local variables.
7030         * dwarf2cfi.c (init_return_column_size): Take a scalar_int_mode
7031         rather than a machine_mode.
7032         * dwarf2out.c (convert_descriptor_to_mode): Likewise.
7033         (scompare_loc_descriptor_wide): Likewise.
7034         (scompare_loc_descriptor_narrow): Likewise.
7035         * emit-rtl.c (adjust_address_1): Use scalar_int_mode for local
7036         variables.
7037         * except.c (sjlj_emit_dispatch_table): Likewise.
7038         (expand_builtin_eh_copy_values): Likewise.
7039         * explow.c (convert_memory_address_addr_space_1): Likewise.
7040         Take a scalar_int_mode rather than a machine_mode.
7041         (convert_memory_address_addr_space): Take a scalar_int_mode rather
7042         than a machine_mode.
7043         (memory_address_addr_space): Use scalar_int_mode for local variables.
7044         * expmed.h (expand_mult_highpart_adjust): Take a scalar_int_mode
7045         rather than a machine_mode.
7046         * expmed.c (mask_rtx): Likewise.
7047         (init_expmed_one_conv): Likewise.
7048         (expand_mult_highpart_adjust): Likewise.
7049         (extract_high_half): Likewise.
7050         (expmed_mult_highpart_optab): Likewise.
7051         (expmed_mult_highpart): Likewise.
7052         (expand_smod_pow2): Likewise.
7053         (expand_sdiv_pow2): Likewise.
7054         (emit_store_flag_int): Likewise.
7055         (adjust_bit_field_mem_for_reg): Use scalar_int_mode for local
7056         variables.
7057         (extract_low_bits): Likewise.
7058         * expr.h (by_pieces_constfn): Take a scalar_int_mode rather than
7059         a machine_mode.
7060         * expr.c (pieces_addr::adjust):  Likewise.
7061         (can_store_by_pieces): Likewise.
7062         (store_by_pieces): Likewise.
7063         (clear_by_pieces_1): Likewise.
7064         (expand_expr_addr_expr_1): Likewise.
7065         (expand_expr_addr_expr): Use scalar_int_mode for local variables.
7066         (expand_expr_real_1): Likewise.
7067         (try_casesi): Likewise.
7068         * final.c (shorten_branches): Likewise.
7069         * fold-const.c (fold_convert_const_int_from_fixed): Change the
7070         type of "mode" to machine_mode.
7071         * internal-fn.c (expand_arith_overflow_result_store): Take a
7072         scalar_int_mode rather than a machine_mode.
7073         (expand_mul_overflow): Use scalar_int_mode for local variables.
7074         * loop-doloop.c (doloop_modify): Likewise.
7075         (doloop_optimize): Likewise.
7076         * optabs.c (expand_subword_shift): Take a scalar_int_mode rather
7077         than a machine_mode.
7078         (expand_doubleword_shift_condmove): Likewise.
7079         (expand_doubleword_shift): Likewise.
7080         (expand_doubleword_clz): Likewise.
7081         (expand_doubleword_popcount): Likewise.
7082         (expand_doubleword_parity): Likewise.
7083         (expand_absneg_bit): Use scalar_int_mode for local variables.
7084         (prepare_float_lib_cmp): Likewise.
7085         * rtl.h (convert_memory_address_addr_space_1): Take a scalar_int_mode
7086         rather than a machine_mode.
7087         (convert_memory_address_addr_space): Likewise.
7088         (get_mode_bounds): Likewise.
7089         (get_address_mode): Return a scalar_int_mode rather than a
7090         machine_mode.
7091         * rtlanal.c (get_address_mode): Likewise.
7092         * stor-layout.c (get_mode_bounds): Take a scalar_int_mode rather
7093         than a machine_mode.
7094         * targhooks.c (default_mode_rep_extended): Likewise.
7095         (default_valid_pointer_mode): Likewise.
7096         (default_addr_space_valid_pointer_mode): Likewise.
7097         (default_eh_return_filter_mode): Return a scalar_int_mode rather
7098         than a machine_mode.
7099         (default_libgcc_cmp_return_mode): Likewise.
7100         (default_libgcc_shift_count_mode): Likewise.
7101         (default_unwind_word_mode): Likewise.
7102         (default_addr_space_pointer_mode): Likewise.
7103         (default_addr_space_address_mode): Likewise.
7104         * targhooks.h (default_eh_return_filter_mode): Likewise.
7105         (default_libgcc_cmp_return_mode): Likewise.
7106         (default_libgcc_shift_count_mode): Likewise.
7107         (default_unwind_word_mode): Likewise.
7108         (default_addr_space_pointer_mode): Likewise.
7109         (default_addr_space_address_mode): Likewise.
7110         (default_mode_rep_extended): Take a scalar_int_mode rather than
7111         a machine_mode.
7112         (default_valid_pointer_mode): Likewise.
7113         (default_addr_space_valid_pointer_mode): Likewise.
7114         * tree-ssa-address.c (addr_for_mem_ref): Use scalar_int_mode for
7115         local variables.
7116         * tree-ssa-loop-ivopts.c (get_shiftadd_cost): Take a scalar_int_mode
7117         rather than a machine_mode.
7118         * tree-switch-conversion.c (array_value_type): Use scalar_int_mode
7119         for local variables.
7120         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
7121         * var-tracking.c (use_narrower_mode): Take a scalar_int_mode rather
7122         than a machine_mode.
7124 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7125             Alan Hayward  <alan.hayward@arm.com>
7126             David Sherwood  <david.sherwood@arm.com>
7128         * dojump.c (do_jump_by_parts_greater_rtx): Change the type of
7129         the mode argument to scalar_int_mode.
7130         (do_jump_by_parts_zero_rtx): Likewise.
7131         (do_jump_by_parts_equality_rtx): Likewise.
7132         (do_jump_by_parts_greater): Take a mode argument.
7133         (do_jump_by_parts_equality): Likewise.
7134         (do_jump_1): Update calls accordingly.
7136 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7137             Alan Hayward  <alan.hayward@arm.com>
7138             David Sherwood  <david.sherwood@arm.com>
7140         * is-a.h (safe_dyn_cast): New function.
7141         * rtl.h (rtx_jump_table_data::get_data_mode): New function.
7142         (jump_table_for_label): Likewise.
7143         * final.c (final_addr_vec_align): Take an rtx_jump_table_data *
7144         instead of an rtx_insn *.
7145         (shorten_branches): Use dyn_cast instead of LABEL_P and
7146         JUMP_TABLE_DATA_P.  Use jump_table_for_label and
7147         rtx_jump_table_data::get_data_mode.
7148         (final_scan_insn): Likewise.
7150 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7151             Alan Hayward  <alan.hayward@arm.com>
7152             David Sherwood  <david.sherwood@arm.com>
7154         * combine.c (try_combine): Use is_a <scalar_int_mode> when
7155         trying to combine a full-register integer set with a subreg
7156         integer set.
7158 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7159             Alan Hayward  <alan.hayward@arm.com>
7160             David Sherwood  <david.sherwood@arm.com>
7162         * expr.c (expand_expr_addr_expr): Add a new_tmode local variable
7163         that is always either address_mode or pointer_mode.
7165 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7166             Alan Hayward  <alan.hayward@arm.com>
7167             David Sherwood  <david.sherwood@arm.com>
7169         * expr.c (expand_expr_real_2): Use word_mode instead of innermode
7170         when the two are known to be equal.
7172 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7173             Alan Hayward  <alan.hayward@arm.com>
7174             David Sherwood  <david.sherwood@arm.com>
7176         * simplify-rtx.c (simplify_const_unary_operation): Use
7177         is_a <scalar_int_mode> instead of checking for a nonzero
7178         precision.  Forcibly convert op_mode to a scalar_int_mode
7179         in that case.  More clearly differentiate the operand and
7180         result modes and use the former when deciding what the value
7181         of a count-bits operation should be.  Use is_int_mode instead
7182         of checking for a MODE_INT.  Remove redundant check for whether
7183         this mode has a zero precision.
7185 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7186             Alan Hayward  <alan.hayward@arm.com>
7187             David Sherwood  <david.sherwood@arm.com>
7189         * optabs.c (widen_leading): Change the type of the mode argument
7190         to scalar_int_mode.  Use opt_scalar_int_mode for the mode iterator.
7191         (widen_bswap): Likewise.
7192         (expand_parity): Likewise.
7193         (expand_ctz): Change the type of the mode argument to scalar_int_mode.
7194         (expand_ffs): Likewise.
7195         (epand_unop): Check for scalar integer modes before calling the
7196         above routines.
7198 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7199             Alan Hayward  <alan.hayward@arm.com>
7200             David Sherwood  <david.sherwood@arm.com>
7202         * expr.c (const_scalar_mask_from_tree): Add a mode argument.
7203         Expand commentary.
7204         (expand_expr_real_1): Update call accordingly.
7206 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7207             Alan Hayward  <alan.hayward@arm.com>
7208             David Sherwood  <david.sherwood@arm.com>
7210         * expmed.c (store_bit_field_using_insv): Add op0_mode and
7211         value_mode arguments.  Use scalar_int_mode internally.
7212         (store_bit_field_1): Rename the new integer mode from imode
7213         to op0_mode and use it instead of GET_MODE (op0).  Update calls
7214         to store_split_bit_field, store_bit_field_using_insv and
7215         store_fixed_bit_field.
7216         (store_fixed_bit_field): Add op0_mode and value_mode arguments.
7217         Use scalar_int_mode internally.  Use a bit count rather than a mode
7218         when calculating the largest bit size for get_best_mode.
7219         Update calls to store_split_bit_field and store_fixed_bit_field_1.
7220         (store_fixed_bit_field_1): Add mode and value_mode arguments.
7221         Remove assertion that OP0 has a scalar integer mode.
7222         (store_split_bit_field): Add op0_mode and value_mode arguments.
7223         Update calls to extract_fixed_bit_field.
7224         (extract_bit_field_using_extv): Add an op0_mode argument.
7225         Use scalar_int_mode internally.
7226         (extract_bit_field_1): Rename the new integer mode from imode to
7227         op0_mode and use it instead of GET_MODE (op0).  Update calls to
7228         extract_split_bit_field, extract_bit_field_using_extv and
7229         extract_fixed_bit_field.
7230         (extract_fixed_bit_field): Add an op0_mode argument.  Update calls
7231         to extract_split_bit_field and extract_fixed_bit_field_1.
7232         (extract_fixed_bit_field_1): Add a mode argument.  Remove assertion
7233         that OP0 has a scalar integer mode.  Use as_a <scalar_int_mode>
7234         on the target mode.
7235         (extract_split_bit_field): Add an op0_mode argument.  Update call
7236         to extract_fixed_bit_field.
7238 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7239             Alan Hayward  <alan.hayward@arm.com>
7240             David Sherwood  <david.sherwood@arm.com>
7242         * cse.c (cse_insn): Use opt_scalar_int_mode for the mode iterator.
7243         * explow.c (hard_function_value): Likewise.
7244         * expmed.c (extract_fixed_bit_field_1): Likewise.  Move the
7245         convert_to_mode call outside the loop.
7246         * expr.c (alignment_for_piecewise_move): Use opt_scalar_int_mode
7247         for the mode iterator.  Require the mode specified by max_pieces
7248         to exist.
7249         (emit_block_move_via_movmem): Use opt_scalar_int_mode for the
7250         mode iterator.
7251         (copy_blkmode_to_reg): Likewise.
7252         (set_storage_via_setmem): Likewise.
7253         * optabs.c (prepare_cmp_insn): Likewise.
7254         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
7255         * stor-layout.c (finish_bitfield_representative): Likewise.
7257 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7258             Alan Hayward  <alan.hayward@arm.com>
7259             David Sherwood  <david.sherwood@arm.com>
7261         * rtl.h (subreg_unpromoted_mode, subreg_promoted_mode): New functions.
7262         * expr.c (convert_move): Use them.
7263         (convert_modes): Likewise.
7264         (store_expr_with_bounds): Likewise.
7266 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7267             Alan Hayward  <alan.hayward@arm.com>
7268             David Sherwood  <david.sherwood@arm.com>
7270         * rtl.h (rtl_hooks::reg_nonzero_bits): Add a scalar_int_mode
7271         parameter for the mode of "x".  Remove the "known_x", "known_mode"
7272         and "known_ret" arguments.  Change the type of the mode argument
7273         to scalar_int_mode.
7274         (rtl_hooks:reg_num_sign_bit_copies): Likewise.
7275         * combine.c (reg_nonzero_bits_for_combine): Update accordingly.
7276         (reg_num_sign_bit_copies_for_combine): Likewise.
7277         * rtlanal.c (nonzero_bits1): Likewise.
7278         (num_sign_bit_copies1): Likewise.
7279         * rtlhooks-def.h (reg_nonzero_bits_general): Likewise.
7280         (reg_num_sign_bit_copies_general): Likewise.
7281         * rtlhooks.c (reg_num_sign_bit_copies_general): Likewise.
7282         (reg_nonzero_bits_general): Likewise.
7284 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7285             Alan Hayward  <alan.hayward@arm.com>
7286             David Sherwood  <david.sherwood@arm.com>
7288         * rtlanal.c (num_sign_bit_copies): Handle VOIDmode here rather
7289         than in subroutines.  Return 1 for non-integer modes.
7290         (cached_num_sign_bit_copies): Change the type of the mode parameter
7291         to scalar_int_mode.
7292         (num_sign_bit_copies1): Likewise.  Remove early exit for other mode
7293         classes.  Handle CONST_INT_P first and then check whether X also
7294         has a scalar integer mode.  Check the same thing for inner registers
7295         of a SUBREG and for values that are being extended or truncated.
7297 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7298             Alan Hayward  <alan.hayward@arm.com>
7299             David Sherwood  <david.sherwood@arm.com>
7301         * rtlanal.c (nonzero_bits): Handle VOIDmode here rather than
7302         in subroutines.  Return the mode mask for non-integer modes.
7303         (cached_nonzero_bits): Change the type of the mode parameter
7304         to scalar_int_mode.
7305         (nonzero_bits1): Likewise.  Remove early exit for other mode
7306         classes.  Handle CONST_INT_P first and then check whether X
7307         also has a scalar integer mode.
7309 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7310             Alan Hayward  <alan.hayward@arm.com>
7311             David Sherwood  <david.sherwood@arm.com>
7313         * expr.c (widest_int_mode_for_size): Make the comment match the code.
7314         Return a scalar_int_mode and assert that the size is greater than
7315         one byte.
7316         (by_pieces_ninsns): Update accordingly and remove VOIDmode handling.
7317         (op_by_pieces_d::op_by_pieces_d): Likewise.
7318         (op_by_pieces_d::run): Likewise.
7319         (can_store_by_pieces): Likewise.
7321 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7322             Alan Hayward  <alan.hayward@arm.com>
7323             David Sherwood  <david.sherwood@arm.com>
7325         * combine.c (extract_left_shift): Add a mode argument and update
7326         recursive calls.
7327         (make_compound_operation_int): Change the type of the mode parameter
7328         to scalar_int_mode and update the call to extract_left_shift.
7330 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7331             Alan Hayward  <alan.hayward@arm.com>
7332             David Sherwood  <david.sherwood@arm.com>
7334         * combine.c (simplify_and_const_int): Change the type of the mode
7335         parameter to scalar_int_mode.
7336         (simplify_and_const_int_1): Likewise.  Update recursive call.
7338 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7339             Alan Hayward  <alan.hayward@arm.com>
7340             David Sherwood  <david.sherwood@arm.com>
7342         * combine.c (simplify_compare_const): Check that the mode is a
7343         scalar_int_mode (rather than VOIDmode) before testing its
7344         precision.
7345         (simplify_comparison): Move COMPARISON_P handling out of the
7346         loop and restrict the latter part of the loop to scalar_int_modes.
7347         Check is_a <scalar_int_mode> before calling HWI_COMPUTABLE_MODE_P
7348         and when considering SUBREG_REGs.  Use is_int_mode instead of
7349         checking GET_MODE_CLASS against MODE_INT.
7351 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7352             Alan Hayward  <alan.hayward@arm.com>
7353             David Sherwood  <david.sherwood@arm.com>
7355         * combine.c (try_widen_shift_mode): Move check for equal modes to...
7356         (simplify_shift_const_1): ...here.  Use scalar_int_mode for
7357         shift_unit_mode and for modes involved in scalar shifts.
7359 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7360             Alan Hayward  <alan.hayward@arm.com>
7361             David Sherwood  <david.sherwood@arm.com>
7363         * combine.c (force_int_to_mode): New function, split out from...
7364         (force_to_mode): ...here.  Keep xmode up-to-date and use it
7365         instead of GET_MODE (x).
7367 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7368             Alan Hayward  <alan.hayward@arm.com>
7369             David Sherwood  <david.sherwood@arm.com>
7371         * optabs-query.h (extraction_insn::struct_mode): Change type to
7372         opt_scalar_int_mode and update comment.
7373         (extraction_insn::field_mode): Change type to scalar_int_mode.
7374         (extraction_insn::pos_mode): Likewise.
7375         * combine.c (make_extraction): Update accordingly.
7376         * optabs-query.c (get_traditional_extraction_insn): Likewise.
7377         (get_optab_extraction_insn): Likewise.
7378         * recog.c (simplify_while_replacing): Likewise.
7379         * expmed.c (narrow_bit_field_mem): Change the type of the mode
7380         parameter to opt_scalar_int_mode.
7382 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7383             Alan Hayward  <alan.hayward@arm.com>
7384             David Sherwood  <david.sherwood@arm.com>
7386         * machmode.h (bit_field_mode_iterator::next_mode): Take a pointer
7387         to a scalar_int_mode instead of a machine_mode.
7388         (bit_field_mode_iterator::m_mode): Change type to opt_scalar_int_mode.
7389         (get_best_mode): Return a boolean and use a pointer argument to store
7390         the selected mode.  Replace the limit mode parameter with a bit limit.
7391         * expmed.c (adjust_bit_field_mem_for_reg): Use scalar_int_mode
7392         for the values returned by bit_field_mode_iterator::next_mode.
7393         (store_bit_field): Update call to get_best_mode.
7394         (store_fixed_bit_field): Likewise.
7395         (extract_fixed_bit_field): Likewise.
7396         * expr.c (optimize_bitfield_assignment_op): Likewise.
7397         * fold-const.c (optimize_bit_field_compare): Likewise.
7398         (fold_truth_andor_1): Likewise.
7399         * stor-layout.c (bit_field_mode_iterator::next_mode): As above.
7400         Update for new type of m_mode.
7401         (get_best_mode): As above.
7403 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7404             Alan Hayward  <alan.hayward@arm.com>
7405             David Sherwood  <david.sherwood@arm.com>
7407         * expmed.c (strict_volatile_bitfield_p): Change the type of fieldmode
7408         to scalar_int_mode.  Remove check for SCALAR_INT_MODE_P.
7409         (store_bit_field): Check is_a <scalar_int_mode> before calling
7410         strict_volatile_bitfield_p.
7411         (extract_bit_field): Likewise.
7413 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7414             Alan Hayward  <alan.hayward@arm.com>
7415             David Sherwood  <david.sherwood@arm.com>
7417         * target.def (cstore_mode): Return a scalar_int_mode.
7418         * doc/tm.texi: Regenerate.
7419         * config/sparc/sparc.c (sparc_cstore_mode): Return a scalar_int_mode.
7420         * targhooks.h (default_cstore_mode): Likewise.
7421         * targhooks.c (default_cstore_mode): Likewise, using a forced
7422         conversion.
7423         * expmed.c (emit_cstore): Expect the target of the cstore to be
7424         a scalar_int_mode.
7426 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7427             Alan Hayward  <alan.hayward@arm.com>
7428             David Sherwood  <david.sherwood@arm.com>
7430         * cfgloop.h (rtx_iv): Change type of extend_mode and mode to
7431         scalar_int_mode.
7432         (niter_desc): Likewise mode.
7433         (iv_analyze): Add a mode parameter.
7434         (biv_p): Likewise.
7435         (iv_analyze_expr): Pass the mode paraeter before the rtx it describes
7436         and change its type to scalar_int_mode.
7437         * loop-iv.c: Update commentary at head of file.
7438         (iv_constant): Pass the mode paraeter before the rtx it describes
7439         and change its type to scalar_int_mode.  Remove VOIDmode handling.
7440         (iv_subreg): Change the type of the mode parameter to scalar_int_mode.
7441         (iv_extend): Likewise.
7442         (shorten_into_mode): Likewise.
7443         (iv_add): Use scalar_int_mode.
7444         (iv_mult): Likewise.
7445         (iv_shift): Likewise.
7446         (canonicalize_iv_subregs): Likewise.
7447         (get_biv_step_1): Pass the outer_mode parameter before the rtx
7448         it describes and change its mode to scalar_int_mode.   Also change
7449         the type of the returned inner_mode to scalar_int_mode.
7450         (get_biv_step): Likewise, turning outer_mode from a pointer
7451         into a direct parameter.  Update call to get_biv_step_1.
7452         (iv_analyze_biv): Add an outer_mode parameter.  Update calls to
7453         iv_constant and get_biv_step.
7454         (iv_analyze_expr): Pass the mode parameter before the rtx it describes
7455         and change its type to scalar_int_mode.  Don't initialise iv->mode
7456         to VOIDmode and remove later checks for its still being VOIDmode.
7457         Update calls to iv_analyze_op and iv_analyze_expr.  Check
7458         is_a <scalar_int_mode> when changing the mode under consideration.
7459         (iv_analyze_def): Ignore registers that don't have a scalar_int_mode.
7460         Update call to iv_analyze_expr.
7461         (iv_analyze_op): Add a mode parameter.  Reject subregs whose
7462         inner register is not also a scalar_int_mode.  Update call to
7463         iv_analyze_biv.
7464         (iv_analyze): Add a mode parameter.  Update call to iv_analyze_op.
7465         (biv_p): Add a mode parameter.  Update call to iv_analyze_biv.
7466         (iv_number_of_iterations): Use is_a <scalar_int_mode> instead of
7467         separate mode class checks.  Update calls to iv_analyze.  Remove
7468         fix-up of VOIDmodes after iv_analyze_biv.
7469         * loop-unroll.c (analyze_iv_to_split_insn): Reject registers that
7470         don't have a scalar_int_mode.  Update call to biv_p.
7472 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7473             Alan Hayward  <alan.hayward@arm.com>
7474             David Sherwood  <david.sherwood@arm.com>
7476         * cfgexpand.c (convert_debug_memory_address): Use
7477         as_a <scalar_int_mode>.
7478         * combine.c (expand_compound_operation): Likewise.
7479         (make_extraction): Likewise.
7480         (change_zero_ext): Likewise.
7481         (simplify_comparison): Likewise.
7482         * cse.c (cse_insn): Likewise.
7483         * dwarf2out.c (minmax_loc_descriptor): Likewise.
7484         (mem_loc_descriptor): Likewise.
7485         (loc_descriptor): Likewise.
7486         * expmed.c (init_expmed_one_mode): Likewise.
7487         (synth_mult): Likewise.
7488         (emit_store_flag_1): Likewise.
7489         (expand_divmod): Likewise.  Use HWI_COMPUTABLE_MODE_P instead
7490         of a comparison with size.
7491         * expr.c (expand_assignment): Use as_a <scalar_int_mode>.
7492         (reduce_to_bit_field_precision): Likewise.
7493         * function.c (expand_function_end): Likewise.
7494         * internal-fn.c (expand_arith_overflow_result_store): Likewise.
7495         * loop-doloop.c (doloop_modify): Likewise.
7496         * optabs.c (expand_binop): Likewise.
7497         (expand_unop): Likewise.
7498         (expand_copysign_absneg): Likewise.
7499         (prepare_cmp_insn): Likewise.
7500         (maybe_legitimize_operand): Likewise.
7501         * recog.c (const_scalar_int_operand): Likewise.
7502         * rtlanal.c (get_address_mode): Likewise.
7503         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
7504         (simplify_cond_clz_ctz): Likewise.
7505         * tree-nested.c (get_nl_goto_field): Likewise.
7506         * tree.c (build_vector_type_for_mode): Likewise.
7507         * var-tracking.c (use_narrower_mode): Likewise.
7509 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7510             Alan Hayward  <alan.hayward@arm.com>
7511             David Sherwood  <david.sherwood@arm.com>
7513         * tree.h (SCALAR_INT_TYPE_MODE): New macro.
7514         * builtins.c (expand_builtin_signbit): Use it.
7515         * cfgexpand.c (expand_debug_expr): Likewise.
7516         * dojump.c (do_jump): Likewise.
7517         (do_compare_and_jump): Likewise.
7518         * dwarf2cfi.c (expand_builtin_init_dwarf_reg_sizes): Likewise.
7519         * expmed.c (make_tree): Likewise.
7520         * expr.c (expand_expr_real_2): Likewise.
7521         (expand_expr_real_1): Likewise.
7522         (try_casesi): Likewise.
7523         * fold-const-call.c (fold_const_call_ss): Likewise.
7524         * fold-const.c (unextend): Likewise.
7525         (extract_muldiv_1): Likewise.
7526         (fold_single_bit_test): Likewise.
7527         (native_encode_int): Likewise.
7528         (native_encode_string): Likewise.
7529         (native_interpret_int): Likewise.
7530         * gimple-fold.c (gimple_fold_builtin_memset): Likewise.
7531         * internal-fn.c (expand_addsub_overflow): Likewise.
7532         (expand_neg_overflow): Likewise.
7533         (expand_mul_overflow): Likewise.
7534         (expand_arith_overflow): Likewise.
7535         * match.pd: Likewise.
7536         * stor-layout.c (layout_type): Likewise.
7537         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
7538         * tree-ssa-math-opts.c (convert_mult_to_widen): Likewise.
7539         * tree-ssanames.c (get_range_info): Likewise.
7540         * tree-switch-conversion.c (array_value_type) Likewise.
7541         * tree-vect-patterns.c (vect_recog_rotate_pattern): Likewise.
7542         (vect_recog_divmod_pattern): Likewise.
7543         (vect_recog_mixed_size_cond_pattern): Likewise.
7544         * tree-vrp.c (extract_range_basic): Likewise.
7545         (simplify_float_conversion_using_ranges): Likewise.
7546         * tree.c (int_fits_type_p): Likewise.
7547         * ubsan.c (instrument_bool_enum_load): Likewise.
7548         * varasm.c (mergeable_string_section): Likewise.
7549         (narrowing_initializer_constant_valid_p): Likewise.
7550         (output_constant): Likewise.
7552 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7553             Alan Hayward  <alan.hayward@arm.com>
7554             David Sherwood  <david.sherwood@arm.com>
7556         * machmode.h (NARROWEST_INT_MODE): New macro.
7557         * expr.c (alignment_for_piecewise_move): Use it instead of
7558         GET_CLASS_NARROWEST_MODE (MODE_INT).
7559         (push_block): Likewise.
7560         * stor-layout.c (bit_field_mode_iterator::bit_field_mode_iterator):
7561         Likewise.
7562         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
7564 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7565             Alan Hayward  <alan.hayward@arm.com>
7566             David Sherwood  <david.sherwood@arm.com>
7568         * postreload.c (move2add_valid_value_p): Change the type of the
7569         mode parameter to scalar_int_mode.
7570         (move2add_use_add2_insn): Add a mode parameter and use it instead
7571         of GET_MODE (reg).
7572         (move2add_use_add3_insn): Likewise.
7573         (reload_cse_move2add): Update accordingly.
7575 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7576             Alan Hayward  <alan.hayward@arm.com>
7577             David Sherwood  <david.sherwood@arm.com>
7579         * expr.c (expand_expr_real_2): Use scalar_int_mode for the
7580         double-word mode.
7581         * lower-subreg.c (resolve_shift_zext): Use is_a <scalar_int_mode>.
7582         * optabs.c (expand_unop): Likewise.
7584 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7585             Alan Hayward  <alan.hayward@arm.com>
7586             David Sherwood  <david.sherwood@arm.com>
7588         * dwarf2out.c (typed_binop): Change mode parameter to scalar_int_mode.
7589         (clz_loc_descriptor): Likewise.  Remove SCALAR_INT_MODE_P check.
7590         (popcount_loc_descriptor): Likewise.
7591         (bswap_loc_descriptor): Likewise.
7592         (rotate_loc_descriptor): Likewise.
7593         (mem_loc_descriptor): Add is_a <scalar_int_mode> checks before
7594         calling the functions above.
7596 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7597             Alan Hayward  <alan.hayward@arm.com>
7598             David Sherwood  <david.sherwood@arm.com>
7600         * combine.c (sign_extend_short_imm): Add is_a <scalar_int_mode>
7601         checks.
7602         (try_combine): Likewise.
7603         (simplify_if_then_else): Likewise.
7604         * cse.c (cse_insn): Likewise.
7605         * dwarf2out.c (mem_loc_descriptor): Likewise.
7606         * emit-rtl.c (gen_lowpart_common): Likewise.
7607         * simplify-rtx.c (simplify_truncation): Likewise.
7608         (simplify_binary_operation_1): Likewise.
7609         (simplify_const_relational_operation): Likewise.
7610         (simplify_ternary_operation): Likewise.
7611         * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise.
7613 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7614             Alan Hayward  <alan.hayward@arm.com>
7615             David Sherwood  <david.sherwood@arm.com>
7617         * cse.c (cse_insn): Add is_a <scalar_int_mode> checks.
7618         * reload.c (push_reload): Likewise.
7619         (find_reloads): Likewise.
7621 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7622             Alan Hayward  <alan.hayward@arm.com>
7623             David Sherwood  <david.sherwood@arm.com>
7625         * combine.c (find_split_point): Add is_a <scalar_int_mode> checks.
7626         (make_compound_operation_int): Likewise.
7627         (change_zero_ext): Likewise.
7628         * expr.c (convert_move): Likewise.
7629         (convert_modes): Likewise.
7630         * fwprop.c (forward_propagate_subreg): Likewise.
7631         * loop-iv.c (get_biv_step_1): Likewise.
7632         * optabs.c (widen_operand): Likewise.
7633         * postreload.c (move2add_valid_value_p): Likewise.
7634         * recog.c (simplify_while_replacing): Likewise.
7635         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
7636         (simplify_binary_operation_1): Likewise.  Remove redundant
7637         mode equality check.
7639 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7640             Alan Hayward  <alan.hayward@arm.com>
7641             David Sherwood  <david.sherwood@arm.com>
7643         * combine.c (combine_simplify_rtx): Add checks for
7644         is_a <scalar_int_mode>.
7645         (simplify_if_then_else): Likewise.
7646         (make_field_assignment): Likewise.
7647         (simplify_comparison): Likewise.
7648         * ifcvt.c (noce_try_bitop): Likewise.
7649         * loop-invariant.c (canonicalize_address_mult): Likewise.
7650         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
7652 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7653             Alan Hayward  <alan.hayward@arm.com>
7654             David Sherwood  <david.sherwood@arm.com>
7656         * gimple-fold.c (gimple_fold_builtin_memory_op): Use
7657         is_a <scalar_int_mode> instead of != BLKmode.
7659 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7660             Alan Hayward  <alan.hayward@arm.com>
7661             David Sherwood  <david.sherwood@arm.com>
7663         * cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>
7664         instead of != VOIDmode.
7665         * combine.c (if_then_else_cond): Likewise.
7666         (change_zero_ext): Likewise.
7667         * dwarf2out.c (mem_loc_descriptor): Likewise.
7668         (loc_descriptor): Likewise.
7669         * rtlanal.c (canonicalize_condition): Likewise.
7670         * simplify-rtx.c (simplify_relational_operation_1): Likewise.
7672 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7673             Alan Hayward  <alan.hayward@arm.com>
7674             David Sherwood  <david.sherwood@arm.com>
7676         * simplify-rtx.c (simplify_binary_operation_1): Use
7677         is_a <scalar_int_mode> instead of !VECTOR_MODE_P.
7679 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7680             Alan Hayward  <alan.hayward@arm.com>
7681             David Sherwood  <david.sherwood@arm.com>
7683         * wide-int.h (int_traits<unsigned char>) New class.
7684         (int_traits<unsigned short>) Likewise.
7685         * cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>.
7686         Use GET_MODE_UNIT_PRECISION and remove redundant test for
7687         SCALAR_INT_MODE_P.
7688         * combine.c (set_nonzero_bits_and_sign_copies): Use
7689         is_a <scalar_int_mode>.
7690         (find_split_point): Likewise.
7691         (combine_simplify_rtx): Likewise.
7692         (simplify_logical): Likewise.
7693         (expand_compound_operation): Likewise.
7694         (expand_field_assignment): Likewise.
7695         (make_compound_operation): Likewise.
7696         (extended_count): Likewise.
7697         (change_zero_ext): Likewise.
7698         (simplify_comparison): Likewise.
7699         * dwarf2out.c (scompare_loc_descriptor): Likewise.
7700         (ucompare_loc_descriptor): Likewise.
7701         (minmax_loc_descriptor): Likewise.
7702         (mem_loc_descriptor): Likewise.
7703         (loc_descriptor): Likewise.
7704         * expmed.c (init_expmed_one_mode): Likewise.
7705         * lra-constraints.c (lra_constraint_offset): Likewise.
7706         * optabs.c (prepare_libcall_arg): Likewise.
7707         * postreload.c (move2add_note_store): Likewise.
7708         * reload.c (operands_match_p): Likewise.
7709         * rtl.h (load_extend_op): Likewise.
7710         * rtlhooks.c (gen_lowpart_general): Likewise.
7711         * simplify-rtx.c (simplify_truncation): Likewise.
7712         (simplify_unary_operation_1): Likewise.
7713         (simplify_binary_operation_1): Likewise.
7714         (simplify_const_binary_operation): Likewise.
7715         (simplify_const_relational_operation): Likewise.
7716         (simplify_subreg): Likewise.
7717         * stor-layout.c (bitwise_mode_for_mode): Likewise.
7718         * var-tracking.c (adjust_mems): Likewise.
7719         (prepare_call_arguments): Likewise.
7721 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7722             Alan Hayward  <alan.hayward@arm.com>
7723             David Sherwood  <david.sherwood@arm.com>
7725         * machmode.h (is_int_mode): New fuction.
7726         * combine.c (find_split_point): Use it.
7727         (combine_simplify_rtx): Likewise.
7728         (simplify_if_then_else): Likewise.
7729         (simplify_set): Likewise.
7730         (simplify_shift_const_1): Likewise.
7731         (simplify_comparison): Likewise.
7732         * config/aarch64/aarch64.c (aarch64_rtx_costs): Likewise.
7733         * cse.c (notreg_cost): Likewise.
7734         (cse_insn): Likewise.
7735         * cselib.c (cselib_lookup_1): Likewise.
7736         * dojump.c (do_jump_1): Likewise.
7737         (do_compare_rtx_and_jump): Likewise.
7738         * dse.c (get_call_args): Likewise.
7739         * dwarf2out.c (rtl_for_decl_init): Likewise.
7740         (native_encode_initializer): Likewise.
7741         * expmed.c (emit_store_flag_1): Likewise.
7742         (emit_store_flag): Likewise.
7743         * expr.c (convert_modes): Likewise.
7744         (store_field): Likewise.
7745         (expand_expr_real_1): Likewise.
7746         * fold-const.c (fold_read_from_constant_string): Likewise.
7747         * gimple-ssa-sprintf.c (get_format_string): Likewise.
7748         * optabs-libfuncs.c (gen_int_libfunc): Likewise.
7749         * optabs.c (expand_binop): Likewise.
7750         (expand_unop): Likewise.
7751         (expand_abs_nojump): Likewise.
7752         (expand_one_cmpl_abs_nojump): Likewise.
7753         * simplify-rtx.c (mode_signbit_p): Likewise.
7754         (val_signbit_p): Likewise.
7755         (val_signbit_known_set_p): Likewise.
7756         (val_signbit_known_clear_p): Likewise.
7757         (simplify_relational_operation_1): Likewise.
7758         * tree.c (vector_type_mode): Likewise.
7760 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7761             Alan Hayward  <alan.hayward@arm.com>
7762             David Sherwood  <david.sherwood@arm.com>
7764         * machmode.h (smallest_mode_for_size): Fix formatting.
7765         (smallest_int_mode_for_size): New function.
7766         * cfgexpand.c (expand_debug_expr): Use smallest_int_mode_for_size
7767         instead of smallest_mode_for_size.
7768         * combine.c (make_extraction): Likewise.
7769         * config/arc/arc.c (arc_expand_movmem): Likewise.
7770         * config/arm/arm.c (arm_expand_divmod_libfunc): Likewise.
7771         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
7772         * config/s390/s390.c (s390_expand_insv): Likewise.
7773         * config/sparc/sparc.c (assign_int_registers): Likewise.
7774         * config/spu/spu.c (spu_function_value): Likewise.
7775         (spu_function_arg): Likewise.
7776         * coverage.c (get_gcov_type): Likewise.
7777         (get_gcov_unsigned_t): Likewise.
7778         * dse.c (find_shift_sequence): Likewise.
7779         * expmed.c (store_bit_field_1): Likewise.
7780         * expr.c (convert_move): Likewise.
7781         (store_field): Likewise.
7782         * internal-fn.c (expand_arith_overflow): Likewise.
7783         * optabs-query.c (get_best_extraction_insn): Likewise.
7784         * optabs.c (expand_twoval_binop_libfunc): Likewise.
7785         * stor-layout.c (layout_type): Likewise.
7786         (initialize_sizetypes): Likewise.
7787         * targhooks.c (default_get_mask_mode): Likewise.
7788         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Likewise.
7790 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7791             Alan Hayward  <alan.hayward@arm.com>
7792             David Sherwood  <david.sherwood@arm.com>
7794         * machmode.h (opt_mode::else_blk): New function.
7795         (int_mode_for_mode): Declare.
7796         * stor-layout.c (int_mode_for_mode): Return an opt_scalar_int_mode.
7797         * builtins.c (expand_builtin_signbit): Adjust for new int_mode_for_mode
7798         return type.
7799         * cfgexpand.c (expand_debug_expr): Likewise.
7800         * combine.c (gen_lowpart_or_truncate): Likewise.
7801         (gen_lowpart_for_combine): Likewise.
7802         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Likewise.
7803         * config/avr/avr.c (avr_to_int_mode): Likewise.
7804         (avr_out_plus_1): Likewise.
7805         (avr_out_plus): Likewise.
7806         (avr_out_round): Likewise.
7807         * config/i386/i386.c (ix86_split_to_parts): Likewise.
7808         * config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
7809         (s390_expand_vcond): Likewise.
7810         * config/spu/spu.c (spu_split_immediate): Likewise.
7811         (spu_expand_mov): Likewise.
7812         * dse.c (get_stored_val): Likewise.
7813         * expmed.c (store_bit_field_1): Likewise.
7814         (convert_extracted_bit_field): Use int_mode_for_mode instead of
7815         int_mode_for_size.
7816         (extract_bit_field_1): Adjust for new int_mode_for_mode return type.
7817         (extract_low_bits): Likewise.
7818         * expr.c (emit_group_load_1): Likewise.  Separate out the BLKmode
7819         handling rather than repeating the check.
7820         (emit_group_store): Likewise.
7821         (emit_move_via_integer): Adjust for new int_mode_for_mode return type.
7822         * optabs.c (expand_absneg_bit): Likewise.
7823         (expand_copysign_absneg): Likewise.
7824         (expand_copysign_bit): Likewise.
7825         * tree-if-conv.c (ifcvt_can_use_mask_load_store): Likewise.
7826         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
7827         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
7828         * var-tracking.c (prepare_call_arguments):  Likewise.
7829         * config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Use
7830         int_mode_for_mode instead of mode_for_size.
7831         * config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
7833 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7834             Alan Hayward  <alan.hayward@arm.com>
7835             David Sherwood  <david.sherwood@arm.com>
7837         * machmode.h (int_mode_for_size): New function.
7838         * builtins.c (set_builtin_user_assembler_name): Use int_mode_for_size
7839         instead of mode_for_size.
7840         * calls.c (save_fixed_argument_area): Likewise.  Make use of BLKmode
7841         explicit.
7842         * combine.c (expand_field_assignment): Use int_mode_for_size
7843         instead of mode_for_size.
7844         (make_extraction): Likewise.
7845         (simplify_shift_const_1): Likewise.
7846         (simplify_comparison): Likewise.
7847         * dojump.c (do_jump): Likewise.
7848         * dwarf2out.c (mem_loc_descriptor): Likewise.
7849         * emit-rtl.c (init_derived_machine_modes): Likewise.
7850         * expmed.c (flip_storage_order): Likewise.
7851         (convert_extracted_bit_field): Likewise.
7852         * expr.c (copy_blkmode_from_reg): Likewise.
7853         * graphite-isl-ast-to-gimple.c (max_mode_int_precision): Likewise.
7854         * internal-fn.c (expand_mul_overflow): Likewise.
7855         * lower-subreg.c (simple_move): Likewise.
7856         * optabs-libfuncs.c (init_optabs): Likewise.
7857         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
7858         * tree.c (vector_type_mode): Likewise.
7859         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
7860         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Likewise.
7861         * tree-vect-generic.c (expand_vector_parallel): Likewise.
7862         * tree-vect-stmts.c (vectorizable_load): Likewise.
7863         (vectorizable_store): Likewise.
7865 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7866             Alan Hayward  <alan.hayward@arm.com>
7867             David Sherwood  <david.sherwood@arm.com>
7869         * coretypes.h (pod_mode): New type.
7870         (scalar_int_mode_pod): New typedef.
7871         * machmode.h (pod_mode): New class.
7872         (int_n_data_t::m): Change type to scalar_int_mode_pod.
7873         * genmodes.c (emit_mode_int_n): Update accordingly.
7874         * lower-subreg.h (target_lower_subreg): Change type to
7875         scalar_int_mode_pod.
7876         * gdbhooks.py (build_pretty_printer): Handle pod_mode and
7877         scalar_int_mode_pod.
7879 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7880             Alan Hayward  <alan.hayward@arm.com>
7881             David Sherwood  <david.sherwood@arm.com>
7883         * config/powerpcspe/powerpcspe.h (rs6000_pmode): Change type from
7884         machine_mode to scalar_int_mode.
7885         * config/powerpcspe/powerpcspe.c (rs6000_pmode): Likewise.
7886         (rs6000_option_override_internal): Remove cast to int.
7887         * config/rs6000/rs6000.h (rs6000_pmode): Change type from
7888         machine_mode to scalar_int_mode.
7889         * config/rs6000/rs6000.c (rs6000_pmode): Likewise.
7890         (rs6000_option_override_internal): Remove cast to int.
7891         * config/s390/s390.h (Pmode): Remove cast to machine_mode.
7892         * config/epiphany/epiphany.h (RTX_OK_FOR_OFFSET_P): Add cast
7893         to machine_mode.
7894         * config/s390/s390.c (s390_expand_builtin): Likewise.
7895         * coretypes.h (scalar_int_mode): New type.
7896         (opt_scalar_int_mode): New typedef.
7897         * machmode.h (scalar_int_mode): New class.
7898         (scalar_int_mode::includes_p): New function.
7899         (byte_mode): Change type to scalar_int_mode.
7900         (word_mode): Likewise.
7901         (ptr_mode): Likewise.
7902         * emit-rtl.c (byte_mode): Likewise.
7903         (word_mode): Likewise.
7904         (ptr_mode): Likewise.
7905         (init_derived_machine_modes): Update accordingly.
7906         * genmodes.c (get_mode_class): Return scalar_int_mode for MODE_INT
7907         and MODE_PARTIAL_INT.
7908         * gdbhooks.py (build_pretty_printer): Handle scalar_int_mode and
7909         opt_scalar_int_mode.
7911 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7912             Alan Hayward  <alan.hayward@arm.com>
7913             David Sherwood  <david.sherwood@arm.com>
7915         * target.def (libgcc_floating_mode_supported_p): Take a
7916         scalar_float_mode.
7917         * doc/tm.texi: Regenerate.
7918         * targhooks.h (default_libgcc_floating_mode_supported_p): Take a
7919         scalar_float_mode.
7920         * targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
7921         * config/aarch64/aarch64.c (aarch64_libgcc_floating_mode_supported_p):
7922         Likewise.
7924 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7925             Alan Hayward  <alan.hayward@arm.com>
7926             David Sherwood  <david.sherwood@arm.com>
7928         * target.def (default_floatn_mode): Return an opt_scalar_float_mode.
7929         * doc/tm.texi: Regenerate.
7930         * config/arm/arm.c (arm_floatn_mode): Return an opt_scalar_float_mode.
7931         * config/powerpcspe/powerpcspe.c (rs6000_floatn_mode): Likewise.
7932         * config/rs6000/rs6000.c (rs6000_floatn_mode): Likewise.
7933         * targhooks.h (default_floatn_mode): Likewise.
7934         * targhooks.c (default_floatn_mode): Likewise.
7935         * tree.c (build_common_tree_nodes): Update accordingly.
7937 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7938             Alan Hayward  <alan.hayward@arm.com>
7939             David Sherwood  <david.sherwood@arm.com>
7941         * machmode.h (mode_iterator::start): Provide overload for opt_modes.
7942         (mode_iterator::iterate_p): Likewise.
7943         (mode_iterator::get_wider): Likewise.
7944         * expr.c (init_expr_target): Use opt_scalar_float_mode.
7946 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7947             Alan Hayward  <alan.hayward@arm.com>
7948             David Sherwood  <david.sherwood@arm.com>
7950         * coretypes.h (opt_scalar_float_mode): New typedef.
7951         * machmode.h (float_mode_for_size): New function.
7952         * emit-rtl.c (double_mode): Delete.
7953         (init_emit_once): Use float_mode_for_size.
7954         * stor-layout.c (layout_type): Likewise.
7955         * gdbhooks.py (build_pretty_printer): Handle opt_scalar_float_mode.
7957 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7958             Alan Hayward  <alan.hayward@arm.com>
7959             David Sherwood  <david.sherwood@arm.com>
7961         * output.h (assemble_real): Take a scalar_float_mode.
7962         * config/arm/arm.c (arm_assemble_integer): Update accordingly.
7963         * config/arm/arm.md (consttable_4): Likewise.
7964         (consttable_8): Likewise.
7965         (consttable_16): Likewise.
7966         * config/mips/mips.md (consttable_float): Likewise.
7967         * config/s390/s390.c (s390_output_pool_entry): Likewise.
7968         * varasm.c (assemble_real): Take a scalar_float_mode.
7969         (output_constant_pool_2): Update accordingly.
7970         (output_constant): Likewise.
7972 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7973             Alan Hayward  <alan.hayward@arm.com>
7974             David Sherwood  <david.sherwood@arm.com>
7976         * tree.h (SCALAR_FLOAT_TYPE_MODE): New macro.
7977         * builtins.c (expand_builtin_signbit): Use it instead of TYPE_MODE.
7978         * fold-const.c (fold_convert_const_real_from_fixed): Likewise.
7979         (native_encode_real): Likewise.
7980         (native_interpret_real): Likewise.
7981         * hsa-brig.c (emit_immediate_scalar_to_buffer): Likewise.
7982         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
7984 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7985             Alan Hayward  <alan.hayward@arm.com>
7986             David Sherwood  <david.sherwood@arm.com>
7988         * optabs-libfuncs.c (gen_trunc_conv_libfunc): Use is_a
7989         <scalar_float_mode>.  Simplify.
7990         (gen_extend_conv_libfunc): Likewise.
7992 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
7993             Alan Hayward  <alan.hayward@arm.com>
7994             David Sherwood  <david.sherwood@arm.com>
7996         * coretypes.h (scalar_float_mode): New type.
7997         * machmode.h (mode_traits::from_int): Use machine_mode if
7998         USE_ENUM_MODES is defined.
7999         (is_a): New function.
8000         (as_a): Likewise.
8001         (dyn_cast): Likewise.
8002         (scalar_float_mode): New class.
8003         (scalar_float_mode::includes_p): New function.
8004         (is_float_mode): Likewise.
8005         * gdbhooks.py (MachineModePrinter): New class.
8006         (build_pretty_printer): Use it for scalar_float_mode.
8007         * real.h (FLOAT_MODE_FORMAT): Use as_a <scalar_float_mode>.
8008         (format_helper::format_helper): Turn into a template.
8009         * genmodes.c (get_mode_class): New function.
8010         (emit_insn_modes_h): Give modes the class returned by get_mode_class,
8011         or machine_mode if none.
8012         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Use
8013         as_a <scalar_float_mode>.
8014         * dwarf2out.c (mem_loc_descriptor): Likewise.
8015         (insert_float): Likewise.
8016         (add_const_value_attribute): Likewise.
8017         * simplify-rtx.c (simplify_immed_subreg): Likewise.
8018         * optabs.c (expand_absneg_bit): Take a scalar_float_mode.
8019         (expand_unop): Update accordingly.
8020         (expand_abs_nojump): Likewise.
8021         (expand_copysign_absneg): Take a scalar_float_mode.
8022         (expand_copysign_bit): Likewise.
8023         (expand_copysign): Update accordingly.
8025 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8026             Alan Hayward  <alan.hayward@arm.com>
8027             David Sherwood  <david.sherwood@arm.com>
8029         * coretypes.h (opt_mode): New class.
8030         * machmode.h (opt_mode): Likewise.
8031         (opt_mode::else_void): New function.
8032         (opt_mode::require): Likewise.
8033         (opt_mode::exists): Likewise.
8034         (GET_MODE_WIDER_MODE): Turn into a function and return an opt_mode.
8035         (GET_MODE_2XWIDER_MODE): Likewise.
8036         (mode_iterator::get_wider): Update accordingly.
8037         (mode_iterator::get_2xwider): Likewise.
8038         (mode_iterator::get_known_wider): Likewise, turning into a template.
8039         * combine.c (make_extraction): Update use of GET_MODE_WIDER_MODE,
8040         forcing a wider mode to exist.
8041         * config/cr16/cr16.h (LONG_REG_P): Likewise.
8042         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
8043         * config/c6x/c6x.c (c6x_rtx_costs): Update use of
8044         GET_MODE_2XWIDER_MODE, forcing a wider mode to exist.
8045         * lower-subreg.c (init_lower_subreg): Likewise.
8046         * optabs-libfuncs.c (init_sync_libfuncs_1): Likewise, but not
8047         on the final iteration.
8048         * config/i386/i386.c (ix86_expand_set_or_movmem): Check whether
8049         a wider mode exists before asking for a move pattern.
8050         (get_mode_wider_vector): Update use of GET_MODE_WIDER_MODE,
8051         forcing a wider mode to exist.
8052         (expand_vselect_vconcat): Update use of GET_MODE_2XWIDER_MODE,
8053         returning false if no such mode exists.
8054         * config/ia64/ia64.c (expand_vselect_vconcat): Likewise.
8055         * config/mips/mips.c (mips_expand_vselect_vconcat): Likewise.
8056         * expmed.c (init_expmed_one_mode): Update use of GET_MODE_WIDER_MODE.
8057         Avoid checking for a MODE_INT if we already know the mode is not a
8058         SCALAR_INT_MODE_P.
8059         (extract_high_half): Update use of GET_MODE_WIDER_MODE,
8060         forcing a wider mode to exist.
8061         (expmed_mult_highpart_optab): Likewise.
8062         (expmed_mult_highpart): Likewise.
8063         * expr.c (expand_expr_real_2): Update use of GET_MODE_WIDER_MODE,
8064         using else_void.
8065         * lto-streamer-in.c (lto_input_mode_table): Likewise.
8066         * optabs-query.c (find_widening_optab_handler_and_mode): Likewise.
8067         * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
8068         * internal-fn.c (expand_mul_overflow): Update use of
8069         GET_MODE_2XWIDER_MODE.
8070         * omp-low.c (omp_clause_aligned_alignment): Likewise.
8071         * tree-ssa-math-opts.c (convert_mult_to_widen): Update use of
8072         GET_MODE_WIDER_MODE.
8073         (convert_plusminus_to_widen): Likewise.
8074         * tree-switch-conversion.c (array_value_type): Likewise.
8075         * var-tracking.c (emit_note_insn_var_location): Likewise.
8076         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
8077         Return false inside rather than outside the loop if no wider mode
8078         exists
8079         * optabs.c (expand_binop): Update use of GET_MODE_WIDER_MODE
8080         and GET_MODE_2XWIDER_MODE
8081         (can_compare_p): Use else_void.
8082         * gdbhooks.py (OptMachineModePrinter): New class.
8083         (build_pretty_printer): Use it for opt_mode.
8085 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8086             Alan Hayward  <alan.hayward@arm.com>
8087             David Sherwood  <david.sherwood@arm.com>
8089         * tree-switch-conversion.c (array_value_type): Only read TYPE_MODE
8090         once.  Use get_narrowest_mode instead of GET_CLASS_NARROWEST_MODE.
8092 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8093             Alan Hayward  <alan.hayward@arm.com>
8094             David Sherwood  <david.sherwood@arm.com>
8096         * machmode.h (mode_traits): New structure.
8097         (get_narrowest_mode): New function.
8098         (mode_iterator::start): Likewise.
8099         (mode_iterator::iterate_p): Likewise.
8100         (mode_iterator::get_wider): Likewise.
8101         (mode_iterator::get_known_wider): Likewise.
8102         (mode_iterator::get_2xwider): Likewise.
8103         (FOR_EACH_MODE_IN_CLASS): New mode iterator.
8104         (FOR_EACH_MODE): Likewise.
8105         (FOR_EACH_MODE_FROM): Likewise.
8106         (FOR_EACH_MODE_UNTIL): Likewise.
8107         (FOR_EACH_WIDER_MODE): Likewise.
8108         (FOR_EACH_2XWIDER_MODE): Likewise.
8109         * builtins.c (expand_builtin_strlen): Use new mode iterators.
8110         * combine.c (simplify_comparison): Likewise
8111         * config/i386/i386.c (type_natural_mode): Likewise.
8112         * cse.c (cse_insn): Likewise.
8113         * dse.c (find_shift_sequence): Likewise.
8114         * emit-rtl.c (init_derived_machine_modes): Likewise.
8115         (init_emit_once): Likewise.
8116         * explow.c (hard_function_value): Likewise.
8117         * expmed.c (extract_fixed_bit_field_1): Likewise.
8118         (extract_bit_field_1): Likewise.
8119         (expand_divmod): Likewise.
8120         (emit_store_flag_1): Likewise.
8121         * expr.c (init_expr_target): Likewise.
8122         (convert_move): Likewise.
8123         (alignment_for_piecewise_move): Likewise.
8124         (widest_int_mode_for_size): Likewise.
8125         (emit_block_move_via_movmem): Likewise.
8126         (copy_blkmode_to_reg): Likewise.
8127         (set_storage_via_setmem): Likewise.
8128         (compress_float_constant): Likewise.
8129         * omp-low.c (omp_clause_aligned_alignment): Likewise.
8130         * optabs-query.c (get_best_extraction_insn): Likewise.
8131         * optabs.c (expand_binop): Likewise.
8132         (expand_twoval_unop): Likewise.
8133         (expand_twoval_binop): Likewise.
8134         (widen_leading): Likewise.
8135         (widen_bswap): Likewise.
8136         (expand_parity): Likewise.
8137         (expand_unop): Likewise.
8138         (prepare_cmp_insn): Likewise.
8139         (prepare_float_lib_cmp): Likewise.
8140         (expand_float): Likewise.
8141         (expand_fix): Likewise.
8142         (expand_sfix_optab): Likewise.
8143         * postreload.c (move2add_use_add2_insn): Likewise.
8144         * reg-stack.c (reg_to_stack): Likewise.
8145         * reginfo.c (choose_hard_reg_mode): Likewise.
8146         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
8147         * stor-layout.c (mode_for_size): Likewise.
8148         (smallest_mode_for_size): Likewise.
8149         (mode_for_vector): Likewise.
8150         (finish_bitfield_representative): Likewise.
8151         * tree-ssa-math-opts.c (target_supports_divmod_p): Likewise.
8152         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
8153         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
8154         * var-tracking.c (prepare_call_arguments): Likewise.
8156 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8157             Alan Hayward  <alan.hayward@arm.com>
8158             David Sherwood  <david.sherwood@arm.com>
8160         * genconditions.c (write_header): Add a "#define USE_ENUM_MODES".
8161         * genmodes.c (emit_insn_modes_h): Define FOOmode to E_FOOmode if
8162         USE_ENUM_MODES is defined and to ((void) 0, E_FOOmode) otherwise.
8163         * machmode.h (mode_size): Move earlier in file.
8164         (mode_precision): Likewise.
8165         (mode_inner): Likewise.
8166         (mode_nunits): Likewise.
8167         (mode_unit_size): Likewise.
8168         (unit_unit_precision): Likewise.
8169         (mode_wider): Likewise.
8170         (mode_2xwider): Likewise.
8171         (machine_mode): New class.
8172         (mode_to_bytes): New function.
8173         (mode_to_bits): Likewise.
8174         (mode_to_precision): Likewise.
8175         (mode_to_inner): Likewise.
8176         (mode_to_unit_size): Likewise.
8177         (mode_to_unit_precision): Likewise.
8178         (mode_to_nunits): Likewise.
8179         (GET_MODE_SIZE): Use mode_to_bytes.
8180         (GET_MODE_BITSIZE): Use mode_to_bits.
8181         (GET_MODE_PRECISION): Use mode_to_precision.
8182         (GET_MODE_INNER): Use mode_to_inner.
8183         (GET_MODE_UNIT_SIZE): Use mode_to_unit_size.
8184         (GET_MODE_UNIT_PRECISION): Use mode_to_unit_precision.
8185         (GET_MODE_NUNITS): Use mode_to_nunits.
8186         * system.h (ALWAYS_INLINE): New macro.
8187         * config/powerpcspe/powerpcspe-c.c
8188         (altivec_resolve_overloaded_builtin): Use machine_mode instead of
8189         int for arg1_mode and arg2_mode.
8191 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8192             Alan Hayward  <alan.hayward@arm.com>
8193             David Sherwood  <david.sherwood@arm.com>
8195         * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
8196         Prefix mode names with E_ in case statements.
8197         * config/aarch64/aarch64-elf.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
8198         * config/aarch64/aarch64.c (aarch64_split_simd_combine): Likewise.
8199         (aarch64_split_simd_move): Likewise.
8200         (aarch64_gen_storewb_pair): Likewise.
8201         (aarch64_gen_loadwb_pair): Likewise.
8202         (aarch64_gen_store_pair): Likewise.
8203         (aarch64_gen_load_pair): Likewise.
8204         (aarch64_get_condition_code_1): Likewise.
8205         (aarch64_constant_pool_reload_icode): Likewise.
8206         (get_rsqrte_type): Likewise.
8207         (get_rsqrts_type): Likewise.
8208         (get_recpe_type): Likewise.
8209         (get_recps_type): Likewise.
8210         (aarch64_gimplify_va_arg_expr): Likewise.
8211         (aarch64_simd_container_mode): Likewise.
8212         (aarch64_emit_load_exclusive): Likewise.
8213         (aarch64_emit_store_exclusive): Likewise.
8214         (aarch64_expand_compare_and_swap): Likewise.
8215         (aarch64_gen_atomic_cas): Likewise.
8216         (aarch64_emit_bic): Likewise.
8217         (aarch64_emit_atomic_swap): Likewise.
8218         (aarch64_emit_atomic_load_op): Likewise.
8219         (aarch64_evpc_trn): Likewise.
8220         (aarch64_evpc_uzp): Likewise.
8221         (aarch64_evpc_zip): Likewise.
8222         (aarch64_evpc_ext): Likewise.
8223         (aarch64_evpc_rev): Likewise.
8224         (aarch64_evpc_dup): Likewise.
8225         (aarch64_gen_ccmp_first): Likewise.
8226         (aarch64_gen_ccmp_next): Likewise.
8227         * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
8228         (alpha_emit_xfloating_libcall): Likewise.
8229         (emit_insxl): Likewise.
8230         (alpha_arg_type): Likewise.
8231         * config/arc/arc.c (arc_vector_mode_supported_p): Likewise.
8232         (arc_preferred_simd_mode): Likewise.
8233         (arc_secondary_reload): Likewise.
8234         (get_arc_condition_code): Likewise.
8235         (arc_print_operand): Likewise.
8236         (arc_legitimate_constant_p): Likewise.
8237         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
8238         * config/arc/arc.md (casesi_load): Likewise.
8239         (casesi_compact_jump): Likewise.
8240         * config/arc/predicates.md (proper_comparison_operator): Likewise.
8241         (cc_use_register): Likewise.
8242         * config/arm/aout.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
8243         * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
8244         (arm_init_iwmmxt_builtins): Likewise.
8245         * config/arm/arm.c (thumb1_size_rtx_costs): Likewise.
8246         (neon_expand_vector_init): Likewise.
8247         (arm_attr_length_move_neon): Likewise.
8248         (maybe_get_arm_condition_code): Likewise.
8249         (arm_emit_vector_const): Likewise.
8250         (arm_preferred_simd_mode): Likewise.
8251         (arm_output_iwmmxt_tinsr): Likewise.
8252         (thumb1_output_casesi): Likewise.
8253         (thumb2_output_casesi): Likewise.
8254         (arm_emit_load_exclusive): Likewise.
8255         (arm_emit_store_exclusive): Likewise.
8256         (arm_expand_compare_and_swap): Likewise.
8257         (arm_evpc_neon_vuzp): Likewise.
8258         (arm_evpc_neon_vzip): Likewise.
8259         (arm_evpc_neon_vrev): Likewise.
8260         (arm_evpc_neon_vtrn): Likewise.
8261         (arm_evpc_neon_vext): Likewise.
8262         (arm_validize_comparison): Likewise.
8263         * config/arm/neon.md (neon_vc<cmp_op><mode>): Likewise.
8264         * config/avr/avr-c.c (avr_resolve_overloaded_builtin): Likewise.
8265         * config/avr/avr.c (avr_rtx_costs_1): Likewise.
8266         * config/c6x/c6x.c (c6x_vector_mode_supported_p): Likewise.
8267         (c6x_preferred_simd_mode): Likewise.
8268         * config/epiphany/epiphany.c (get_epiphany_condition_code): Likewise.
8269         (epiphany_rtx_costs): Likewise.
8270         * config/epiphany/predicates.md (proper_comparison_operator):
8271         Likewise.
8272         * config/frv/frv.c (condexec_memory_operand): Likewise.
8273         (frv_emit_move): Likewise.
8274         (output_move_single): Likewise.
8275         (output_condmove_single): Likewise.
8276         (frv_hard_regno_mode_ok): Likewise.
8277         (frv_matching_accg_mode): Likewise.
8278         * config/h8300/h8300.c (split_adds_subs): Likewise.
8279         (h8300_rtx_costs): Likewise.
8280         (h8300_print_operand): Likewise.
8281         (compute_mov_length): Likewise.
8282         (output_logical_op): Likewise.
8283         (compute_logical_op_length): Likewise.
8284         (compute_logical_op_cc): Likewise.
8285         (h8300_shift_needs_scratch_p): Likewise.
8286         (output_a_shift): Likewise.
8287         (compute_a_shift_length): Likewise.
8288         (compute_a_shift_cc): Likewise.
8289         (expand_a_rotate): Likewise.
8290         (output_a_rotate): Likewise.
8291         * config/i386/i386.c (classify_argument): Likewise.
8292         (function_arg_advance_32): Likewise.
8293         (function_arg_32): Likewise.
8294         (function_arg_64): Likewise.
8295         (function_value_64): Likewise.
8296         (ix86_gimplify_va_arg): Likewise.
8297         (ix86_legitimate_constant_p): Likewise.
8298         (put_condition_code): Likewise.
8299         (split_double_mode): Likewise.
8300         (ix86_avx256_split_vector_move_misalign): Likewise.
8301         (ix86_expand_vector_logical_operator): Likewise.
8302         (ix86_split_idivmod): Likewise.
8303         (ix86_expand_adjust_ufix_to_sfix_si): Likewise.
8304         (ix86_build_const_vector): Likewise.
8305         (ix86_build_signbit_mask): Likewise.
8306         (ix86_match_ccmode): Likewise.
8307         (ix86_cc_modes_compatible): Likewise.
8308         (ix86_expand_branch): Likewise.
8309         (ix86_expand_sse_cmp): Likewise.
8310         (ix86_expand_sse_movcc): Likewise.
8311         (ix86_expand_int_sse_cmp): Likewise.
8312         (ix86_expand_vec_perm_vpermi2): Likewise.
8313         (ix86_expand_vec_perm): Likewise.
8314         (ix86_expand_sse_unpack): Likewise.
8315         (ix86_expand_int_addcc): Likewise.
8316         (ix86_split_to_parts): Likewise.
8317         (ix86_vectorize_builtin_gather): Likewise.
8318         (ix86_vectorize_builtin_scatter): Likewise.
8319         (avx_vpermilp_parallel): Likewise.
8320         (inline_memory_move_cost): Likewise.
8321         (ix86_tieable_integer_mode_p): Likewise.
8322         (x86_maybe_negate_const_int): Likewise.
8323         (ix86_expand_vector_init_duplicate): Likewise.
8324         (ix86_expand_vector_init_one_nonzero): Likewise.
8325         (ix86_expand_vector_init_one_var): Likewise.
8326         (ix86_expand_vector_init_concat): Likewise.
8327         (ix86_expand_vector_init_interleave): Likewise.
8328         (ix86_expand_vector_init_general): Likewise.
8329         (ix86_expand_vector_set): Likewise.
8330         (ix86_expand_vector_extract): Likewise.
8331         (emit_reduc_half): Likewise.
8332         (ix86_emit_i387_round): Likewise.
8333         (ix86_mangle_type): Likewise.
8334         (ix86_expand_round_sse4): Likewise.
8335         (expand_vec_perm_blend): Likewise.
8336         (canonicalize_vector_int_perm): Likewise.
8337         (ix86_expand_vec_one_operand_perm_avx512): Likewise.
8338         (expand_vec_perm_1): Likewise.
8339         (expand_vec_perm_interleave3): Likewise.
8340         (expand_vec_perm_even_odd_pack): Likewise.
8341         (expand_vec_perm_even_odd_1): Likewise.
8342         (expand_vec_perm_broadcast_1): Likewise.
8343         (ix86_vectorize_vec_perm_const_ok): Likewise.
8344         (ix86_expand_vecop_qihi): Likewise.
8345         (ix86_expand_mul_widen_hilo): Likewise.
8346         (ix86_expand_sse2_abs): Likewise.
8347         (ix86_expand_pextr): Likewise.
8348         (ix86_expand_pinsr): Likewise.
8349         (ix86_preferred_simd_mode): Likewise.
8350         (ix86_simd_clone_compute_vecsize_and_simdlen): Likewise.
8351         * config/i386/sse.md (*andnot<mode>3): Likewise.
8352         (<mask_codefor><code><mode>3<mask_name>): Likewise.
8353         (*<code><mode>3): Likewise.
8354         * config/ia64/ia64.c (ia64_expand_vecint_compare): Likewise.
8355         (ia64_expand_atomic_op): Likewise.
8356         (ia64_arg_type): Likewise.
8357         (ia64_mode_to_int): Likewise.
8358         (ia64_scalar_mode_supported_p): Likewise.
8359         (ia64_vector_mode_supported_p): Likewise.
8360         (expand_vec_perm_broadcast): Likewise.
8361         * config/iq2000/iq2000.c (iq2000_move_1word): Likewise.
8362         (iq2000_function_arg_advance): Likewise.
8363         (iq2000_function_arg): Likewise.
8364         * config/m32c/m32c.c (m32c_preferred_reload_class): Likewise.
8365         * config/m68k/m68k.c (output_dbcc_and_branch): Likewise.
8366         (m68k_libcall_value): Likewise.
8367         (m68k_function_value): Likewise.
8368         (sched_attr_op_type): Likewise.
8369         * config/mcore/mcore.c (mcore_output_move): Likewise.
8370         * config/microblaze/microblaze.c (microblaze_function_arg_advance):
8371         Likewise.
8372         (microblaze_function_arg): Likewise.
8373         * config/mips/mips.c (mips16_build_call_stub): Likewise.
8374         (mips_print_operand): Likewise.
8375         (mips_mode_ok_for_mov_fmt_p): Likewise.
8376         (mips_vector_mode_supported_p): Likewise.
8377         (mips_preferred_simd_mode): Likewise.
8378         (mips_expand_vpc_loongson_even_odd): Likewise.
8379         (mips_expand_vec_unpack): Likewise.
8380         (mips_expand_vi_broadcast): Likewise.
8381         (mips_expand_vector_init): Likewise.
8382         (mips_expand_vec_reduc): Likewise.
8383         (mips_expand_msa_cmp): Likewise.
8384         * config/mips/mips.md (casesi_internal_mips16_<mode>): Likewise.
8385         * config/mn10300/mn10300.c (mn10300_print_operand): Likewise.
8386         (cc_flags_for_mode): Likewise.
8387         * config/msp430/msp430.c (msp430_print_operand): Likewise.
8388         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Likewise.
8389         (nds32_output_casesi_pc_relative): Likewise.
8390         * config/nds32/nds32.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
8391         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Likewise.
8392         (nvptx_gen_unpack): Likewise.
8393         (nvptx_gen_pack): Likewise.
8394         (nvptx_gen_shuffle): Likewise.
8395         (nvptx_gen_wcast): Likewise.
8396         (nvptx_preferred_simd_mode): Likewise.
8397         * config/pa/pa.c (pa_secondary_reload): Likewise.
8398         * config/pa/predicates.md (base14_operand): Likewise.
8399         * config/powerpcspe/powerpcspe-c.c
8400         (altivec_resolve_overloaded_builtin): Likewise.
8401         * config/powerpcspe/powerpcspe.c (rs6000_setup_reg_addr_masks):
8402         Likewise.
8403         (rs6000_preferred_simd_mode): Likewise.
8404         (output_vec_const_move): Likewise.
8405         (rs6000_expand_vector_extract): Likewise.
8406         (rs6000_split_vec_extract_var): Likewise.
8407         (reg_offset_addressing_ok_p): Likewise.
8408         (rs6000_legitimate_offset_address_p): Likewise.
8409         (rs6000_legitimize_address): Likewise.
8410         (rs6000_emit_set_const): Likewise.
8411         (rs6000_const_vec): Likewise.
8412         (rs6000_emit_move): Likewise.
8413         (spe_build_register_parallel): Likewise.
8414         (rs6000_darwin64_record_arg_recurse): Likewise.
8415         (swap_selector_for_mode): Likewise.
8416         (spe_init_builtins): Likewise.
8417         (paired_init_builtins): Likewise.
8418         (altivec_init_builtins): Likewise.
8419         (do_load_for_compare): Likewise.
8420         (rs6000_generate_compare): Likewise.
8421         (rs6000_expand_float128_convert): Likewise.
8422         (emit_load_locked): Likewise.
8423         (emit_store_conditional): Likewise.
8424         (rs6000_output_function_epilogue): Likewise.
8425         (rs6000_handle_altivec_attribute): Likewise.
8426         (rs6000_function_value): Likewise.
8427         (emit_fusion_gpr_load): Likewise.
8428         (emit_fusion_p9_load): Likewise.
8429         (emit_fusion_p9_store): Likewise.
8430         * config/powerpcspe/predicates.md (easy_fp_constant): Likewise.
8431         (fusion_gpr_mem_load): Likewise.
8432         (fusion_addis_mem_combo_load): Likewise.
8433         (fusion_addis_mem_combo_store): Likewise.
8434         * config/rs6000/predicates.md (easy_fp_constant): Likewise.
8435         (fusion_gpr_mem_load): Likewise.
8436         (fusion_addis_mem_combo_load): Likewise.
8437         (fusion_addis_mem_combo_store): Likewise.
8438         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
8439         Likewise.
8440         * config/rs6000/rs6000-string.c (do_load_for_compare): Likewise.
8441         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
8442         (rs6000_preferred_simd_mode): Likewise.
8443         (output_vec_const_move): Likewise.
8444         (rs6000_expand_vector_extract): Likewise.
8445         (rs6000_split_vec_extract_var): Likewise.
8446         (reg_offset_addressing_ok_p): Likewise.
8447         (rs6000_legitimate_offset_address_p): Likewise.
8448         (rs6000_legitimize_address): Likewise.
8449         (rs6000_emit_set_const): Likewise.
8450         (rs6000_const_vec): Likewise.
8451         (rs6000_emit_move): Likewise.
8452         (rs6000_darwin64_record_arg_recurse): Likewise.
8453         (swap_selector_for_mode): Likewise.
8454         (paired_init_builtins): Likewise.
8455         (altivec_init_builtins): Likewise.
8456         (rs6000_expand_float128_convert): Likewise.
8457         (emit_load_locked): Likewise.
8458         (emit_store_conditional): Likewise.
8459         (rs6000_output_function_epilogue): Likewise.
8460         (rs6000_handle_altivec_attribute): Likewise.
8461         (rs6000_function_value): Likewise.
8462         (emit_fusion_gpr_load): Likewise.
8463         (emit_fusion_p9_load): Likewise.
8464         (emit_fusion_p9_store): Likewise.
8465         * config/rx/rx.c (rx_gen_move_template): Likewise.
8466         (flags_from_mode): Likewise.
8467         * config/s390/predicates.md (s390_alc_comparison): Likewise.
8468         (s390_slb_comparison): Likewise.
8469         * config/s390/s390.c (s390_handle_vectorbool_attribute): Likewise.
8470         (s390_vector_mode_supported_p): Likewise.
8471         (s390_cc_modes_compatible): Likewise.
8472         (s390_match_ccmode_set): Likewise.
8473         (s390_canonicalize_comparison): Likewise.
8474         (s390_emit_compare_and_swap): Likewise.
8475         (s390_branch_condition_mask): Likewise.
8476         (s390_rtx_costs): Likewise.
8477         (s390_secondary_reload): Likewise.
8478         (__SECONDARY_RELOAD_CASE): Likewise.
8479         (s390_expand_cs): Likewise.
8480         (s390_preferred_simd_mode): Likewise.
8481         * config/s390/vx-builtins.md (vec_packsu_u<mode>): Likewise.
8482         * config/sh/sh.c (sh_print_operand): Likewise.
8483         (dump_table): Likewise.
8484         (sh_secondary_reload): Likewise.
8485         * config/sh/sh.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
8486         * config/sh/sh.md (casesi_worker_1): Likewise.
8487         (casesi_worker_2): Likewise.
8488         * config/sparc/predicates.md (icc_comparison_operator): Likewise.
8489         (fcc_comparison_operator): Likewise.
8490         * config/sparc/sparc.c (sparc_expand_move): Likewise.
8491         (emit_soft_tfmode_cvt): Likewise.
8492         (sparc_preferred_simd_mode): Likewise.
8493         (output_cbranch): Likewise.
8494         (sparc_print_operand): Likewise.
8495         (sparc_expand_vec_perm_bmask): Likewise.
8496         (vector_init_bshuffle): Likewise.
8497         * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
8498         (spu_vector_mode_supported_p): Likewise.
8499         (spu_expand_insv): Likewise.
8500         (spu_emit_branch_or_set): Likewise.
8501         (spu_handle_vector_attribute): Likewise.
8502         (spu_builtin_splats): Likewise.
8503         (spu_builtin_extract): Likewise.
8504         (spu_builtin_promote): Likewise.
8505         (spu_expand_sign_extend): Likewise.
8506         * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
8507         (tilegx_simd_int): Likewise.
8508         * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p): Likewise.
8509         (tilepro_simd_int): Likewise.
8510         * config/v850/v850.c (const_double_split): Likewise.
8511         (v850_print_operand): Likewise.
8512         (ep_memory_offset): Likewise.
8513         * config/vax/vax.c (vax_rtx_costs): Likewise.
8514         (vax_output_int_move): Likewise.
8515         (vax_output_int_add): Likewise.
8516         (vax_output_int_subtract): Likewise.
8517         * config/visium/predicates.md (visium_branch_operator): Likewise.
8518         * config/visium/visium.c (rtx_ok_for_offset_p): Likewise.
8519         (visium_print_operand_address): Likewise.
8520         * config/visium/visium.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
8521         * config/xtensa/xtensa.c (xtensa_mem_offset): Likewise.
8522         (xtensa_expand_conditional_branch): Likewise.
8523         (xtensa_copy_incoming_a7): Likewise.
8524         (xtensa_output_literal): Likewise.
8525         * dfp.c (decimal_real_maxval): Likewise.
8526         * targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
8528 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8529             Alan Hayward  <alan.hayward@arm.com>
8530             David Sherwood  <david.sherwood@arm.com>
8532         * genmodes.c (mode_size_inline): Add an E_ prefix to mode names.
8533         (mode_nunits_inline): Likewise.
8534         (mode_inner_inline): Likewise.
8535         (mode_unit_size_inline): Likewise.
8536         (mode_unit_precision_inline): Likewise.
8537         (emit_insn_modes_h): Likewise.  Also emit a #define of the
8538         unprefixed name.
8539         (emit_mode_wider): Add an E_ prefix to mode names.
8540         (emit_mode_complex): Likewise.
8541         (emit_mode_inner): Likewise.
8542         (emit_mode_adjustments): Likewise.
8543         (emit_mode_int_n): Likewise.
8544         * config/aarch64/aarch64-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP)
8545         (v2si_UP, v2sf_UP, v1df_UP, di_UP, df_UP, v16qi_UP, v8hi_UP, v8hf_UP)
8546         (v4si_UP, v4sf_UP, v2di_UP, v2df_UP, ti_UP, oi_UP, ci_UP, xi_UP)
8547         (si_UP, sf_UP, hi_UP, hf_UP, qi_UP): Likewise.
8548         (CRC32_BUILTIN, ENTRY): Likewise.
8549         * config/aarch64/aarch64.c (aarch64_push_regs): Likewise.
8550         (aarch64_pop_regs): Likewise.
8551         (aarch64_process_components): Likewise.
8552         * config/alpha/alpha.c (alpha_emit_conditional_move): Likewise.
8553         * config/arm/arm-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP, v2si_UP)
8554         (v2sf_UP, di_UP, v16qi_UP, v8hi_UP, v8hf_UP, v4si_UP, v4sf_UP)
8555         (v2di_UP, ti_UP, ei_UP, oi_UP, hf_UP, si_UP, void_UP): Likewise.
8556         * config/arm/arm.c (arm_init_libfuncs): Likewise.
8557         * config/i386/i386-builtin-types.awk (ix86_builtin_type_vect_mode):
8558         Likewise.
8559         * config/i386/i386-builtin.def (pcmpestr): Likewise.
8560         (pcmpistr): Likewise.
8561         * config/microblaze/microblaze.c (double_memory_operand): Likewise.
8562         * config/mmix/mmix.c (mmix_output_condition): Likewise.
8563         * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
8564         Likewise.
8565         * config/rl78/rl78.c (mduc_regs): Likewise.
8566         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
8567         (htm_expand_builtin): Likewise.
8568         * config/sh/sh.h (REGISTER_NATURAL_MODE): Likewise.
8569         * config/sparc/sparc.c (emit_save_or_restore_regs): Likewise.
8570         * config/xtensa/xtensa.c (print_operand): Likewise.
8571         * expmed.h (NUM_MODE_PARTIAL_INT): Likewise.
8572         (NUM_MODE_VECTOR_INT): Likewise.
8573         * genoutput.c (null_operand): Likewise.
8574         (output_operand_data): Likewise.
8575         * genrecog.c (print_parameter_value): Likewise.
8576         * lra.c (debug_operand_data): Likewise.
8578 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8580         * dwarf2out.c (scompare_loc_descriptor_wide)
8581         (scompare_loc_descriptor_narrow): New functions, split out from...
8582         (scompare_loc_descriptor): ...here.
8583         * expmed.c (emit_store_flag_int): New function, split out from...
8584         (emit_store_flag): ...here.
8586 2017-08-30  Richard Biener  <rguenther@suse.de>
8588         * dwarf2out.c (dwarf2out_finish): Remove setting AT_pubnames.
8589         (dwarf2out_early_finish): Move setting of AT_pubnames from
8590         early debug output to early finish.
8592 2017-08-30  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
8594         * gcc/config/msp430/msp430.h: Pass -mcode/data-region to the linker
8595         and -mdata-region to the assembler.
8597 2017-08-30  Richard Biener  <rguenther@suse.de>
8599         * dwarf2out.c (add_dwarf_attr): Check we don't add duplicate
8600         attributes.
8601         (gen_subprogram_die): Add DW_AT_object_pointer only early.
8602         (dwarf2out_early_global_decl): Only generate a DIE for the
8603         abstract origin if it doesn't already exist or is a declaration DIE.
8604         (resolve_addr): Do not add the linkage name twice when
8605         generating a stub DIE for the DW_TAG_GNU_call_site target.
8607 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
8609         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
8610         Use machine_mode rather than int for arg1_mode.
8612 2017-08-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
8614         PR target/82015
8615         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Insure
8616         that the second argument of the built-in functions to unpack
8617         128-bit scalar types to 64-bit values is 0 or 1.  Change to use a
8618         switch statement instead a lot of if statements.
8619         * config/rs6000/rs6000.md (unpack<mode>, FMOVE128_VSX iterator):
8620         Allow 64-bit values to be in Altivec registers as well as
8621         traditional floating point registers.
8622         (pack<mode>, FMOVE128_VSX iterator): Likewise.
8624 2017-08-29  Alexander Monakov  <amonakov@ispras.ru>
8626         * ira-costs.c (record_address_regs): Handle both operands of PLUS for
8627         MAX_REGS_PER_ADDRESS == 1.
8629 2017-08-29  Uros Bizjak  <ubizjak@gmail.com>
8631         * config/i386/i386.opt (flag_fentry): Do not init to -1.
8632         * config/i386/i386.c (ix86_option_override_internal): Simplify
8633         setting of opts->x_flag_entry.
8635 2017-08-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8636             Jakub Jelinek  <jakub@redhat.com>
8637             Richard Biener  <rguenther@suse.de>
8639         PR tree-optimization/81503
8640         * gimple-ssa-strength-reduction.c (replace_mult_candidate): Ensure
8641         folded constant fits in the target type; reorder tests for clarity.
8643 2017-08-29  Martin Liska  <mliska@suse.cz>
8645         * passes.def: Include pass_lower_switch.
8646         * stmt.c (dump_case_nodes): Remove and move to
8647         tree-switch-conversion.
8648         (case_values_threshold): Likewise.
8649         (expand_switch_as_decision_tree_p): Likewise.
8650         (emit_case_decision_tree): Likewise.
8651         (expand_case): Likewise.
8652         (balance_case_nodes): Likewise.
8653         (node_has_low_bound): Likewise.
8654         (node_has_high_bound): Likewise.
8655         (node_is_bounded): Likewise.
8656         (emit_case_nodes): Likewise.
8657         (struct simple_case_node): New struct.
8658         (add_case_node): Remove.
8659         (emit_case_dispatch_table): Use vector instead of case_list.
8660         (reset_out_edges_aux): Remove.
8661         (compute_cases_per_edge): Likewise.
8662         (expand_case): Build list of simple_case_node.
8663         (expand_sjlj_dispatch_table): Use it.
8664         * tree-switch-conversion.c (struct case_node): Moved from
8665         stmt.c and adjusted.
8666         (emit_case_nodes): Likewise.
8667         (node_has_low_bound): Likewise.
8668         (node_has_high_bound): Likewise.
8669         (node_is_bounded): Likewise.
8670         (case_values_threshold): Likewise.
8671         (reset_out_edges_aux): Likewise.
8672         (compute_cases_per_edge): Likewise.
8673         (add_case_node): Likewise.
8674         (dump_case_nodes): Likewise.
8675         (balance_case_nodes): Likewise.
8676         (expand_switch_as_decision_tree_p): Likewise.
8677         (emit_jump): Likewise.
8678         (emit_case_decision_tree): Likewise.
8679         (try_switch_expansion): Likewise.
8680         (do_jump_if_equal): Likewise.
8681         (emit_cmp_and_jump_insns): Likewise.
8682         (fix_phi_operands_for_edge): New function.
8683         (record_phi_operand_mapping): Likewise.
8684         (class pass_lower_switch): New pass.
8685         (pass_lower_switch::execute): New function.
8686         (make_pass_lower_switch): Likewise.
8687         (conditional_probability):
8688         * timevar.def: Add TV_TREE_SWITCH_LOWERING.
8689         * tree-pass.h: Add make_pass_lower_switch.
8691 2017-08-29  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
8693         PR target/80993
8694         * gcc/config/msp430/msp430.c (msp430_attr): Mark interrupt
8695         handlers as used.
8697 2017-08-29  Richard Biener  <rguenther@suse.de>
8699         * dwarf2out.c (add_dwarf_attr): When checking is enabled verify
8700         we do not add a DW_AT_inline attribute twice.
8701         (gen_subprogram_die): Remove code setting DW_AT_inline on
8702         DECL_ABSTRACT_P nodes.
8704 2017-08-29  Richard Sandiford  <richard.sandiford@linaro.org>
8706         * gimplify.c (gimplify_call_expr): Copy the nothrow flag to
8707         calls to internal functions.
8708         (gimplify_modify_expr): Likewise.
8709         * tree-call-cdce.c (use_internal_fn): Likewise.
8710         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
8711         (convert_to_divmod): Set the nothrow flag.
8712         * tree-if-conv.c (predicate_mem_writes):  Likewise.
8713         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
8714         (vectorizable_call): Likewise.
8715         (vectorizable_store): Likewise.
8716         (vectorizable_load): Likewise.
8717         * tree-vect-patterns.c (vect_recog_pow_pattern): Likewise.
8718         (vect_recog_mask_conversion_pattern): Likewise.
8720 2017-08-29  Martin Liska  <mliska@suse.cz>
8722         PR other/39851
8723         * gcc.c (driver_handle_option): Add new argument.
8724         * opts-common.c (handle_option): Pass
8725         target_option_override_hook.
8726         * opts-global.c (lang_handle_option): Add new option.
8727         (set_default_handlers):  Add new argument.
8728         (decode_options): Likewise.
8729         * opts.c (target_handle_option): Likewise.
8730         (common_handle_option): Call target_option_override_hook.
8731         * opts.h (struct cl_option_handler_func): Add hook for
8732         target option override.
8733         (struct cl_option_handlers): Likewise.
8734         (set_default_handlers): Add new argument.
8735         (decode_options): Likewise.
8736         (common_handle_option): Likewise.
8737         (target_handle_option): Likewise.
8738         * toplev.c (toplev::main): Pass targetm.target_option.override
8739         hook.
8741 2017-08-29  Richard Biener  <rguenther@suse.de>
8742         Dominik Infuehr <dominik.infuehr@theobroma-systems.com>
8744         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Properly confine
8745         life to the active subtree.
8747 2017-08-28  Jeff Law  <law@redhat.com>
8749         * tree-ssa-dom.c (edge_info::record_simple_equiv): Call
8750         derive_equivalences.
8751         (derive_equivalences_from_bit_ior, record_temporary_equivalences):
8752         Code moved into....
8753         (edge_info::derive_equivalences): New private member function
8755         * tree-ssa-dom.c (class edge_info): Changed from a struct
8756         to a class.  Add ctor/dtor, methods and data members.
8757         (edge_info::edge_info): Renamed from allocate_edge_info.
8758         Initialize additional members.
8759         (edge_info::~edge_info): New.
8760         (free_dom_edge_info): Delete the edge info.
8761         (record_edge_info): Use new class & associated member functions.
8762         Tighten forms for testing for edge equivalences.
8763         (record_temporary_equivalences): Iterate over the simple
8764         equivalences rather than assuming there's only one per edge.
8765         (cprop_into_successor_phis): Iterate over the simple
8766         equivalences rather than assuming there's only one per edge.
8767         (optimize_stmt): Use operand_equal_p rather than pointer
8768         equality for mini-DSE code.
8770 2017-08-28  Nathan Sidwell  <nathan@acm.org>
8772         * gcc.c (execute): Fold SIGPIPE handling into switch
8773         statement.  Adjust internal error message.
8775 2017-08-28  Richard Biener  <rguenther@suse.de>
8777         PR debug/81993
8778         * dwarf2out.c (gen_remaining_tmpl_value_param_die_attributes):
8779         Do nothing for removed DIEs.
8781 2017-08-28  Richard Biener  <rguenther@suse.de>
8783         PR tree-optimization/81977
8784         * tree-ssa-sccvn.c (vn_reference_lookup_3): Fix look through
8785         memcpy.
8787 2017-08-28  Alexander Monakov  <amonakov@ispras.ru>
8789         PR target/80640
8790         * doc/md.texi (mem_thread_fence): Remove mention of mode.  Rewrite.
8791         * optabs.c (expand_mem_thread_fence): Emit a compiler barrier when
8792         using targetm.gen_mem_thread_fence.
8794 2017-08-27  Uros Bizjak  <ubizjak@gmail.com>
8796         PR target/81995
8797         * config/i386/i386.md (*<btsc><mode>): Change operand 2
8798         predicate to register_operand.  Reorder operands.
8799         (*btr<mode>): Ditto.
8800         (*<btsc><mode>_mask): Change operand 3 predicate to register_operand.
8801         (*btr<mode>_mask): Ditto.
8803 2017-08-25  Steven Munroe  <munroesj@gcc.gnu.org>
8805         * config.gcc (powerpc*-*-*): Add xmmintrin.h and mm_malloc.h.
8806         * config/rs6000/xmmintrin.h: New file.
8807         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include xmmintrin.h.
8809 2017-08-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8811         PR target/81504
8812         * config/rs6000/rs6000-p8swap.c (find_alignment_op): Add reference
8813         parameter and_insn and return it.
8814         (recombine_lvx_pattern): Insert a copy to ensure availability of
8815         the base register of the copied masking operation at the point of
8816         the instruction replacement.
8817         (recombine_stvx_pattern): Likewise.
8819 2017-08-25  Michael Meissner  <meissner@linux.vnet.ibm.com>
8821         * config/rs6000/rs6000.opt (-mpower9-dform-scalar): Delete
8822         undocumented switches.
8823         (-mpower9-dform-vector): Likewise.
8824         (-mpower9-dform): Likewise.
8825         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
8826         comments to delete references to -mpower9-dform* switches.
8827         * config/rs6000/predicates.md (vsx_quad_dform_memory_operand):
8828         Delete reference to -mpower9-dform* switches, test for
8829         -mpower9-vector instead.
8830         * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Likewise.
8831         (OTHER_P9_VECTOR_MASKS): Likewise.
8832         (POWERPC_MASKS): Likewise.
8833         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Change
8834         tests against -mpower9-dform* to -mpower9-vector.  Delete code
8835         that checked for -mpower9-dform* consistancy with other options.
8836         Add test for -mpower9-misc to enable other power9 switches.
8837         (rs6000_init_hard_regno_mode_ok): Likewise.
8838         (rs6000_option_override_internal): Likewise.
8839         (rs6000_emit_prologue): Likewise.
8840         (rs6000_emit_epilogue): Likewise.
8841         (rs6000_opt_masks): Delete -mpower9-dform-{scalar,vector}.
8842         (rs6000_disable_incompatiable_switches): Delete -mpower9-dform.
8843         (emit_fusion_p9_load): Change tests for -mpower9-dform-scalar
8844         -mpower9-vector.
8845         (emit_fusion_p9_store): Likewise.
8846         * config/rs6000/rs6000.h (TARGET_P9_DFORM_SCALAR): Delete
8847         resetting these macros if the assembler does not support ISA 3.0
8848         instructions.
8849         (TARGET_P9_DFORM_VECTOR): Likewise.
8850         * config/rs6000/rs6000.md (peepholes to optimize altivec memory):
8851         Change to use -mpower9-vector instead of -mpower9-dform-scalar.
8853 2017-08-25  Alan Modra  <amodra@gmail.com>
8855         PR rtl-optimization/81747
8856         * cse.c (cse_extended_basic_block): Don't attempt to record
8857         equivalences for degenerate conditional branches that branch
8858         to their fall-through.
8860 2017-08-24  Martin Sebor  <msebor@redhat.com>
8862         PR middle-end/81908
8863         * gimple-fold.c (size_must_be_zero_p): New function.
8864         (gimple_fold_builtin_memory_op): Call it.
8866 2017-08-24  Steven Munroe  <munroesj@gcc.gnu.org>
8868         * config/rs6000/mm_malloc.h: New file.
8870 2017-08-24  Bin Cheng  <bin.cheng@arm.com>
8872         PR tree-optimization/81913
8873         * tree-ssa-loop-niter.c (number_of_iterations_cond): Skip niter
8874         analysis when either IVs in condition can wrap.
8876 2017-08-24  Uros Bizjak  <ubizjak@gmail.com>
8878         * dwarf2out.c (MAX_ARTIFICIAL_LABEL_BYTES): Increase to 40.
8879         * dwarf2cfi.c (MAX_ARTIFICIAL_LABEL_BYTES): Remove.
8881 2017-08-24  Richard Biener  <rguenther@suse.de>
8883         PR target/81921
8884         * targhooks.c (default_target_can_inline_p): Properly
8885         use target_option_default_node when no DECL_FUNCTION_SPECIFIC_TARGET
8886         is present and always compare.
8887         * config/i386/i386.c (ix86_valid_target_attribute_tree): Do not
8888         infer -mfpmath=sse from TARGET_SSE_P.
8889         (ix86_can_inline_p): Properly use target_option_default_node when
8890         no DECL_FUNCTION_SPECIFIC_TARGET is present and always compare.
8892 2017-08-24  Richard Biener  <rguenther@suse.de>
8894         PR debug/81936
8895         * dwarf2out.c (output_die): Handle flag_generate_offload like
8896         flag_generate_lto.
8897         (output_comp_unit): Likewise.
8898         (gen_array_type_die): Likewise.
8899         (dwarf2out_early_finish): Likewise.
8900         (note_variable_value_in_expr): Likewise.
8901         (dwarf2out_finish): Likewise.  Adjust assert.
8902         * cgraphunit.c (symbol_table::compile): Move setting of
8903         flag_generate_offload earlier ...
8904         (symbol_table::finalize_compilation_unit): ... here, before
8905         early debug finalization.
8907 2017-08-24  Richard Biener  <rguenther@suse.de>
8909         * config/i386/i386.c: Include symbol-summary.h, ipa-prop.h
8910         and ipa-fnsummary.h.
8911         (ix86_can_inline_p): When ix86_fpmath flags do not match
8912         check whether the callee uses FP math at all.
8914 2017-08-24  Aldy Hernandez  <aldyh@redhat.com>
8916         PR middle-end/81931
8917         * tree-ssanames.c (get_nonzero_bits): Use element_precision
8918         instead of TYPE_PRECISION.
8920 2017-08-24  Richard Sandiford  <richard.sandiford@linaro.org>
8921             Alan Hayward  <alan.hayward@arm.com>
8922             David Sherwood  <david.sherwood@arm.com>
8924         * combine.c (make_extraction): Use subreg_offset_from_lsb.
8926 2017-08-23  Daniel Santos  <daniel.santos@pobox.com>
8928         * config/i386/i386.h (ix86_frame::stack_realign_allocate_offset):
8929         Remove field.
8930         (ix86_frame::stack_realign_allocate): New field.
8931         (struct machine_frame_state): Modify comments.
8932         (machine_frame_state::sp_realigned_fp_end): New field.
8933         * config/i386/i386.c (ix86_compute_frame_layout): Rework stack frame
8934         layout calculation.
8935         (sp_valid_at): Add assertion to assure no attempt to access invalid
8936         offset of a realigned stack.
8937         (fp_valid_at): Likewise.
8938         (choose_baseaddr): Modify comments.
8939         (ix86_emit_outlined_ms2sysv_save): Adjust to changes in
8940         ix86_expand_prologue.
8941         (ix86_expand_prologue): Modify stack realignment and allocation.
8942         (ix86_expand_epilogue): Modify comments.
8943         * doc/sourcebuild.texi: Add documentation for target selectors avx2,
8944         avx2_runtime, avx512f, and avx512f_runtime.
8946 2017-08-23  Uros Bizjak  <ubizjak@gmail.com>
8948         * config/i386/i386.opt: Remove unneeded Init(0) initializations.
8949         (mstackrealign): Do not init to -1.
8950         * config/i386/i386.c (ix86_option_override_internal):
8951         Check opts_set, not opts when setting default value of
8952         opts->x_ix86_force_align_arg_pointer.
8954 2017-08-23  Richard Biener  <rguenther@suse.de>
8956         * function.c (fndecl_name): Use verbosity 1 (no arguments) for
8957         lang_hooks.decl_printable_name.
8958         * print-rtl-function.c (print_rtx_function): Likewise.
8959         * tree-pretty-print.c (dump_function_header): Likewise.
8961 2017-08-23  Richard Biener  <rguenther@suse.de>
8963         PR lto/81940
8964         * dwarf2out.c (dwarf2out_abstract_function): Handle LTO with
8965         -g0 at compile-time.
8967 2017-08-23  Tamar Christina  <tamar.christina@arm.com>
8969         PR middle-end/19706
8970         * doc/sourcebuild.texi (Other hardware attributes):
8971         Document xorsign.
8973 2017-08-23  Tamar Christina  <tamar.christina@arm.com>
8975         PR middle-end/19706
8976         * tree-ssa-math-opts.c (convert_expand_mult_copysign):
8977         Fix single-use check.
8979 2017-08-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>
8981         * gcc.c (execute): Only test for SIGKILL and SIGQUIT if available.
8983 2017-08-22  Daniel Santos  <daniel.santos@pobox.com>
8985         * doc/install.texi: Modify to add more details on running selected
8986         tests.
8988 2017-08-22  Daniel Santos  <daniel.santos@pobox.com>
8990         * config/i386/i386.c (ix86_option_override_internal): Error when -mx32
8991         is combined with -mabi=ms.
8992         (ix86_function_type_abi): Limit errors for mixing -mx32 with attribute
8993         ms_abi.
8995 2017-08-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8997         PR tree-optimization/81488
8998         * gimple-ssa-strength-reduction (struct slsr_cand_d): Add visited
8999         and cached_basis fields.
9000         (MAX_SPREAD): New constant.
9001         (alloc_cand_and_find_basis): Initialize new fields.
9002         (clear_visited): New function.
9003         (create_phi_basis_1): Rename from create_phi_basis, set visited
9004         and cached_basis fields.
9005         (create_phi_basis): New wrapper function.
9006         (phi_add_costs_1): Rename from phi_add_costs, add spread
9007         parameter, set visited field, short-circuit when limits reached.
9008         (phi_add_costs): New wrapper function.
9009         (record_phi_increments_1): Rename from record_phi_increments, set
9010         visited field.
9011         (record_phi_increments): New wrapper function.
9012         (phi_incr_cost_1): Rename from phi_incr_cost, set visited field.
9013         (phi_incr_cost): New wrapper function.
9014         (all_phi_incrs_profitable_1): Rename from
9015         all_phi_incrs_profitable, set visited field.
9016         (all_phi_incrs_profitable): New wrapper function.
9018 2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
9019             Alan Hayward  <alan.hayward@arm.com>
9020             David Sherwood  <david.sherwood@arm.com>
9022         * rtl.h (paradoxical_subreg_p): Define inline, and add a version
9023         that takes the outer and inner modes.
9024         * doc/rtl.texi: Use paradoxical_subreg_p instead of a GET_MODE_SIZE
9025         comparison as the canonical test for a paradoxical subreg.
9026         * combine.c (simplify_set): Use paradoxical_subreg_p.
9027         (make_extraction): Likewise.
9028         (force_to_mode): Likewise.
9029         (rtx_equal_for_field_assignment_p): Likewise.
9030         (gen_lowpart_for_combine): Likewise.
9031         (simplify_comparison): Likewise.
9032         * cse.c (equiv_constant): Likewise.
9033         * expmed.c (store_bit_field_1): Likewise.
9034         * final.c (alter_subreg): Likewise.
9035         * fwprop.c (propagate_rtx): Likewise.
9036         (forward_propagate_subreg): Likewise.
9037         * ira-conflicts.c (ira_build_conflicts): Likewise.
9038         * lower-subreg.c (simplify_gen_subreg_concatn): Likewise.
9039         * lra-constraints.c (curr_insn_transform): Likewise.
9040         (split_reg): Likewise.
9041         * lra-eliminations.c (move_plus_up): Likewise.
9042         (lra_eliminate_regs_1): Likewise.
9043         * recog.c (general_operand): Likewise.
9044         * ree.c (combine_reaching_defs): Likewise.
9045         * reload.c (push_reload): Likewise.
9046         (find_reloads): Likewise.
9047         * reload1.c (elimination_effects): Likewise.
9048         (compute_reload_subreg_offset): Likewise.
9049         (choose_reload_regs): Likewise.
9050         * rtlanal.c (subreg_lsb_1): Likewise.
9051         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
9052         (simplify_subreg): Likewise.
9053         * var-tracking.c (track_loc_p): Likewise.
9054         * emit-rtl.c (byte_lowpart_offset): Likewise.
9055         (paradoxical_subreg_p): Delete out-of-line definition.
9057 2017-08-22  Jeff Law  <law@redhat.com>
9059         PR tree-optimization/81741
9060         PR tree-optimization/71947
9061         * tree-ssa-dom.c: Include tree-inline.h.
9062         (record_temporary_equivalences): Only record SSA_NAME = SSA_NAME
9063         equivalences if one is more expensive to compute than the other.
9064         * tree-ssa-scopedtables.h (class const_or_copies): Make
9065         record_const_or_copy_raw method private.
9066         (class avail_exprs_stack): New method simplify_binary_operation.
9067         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr): Call
9068         avail_exprs_stack::simplify_binary_operation as needed.
9069         (avail_exprs_stack::simplify_binary_operation): New function.
9071 2017-08-22  Sebastian Huber  <sebastian.huber@embedded-brains.de>
9073         * config.gcc (powerpc-*-rtems*): Add rs6000/linux64.opt.
9074         * config/rs6000/rtems.h (ASM_PREFERRED_EH_DATA_FORMAT): New define.
9075         (DOT_SYMBOLS): Likewise.
9076         (MINIMAL_TOC_SECTION_ASM_OP): Likewise.
9077         (RELOCATABLE_NEEDS_FIXUP): Likewise.
9078         (RS6000_ABI_NAME): Likewise.
9079         (TARGET_CMODEL): Likewise.
9080         (TOC_SECTION_ASM_OP): Likewise.
9081         (SET_CMODEL): New macro.
9082         (SUBSUBTARGET_OVERRIDE_OPTIONS): Evaluate cmodel options.
9084 2017-08-22  Richard Biener  <rguenther@suse.de>
9086         * tree-inline.c (remap_type_1): Change asserts on TYPE_SIZE[_UNIT]
9087         to allow for free-lang-data replacements similar to verify_type_variant.
9089 2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
9090             Alan Hayward  <alan.hayward@arm.com>
9091             David Sherwood  <david.sherwood@arm.com>
9093         * config/aarch64/aarch64.md (casesi): Use DImode rather than
9094         VOIDmode for the LABEL_REF.
9096 2017-08-22  Richard Biener  <rguenther@suse.de>
9098         * tree-cfg.c (gimple_split_edge): Avoid reallocating target PHI nodes.
9100 2017-08-22  Richard Biener  <rguenther@suse.de>
9102         * common.opt (feliminate-dwarf2-dups): Ignore.
9103         * doc/invoke.texi (feliminate-dwarf2-dups): Remove documentation.
9104         * dwarf2out.c (push_new_compile_unit, pop_compile_unit,
9105         same_die_p_wrap, compute_section_prefix,
9106         is_symbol_die, assign_symbol_names, break_out_includes): Remove.
9107         (comdat_symbol_id, comdat_symbol_number): Likewise.
9108         (cu_hash_table_entry, cu_hash_table_entry_hasher, cu_hash_type):
9109         Likewise.
9110         (check_duplicate_cu, record_comdat_symbol_number): Likewise.
9111         (output_die): Mark unreachable path unreachable.
9112         (dwarf2out_start_source_file): Do not create DW_TAG_GNU_BINCL.
9113         (dwarf2out_end_source_file): Do not create DW_TAG_GNU_EINCL.
9114         (dwarf2out_init): Remove code handling flag_eliminate_dwarf2_dups.
9115         (dwarf2out_early_finish): Likewise.
9117 2017-08-22  Aldy Hernandez  <aldyh@redhat.com>
9119         * wide-int.h (hwi_with_prec::hwi_with_prec): Sign extend.
9121 2017-08-22  Georg-Johann Lay  <avr@gjlay.de>
9123         PR target/81910
9124         * config/avr/avr.c (avr_handle_addr_attribute): Early return if
9125         not VAR_P. Filter attribute warnings with OPT_Wattributes.
9126         (avr_attribute_table) <io, io_low, address>: Initialize
9127         .decl_required with true.
9129 2017-08-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
9131         * config/rs6000/rs6000-cpus.def (-mvsx-scalar-float): Delete
9132         undocumented debugging options.
9133         (-mvsx-scalar-double): Likewise.
9134         (-mallow-df-permute): Likewise.
9135         (-mvectorize-builtins): Likewise.
9136         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
9137         (rs6000_builtin_vectorized_function): Likewise.
9138         (rs6000_builtin_md_vectorized_function): Likewise.
9139         (rs6000_opt_vars): Likewise.
9141 2017-08-21  Uros Bizjak  <ubizjak@gmail.com>
9143         PR target/46091
9144         * config/i386/i386.md (*btsq_imm): Rename from *btsq.
9145         (*btrq_imm): Rename from *btrq.
9146         (*btcq_imm): Rename from *btcq.
9147         (btsc): New code attribute.
9148         (*<btsc><mode>): New insn pattern.
9149         (*btr<mode>): Ditto.
9150         (*<btsc><mode>_mask): New insn_and_split pattern.
9151         (*btr<mode>_mask): Ditto.
9153 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
9154             Alan Hayward  <alan.hayward@arm.com>
9155             David Sherwood  <david.sherwood@arm.com>
9157         * function.c (pad_below): Simplify padding calculation.
9159 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
9160             Alan Hayward  <alan.hayward@arm.com>
9161             David Sherwood  <david.sherwood@arm.com>
9163         * target.def (function_prologue): Remove frame size argument.
9164         (function_epilogue): Likewise.
9165         * doc/tm.texi: Regenerate.
9166         * final.c (final_start_function): Update call to function_prologue.
9167         (final_end_function): Update call to function_epilogue.
9168         (default_function_pro_epilogue): Remove frame size argument.
9169         * output.h (default_function_pro_epilogue): Likewise.
9170         * config/arm/arm.c (arm_output_function_epilogue): Likewise.
9171         (arm_output_function_prologue): Likewise.
9172         * config/frv/frv.c (frv_function_prologue): Likewise.
9173         (frv_function_epilogue): Likewise.
9174         * config/i386/i386.c (ix86_output_function_epilogue): Likewise.
9175         * config/ia64/ia64.c (ia64_output_function_prologue): Likewise.
9176         (ia64_output_function_epilogue): Likewise.
9177         * config/m32r/m32r.c (m32r_output_function_prologue): Likewise.
9178         (m32r_output_function_epilogue): Likewise.
9179         * config/microblaze/microblaze.c (microblaze_function_prologue)
9180         (microblaze_function_epilogue): Likewise.
9181         * config/mips/mips.c (mips_output_function_prologue): Likewise.
9182         (mips_output_function_epilogue): Likewise.
9183         * config/mmix/mmix.c (mmix_target_asm_function_prologue): Likewise.
9184         (mmix_target_asm_function_epilogue): Likewise.
9185         * config/msp430/msp430.c (msp430_start_function): Likewise.
9186         * config/nds32/nds32.c (nds32_asm_function_prologue): Likewise.
9187         (nds32_asm_function_epilogue): Likewise.
9188         * config/nios2/nios2.c (nios2_asm_function_prologue): Likewise.
9189         * config/pa/pa.c (pa_output_function_prologue): Likewise.
9190         (pa_output_function_epilogue): Likewise.
9191         * config/powerpcspe/powerpcspe.c (rs6000_output_function_prologue)
9192         (rs6000_output_function_epilogue): Likewise.
9193         * config/rl78/rl78.c (rl78_start_function): Likewise.
9194         * config/rs6000/rs6000.c (rs6000_output_function_prologue): Likewise.
9195         (rs6000_output_function_epilogue): Likewise.
9196         * config/rx/rx.c (rx_output_function_prologue): Likewise.
9197         * config/sh/sh.c (sh_output_function_epilogue): Likewise.
9198         * config/sparc/sparc.c (sparc_asm_function_prologue): Likewise.
9199         (sparc_asm_function_epilogue): Likewise.
9201 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
9203         * tree.h (type_has_mode_precision_p): New function.
9204         * convert.c (convert_to_integer_1): Use it.
9205         * expr.c (expand_expr_real_2): Likewise.
9206         (expand_expr_real_1): Likewise.
9207         * fold-const.c (fold_single_bit_test_into_sign_test): Likewise.
9208         * match.pd: Likewise.
9209         * tree-ssa-forwprop.c (simplify_rotate): Likewise.
9210         * tree-ssa-math-opts.c (convert_mult_to_fma): Likewise.
9211         * tree-tailcall.c (process_assignment): Likewise.
9212         * tree-vect-loop.c (vectorizable_reduction): Likewise.
9213         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern)
9214         (vect_recog_mult_pattern, vect_recog_divmod_pattern): Likewise.
9215         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
9216         (vectorizable_assignment): Likewise.
9217         (vectorizable_shift): Likewise.
9218         (vectorizable_operation): Likewise.
9219         * tree-vrp.c (register_edge_assert_for_2): Likewise.
9221 2017-08-21  Wilco Dijkstra  <wdijkstr@arm.com>
9223         * match.pd: Add pow (C, x) simplification.
9225 2017-08-21  Richard Biener  <rguenther@suse.de>
9227         PR tree-optimization/81900
9228         * tree-ssa-pre.c (compute_antic_aux): Properly compute changed
9229         for blocks with abnormal predecessors.
9230         (compute_antic): Do not set visited flag prematurely.
9232 2017-08-21  Georg-Johann Lay  <avr@gjlay.de>
9234         PR target/79883
9235         * config/avr/avr.c (avr_set_current_function): Typo in diagnostic.
9237 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
9239         * stor-layout.h (vector_type_mode): Move to...
9240         * tree.h (vector_type_mode): ...here.
9241         * stor-layout.c (vector_type_mode): Move to...
9242         * tree.c (vector_type_mode): ...here.  Include rtl.h and regs.h.
9244 2017-08-21  Richard Biener  <rguenther@suse.de>
9246         * debug.h (struct gcc_debug_hooks): Add die_ref_for_decl and
9247         register_external_die hooks.
9248         (debug_false_tree_charstarstar_uhwistar): Declare.
9249         (debug_nothing_tree_charstar_uhwi): Likewise.
9250         * debug.c (do_nothing_debug_hooks): Adjust.
9251         (debug_false_tree_charstarstar_uhwistar): New do nothing.
9252         (debug_nothing_tree_charstar_uhwi): Likewise.
9253         * dbxout.c (dbx_debug_hooks): Adjust.
9254         (xcoff_debug_hooks): Likewise.
9255         * sdbout.c (sdb_debug_hooks): Likewise.
9256         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
9257         * dwarf2out.c (macinfo_label_base): New global.
9258         (dwarf2out_register_external_die): New function for the
9259         register_external_die hook.
9260         (dwarf2out_die_ref_for_decl): Likewise for die_ref_for_decl.
9261         (dwarf2_debug_hooks): Use them.
9262         (dwarf2_lineno_debug_hooks): Adjust.
9263         (struct die_struct): Add with_offset flag.
9264         (DEBUG_LTO_DWO_INFO_SECTION, DEBUG_LTO_INFO_SECTION,
9265         DEBUG_LTO_DWO_ABBREV_SECTION, DEBUG_LTO_ABBREV_SECTION,
9266         DEBUG_LTO_DWO_MACINFO_SECTION, DEBUG_LTO_MACINFO_SECTION,
9267         DEBUG_LTO_DWO_MACRO_SECTION, DEBUG_LTO_MACRO_SECTION,
9268         DEBUG_LTO_LINE_SECTION, DEBUG_LTO_DWO_STR_OFFSETS_SECTION,
9269         DEBUG_LTO_STR_DWO_SECTION, DEBUG_STR_LTO_SECTION): New macros
9270         defining section names for the early LTO debug variants.
9271         (reset_indirect_string): New helper.
9272         (add_AT_external_die_ref): Helper for dwarf2out_register_external_die.
9273         (print_dw_val): Add support for offsetted symbol references.
9274         (get_ultimate_context): Split out from is_cxx.
9275         (is_cxx): Use get_ultimate_context.
9276         (is_fortran): Add decl overload.
9277         (compute_comp_unit_symbol): Split out worker from
9278         compute_section_prefix.
9279         (compute_section_prefix): Call compute_comp_unit_symbol and
9280         set comdat_type_p here.
9281         (output_die): Skip DIE symbol output for the LTO added one.
9282         Handle DIE symbol references with offset.
9283         (output_comp_unit): Guard section name mangling properly.
9284         For LTO debug sections emit a symbol at the section beginning
9285         which we use to refer to its DIEs.
9286         (add_abstract_origin_attribute): For DIEs registered via
9287         dwarf2out_register_external_die directly refer to the early
9288         DIE rather than indirectly through the shadow one we created.
9289         Remove obsolete call to dwarf2out_abstract_function for
9290         non-function/block origins.
9291         (gen_array_type_die): When generating early LTO debug do
9292         not emit DW_AT_string_length.
9293         (gen_formal_parameter_die): Do not re-create DIEs for PARM_DECLs
9294         late when in LTO.  As suggested place a gcc_unreachable for
9295         the DECL_ABSTRACT_P case.
9296         (gen_subprogram_die): Avoid another specification DIE
9297         for early built declarations/definitions for the late LTO case.
9298         (gen_variable_die): Add type references for late duplicated VLA dies
9299         when in late LTO.
9300         (gen_inlined_subroutine_die): Do not call dwarf2out_abstract_function,
9301         we have the abstract instance already.
9302         (process_scope_var): Adjust decl DIE contexts in LTO which
9303         first puts them in limbo.
9304         (gen_decl_die): Do not generate type DIEs late apart from
9305         types for VLAs or for decls we do not yet have a DIE.  Do not
9306         call dwarf2out_abstract_function late.
9307         (dwarf2out_early_global_decl): Make sure to create DIEs
9308         for abstract instances of a decl first.
9309         (dwarf2out_late_global_decl): Adjust comment.
9310         (output_macinfo_op): With multiple macro sections use
9311         macinfo_label_base to distinguish labels.
9312         (output_macinfo): Likewise.  Update macinfo_label_base.
9313         Pass in the line info label.
9314         (note_variable_value_in_expr): When generating LTO resolve
9315         all variable values here by generating DIEs as needed.
9316         (init_sections_and_labels): Add early LTO debug flag parameter
9317         and generate different sections and names if set.  Add generation
9318         counter for the labels so we can have multiple of them.
9319         (reset_dies): Helper to allow DIEs to be output multiple times.
9320         (dwarf2out_finish): When outputting DIEs to the fat part of an
9321         LTO object first reset DIEs.
9322         (dwarf2out_early_finish): Output early DIEs when generating LTO.
9323         (modified_type_die): Check for decl_ultimate_origin being self
9324         before recursing.
9325         (gen_type_die_with_usage): Likewise.
9326         (gen_typedef_die): Allow decl_ultimate_origin being self.
9327         (set_decl_abstract_flags): Remove.
9328         (set_block_abstract_flags): Likewise.
9329         (dwarf2out_abstract_function): Treat the early generated DIEs
9330         as the abstract copy and only add DW_AT_inline and
9331         DW_AT_artificial here and call set_decl_origin_self.
9332         If the DIE has an abstract origin don't do anything.
9333         * tree.c (free_lang_data): Build a dummy TRANSLATION_UNIT_DECL
9334         if we have none yet (Go fails to build one, PR78628).
9335         (variably_modified_type_p): Prevent endless recursion for Ada
9336         cyclic pointer types.
9337         * lto-streamer-in.c: Include debug.h.
9338         (dref_queue): New global.
9339         (lto_read_tree_1): Stream in DIE references.
9340         (lto_input_tree): Register DIE references.
9341         (input_function): Stream DECL_DEBUG_ARGS.
9342         * lto-streamer-out.c: Include debug.h.
9343         (lto_write_tree_1): Output DIE references.
9344         (DFS::DFS_write_tree_body): Follow DECL_ABSTRACT_ORIGIN.
9345         Force a TRANSLATION_UNIT_DECL DECL_CONTEXT for file-scope decls.
9346         (output_function): Stream DECL_DEBUG_ARGS.
9347         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
9348         Stream DECL_ABSTRACT_ORIGIN.
9349         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
9350         (write_ts_decl_minimal_tree_pointers): Force a TRANSLATION_UNIT_DECL
9351         DECL_CONTEXT for file-scope decls.
9352         * lto-streamer.h (struct dref_entry): Declare.
9353         (dref_queue): Likewise.
9354         * cfgexpand.c (pass_expand::execute): Do not call the
9355         outlining_inline_function hook here.
9356         * lto-wrapper.c (debug_obj): New global.
9357         (tool_cleanup): Unlink it if required.
9358         (debug_objcopy): New function.
9359         (run_gcc): Handle early debug sections in the IL files by
9360         extracting them to separate files, partially linkin them and
9361         feeding the result back as result to the linker.
9362         * config/darwin.h (DEBUG_LTO_INFO_SECTION, DEBUG_LTO_ABBREV_SECTION,
9363         DEBUG_LTO_MACINFO_SECTION, DEBUG_LTO_LINE_SECTION,
9364         DEBUG_STR_LTO_SECTION, DEBUG_LTO_MACRO_SECTION): Put early debug
9365         sections into a separate segment.
9366         * config/darwin.c (darwin_asm_named_section): Handle __GNU_DWARF_LTO
9367         segments.
9368         (darwin_asm_dwarf_section): Likewise.
9369         (darwin_asm_output_dwarf_offset): Likewise.
9370         * config/i386/i386.c (make_resolver_func): Set DECL_IGNORED_P.
9372 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
9373             Alan Hayward  <alan.hayward@arm.com>
9374             David Sherwood  <david.sherwood@arm.com>
9376         * read-md.h (md_reader::record_potential_iterator_use): Replace
9377         pointer argument with an rtx and an index.
9378         * read-rtl.c (iterator_group::apply_iterator): Likewise.
9379         (apply_mode_iterator): Likewise.
9380         (apply_code_iterator): Likewise.
9381         (apply_int_iterator): Likewise.
9382         (apply_subst_iterator): Likewise.
9383         (record_iterator_use): Likewise.
9384         (record_attribute_use): Likewise.
9385         (md_reader::record_potential_iterator_use): Likewise.  Update calls
9386         to record_iterator_use and apply_iterator.
9387         (iterator_use): Replace ptr with x and index.
9388         (attribute_use): Likewise.
9389         (apply_attribute_uses): Update calls to apply_iterator.
9390         (apply_iterators): Likewise.  Update initialization of iterator_use.
9391         (rtx_reader::read_rtx_code): Update calls to record_iterator_use
9392         and record_potential_iterator_use.
9393         (rtx_reader::read_rtx_operand): Likewise.
9395 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
9396             Alan Hayward  <alan.hayward@arm.com>
9397             David Sherwood  <david.sherwood@arm.com>
9399         * varasm.c (const_rtx_hash_1): Don't hash in the mode of a
9400         CONST_WIDE_INT.
9402 2017-08-21  Richard Biener  <rguenther@suse.de>
9404         PR middle-end/81884
9405         * tree-ssa-alias.c (stmt_kills_ref_p): Handle array accesses
9406         at struct end conservatively when comparing common bases.
9408 2017-08-21  Richard Biener  <rguenther@suse.de>
9410         * tree-ssa-loop-im.c (struct lim_aux_data): Add ref index member.
9411         (mem_ref_in_stmt): Remove.
9412         (determine_max_movement): Use ref index to get at the reference.
9413         (invariantness_dom_walker::before_dom_children): Deal with
9414         lim data already initialized.
9415         (gather_mem_refs_stmt): Initialize lim data and record ref index.
9417 2017-08-19  Uros Bizjak  <ubizjak@gmail.com>
9419         * config/i386/i386.h (OPTION_MASK_ISA_ROUND): Remove.
9420         (TARGET_ISA_ROUND): Ditto.
9421         (TARGET_ROUND): Ditto.
9422         * config/i386/i386.c: Substitute TARGET_ROUND with TARGET_SSE4_1.
9423         * config/i386/i386.md: Ditto.
9424         * config/i386/sse.md: Ditto.
9425         * config/i386/i386-builtin.def: Substitute OPTION_MASK_ISA_ROUND
9426         with OPTION_MASK_ISA_SSE4_1.
9428 2017-08-19  Uros Bizjak  <ubizjak@gmail.com>
9430         PR target/81894
9431         * doc/extend.texi (x86 Built-in Functions): Correct the name of
9432         __builtin_ia32_lzcnt_u16.
9434 2017-08-18  Peter Bergner  <bergner@vnet.ibm.com>
9436         PR target/80210
9437         * config/rs6000/rs6000.c (rs6000_activate_target_options): New function.
9438         (rs6000_set_current_function): Rewrite function to use it.
9440 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
9442         PR c/53037
9443         * print-tree.c (print_node): Support DECL_WARN_IF_NOT_ALIGN
9444         and TYPE_WARN_IF_NOT_ALIGN.
9445         * stor-layout.c (do_type_align): Merge DECL_WARN_IF_NOT_ALIGN.
9446         (handle_warn_if_not_align): New.
9447         (place_union_field): Call handle_warn_if_not_align.
9448         (place_field): Call handle_warn_if_not_align.
9449         Copy TYPE_WARN_IF_NOT_ALIGN.
9450         (finish_builtin_struct): Copy TYPE_WARN_IF_NOT_ALIGN.
9451         (layout_type): Likewise.
9452         * tree-core.h (tree_type_common): Add warn_if_not_align.  Set
9453         spare to 18.
9454         (tree_decl_common): Add warn_if_not_align.
9455         * tree.c (build_range_type_1): Copy TYPE_WARN_IF_NOT_ALIGN.
9456         * tree.h (TYPE_WARN_IF_NOT_ALIGN): New.
9457         (SET_TYPE_WARN_IF_NOT_ALIGN): Likewise.
9458         (DECL_WARN_IF_NOT_ALIGN): Likewise.
9459         (SET_DECL_WARN_IF_NOT_ALIGN): Likewise.
9460         * doc/extend.texi: Document warn_if_not_aligned attribute.
9461         * doc/invoke.texi: Document -Wif-not-aligned and -Wpacked-not-aligned.
9463 2017-08-17  Martin Liska  <mliska@suse.cz>
9465         PR bootstrap/81864
9466         * tree-loop-distribution.c (ddrs_table): Change type to pointer type.
9467         (get_data_dependence): Use it as pointer type.
9468         (distribute_loop): Likewise.
9470 2017-08-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9472         * config/rs6000/altivec.md (UNSPEC_VMRGOW_DIRECT): New constant.
9473         (p8_vmrgew_v4sf_direct): Generalize to p8_vmrgew_<mode>_direct.
9474         (p8_vmrgow_<mode>_direct): New define_insn.
9475         * config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Properly
9476         handle endianness for vmrgew and vmrgow permute patterns.
9478 2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>
9480         * config/rs6000/altivec.md (VParity): Remove TARGET_VSX_TIMODE.
9481         * config/rs6000/rs6000-cpus.def: Remove comment.
9482         (ISA_2_7_MASKS_SERVER): Delete OPTION_MASK_VSX_TIMODE;
9483         (POWERPC_MASKS): Likewise.
9484         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Remove unneeded
9485         use of TARGET_VSX_TIMODE.
9486         (rs6000_setup_reg_addr_masks): Change TARGET_VSX_TIMODE to TARGET_VSX.
9487         (rs6000_init_hard_regno_mode_ok): Remove unneeded uses of
9488         TARGET_VSX_TIMODE.  Change use of TARGET_VSX_TIMODE to TARGET_VSX.
9489         (rs6000_option_override_internal): Remove dead code.
9490         (rs6000_legitimize_address): Change TARGET_VSX_TIMODE to TARGET_VSX.
9491         (rs6000_legitimize_reload_address): Likewise.
9492         (rs6000_legitimate_address_p): Likewise.
9493         (rs6000_opt_masks): Delete "vsx-timode".
9494         (rs6000_disable_incompatible_switches): Remove mention of -mvsx-timode
9495         from function comment.
9496         * config/rs6000/rs6000.h (MASK_VSX_TIMODE): Delete.
9497         * config/rs6000/rs6000.md (FMOVE128_GPR): Remove TARGET_VSX_TIMODE.
9498         (V16QI, V8HI, V4SI, V4SF, V2DI, V2DF, V1TI): Remove useless empty
9499         condition.
9500         * config/rs6000/rs6000.opt (mvsx-timode): Replace with stub.
9501         * config/rs6000/vector.md (VEC_IP): Remove TARGET_VSX_TIMODE.
9502         * config/rs6000/vsx.md (VSX_LE_128): Likewise.
9503         (VSX_TI): Likewise.
9504         (VSX_M): Likewise.
9505         (define_peephole2): Likewise.
9507 2017-08-17  Martin Sebor  <msebor@redhat.com>
9509         PR c/81859
9510         * pretty-print.c (pp_format): Use strnlen in %.*s to avoid reading
9511         past the end of an array.
9512         (test_pp_format): Add test cases.
9514 2017-08-17  Richard Sandiford  <richard.sandiford@linaro.org>
9516         * internal-fn.def (CLRSB, CLZ, CTZ, FFS, PARITY, POPCOUNT): Add
9517         missing ECF_NOTHROW flags.
9519 2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>
9521         PR target/72804
9522         * config/rs6000/vsx.md (*vsx_le_permute_<mode>): Add support for
9523         operands residing in integer registers.
9524         (*vsx_le_perm_load_<mode>): Likewise.
9525         (*vsx_le_perm_store_<mode>): Likewise.
9526         (define_peephole2): Add peepholes to optimize the above.
9528 2017-08-17  Marek Polacek  <polacek@redhat.com>
9530         PR middle-end/81814
9531         * fold-const.c (operand_equal_for_comparison_p): Remove code that used
9532         to mimic what shorten_compare did.  Change the return type to bool.
9533         (fold_cond_expr_with_comparison): Update call to
9534         operand_equal_for_comparison_p.
9535         (fold_ternary_loc): Likewise.
9537 2017-08-17  Jackson Woodruff  <jackson.woodruff@arm.com>
9539         * aarch64-simd.md (mov<mode>): No longer force zero immediate into
9540         register.
9541         (*aarch64_simd_mov<mode>): Add new case for stp using zero immediate.
9543 2017-08-17  Richard Biener  <rguenther@suse.de>
9545         * tree-ssa-structalias.c (solve_graph): When propagating
9546         to successors update the graphs succ edges and avoid duplicate work.
9548 2017-08-17  Maxim Ostapenko  <m.ostapenko@samsung.com>
9550         PR target/81861
9551         * config/i386/i386.c (ix86_option_override_internal): Save target
9552         specific options after ix86_stack_protector_guard_reg was changed.
9554 2017-08-17  Richard Biener  <rguenther@suse.de>
9556         PR tree-optimization/81827
9557         * tree-ssa-structalias.c (struct variable_info): Add is_reg_var flag.
9558         (new_var_info): Initialize it conservatively.
9559         (get_call_vi): Mark register vars.
9560         (new_scalar_tmp_constraint_exp): Likewise.
9561         (handle_rhs_call): Likewise.
9562         (handle_const_call): Likewise.
9563         (create_function_info_for): Likewise.
9564         (solve_constraints): Sort varinfos to separate register from
9565         non-register vars to pack points-to solution bitmaps during
9566         iteration.
9568 2017-08-17  Marek Polacek  <polacek@redhat.com>
9570         * gimplify.c (gimplify_adjust_omp_clauses): Compare with 0 instead of 1.
9572 2017-08-17  Richard Biener  <rguenther@suse.de>
9574         * tree-vrp.c (vrp_int_const_binop): Do not set *overflow_p
9575         to true when overflow is undefined and we saturated the result.
9577 2017-08-17  Alan Modra  <amodra@gmail.com>
9579         PR target/80938
9580         * config/rs6000/rs6000.c (rs6000_savres_strategy): Revert 2017-08-09.
9581         Don't use store multiple if only one reg needs saving.
9582         (interesting_frame_related_regno): New function.
9583         (rs6000_frame_related): Don't emit frame info for regs that
9584         don't need saving.
9585         (rs6000_emit_epilogue): Likewise.
9587 2017-08-16  Nathan Sidwell  <nathan@acm.org>
9589         * tree-core.h (tree_type_non_common): Rename binfo to lang_1.
9590         * tree.h (TYPE_BINFO): Use type_non_common.maxval.
9591         (TYPE_LANG_SLOT_1): Use type_non_common.lang_1, for any type.
9592         * tree.c (free_lang_data_in_type): Use else-if chain.  Always
9593         clear TYPE_LANG_1.  Remove obsolete member-function stripping.
9594         (find_decls_types_r): Comment about TYPE_MAX_VALUES_RAW.
9595         (verify_type): Adjust for TYPE_BINFO move.
9596         * lto-streamer-out.c (DFS::DFS_write_tree_body): No need to
9597         process TYPE_BINFO directly.
9598         (hash_tree): Likewise.
9599         * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
9600         Likewise.
9601         * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
9602         Likewise.
9604 2017-08-16  David Malcolm  <dmalcolm@redhat.com>
9606         * diagnostic-show-locus.c (colorizer::m_caret): Remove unused field.
9608 2017-08-16  Uros Bizjak  <ubizjak@gmail.com>
9610         PR target/46091
9611         * config/i386/i386.md (*anddi_1_btr): Change predicates of
9612         operand 0 and operand 1 to nomimmediate_operand. Add "m" constraint.
9613         Add ix86_binary_operator_ok to insn constraint.
9614         (*iordi_1_bts): Ditto.
9615         (*xordi_1_btc): Ditto.
9616         (*btsq): Change predicate of operand 0 to nonimmediate_operand.
9617         Update corresponding peephole2 pattern.
9618         (*btrq): Ditto.
9619         (*btcq): Ditto.
9621 2017-08-16  Bin Cheng  <bin.cheng@arm.com>
9623         PR tree-optimization/81832
9624         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Don't
9625         copy loop header which has IFN_LOOP_DIST_ALIAS call.
9627 2017-08-16  Marek Polacek  <polacek@redhat.com>
9629         PR middle/81695
9630         * fold-const.c (fold_indirect_ref_1): Restore original behavior
9631         regarding size_zero_node.
9633 2017-08-16  Martin Liska  <mliska@suse.cz>
9635         PR target/81753
9636         * config.gcc: Respect previously set extra_objs in case
9637         of darwin target.
9639 2017-08-16  Richard Sandiford  <richard.sandiford@linaro.org>
9641         PR tree-optimization/81835
9642         * tree-vect-loop.c (vect_is_simple_reduction): Simply checks for
9643         the phi SSA_NAME.  Check that the condition in a COND_EXPR does
9644         not depend on the phi.
9646 2017-08-16  Alan Modra  <amodra@gmail.com>
9648         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Delete
9649         dead code.
9651 2017-08-16  Alan Modra  <amodra@gmail.com>
9653         * config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p): Merge..
9654         (save_reg_p): ..into this.  Update all callers.
9655         (first_reg_to_save): Simplify.
9657 2017-08-16  Alan Modra  <amodra@gmail.com>
9659         * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't restore
9660         fixed regs.
9662 2017-08-15  Joseph Myers  <joseph@codesourcery.com>
9664         PR target/78460
9665         PR target/67712
9666         * config/sh/sh-mem.cc (sh_expand_cmpnstr): Only unroll for
9667         constant count if that count is less than 32.
9669 2017-08-15  Nathan Sidwell  <nathan@acm.org>
9671         * gcc.c (execute): Emit friendlier message if inferior is killed
9672         by an external cause.
9674 2017-08-15  Richard Biener  <rguenther@suse.de>
9676         PR tree-optimization/81790
9677         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Handle both
9678         CONSTRUCTORs from simplifying and VN.
9680 2017-08-14  Martin Sebor  <msebor@redhat.com>
9682         * builtin-attrs.def: Add comments.
9684 2017-08-14  Martin Sebor  <msebor@redhat.com>
9686         PR c/81117
9687         * doc/extend.texi (attribute nonstring): Document new attribute.
9689 2017-08-14  Martin Sebor  <msebor@redhat.com>
9691         PR c/81117
9692         * tree-diagnostic.c (default_tree_printer): Handle %G.
9693         * gimple-pretty-print.h (percent_G_format): Declare new function.
9694         * gimple-pretty-print.c (percent_G_format): Define.
9695         * tree-pretty-print.c (percent_K_format): Add argument.
9697 2017-08-14  Martin Sebor  <msebor@redhat.com>
9699         PR translation/79998
9700         * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call):
9701         Remove a stray space.
9703 2017-08-14  Uros Bizjak  <ubizjak@gmail.com>
9705         PR target/46091
9706         * config/i386/i386.md (*anddi_1_btr): New insn_and_split pattern.
9707         (*iordi_1_bts): Ditto.
9708         (*xordi_1_btc): Ditto.
9710 2017-08-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9712         PR target/79845
9713         * config/rs6000/linux64.h (INVALID_64BIT): Use quoted strings.
9714         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
9715         Likewise.
9716         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Use
9717         quoted strings, and make more translator-friendly.
9718         (darwin_rs6000_override_options): Likewise.
9719         (rs6000_option_override_internal): Likewise.
9720         (rs6000_return_in_memory): Fix overlong line.
9721         (init_cmulative_args): Use quoted strings, and make more
9722         translator-friendly.
9723         (rs6000_pass_by_reference): Fix overlong line.
9724         (def_builtin): Use quoted strings.
9725         (altivec_expand_predicate_builtin): Use quoted strings, and make
9726         more translator-friendly.
9727         (htm_expand_builtin): Use quoted strings.
9728         (cpu_expand_builtin): Use quoted strings, and make more
9729         translator-friendly.
9730         (altivec_expand_builtin): Likewise.
9731         (paired_expand_predicate_builtin): Likewise.
9732         (rs6000_invalid_builtin): Likewise.
9733         (builtin_function_type): Use quoted strings.
9734         (rs6000_expand_split_stack_prologue): Use quoted strings, and make
9735         more translator-friendly.
9736         (rs6000_trampoline_init): Likewise.
9737         (rs6000_handle_altivec_attribute): Likewise.
9738         (rs6000_inner_target_options): Use quoted strings.
9739         (rs6000_disable_incompatible_switches): Likewise.
9740         * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Use quoted
9741         strings, and make more translator-friendly.
9742         (SUBSUBTARGET_OVERRIDE_OPTIONS): Use quoted strings.
9744 2017-08-14  Bin Cheng  <bin.cheng@arm.com>
9746         PR tree-optimization/81799
9747         * tree-loop-distribution.c (version_loop_by_alias_check): Force
9748         cond_expr to simple gimple operand.
9750 2017-08-14  Wilco Dijkstra  <wdijkstr@arm.com>
9752         PR middle-end/46932
9753         * doc/sourcebuild.texi (autoincdec): Add autoincdec description.
9755 2017-08-14  Georg-Johann Lay  <avr@gjlay.de>
9757         PR target/81754
9758         PR target/81268
9759         * config/avr/avr.opt (mgas-isr-prologues): New Var avr_gasisr_prologues.
9760         * config/avr/avr.md (gasisr, *gasisr): Use it instead of
9761         TARGET_GASISR_PROLOGUES.
9762         * config/avr/avr.c (avr_option_override): Same.
9763         (avr_pass_pre_proep::execute): Same.
9765 2017-08-13  H.J. Lu  <hongjiu.lu@intel.com>
9767         PR target/81820
9768         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Replace
9769         frame pointer with stack pointer - UNITS_PER_WORD in debug insns.
9771 2017-08-13  Uros Bizjak  <ubizjak@gmail.com>
9773         * config/i386/i386.md (*load_tp_<mode>): Redefine as
9774         define_insn_and_split.  Split to a memory load from 0 in
9775         DEFAULT_TLS_SEG_REG address space.  Merge with *load_tp_x32
9776         using PTR mode iterator.
9777         (*load_tp_x32_zext"): Redefine as define_insn_and_split.
9778         Split to a memory load from 0 in DEFAULT_TLS_SEG_REG address space.
9779         (*add_tp_<mode>): Redefine as define_insn_and_split.
9780         Split to an add with a memory load from 0 in DEFAULT_TLS_SEG_REG
9781         address space.  Merge with *add_tp_x32 using PTR mode iterator.
9782         (*add_tp_x32_zext"): Redefine as define_insn_and_split.
9783         Split to an add with a  memory load from 0 in
9784         DEFAULT_TLS_SEG_REG address space.
9786 2017-08-12  Andrew Pinski  <apinski@cavium.com>
9788         * config/aarch64/aarch64-option-extensions.def (rdma):
9789         Fix feature string to what Linux prints out in /proc/cpuinfo.
9791 2017-08-12  Pierre-Marie de Rodat  <derodat@adacore.com>
9793         PR ada/79542
9794         * dwarf2out.c (modified_type_die): For C typedef types that have
9795         an ultimate origin, process the ultimate origin instead of the
9796         input type.
9797         (gen_typedef_die): Assert that input DECLs have no ultimate
9798         origin.
9799         (gen_type_die_with_usage): For typedef variants that have an
9800         ultimate origin, just call gen_decl_die on the original DECL.
9801         (process_scope_var): Avoid creating DIEs for local typedefs and
9802         concrete static variables.
9804 2017-08-12  Alan Modra  <amodra@gmail.com>
9806         PR target/81170
9807         PR target/81295
9808         * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
9809         match gnu-user.h startfile.
9810         (ENDFILE_LINUX_SPEC): Similarly.
9812 2017-08-11  Thomas Schwinge  <thomas@codesourcery.com>
9814         PR lto/81430
9815         * config/nvptx/nvptx.c (nvptx_override_options_after_change):
9816         Remove function.
9817         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Remove definition.
9819 2017-08-11  Tamar Christina  <tamar.christina@arm.com>
9820         * config/aarch64/aarch64.md (mov<mode>): Change.
9821         (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
9822         aarch64_reg_or_fp_float into aarch64_reg_or_fp_zero.
9823         * config/aarch64/predicates.md (aarch64_reg_or_fp_float): Removed.
9825 2017-08-11  Eric Botcazou  <ebotcazou@adacore.com>
9827         * tree-sra.c (build_access_from_expr_1): Use more precise diagnostics
9828         for storage order barriers.
9830 2017-08-11  Martin Liska  <mliska@suse.cz>
9832         PR tree-opt/79987
9833         * tree-chkp.c (chkp_get_bounds_for_decl_addr): Do not instrument
9834         variables of void type.
9836 2017-08-11  Martin Liska  <mliska@suse.cz>
9838         * asan.c (asan_protect_global): Replace ASM_OUTPUT_DEF with
9839         TARGET_SUPPORTS_ALIASES.
9840         * cgraph.c (cgraph_node::create_same_body_alias): Likewise.
9841         * ipa-visibility.c (can_replace_by_local_alias): Likewise.
9842         (optimize_weakref): Likewise.
9843         * symtab.c (symtab_node::noninterposable_alias): Likewise.
9844         * varpool.c (varpool_node::create_extra_name_alias): Likewise.
9845         * defaults.h: Introduce TARGET_SUPPORTS_ALIASES.
9847 2017-08-11  Martin Liska  <mliska@suse.cz>
9849         PR ipa/81213
9850         * config/i386/i386.c (make_resolver_func): Do complete
9851         refactoring of the function.
9853 2017-08-10  Uros Bizjak  <ubizjak@gmail.com>
9855         PR target/81708
9856         * config/i386/i386.opt (mstack-protector-guard-symbol=): New option
9857         * config/i386/i386.c (ix86_stack_protect_guard): Use
9858         ix86_stack_protect_guard_symbol_str to generate varible declaration.
9859         * doc/invoke.texi (x86 Options): Document
9860         -mstack-protector-guard-symbol= option.
9862 2017-08-10  Uros Bizjak  <ubizjak@gmail.com>
9864         * config/i386/i386-protos.h (ix86_split_stack_guard): New prototype.
9865         * config/i386/i386.c (ix86_split_stack_guard): New function.
9866         (ix86_xpand_split_stack_prologue): Call ix86_split_stack_guard.
9867         (ix86_legitimate_address_p) <case UNSPEC_STACK_CHECK>: Remove.
9868         (i386_asm_output_addr_const_extra) <case UNSPEC_STACK_CHECK>: Ditto.
9869         (optput_pic_addr_const): Remove UNSPEC_STACK_CHECK handling.
9870         * config/i386/i386.md (unspec): Remove UNSPEC_STACK_CHECK.
9871         (split_stack_space_check): Call ix86_split_stack_guard.
9873 2017-08-10  Martin Sebor  <msebor@redhat.com>
9875         * print-tree.c (print_node): Print location using the established
9876         format %s:%i%i.
9877         Replace spaces with colons.
9878         (debug_raw, debug): Ditto.
9880 2017-08-10  Martin Sebor  <msebor@redhat.com>
9882         PR c++/81586
9883         * pretty-print.c (pp_format): Correct the handling of %s precision.
9885 2017-08-10  H.J. Lu  <hongjiu.lu@intel.com>
9887         PR target/81736
9888         * config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
9889         to ...
9890         (ix86_finalize_stack_frame_flags): This.  Also clear
9891         frame_pointer_needed if -fno-omit-frame-pointer is used without
9892         stack access.
9893         (ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
9894         with ix86_finalize_stack_frame_flags.
9895         (ix86_expand_epilogue): Likewise.
9896         (ix86_expand_split_stack_prologue): Likewise.
9897         * doc/invoke.texi: Add a note for -fno-omit-frame-pointer.
9899 2017-08-10  Martin Liska  <mliska@suse.cz>
9901         PR c++/81355
9902         * c-attribs.c (handle_target_attribute):
9903         Report warning for an empty string argument of target attribute.
9905 2017-08-09  Jakub Jelinek  <jakub@redhat.com>
9907         PR c/81687
9908         * omp-low.c (omp_copy_decl): Don't remap FORCED_LABEL or DECL_NONLOCAL
9909         LABEL_DECLs.
9910         * tree-cfg.c (move_stmt_op): Don't adjust DECL_CONTEXT of FORCED_LABEL
9911         or DECL_NONLOCAL labels.
9912         (move_stmt_r) <case GIMPLE_LABEL>: Adjust DECL_CONTEXT of FORCED_LABEL
9913         or DECL_NONLOCAL labels here.
9915 2017-08-09  Will Schmidt  <will_schmidt@vnet.ibm.com>
9917         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add blurb
9918         to indicate when early gimple folding has been disabled.
9919         (rs6000_gimple_fold_builtin): Add debug content.
9920         (rs6000_invalid_builtin): Fix whitespace.
9921         (rs6000_expand_builtin): Fix whitespace.
9922         * config/rs6000/rs6000.opt: Add option for -mfold-gimple.
9924 2017-08-09  Segher Boessenkool  <segher@kernel.crashing.org>
9926         PR target/80938
9927         * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't use
9928         SAVE_MULTIPLE if not all the registers that saves, should be saved.
9930 2017-08-09  Jim Wilson  <jim.wilson@linaro.org>
9932         * config/aarch64/aarch64-cores.def (falkor): Use falkor pipeline.
9933         (qdf24xx): Likewise.
9934         * config/aarch64/aarch64.md: Include falkor.md.
9935         * config/aarch64/falkor.md: New.
9937 2017-08-09  Marek Polacek  <polacek@redhat.com>
9939         PR c/81233
9940         * diagnostic-core.h (emit_diagnostic_valist): Add declaration.
9941         * diagnostic.c (emit_diagnostic): Add a comment.
9942         (emit_diagnostic_valist): New function.
9944 2017-08-09  Marek Polacek  <polacek@redhat.com>
9946         PR c/81417
9947         * input.c (make_location): New overload.
9948         * input.h (make_location): Declare.
9950 2017-08-08  Alan Modra  <amodra@gmail.com>
9951             H.J. Lu  <hongjiu.lu@intel.com>
9953         PR driver/81523
9954         * gcc.c (NO_PIE_SPEC): Delete.
9955         (PIE_SPEC): Define as !no-pie/pie.  Move static|shared|r
9956         exclusion..
9957         (LINK_PIE_SPEC): ..to here.
9958         (LINK_COMMAND_SPEC): Support -no-pie.
9959         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct
9960         chain of crtbegin*.o selection, update for PIE_SPEC changes and
9961         format.
9962         (GNU_USER_TARGET_ENDFILE_SPEC): Similarly.
9963         * config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly.
9964         (ENDFILE_CRTEND_SPEC): Similarly.
9966 2017-08-08  Uros Bizjak  <ubizjak@gmail.com>
9968         PR target/81708
9969         * config/i386/i386.opt (mstack-protector-guard-reg=): New option
9970         (mstack-protector-guard-offset=): Ditto.
9971         * config/i386/i386.c (ix86_option_override): Handle
9972         -mstack-protector-guard-reg= and -mstack-protector-guard-offset=
9973         options.
9974         (ix86_stack_protect_guard): Use ix86_stack_protect_guard_reg and
9975         ix86_stack_protect_guard_offset variables.
9976         (TARGET_STACK_PROTECT_GUARD): Always define.
9977         * doc/invoke.texi (x86 Options): Document -mstack-protector-guard-reg=
9978         and -mstack-protector-guard-offset= options.
9980 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
9982         * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): Handle
9983         boundary case for the last candidate.
9985 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
9987         * doc/invoke.texi: Document -ftree-loop-distribution for O3.
9988         * opts.c (default_options_table): Add OPT_ftree_loop_distribution.
9990 2017-08-08  Tamar Christina  <tamar.christina@arm.com>
9992         PR middle-end/19706
9993         * config/aarch64/aarch64.md (xorsign<mode>3): New optabs.
9994         * config/aarch64/aarch64-builtins.c
9995         (aarch64_builtin_vectorized_function): Added CASE_CFN_XORSIGN.
9996         * config/aarch64/aarch64-simd-builtins.def: Added xorsign BINOP.
9997         * config/aarch64/aarch64-simd.md: Added xorsign<mode>3
9999 2017-08-08  Tamar Christina  <tamar.christina@arm.com>
10000             Andrew Pinski <pinskia@gmail.com>
10002         PR middle-end/19706
10003         * internal-fn.def (XORSIGN): New.
10004         * optabs.def (xorsign_optab): New.
10005         * tree-ssa-math-opts.c (is_copysign_call_with_1): New.
10006         (convert_expand_mult_copysign): New.
10007         (pass_optimize_widening_mul::execute): Call
10008         convert_expand_mult_copysign.
10010 2017-08-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10012         PR tree-optimization/81354
10013         * gimple-ssa-strength-reduction.c (create_add_on_incoming_edge):
10014         Insert on edges rather than explicitly creating landing pads.
10015         (analyze_candidates_and_replace): Commit edge inserts.
10017 2017-08-08  Richard Biener  <rguenther@suse.de>
10019         PR middle-end/81719
10020         * tree-ssa-loop-niter.c: Include tree-dfa.h.
10021         (expand_simple_operations): Also look through ADDR_EXPRs with
10022         MEM_REF bases treating them as POINTER_PLUS_EXPR.
10024 2017-08-08  Richard Biener  <rguenther@suse.de>
10026         PR tree-optimization/81723
10027         * tree-vect-slp.c (struct bst_traits): New hash traits.
10028         (bst_fail): New global.
10029         (vect_build_slp_tree_2): New worker, split out from ...
10030         (vect_build_slp_tree): ... this now wrapping it with using
10031         bst_fail set to cache SLP tree build fails.  Properly handle
10032         max_tree_size.
10033         (vect_analyze_slp_instance): Allocate and free bst_fail.
10035 2017-08-08  Martin Liska  <mliska@suse.cz>
10037         PR tree-opt/81696
10038         * ipa-icf-gimple.c (func_checker::compare_cst_or_decl): Consider
10039         LABEL_DECLs that can be from a different function.
10041 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
10043         PR tree-optimization/81744
10044         * tree-predcom.c (prepare_finalizers_chain): Deep copy expr of
10045         loop's number of iterations.
10047 2017-08-08  Martin Liska  <mliska@suse.cz>
10049         * asan.c: Include header files.
10050         * attribs.c (build_decl_attribute_variant): New function moved
10051         from tree.[ch].
10052         (build_type_attribute_qual_variant): Likewise.
10053         (cmp_attrib_identifiers): Likewise.
10054         (simple_cst_list_equal): Likewise.
10055         (omp_declare_simd_clauses_equal): Likewise.
10056         (attribute_value_equal): Likewise.
10057         (comp_type_attributes): Likewise.
10058         (build_type_attribute_variant): Likewise.
10059         (lookup_ident_attribute): Likewise.
10060         (remove_attribute): Likewise.
10061         (merge_attributes): Likewise.
10062         (merge_type_attributes): Likewise.
10063         (merge_decl_attributes): Likewise.
10064         (merge_dllimport_decl_attributes): Likewise.
10065         (handle_dll_attribute): Likewise.
10066         (attribute_list_equal): Likewise.
10067         (attribute_list_contained): Likewise.
10068         * attribs.h (lookup_attribute): New function moved from tree.[ch].
10069         (lookup_attribute_by_prefix): Likewise.
10070         * bb-reorder.c: Include header files.
10071         * builtins.c: Likewise.
10072         * calls.c: Likewise.
10073         * cfgexpand.c: Likewise.
10074         * cgraph.c: Likewise.
10075         * cgraphunit.c: Likewise.
10076         * convert.c: Likewise.
10077         * dwarf2out.c: Likewise.
10078         * final.c: Likewise.
10079         * fold-const.c: Likewise.
10080         * function.c: Likewise.
10081         * gimple-expr.c: Likewise.
10082         * gimple-fold.c: Likewise.
10083         * gimple-pretty-print.c: Likewise.
10084         * gimple.c: Likewise.
10085         * gimplify.c: Likewise.
10086         * hsa-common.c: Likewise.
10087         * hsa-gen.c: Likewise.
10088         * internal-fn.c: Likewise.
10089         * ipa-chkp.c: Likewise.
10090         * ipa-cp.c: Likewise.
10091         * ipa-devirt.c: Likewise.
10092         * ipa-fnsummary.c: Likewise.
10093         * ipa-inline.c: Likewise.
10094         * ipa-visibility.c: Likewise.
10095         * ipa.c: Likewise.
10096         * lto-cgraph.c: Likewise.
10097         * omp-expand.c: Likewise.
10098         * omp-general.c: Likewise.
10099         * omp-low.c: Likewise.
10100         * omp-offload.c: Likewise.
10101         * omp-simd-clone.c: Likewise.
10102         * opts-global.c: Likewise.
10103         * passes.c: Likewise.
10104         * predict.c: Likewise.
10105         * sancov.c: Likewise.
10106         * sanopt.c: Likewise.
10107         * symtab.c: Likewise.
10108         * toplev.c: Likewise.
10109         * trans-mem.c: Likewise.
10110         * tree-chkp.c: Likewise.
10111         * tree-eh.c: Likewise.
10112         * tree-into-ssa.c: Likewise.
10113         * tree-object-size.c: Likewise.
10114         * tree-parloops.c: Likewise.
10115         * tree-profile.c: Likewise.
10116         * tree-ssa-ccp.c: Likewise.
10117         * tree-ssa-live.c: Likewise.
10118         * tree-ssa-loop.c: Likewise.
10119         * tree-ssa-sccvn.c: Likewise.
10120         * tree-ssa-structalias.c: Likewise.
10121         * tree-ssa.c: Likewise.
10122         * tree-streamer-in.c: Likewise.
10123         * tree-vectorizer.c: Likewise.
10124         * tree-vrp.c: Likewise.
10125         * tsan.c: Likewise.
10126         * ubsan.c: Likewise.
10127         * varasm.c: Likewise.
10128         * varpool.c: Likewise.
10129         * tree.c: Remove functions moved to attribs.[ch].
10130         * tree.h: Likewise.
10131         * config/aarch64/aarch64.c: Add attrs.h header file.
10132         * config/alpha/alpha.c: Likewise.
10133         * config/arc/arc.c: Likewise.
10134         * config/arm/arm.c: Likewise.
10135         * config/avr/avr.c: Likewise.
10136         * config/bfin/bfin.c: Likewise.
10137         * config/c6x/c6x.c: Likewise.
10138         * config/cr16/cr16.c: Likewise.
10139         * config/cris/cris.c: Likewise.
10140         * config/darwin.c: Likewise.
10141         * config/epiphany/epiphany.c: Likewise.
10142         * config/fr30/fr30.c: Likewise.
10143         * config/frv/frv.c: Likewise.
10144         * config/ft32/ft32.c: Likewise.
10145         * config/h8300/h8300.c: Likewise.
10146         * config/i386/winnt.c: Likewise.
10147         * config/ia64/ia64.c: Likewise.
10148         * config/iq2000/iq2000.c: Likewise.
10149         * config/lm32/lm32.c: Likewise.
10150         * config/m32c/m32c.c: Likewise.
10151         * config/m32r/m32r.c: Likewise.
10152         * config/m68k/m68k.c: Likewise.
10153         * config/mcore/mcore.c: Likewise.
10154         * config/microblaze/microblaze.c: Likewise.
10155         * config/mips/mips.c: Likewise.
10156         * config/mmix/mmix.c: Likewise.
10157         * config/mn10300/mn10300.c: Likewise.
10158         * config/moxie/moxie.c: Likewise.
10159         * config/msp430/msp430.c: Likewise.
10160         * config/nds32/nds32-isr.c: Likewise.
10161         * config/nds32/nds32.c: Likewise.
10162         * config/nios2/nios2.c: Likewise.
10163         * config/nvptx/nvptx.c: Likewise.
10164         * config/pa/pa.c: Likewise.
10165         * config/pdp11/pdp11.c: Likewise.
10166         * config/powerpcspe/powerpcspe.c: Likewise.
10167         * config/riscv/riscv.c: Likewise.
10168         * config/rl78/rl78.c: Likewise.
10169         * config/rx/rx.c: Likewise.
10170         * config/s390/s390.c: Likewise.
10171         * config/sh/sh.c: Likewise.
10172         * config/sol2.c: Likewise.
10173         * config/sparc/sparc.c: Likewise.
10174         * config/spu/spu.c: Likewise.
10175         * config/stormy16/stormy16.c: Likewise.
10176         * config/tilegx/tilegx.c: Likewise.
10177         * config/tilepro/tilepro.c: Likewise.
10178         * config/v850/v850.c: Likewise.
10179         * config/vax/vax.c: Likewise.
10180         * config/visium/visium.c: Likewise.
10181         * config/xtensa/xtensa.c: Likewise.
10183 2017-08-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
10185         PR target/81593
10186         * config/rs6000/vsx.md (vsx_concat_<mode>, VSX_D): Cleanup
10187         constraints since the -mupper-regs-* switches have been
10188         eliminated.
10189         (vsx_concat_<mode>_1): New combiner insns to recognize inserting
10190         into a vector from a double word element that was extracted from
10191         another vector, and eliminate extra XXPERMDI instructions.
10192         (vsx_concat_<mode>_2): Likewise.
10193         (vsx_concat_<mode>_3): Likewise.
10194         (vsx_set_<mode>, VSX_D): Rewrite vector set in terms of vector
10195         concat to allow optimizing inserts from previous extracts.
10197 2017-08-07  Uros Bizjak  <ubizjak@gmail.com>
10199         * config/i386/i386.c (ix86_stack_protect_guard): Generate
10200         memory reference to a SSP offset in TLS address space.
10201         (ix86_print_operand) <case '@'>: Remove.
10202         (ix86_print_operand_punct_valid_p): Remove '@' code.
10203         * config/i386/i386.md (unspec): Remove UNSPEC_SP_TLS_SET and
10204         UNSPEC_SP_TLS_TEST.
10205         (stack_tls_protect_set_<mode>): Remove.
10206         (stack_protect_set): Do not call gen_stack_tls_protect_set_<mode>.
10207         (stack_tls_protect_test_<mode>): Remove.
10208         (stack_protect_test): Do not call gen_stack_tls_protect_test_<mode>.
10210 2017-08-07  Olivier Hainque  <hainque@adacore.com>
10212         PR target/81755
10213         * config/vxworksae.h (VXWORKS_HAVE_TLS): Define.
10215 2017-08-07  Douglas Rupp  <rupp@adacore.com>
10217         * Makefile.in (install-mkheaders): Fix typo, where the multi_dir
10218         variable was referenced as multidir in command.
10220 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
10222         PR c/69389
10223         * gimplify.c (goa_stabilize_expr): Handle BIT_INSERT_EXPR and
10224         BIT_FIELD_REF.
10226 2017-08-07  Martin Liska  <mliska@suse.cz>
10228         * config/m32c/m32c.c: Add include of stringpool.h and attribs.h.
10229         * config/rl78/rl78.c: Add include of attribs.h.
10230         * config/sh/sh.c: Likewise.
10231         * config/v850/v850.c: Likewise.
10233 2017-08-07  Tom de Vries  <tom@codesourcery.com>
10235         PR middle-end/78266
10236         * omp-expand.c (expand_oacc_for): Ensure diff_type is large enough.
10238 2017-08-07  Martin Liska  <mliska@suse.cz>
10240         * config/mips/mips.c: Include attribs.h.
10242 2017-08-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
10244         PR fortran/68829
10245         * doc/invoke.texi: Document change in behvaior for -Ofast for
10246         Fortran.
10248 2017-08-07  Wilco Dijkstra  <wdijkstr@arm.com>
10250         * config/aarch64/aarch64.c (aarch64_pushwb_single_reg):
10251         Use gen_frame_mem.
10252         (aarch64_pop_regs): Likewise.
10253         (aarch64_gen_load_pair): Likewise.
10254         (aarch64_save_callee_saves): Likewise.
10255         (aarch64_restore_callee_saves): Likewise.
10257 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
10259         * config/i386/i386.c: Revert the last change.
10261 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
10263         PR target/81736
10264         * config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
10265         to ...
10266         (ix86_finalize_stack_frame_flags): This.  Also clear
10267         frame_pointer_needed if -fno-omit-frame-pointer is used without
10268         stack access.
10269         (ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
10270         with ix86_finalize_stack_frame_flags.
10271         (ix86_expand_epilogue): Likewise.
10272         (ix86_expand_split_stack_prologue): Likewise.
10274 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
10276         PR target/81743
10277         * config/i386/i386.c (get_builtin_code_for_version): Set priority
10278         to P_AES for Westmere.
10280 2017-08-07  Jonathan Yong  <10walls@gmail.com>
10282         * config/i386/mingw.opt (fset-stack-executable): Removed.
10283         * config/i386/cygming.opt (fset-stack-executable): Moved
10284         from mingw.opt.
10285         * config/i386/cygwin.h: Define CHECK_EXECUTE_STACK_ENABLED.
10287 2017-08-07  Segher Boessenkool  <segher@kernel.crashing.org>
10289         * print-rtl.c (print_exp): Print NOT as "~" instead of as "!".
10291 2017-08-07  Marek Polacek  <polacek@redhat.com>
10293         PR middle-end/81737
10294         * fold-const.c (fold_indirect_ref_1): Check type_domain.
10296 2017-08-07  Martin Liska  <mliska@suse.cz>
10298         * attribs.h (canonicalize_attr_name): New function.
10299         (cmp_attribs): Move from c-format.c and adjusted.
10300         (is_attribute_p): Moved from tree.h.
10301         * tree-inline.c: Add new includes.
10302         * tree.c (cmp_attrib_identifiers): Use cmp_attribs.
10303         (private_is_attribute_p): Remove.
10304         (private_lookup_attribute): Likewise.
10305         (private_lookup_attribute_by_prefix): Simplify.
10306         (remove_attribute): Use is_attribute_p.
10307         * tree.h: Remove removed declarations.
10309 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
10311         PR middle-end/81698
10312         * stmt.c (emit_case_dispatch_table): Add DEFAULT_EDGE argument,
10313         instead of computing it in the function.  Formatting fix.
10314         (expand_case): Don't rely on default_edge being the first edge,
10315         clear it if removing it, pass default_edge to
10316         emit_case_dispatch_table.
10317         (expand_sjlj_dispatch_table): Pass NULL as DEFAULT_EDGE, formatting
10318         fix.
10320 2017-08-06  Uros Bizjak  <ubizjak@gmail.com>
10322         * config/alpha/alpha.c (alpha_reorg): If trap is the last active
10323         insn in the function, emit NOP after the insn.
10325 2017-08-06  Tom de Vries  <tom@codesourcery.com>
10327         * omp-expand.c (expand_oacc_for): Add missing edge probability for tile
10328         and element loops.
10330 2017-08-06  Tom de Vries  <tom@codesourcery.com>
10332         * omp-expand.c (expand_oacc_for): Add missing edge probability for chunk
10333         loop.
10335 2017-08-04  Yury Gribov  <tetra2005@gmail.com>
10337         PR tree-optimization/57371
10338         * match.pd: New pattern.
10340 2017-08-04  Marek Polacek  <polacek@redhat.com>
10342         PR middle-end/81695
10343         * fold-const.c (fold_indirect_ref_1): For ((int *)&a + 4 -> a[1],
10344         perform the computation in offset_int.
10346 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
10348         PR tree-optimization/81136
10349         * tree-vectorizer.h: Include tree-hash-traits.h.
10350         (vec_base_alignments): New typedef.
10351         (vec_info): Add a base_alignments field.
10352         (vect_record_base_alignments): Declare.
10353         * tree-data-ref.h (data_reference): Add an is_conditional_in_stmt
10354         field.
10355         (DR_IS_CONDITIONAL_IN_STMT): New macro.
10356         (create_data_ref): Add an is_conditional_in_stmt argument.
10357         * tree-data-ref.c (create_data_ref): Likewise.  Use it to initialize
10358         the is_conditional_in_stmt field.
10359         (data_ref_loc): Add an is_conditional_in_stmt field.
10360         (get_references_in_stmt): Set the is_conditional_in_stmt field.
10361         (find_data_references_in_stmt): Update call to create_data_ref.
10362         (graphite_find_data_references_in_stmt): Likewise.
10363         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Likewise.
10364         * tree-vect-data-refs.c (vect_analyze_data_refs): Likewise.
10365         (vect_record_base_alignment): New function.
10366         (vect_record_base_alignments): Likewise.
10367         (vect_compute_data_ref_alignment): Adjust base_addr and aligned_to
10368         for nested statements even if we fail to compute a misalignment.
10369         Use pooled base alignments for unconditional references.
10370         (vect_find_same_alignment_drs): Compare base addresses instead
10371         of base objects.
10372         (vect_analyze_data_refs_alignment): Call vect_record_base_alignments.
10373         * tree-vect-slp.c (vect_slp_analyze_bb_1): Likewise.
10375 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
10377         * tree-vectorizer.h (vec_info): Add a constructor and destructor.
10378         Add an explicit name for the enum.  Use auto_vec for slp_instances
10379         and grouped_stores.
10380         (_loop_vec_info): Add a constructor and destructor.  Use auto_vec
10381         for all vectors.
10382         (_bb_vec_info): Add a constructor and destructor.
10383         (vinfo_for_stmt): Return NULL for uids of -1 as well.
10384         (destroy_loop_vec_info): Delete.
10385         (vect_destroy_datarefs): Likewise.
10386         * tree-vectorizer.c (vect_destroy_datarefs): Delete.
10387         (vec_info::vec_info): New function.
10388         (vec_info::~vec_info): Likewise.
10389         (vectorize_loops): Use delete instead of destroy_loop_vec_info.
10390         * tree-parloops.c (gather_scalar_reductions): Use delete instead of
10391         destroy_loop_vec_info.
10392         * tree-vect-loop.c (new_loop_vec_info): Replace with...
10393         (_loop_vec_info::_loop_vec_info): ...this.
10394         (destroy_loop_vec_info): Replace with...
10395         (_loop_vec_info::~_loop_vec_info): ...this.  Unconditionally delete
10396         the stmt_vec_infos.  Leave handling of vec_info information to its
10397         destructor.  Remove explicit vector releases.
10398         (vect_analyze_loop_form): Use new instead of new_loop_vec_info.
10399         (vect_analyze_loop): Use delete instead of destroy_loop_vec_info.
10400         * tree-vect-slp.c (new_bb_vec_info): Replace with...
10401         (_bb_vec_info::_bb_vec_info): ...this.  Don't reserve space in
10402         BB_VINFO_GROUPED_STORES or BB_VINFO_SLP_INSTANCES.
10403         (destroy_bb_vec_info): Replace with...
10404         (_bb_vec_info::~_bb_vec_info): ...this.  Leave handling of vec_info
10405         information to its destructor.
10406         (vect_slp_analyze_bb_1): Use new and delete instead of
10407         new_bb_vec_info and destroy_bb_vec_info.
10408         (vect_slp_bb): Replace 2 calls to destroy_bb_vec_info with a
10409         single delete.
10411 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
10413         * tree-data-ref.h (subscript): Add access_fn field.
10414         (data_dependence_relation): Add could_be_independent_p.
10415         (SUB_ACCESS_FN, DDR_COULD_BE_INDEPENDENT_P): New macros.
10416         (same_access_functions): Move to tree-data-ref.c.
10417         * tree-data-ref.c (ref_contains_union_access_p): New function.
10418         (access_fn_component_p): Likewise.
10419         (access_fn_components_comparable_p): Likewise.
10420         (dr_analyze_indices): Add a reference to access_fn_component_p.
10421         (dump_data_dependence_relation): Use SUB_ACCESS_FN instead of
10422         DR_ACCESS_FN.
10423         (constant_access_functions): Likewise.
10424         (add_other_self_distances): Likewise.
10425         (same_access_functions): Likewise.  (Moved from tree-data-ref.h.)
10426         (initialize_data_dependence_relation): Use XCNEW and remove
10427         explicit zeroing of DDR_REVERSED_P.  Look for a subsequence
10428         of access functions that have the same type.  Allow the
10429         subsequence to end with different bases in some circumstances.
10430         Record the chosen access functions in SUB_ACCESS_FN.
10431         (build_classic_dist_vector_1): Replace ddr_a and ddr_b with
10432         a_index and b_index.  Use SUB_ACCESS_FN instead of DR_ACCESS_FN.
10433         (subscript_dependence_tester_1): Likewise dra and drb.
10434         (build_classic_dist_vector): Update calls accordingly.
10435         (subscript_dependence_tester): Likewise.
10436         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Check
10437         DDR_COULD_BE_INDEPENDENT_P.
10438         * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Test
10439         comp_alias_ddrs instead of may_alias_ddrs.
10440         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
10441         New function.
10442         (vect_analyze_data_ref_dependence): Use it if
10443         DDR_COULD_BE_INDEPENDENT_P, but fall back to using the recorded
10444         distance vectors if that fails.
10445         (dependence_distance_ge_vf): New function.
10446         (vect_prune_runtime_alias_test_list): Use it.  Don't clear
10447         LOOP_VINFO_MAY_ALIAS_DDRS.
10449 2017-08-04  Richard Biener  <rguenther@suse.de>
10451         PR middle-end/81705
10452         * fold-const.c (fold_binary_loc): Properly restrict
10453         minus_var0 && minus_var1 case when associating undefined overflow
10454         entities.
10456 2017-08-04  Tom de Vries  <tom@codesourcery.com>
10458         * omp-simd-clone.c (simd_clone_adjust): Add missing edge probability.
10460 2017-08-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10462         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
10463         Don't start diagnostic messages with a capital letter.
10464         * config/rs6000/rs6000.c (rs6000_option_override_internal):
10465         Likewise.
10466         (rs6000_invalid_builtin): Likewise.
10467         (rs6000_trampoline_init): Likewise.
10469 2017-08-03  Jakub Jelinek  <jakub@redhat.com>
10471         PR target/81621
10472         * bb-reorder.c (pass_partition_blocks::execute): Return TODO_df_finish
10473         after setting changeable df flags.
10475 2017-08-03  Richard Biener  <rguenther@suse.de>
10477         * tree-ssa-reassoc.c (should_break_up_subtract): Also break
10478         up if the use is in USE - X.
10480 2017-08-03  Alexander Monakov  <amonakov@ispras.ru>
10482         * toplev.c (dumpfile.h): New include.
10483         (internal_error_reentered): New static function.  Use it...
10484         (internal_error_function): ...here to handle reentered internal_error.
10486 2017-08-03  Richard Biener  <rguenther@suse.de>
10488         PR middle-end/81148
10489         * fold-const.c (split_tree): Add minus_var and minus_con
10490         arguments, remove unused loc arg.  Never generate NEGATE_EXPRs
10491         here but always use minus_*.
10492         (associate_trees): Assert we never associate with MINUS_EXPR
10493         and NULL first operand.  Do not recurse for PLUS_EXPR operands
10494         when associating as MINUS_EXPR either.
10495         (fold_binary_loc): Track minus_var and minus_con.
10497 2017-08-03  Tom de Vries  <tom@codesourcery.com>
10499         PR lto/81430
10500         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers): If
10501         ACCEL_COMPILER, apply finish_options on
10502         DECL_FUNCTION_SPECIFIC_OPTIMIZATION.
10504 2017-08-03  Tom de Vries  <tom@codesourcery.com>
10506         PR target/81662
10507         * config/nvptx/nvptx.c (nvptx_option_override): Emit sorry if
10508         function_entry_patch_area_size > 0.
10510 2017-08-03  Jakub Jelinek  <jakub@redhat.com>
10512         PR driver/81650
10513         * calls.c (alloc_max_size): Use HOST_WIDE_INT_UC (10??)
10514         instead of 10??LU, perform unit multiplication in wide_int,
10515         don't change alloc_object_size_limit if the limit is larger
10516         than SSIZE_MAX.
10518         PR tree-optimization/81655
10519         PR tree-optimization/81588
10520         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Handle also
10521         the case when ranges[i].low and high are 1 for unsigned type with
10522         precision 1.
10524         PR middle-end/81052
10525         * omp-low.c (diagnose_sb_0): Handle flag_openmp_simd like flag_openmp.
10526         (pass_diagnose_omp_blocks::gate): Enable also for flag_openmp_simd.
10528 2017-08-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10530         * tree-vrp.h: Add include guard.
10532 2017-08-02  Uros Bizjak  <ubizjak@gmail.com>
10534         PR target/81644
10535         * config/i386/i386.md (unspecv): Add UNSPECV_UD2.
10536         (ud2): New insn pattern.
10537         * config/i386/i386.c (ix86_expand_epilogue):
10538         For naked functions, generate ud2 instead of trap insn.
10540 2017-08-02  Marek Polacek  <polacek@redhat.com>
10542         PR other/81667
10543         * alloc-pool.h (base_pool_allocator): Initialize m_elt_size.
10545 2017-08-02  Tom de Vries  <tom@codesourcery.com>
10546             Cesar Philippidis  <cesar@codesourcery.com>
10548         * config/nvptx/nvptx.c (nvptx_lockless_update, nvptx_lockfull_update):
10549         Add missing edge probabilities.
10551 2017-08-02  Tamar Christina  <tamar.christina@arm.com>
10553         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
10554         Correct endianness.
10556 2017-08-02  Jakub Jelinek  <jakub@redhat.com>
10558         PR middle-end/79499
10559         * function.c (thread_prologue_and_epilogue_insns): Determine blocks
10560         for find_many_sub_basic_blocks bitmap by looking up BLOCK_FOR_INSN
10561         of first NONDEBUG_INSN_P in each of the split_prologue_seq and
10562         prologue_seq sequences - if any.
10564 2017-08-02  Richard Biener  <rguenther@suse.de>
10566         * tree-vect-stmts.c (vectorizable_store): Perform vector extracts
10567         via vectors if supported, integer extracts via punning if supported
10568         or otherwise vector extracts.
10570 2017-08-02  Richard Biener  <rguenther@suse.de>
10572         * tree-ssa-pre.c (bitmap_insert_into_set_1): Remove and inline
10573         into ...
10574         (bitmap_insert_into_set): ... this.
10576 2017-08-02  Richard Biener  <rguenther@suse.de>
10578         PR tree-optimization/81633
10579         Revert
10580         2015-08-17  Alan Hayward  <alan.hayward@arm.com>
10582         PR tree-optimization/71752
10583         * tree-vect-slp.c (vect_get_slp_defs): Handle null operands.
10585 2017-08-01  Daniel Santos  <daniel.santos@pobox.com>
10587         * config/i386/i386.h (ix86_frame::outlined_save_offset): Remove field.
10588         (machine_function::call_ms2sysv_pad_out): Remove field.
10589         * config/i386/i386.c (xlogue_layout::get_stack_space_used): Modify.
10590         (ix86_compute_frame_layout): Likewise.
10592 2017-08-01  H.J. Lu  <hongjiu.lu@intel.com>
10594         PR target/81654
10595         * config/i386/i386.c (ix86_set_func_type): Disallow naked
10596         attribute with interrupt attribute.
10598 2017-08-01  Andrew Pinski  <apinski@cavium.com>
10600         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Check
10601         BIT_INSERT_EXPR's operand 1
10602         to see if the types precision matches.
10604 2017-08-01  Martin Liska  <mliska@suse.cz>
10606         PR middle-end/70140
10607         * builtins.c (expand_builtin_memcpy_args): Remove.
10608         (expand_builtin_memcpy): Call newly added function
10609         expand_builtin_memory_copy_args.
10610         (expand_builtin_memcpy_with_bounds): Likewise.
10611         (expand_builtin_mempcpy): Remove last argument.
10612         (expand_builtin_mempcpy_with_bounds): Likewise.
10613         (expand_builtin_memory_copy_args): New function created from
10614         expand_builtin_mempcpy_args with small modifications.
10615         (expand_builtin_mempcpy_args): Remove.
10616         (expand_builtin_stpcpy): Remove unused argument.
10617         (expand_builtin): Likewise.
10618         (expand_builtin_with_bounds): Likewise.
10620 2017-08-01  Martin Liska  <mliska@suse.cz>
10622         Revert r250771
10623         Make mempcpy more optimal (PR middle-end/70140).
10625 2017-08-01  Jakub Jelinek  <jakub@redhat.com>
10627         PR target/81622
10628         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
10629         __builtin_vec_cmpne verify both arguments are compatible vectors
10630         before looking at TYPE_MODE on the element type.  For __builtin_vec_ld
10631         verify arg1_type is a pointer or array type.  For __builtin_vec_st,
10632         move computation of aligned to after checking the argument types.
10633         Formatting fixes.
10635         PR target/80846
10636         * config/rs6000/vsx.md (vextract_fp_from_shorth,
10637         vextract_fp_from_shortl): Add element mode after mode in gen_vec_init*
10638         calls.
10640 2017-08-01  Jerome Lambourg  <lambourg@adacore.com>
10641             Doug Rupp  <rupp@adacore.com>
10642             Olivier Hainque  <hainque@adacore.com>
10644         * config.gcc (arm-wrs-vxworks*): Rework to handle arm-wrs-vxworks7 as
10645         well as arm-wrs-vxworks. Update target_cpu_name from arm6 (arch v3) to
10646         arm8 (arch v4).
10647         * config/arm/vxworks.h (MAYBE_TARGET_BPABI_CPP_BUILTINS): New, helper
10648         for TARGET_OS_CPP_BUILTIN.
10649         (TARGET_OS_CPP_BUILTIN): Invoke MAYBE_TARGET_BPABI_CPP_BUILTINS(),
10650         refine CPU definitions for arm_arch5 and add those for arm_arch6 and
10651         arm_arch7.
10652         (MAYBE_ASM_ABI_SPEC): New, helper for SUBTARGET_EXTRA_ASM_SPEC,
10653         passing required abi options to the assembler for EABI configurations.
10654         (EXTRA_CC1_SPEC): New macro, to help prevent the implicit production
10655         of .text.hot and .text.unlikely sections for kernel modules when
10656         using ARM style exceptions.
10657         (CC1_SPEC): Remove obsolete attempt at mimicking Diab toolchain
10658         options. Add EXTRA_CC1_SPEC.
10659         (VXWORKS_ENDIAN_SPEC): Adjust comment and remove handling of Diab
10660         toolchain options.
10661         (DWARF2_UNWIND_INFO): Redefine to handle the pre/post VxWorks 7
10662         transition.
10663         (ARM_TARGET2_DWARF_FORMAT): Define.
10664         * config/arm/t-vxworks: Adjust multilib control to removal of the
10665         Diab command line options.
10667 2017-08-01  Martin Liska  <mliska@suse.cz>
10669         PR gcov-profile/81561
10670         * gcov.c (unblock): Make unblocking safe as we need to preserve
10671         index correspondence of blocks and block_lists.
10673 2017-08-01  Richard Biener  <rguenther@suse.de>
10675         PR tree-optimization/81181
10676         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
10677         (compute_antic): ... end of iteration here.
10679 2017-08-01  James Greenhalgh  <james.greenhalgh@arm.com>
10681         * common.opt (ftree-vectorize): No longer set flag_tree_vectorize.
10682         (ftree-loop-vectorize): Set as EnabledBy ftree-vectorize.
10683         (ftree-slp-vectorize): Likewise.
10684         * omp-expand (expand_omp_simd): Remove flag_tree_vectorize, as it
10685         can no longer be set independent of flag_tree_loop_vectorize.
10686         * omp-general.c (emp_max_vf): Likewise.
10687         * opts.c (enable_fdo_optimizations): Remove references to
10688         flag_tree_vectorize, these are now implicit.
10689         (common_handle_option): Remove handling for OPT_ftree_vectorize,
10690         and leave it for the options machinery.
10692 2017-08-01  Martin Liska  <mliska@suse.cz>
10694         PR middle-end/70140
10695         * builtins.c (expand_builtin_memcpy_args): Remove.
10696         (expand_builtin_memcpy): Call newly added function
10697         expand_builtin_memory_copy_args.
10698         (expand_builtin_memcpy_with_bounds): Likewise.
10699         (expand_builtin_mempcpy): Remove last argument.
10700         (expand_builtin_mempcpy_with_bounds): Likewise.
10701         (expand_builtin_memory_copy_args): New function created from
10702         expand_builtin_mempcpy_args with small modifications.
10703         (expand_builtin_mempcpy_args): Remove.
10704         (expand_builtin_stpcpy): Remove unused argument.
10705         (expand_builtin): Likewise.
10706         (expand_builtin_with_bounds): Likewise.
10708 2017-08-01  Uros Bizjak  <ubizjak@gmail.com>
10710         PR target/81641
10711         * config/i386/i386.c (ix86_print_operand_address_as): For -masm=intel
10712         print "ds:" only for immediates in generic address space.
10714 2017-08-01  Uros Bizjak  <ubizjak@gmail.com>
10716         PR target/81639
10717         * config/i386/i386.c (ix86_funciton_naked): New prototype.
10718         (ix86_function_ok_for_sibcall): Return false for naked functions.
10720 2017-08-01  Richard Biener  <rguenther@suse.de>
10722         * tree-ssa-pre.c (print_pre_expr): Handle NULL expr.
10723         (compute_antic): Seed worklist with exit block predecessors.
10724         * cfganal.c (dfs_find_deadend): For a cycle return the source
10725         of the edge closing it.
10727 2017-08-01  Tamar Christina  <tamar.christina@arm.com>
10729         * config/aarch64/aarch64.c
10730         (aarch64_can_const_movi_rtx_p): Move 0 check.
10732 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
10734         * tree.h (POINTER_TYPE_OVERFLOW_UNDEFINED): Delete.
10735         * fold-const.c (fold_comparison, fold_binary_loc): Delete use of
10736         above macro.
10737         * match.pd: Ditto in address comparison pattern.
10739 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
10741         PR tree-optimization/81627
10742         * tree-predcom.c (prepare_finalizers): Always rewrite into loop
10743         closed ssa form for store-store chain.
10745 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
10747         PR tree-optimization/81620
10748         * tree-predcom.c (add_ref_to_chain): Don't set has_max_use_after
10749         for store-store chain.
10751 2017-08-01  Jakub Jelinek  <jakub@redhat.com>
10753         PR tree-optimization/81588
10754         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If
10755         ranges[i].in_p, invert comparison code ccode.  For >/>=,
10756         swap rhs1 and rhs2 and comparison code unconditionally,
10757         for </<= don't do that.  Don't swap rhs1/rhs2 again if
10758         ranges[i].in_p, instead invert comparison code ccode if
10759         opcode or oe->rank is BIT_IOR_EXPR.
10761         PR target/80846
10762         * optabs.def (vec_extract_optab, vec_init_optab): Change from
10763         a direct optab to conversion optab.
10764         * optabs.c (expand_vector_broadcast): Use convert_optab_handler
10765         with GET_MODE_INNER as last argument instead of optab_handler.
10766         * expmed.c (extract_bit_field_1): Likewise.  Use vector from
10767         vector extraction if possible and optab is available.
10768         * expr.c (store_constructor): Use convert_optab_handler instead
10769         of optab_handler.  Use vector initialization from smaller
10770         vectors if possible and optab is available.
10771         * tree-vect-stmts.c (vectorizable_load): Likewise.
10772         * doc/md.texi (vec_extract, vec_init): Document that the optabs
10773         now have two modes.
10774         * config/i386/i386.c (ix86_expand_vector_init): Handle expansion
10775         of vec_init from half-sized vectors with the same element mode.
10776         * config/i386/sse.md (ssehalfvecmode): Add V4TI case.
10777         (ssehalfvecmodelower, ssescalarmodelower): New mode attributes.
10778         (reduc_plus_scal_v8df, reduc_plus_scal_v4df, reduc_plus_scal_v2df,
10779         reduc_plus_scal_v16sf, reduc_plus_scal_v8sf, reduc_plus_scal_v4sf,
10780         reduc_<code>_scal_<mode>, reduc_umin_scal_v8hi): Add element mode
10781         after mode in gen_vec_extract* calls.
10782         (vec_extract<mode>): Renamed to ...
10783         (vec_extract<mode><ssescalarmodelower>): ... this.
10784         (vec_extract<mode><ssehalfvecmodelower>): New expander.
10785         (rotl<mode>3, rotr<mode>3, <shift_insn><mode>3, ashrv2di3): Add
10786         element mode after mode in gen_vec_init* calls.
10787         (VEC_INIT_HALF_MODE): New mode iterator.
10788         (vec_init<mode>): Renamed to ...
10789         (vec_init<mode><ssescalarmodelower>): ... this.
10790         (vec_init<mode><ssehalfvecmodelower>): New expander.
10791         * config/i386/mmx.md (vec_extractv2sf): Renamed to ...
10792         (vec_extractv2sfsf): ... this.
10793         (vec_initv2sf): Renamed to ...
10794         (vec_initv2sfsf): ... this.
10795         (vec_extractv2si): Renamed to ...
10796         (vec_extractv2sisi): ... this.
10797         (vec_initv2si): Renamed to ...
10798         (vec_initv2sisi): ... this.
10799         (vec_extractv4hi): Renamed to ...
10800         (vec_extractv4hihi): ... this.
10801         (vec_initv4hi): Renamed to ...
10802         (vec_initv4hihi): ... this.
10803         (vec_extractv8qi): Renamed to ...
10804         (vec_extractv8qiqi): ... this.
10805         (vec_initv8qi): Renamed to ...
10806         (vec_initv8qiqi): ... this.
10807         * config/rs6000/vector.md (VEC_base_l): New mode attribute.
10808         (vec_init<mode>): Renamed to ...
10809         (vec_init<mode><VEC_base_l>): ... this.
10810         (vec_extract<mode>): Renamed to ...
10811         (vec_extract<mode><VEC_base_l>): ... this.
10812         * config/rs6000/paired.md (vec_initv2sf): Renamed to ...
10813         (vec_initv2sfsf): ... this.
10814         * config/rs6000/altivec.md (splitter, altivec_copysign_v4sf3,
10815         vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
10816         vec_unpacku_lo_v8hi, mulv16qi3, altivec_vreve<mode>2): Add
10817         element mode after mode in gen_vec_init* calls.
10818         * config/aarch64/aarch64-simd.md (vec_init<mode>): Renamed to ...
10819         (vec_init<mode><Vel>): ... this.
10820         (vec_extract<mode>): Renamed to ...
10821         (vec_extract<mode><Vel>): ... this.
10822         * config/aarch64/iterators.md (Vel): New mode attribute.
10823         * config/s390/s390.c (s390_expand_vec_strlen, s390_expand_vec_movstr):
10824         Add element mode after mode in gen_vec_extract* calls.
10825         * config/s390/vector.md (non_vec_l): New mode attribute.
10826         (vec_extract<mode>): Renamed to ...
10827         (vec_extract<mode><non_vec_l>): ... this.
10828         (vec_init<mode>): Renamed to ...
10829         (vec_init<mode><non_vec_l>): ... this.
10830         * config/s390/s390-builtins.def (s390_vlgvb, s390_vlgvh, s390_vlgvf,
10831         s390_vlgvf_flt, s390_vlgvg, s390_vlgvg_dbl): Add element mode after
10832         vec_extract mode.
10833         * config/arm/iterators.md (V_elem_l): New mode attribute.
10834         * config/arm/neon.md (vec_extract<mode>): Renamed to ...
10835         (vec_extract<mode><V_elem_l>): ... this.
10836         (vec_extractv2di): Renamed to ...
10837         (vec_extractv2didi): ... this.
10838         (vec_init<mode>): Renamed to ...
10839         (vec_init<mode><V_elem_l>): ... this.
10840         (reduc_plus_scal_<mode>, reduc_plus_scal_v2di, reduc_smin_scal_<mode>,
10841         reduc_smax_scal_<mode>, reduc_umin_scal_<mode>,
10842         reduc_umax_scal_<mode>, neon_vget_lane<mode>, neon_vget_laneu<mode>):
10843         Add element mode after gen_vec_extract* calls.
10844         * config/mips/mips-msa.md (vec_init<mode>): Renamed to ...
10845         (vec_init<mode><unitmode>): ... this.
10846         (vec_extract<mode>): Renamed to ...
10847         (vec_extract<mode><unitmode>): ... this.
10848         * config/mips/loongson.md (vec_init<mode>): Renamed to ...
10849         (vec_init<mode><unitmode>): ... this.
10850         * config/mips/mips-ps-3d.md (vec_initv2sf): Renamed to ...
10851         (vec_initv2sfsf): ... this.
10852         (vec_extractv2sf): Renamed to ...
10853         (vec_extractv2sfsf): ... this.
10854         (reduc_plus_scal_v2sf, reduc_smin_scal_v2sf, reduc_smax_scal_v2sf):
10855         Add element mode after gen_vec_extract* calls.
10856         * config/mips/mips.md (unitmode): New mode iterator.
10857         * config/spu/spu.c (spu_expand_prologue, spu_allocate_stack,
10858         spu_builtin_extract): Add element mode after gen_vec_extract* calls.
10859         * config/spu/spu.md (inner_l): New mode attribute.
10860         (vec_init<mode>): Renamed to ...
10861         (vec_init<mode><inner_l>): ... this.
10862         (vec_extract<mode>): Renamed to ...
10863         (vec_extract<mode><inner_l>): ... this.
10864         * config/sparc/sparc.md (veltmode): New mode iterator.
10865         (vec_init<VMALL:mode>): Renamed to ...
10866         (vec_init<VMALL:mode><VMALL:veltmode>): ... this.
10867         * config/ia64/vect.md (vec_initv2si): Renamed to ...
10868         (vec_initv2sisi): ... this.
10869         (vec_initv2sf): Renamed to ...
10870         (vec_initv2sfsf): ... this.
10871         (vec_extractv2sf): Renamed to ...
10872         (vec_extractv2sfsf): ... this.
10873         * config/powerpcspe/vector.md (VEC_base_l): New mode attribute.
10874         (vec_init<mode>): Renamed to ...
10875         (vec_init<mode><VEC_base_l>): ... this.
10876         (vec_extract<mode>): Renamed to ...
10877         (vec_extract<mode><VEC_base_l>): ... this.
10878         * config/powerpcspe/paired.md (vec_initv2sf): Renamed to ...
10879         (vec_initv2sfsf): ... this.
10880         * config/powerpcspe/altivec.md (splitter, altivec_copysign_v4sf3,
10881         vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
10882         vec_unpacku_lo_v8hi, mulv16qi3): Add element mode after mode in
10883         gen_vec_init* calls.
10885 2017-08-01  Richard Biener  <rguenther@suse.de>
10887         PR tree-optimization/81297
10888         * tree-vrp.c (get_single_symbol): Remove assert, instead drop
10889         TREE_OVERFLOW from INTEGER_CSTs.
10891 2017-07-31  Segher Boessenkool  <segher@kernel.crashing.org>
10893         * config/rs6000/rs6000.c (enum rs6000_reg_type): Delete trailing comma.
10895 2017-07-31  Carl Love  <cel@us.ibm.com>
10897         * config/rs6000/rs6000-c: Add support for built-in functions
10898         vector signed char vec_xl_be (signed long long, signed char *);
10899         vector unsigned char vec_xl_be (signed long long, unsigned char *);
10900         vector signed int vec_xl_be (signed long long, signed int *);
10901         vector unsigned int vec_xl_be (signed long long, unsigned int *);
10902         vector signed long long vec_xl_be (signed long long, signed long long *);
10903         vector unsigned long long vec_xl_be (signed long long, unsigned long long *);
10904         vector signed short vec_xl_be (signed long long, signed short *);
10905         vector unsigned short vec_xl_be (signed long long, unsigned short *);
10906         vector double vec_xl_be (signed long long, double *);
10907         vector float vec_xl_be (signed long long, float *);
10908         * config/rs6000/altivec.h (vec_xl_be): Add #define.
10909         * config/rs6000/rs6000-builtin.def (XL_BE_V16QI, XL_BE_V8HI, XL_BE_V4SI)
10910         XL_BE_V2DI, XL_BE_V4SF, XL_BE_V2DF, XL_BE): Add definitions
10911         for the builtins.
10912         * config/rs6000/rs6000.c (altivec_expand_xl_be_builtin): Add function.
10913         (altivec_expand_builtin): Add switch statement to call
10914         altivec_expand_xl_be for each builtin.
10915         (altivec_init_builtins): Add def_builtin for _builtin_vsx_le_be_v8hi,
10916         __builtin_vsx_le_be_v4si, __builtin_vsx_le_be_v2di,
10917         __builtin_vsx_le_be_v4sf, __builtin_vsx_le_be_v2df,
10918         __builtin_vsx_le_be_v16qi.
10919         * doc/extend.texi: Update the built-in documentation file for the
10920         new built-in functions.
10922 2017-07-31  Uros Bizjak  <ubizjak@gmail.com>
10924         PR target/25967
10925         * config/i386/i386.c (ix86_allocate_stack_slots_for_args):
10926         New function.
10927         (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
10929 2017-07-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
10931         * config.gcc: Add z14.
10932         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
10933         CPU model numbers for z13s and z14.
10934         * config/s390/s390-c.c (s390_resolve_overloaded_builtin): Replace
10935         arch12 with z14.
10936         * config/s390/s390-opts.h (enum processor_type): Rename
10937         PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
10938         * config/s390/s390.c (processor_table): Add field for CPU name to
10939         be passed to Binutils.
10940         (s390_asm_output_machine_for_arch): Use the new field in
10941         processor_table for Binutils.
10942         (s390_expand_builtin): Replace arch12 with z14.
10943         (s390_issue_rate): Rename PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
10944         (s390_get_sched_attrmask): Likewise.
10945         (s390_get_unit_mask): Likewise.
10946         * config/s390/s390.opt: Add z14 to processor_type enum.
10948 2017-07-31  Martin Jambor  <mjambor@suse.cz>
10950         PR hsa/81477
10951         * ipa-fnsummary.c (ipa_fn_summary_generate): Set versionable
10952         regardless of optimization level.
10954 2017-07-31  Jan Hubicka <hubicka@ucw.cz>
10955             Martin Liska  <mliska@suse.cz>
10957         * predict.def: Remove old comment and adjust probability.
10958         * gimplify.c (should_warn_for_implicit_fallthrough): Ignore
10959         PREDICT statements.
10961 2017-07-31  Uros Bizjak  <ubizjak@gmail.com>
10963         PR target/25967
10964         * config/i386/i386.c (ix86_function_naked): New function.
10965         (ix86_can_use_return_insn_p): Return false for naked functions.
10966         (ix86_expand_prologue): Skip prologue for naked functions.
10967         (ix86_expand_epilogue): Skip epilogue for naked functions
10968         and emit trap instruction.
10969         (ix86_warn_func_return): New function.
10970         (ix86_attribute_table): Add "naked" attribute specification.
10971         (TARGET_WARN_FUNC_RETURN): Define.
10972         * doc/extend.texi (x86 Function Attributes) <naked>: Document it.
10974 2017-07-31  Martin Liska  <mliska@suse.cz>
10976         * gimple-pretty-print.c (dump_gimple_label): Never dump BB info.
10977         (dump_gimple_bb_header): Always dump BB info.
10978         (pp_cfg_jump): Do not append info about BB when dumping a jump.
10980 2017-07-31  Martin Liska  <mliska@suse.cz>
10982         PR sanitize/81530
10983         * convert.c (convert_to_integer_1): Guard condition with flag_sanitize_p
10984         also with current_function_decl non-null equality.
10986 2017-07-31  Jakub Jelinek  <jakub@redhat.com>
10988         PR sanitizer/81604
10989         * ubsan.c (ubsan_type_descriptor): For UBSAN_PRINT_ARRAY don't
10990         change type to the element type, instead add eltype variable and
10991         use it where we are interested in the element type.
10993         PR tree-optimization/81603
10994         * ipa-polymorphic-call.c
10995         (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Perform
10996         offset arithmetic in offset_int, bail out if the resulting bit offset
10997         doesn't fit into shwi.
10999 2017-07-31  Martin Liska  <mliska@suse.cz>
11001         * gimplify.c (mostly_copy_tree_r): Remove Java specific hunk.
11002         (gimplify_save_expr): Fix comment.
11004 2017-07-30  H.J. Lu  <hongjiu.lu@intel.com>
11006         PR target/79793
11007         * config/i386/i386.c (ix86_function_arg): Update arguments for
11008         exception handler.
11009         (ix86_compute_frame_layout): Set the initial stack offset to
11010         INCOMING_FRAME_SP_OFFSET.  Update red-zone offset with
11011         INCOMING_FRAME_SP_OFFSET.
11012         (ix86_expand_epilogue): Don't pop the 'ERROR_CODE' off the
11013         stack before exception handler returns.
11014         * config/i386/i386.h (INCOMING_FRAME_SP_OFFSET): Add the
11015         the 'ERROR_CODE' for exception handler.
11017 2017-07-30  Uros Bizjak  <ubizjak@gmail.com>
11019         * config/i386/i386.h (ASM_PRINTF_EXTENSIONS): New macro.
11020         (ASM_OUTPUT_REG_PUSH): Rewrite with new operand modifiers.
11021         (ASM_OUTPUT_REG_POP): Ditto.
11022         * config/i386/i386.c (ix86_asm_output_function_label): Use fputs
11023         instead of asm_fprintf to output pure string.
11025 2017-07-29  Jakub Jelinek  <jakub@redhat.com>
11027         * debug.h (struct gcc_debug_hooks): Add IMPLICIT argument
11028         to imported_module_or_decl hook.
11029         (debug_nothing_tree_tree_tree_bool): Remove.
11030         (debug_nothing_tree_tree_tree_bool_bool): New declaration.
11031         * debug.c (do_nothing_debug_hooks): Use
11032         debug_nothing_tree_tree_tree_bool_bool instead of
11033         debug_nothing_tree_tree_tree_bool.
11034         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
11035         * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
11036         * sdbout.c (sdb_debug_hooks): Likewise.
11037         * dwarf2out.c (dwarf2_lineno_debug_hooks): Likewise.
11038         (gen_namespace_die): Add DW_AT_export_symbols attribute if
11039         langhook wants it.
11040         (dwarf2out_imported_module_or_decl): Add IMPLICIT argument,
11041         if true, -gdwarf-5 and decl will have DW_AT_export_symbols
11042         attribute, don't add anything.
11044 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11046         * fold-const.c (fold_build1_stat_loc): Remove _stat from name.
11047         (fold_build2_stat_loc): Likewise.
11048         (fold_build3_stat_loc): Likewise.
11049         * fold-const.h (fold_build1, fold_build2, fold_build3): Adjust.
11050         (fold_build1_loc): Remove macro.
11051         (fold_build2_loc): Likewise.
11052         (fold_build3_loc): Likewise.
11054 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11056         * gimple.c (gimple_build_debug_bind_stat): Remove _stat from name.
11057         (gimple_build_debug_bind_source_stat): Likewise.
11058         * gimple.h (gimple_build_debug_bind): Remove macro.
11059         (gimple_build_debug_bind_source): Likewise.
11061 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11063         * bitmap.c (bitmap_alloc): Adjust.
11064         (bitmap_gc_alloc): Likewise.
11065         * bitmap.h (bitmap_initialize_stat): Remove _stat from name.
11067 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11069         * bitmap.c (bitmap_obstack_alloc_stat): Rename to bitmap_alloc.
11070         (bitmap_gc_alloc_stat): Rename to bitmap_gc_alloc.
11071         * bitmap.h (bitmap_obstack_alloc_stat): Adjust prototype.
11072         (bitmap_gc_alloc_stat): Likewise.
11073         (BITMAP_ALLOC, BITMAP_GGC_ALLOC): Adjust.
11075 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11077         * rtl.c (shallow_copy_rtx_stat): Remove _stat from name.
11078         * rtl.h (shallow_copy_rtx): Remove macro.
11080 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11082         * emit-rtl.c (gen_raw_REG): Adjust.
11083         * gengenrtl.c (gendef): Likewise.
11084         * rtl.c (rtx_alloc_stat): Remove _stat from name.
11085         * rtl.h (rtx_alloc): Remove macro.
11087 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11089         * tree.c (build_tree_list_vec_stat): Remove _stat from name.
11090         (build_tree_list_stat): Likewise.
11091         * tree.h (build_tree_list): Remove macro.
11092         (build_tree_list_vec): Likewise.
11094 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11096         * tree.c (make_vector_stat): Remove _stat from name.
11097         (build_vector_stat): Likewise.
11098         * tree.h (make_vector_stat): Remove macro.
11099         (build_vector_stat): Likewise.
11101 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11103         * tree.h (build_var_debug_value): Remove prototype.
11105 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11107         * tree.c (tree_cons_stat): Remove _stat from name.
11108         * tree.h (tree_cons): Remove macro.
11110 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11112         * tree.c (build_vl_exp_stat): Remove _stat from name.
11113         * tree.h (build_vl_exp): Remove macro.
11115 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11117         * tree.c (build_decl_stat): Remove _stat from name.
11118         * tree.h (build_decl): Remove macro.
11120 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11122         * gimple.c (gimple_build_with_ops_stat): Adjust.
11123         (gimple_alloc_stat): Remove _stat from name.
11124         * gimple.h (gimple_alloc): Remove macro.
11126 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11128         * tree.c (make_tree_vec_stat): Remove _stat from name.
11129         (grow_tree_vec_stat): Likewise.
11130         * tree.h (make_tree_vec_stat): Adjust prototype.
11131         (grow_tree_vec_stat): Likewise.
11132         (make_tree_vec): Remove macro.
11133         (grow_tree_vec): Likewise.
11135 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11137         * fold-const.c (fold_build1_stat_loc): Adjust.
11138         (fold_build2_stat_loc): Likewise.
11139         (fold_build3_stat_loc): Likewise.
11140         * tree.c (build0_stat): Remove _stat from name.
11141         (build1_stat): Likewise.
11142         (build2_stat): Likewise.
11143         (build3_stat): Likewise.
11144         (build4_stat): Likewise.
11145         (build5_stat): Likewise.
11146         * tree.h (build1_loc): Remove macro, and rename _stat function
11147         to this.
11148         (build2_loc): Likewise.
11149         (build3_loc): Likewise.
11150         (build4_loc): Likewise.
11151         (build5_loc): Likewise.
11153 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11155         * tree.c (make_int_cst_stat): Remove _stat from name.
11156         * tree.h (make_int_cst_stat): Adjust prototype.
11157         (make_int_cst): Remove macro.
11159 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11161         * tree.c (make_tre_binfo_stat): Remove _stat from name.
11162         * tree.h (make_tree_binfo_stat): Adjust prototype.
11163         (make_tree_binfo): Remove.
11165 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11167         * tree.c (copy_node_stat): Rename to copy_node.
11168         (build_distinct_type_copy): Adjust.
11169         * tree.h (copy_node_stat): Adjust prototype.
11170         (copy_node): Remove macro.
11172 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
11174         * tree.c (make_node_stat): rename to make_node.
11175         (build_tree_list_stat): Adjust.
11176         (build0_stat): Likewise.
11177         (build2_stat): Likewise.
11178         (build3_stat): Likewise.
11179         (build4_stat): Likewise.
11180         (build5_stat): Likewise.
11181         (build_decl_stat): Likewise.
11182         * tree.h (make_node_stat): Adjust prototype.
11183         (make_node): remove macro.
11185 2017-07-28  Peter Bergner  <bergner@vnet.ibm.com>
11187         * config/rs6000/ppc-auxv.h (PPC_FEATURE2_DARN): New define.
11188         (PPC_FEATURE2_SCV): Likewise.
11189         * config/rs6000/rs6000.c (cpu_supports_info): Use them.
11191 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
11193         * config/aarch64/aarch64.c
11194         (aarch64_internal_mov_immediate): Add new special pattern.
11195         * config/aarch64/aarch64.md (*movdi_aarch64):
11196         Add reg/32bit const mov case.
11198 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
11199             Richard Sandiford <richard.sandiford@linaro.org>
11201         * config/aarch64/aarch64.md (mov<mode>): Generalize.
11202         (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
11203         Add integer and movi cases.
11204         (movi-split-hf-df-sf split, fp16): New.
11205         (enabled): Added TARGET_FP_F16INST.
11206         * config/aarch64/iterators.md (GPF_HF): New.
11207         * config/aarch64/predicates.md (aarch64_reg_or_fp_float): New.
11209 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
11211         * config/aarch64/aarch64.c
11212         (aarch64_simd_container_mode): Add prototype.
11213         (aarch64_expand_mov_immediate): Add HI support.
11214         (aarch64_reinterpret_float_as_int, aarch64_float_const_rtx_p: New.
11215         (aarch64_can_const_movi_rtx_p): New.
11216         (aarch64_preferred_reload_class):
11217         Remove restrictions of using FP registers for certain SIMD operations.
11218         (aarch64_rtx_costs): Added new cost for CONST_DOUBLE moves.
11219         (aarch64_valid_floating_const): Add integer move validation.
11220         (aarch64_simd_imm_scalar_p): Remove.
11221         (aarch64_output_scalar_simd_mov_immediate): Generalize function.
11222         (aarch64_legitimate_constant_p): Expand list of supported cases.
11223         * config/aarch64/aarch64-protos.h
11224         (aarch64_float_const_rtx_p, aarch64_can_const_movi_rtx_p): New.
11225         (aarch64_reinterpret_float_as_int): New.
11226         (aarch64_simd_imm_scalar_p): Remove.
11227         * config/aarch64/constraints.md (Uvi): New.
11228         (Dd): Split into Ds and new Dd.
11229         * config/aarch64/aarch64.md (*movsi_aarch64):
11230         Add SIMD mov case.
11231         (*movdi_aarch64): Add SIMD mov case.
11233 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
11235         * tree-predcom.c: (struct chain): Handle store-store chain in which
11236         stores for elimination only store loop invariant values.
11237         (execute_pred_commoning_chain): Ditto.
11238         (prepare_initializers_chain_store_elim): Ditto.
11239         (prepare_finalizers): Ditto.
11240         (is_inv_store_elimination_chain): New function.
11241         (initialize_root_vars_store_elim_1): New function.
11243 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
11245         * tree-predcom.c: Revise general description of the pass.
11246         (enum chain_type): New enum type for store elimination.
11247         (struct chain): New field supporting store elimination.
11248         (struct component): Ditto.
11249         (dump_chain): Dump store-stores chain.
11250         (release_chain): Release resources.
11251         (split_data_refs_to_components): Compute and create component
11252         contains only stores for elimination.
11253         (get_chain_last_ref_at): New function.
11254         (make_invariant_chain): Initialization.
11255         (make_rooted_chain): Specify chain type in parameter and record it.
11256         (add_looparound_copies): Skip for store-stores chain.
11257         (determine_roots_comp): Compute type of chain and pass it to
11258         make_rooted_chain.
11259         (initialize_root_vars_store_elim_2): New function.
11260         (finalize_eliminated_stores): New function.
11261         (remove_stmt): Handle store for elimination.
11262         (execute_pred_commoning_chain): Execute predictive commoning on
11263         store-store chains.
11264         (determine_unroll_factor): Skip unroll for store-stores chain.
11265         (prepare_initializers_chain_store_elim): New function.
11266         (prepare_initializers_chain): Hanlde store-store chain.
11267         (prepare_finalizers_chain, prepare_finalizers): New function.
11268         (tree_predictive_commoning_loop): Return integer value indicating
11269         if loop is unrolled or lcssa form is corrupted.
11270         (tree_predictive_commoning): Rewrite for lcssa form if necessary.
11272 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
11274         * tree-predcom.c (initialize_root): Delete.
11275         (execute_pred_commoning_chain): Initialize root vars and replace
11276         reference of non-combined chain directly, rather than call above
11277         function.
11279 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
11281         * tree-predcom.c (ref_at_iteration): Add parameter NITERS.  Compute
11282         memory reference to DR at (NITERS + ITERS)-th iteration of loop.
11284 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
11286         * tree-predcom.c (struct chain): New field init_seq.
11287         (release_chain): Release init_seq.
11288         (prepare_initializers_chain): Record intialization stmts in above
11289         field.
11290         (insert_init_seqs): New function.
11291         (tree_predictive_commoning_loop): Call insert_init_seqs.
11293 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
11295         * tree-predcom.c (determine_roots_comp): Skip trivial components.
11297 2017-07-28  Richard Biener  <rguenther@suse.de>
11299         * match.pd: Remove superfluous :c.
11300         * genmatch.c (simplify::id): Add member.
11301         (lower_commutative, lower_opt_convert, lower_cond, lower_for):
11302         Copy id.
11303         (current_id): New global.
11304         (dt_node::parent): Move from ...
11305         (dt_operand::parent): ... here.  Add for_id member.
11306         (is_a_helper <dt_operand *>::test): DT_TRUE is also a dt_operand.
11307         (decision_tree::find_node): Relax order requirement when
11308         merging DT_TRUE nodes to ones inbetween the current simplify
11309         and the one we try to merge with.  Add diagnostic whenever
11310         we need to enforce pattern order by not merging.
11311         (decision_tree::insert): Set current_id.
11312         (decision_tree::print_node): Dump parent node and for_id.
11313         (parser::last_id): Add member.
11314         (parser::push_simplify): Assign unique id.
11315         (parser::parser): Initialize last_id.
11317 2017-07-28  Martin Liska  <mliska@suse.cz>
11319         PR sanitizer/81340
11320         * sanopt.c (sanitize_rewrite_addressable_params): Set VALUE_EXPR after
11321         gimple_build_debug_bind.
11323 2017-07-28  Richard Biener  <rguenther@suse.de>
11325         PR tree-optimization/81502
11326         * match.pd: Add pattern combining BIT_INSERT_EXPR with
11327         BIT_FIELD_REF.
11328         * tree-cfg.c (verify_expr): Verify types of BIT_FIELD_REF
11329         size/pos operands.
11330         (verify_gimple_assign_ternary): Likewise for BIT_INSERT_EXPR pos.
11331         * gimple-fold.c (maybe_canonicalize_mem_ref_addr): Use bitsizetype
11332         for BIT_FIELD_REF args.
11333         * fold-const.c (make_bit_field_ref): Likewise.
11334         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
11336 2017-07-28  Jakub Jelinek  <jakub@redhat.com>
11338         PR sanitizer/80998
11339         * sanopt.c (pass_sanopt::execute): Handle IFN_UBSAN_PTR.
11340         * tree-ssa-alias.c (call_may_clobber_ref_p_1): Likewise.
11341         * flag-types.h (enum sanitize_code): Add SANITIZER_POINTER_OVERFLOW.
11342         Or it into SANITIZER_UNDEFINED.
11343         * ubsan.c: Include gimple-fold.h and varasm.h.
11344         (ubsan_expand_ptr_ifn): New function.
11345         (instrument_pointer_overflow): New function.
11346         (maybe_instrument_pointer_overflow): New function.
11347         (instrument_object_size): Formatting fix.
11348         (pass_ubsan::execute): Call instrument_pointer_overflow
11349         and maybe_instrument_pointer_overflow.
11350         * internal-fn.c (expand_UBSAN_PTR): New function.
11351         * ubsan.h (ubsan_expand_ptr_ifn): Declare.
11352         * sanitizer.def (__ubsan_handle_pointer_overflow,
11353         __ubsan_handle_pointer_overflow_abort): New builtins.
11354         * tree-ssa-tail-merge.c (merge_stmts_p): Handle IFN_UBSAN_PTR.
11355         * internal-fn.def (UBSAN_PTR): New internal function.
11356         * opts.c (sanitizer_opts): Add pointer-overflow.
11357         * lto-streamer-in.c (input_function): Handle IFN_UBSAN_PTR.
11358         * fold-const.c (build_range_check): Compute pointer range check in
11359         integral type if pointer arithmetics would be needed.  Formatting
11360         fixes.
11362 2017-07-28  Martin Liska  <mliska@suse.cz>
11364         PR sanitizer/81460
11365         * sanopt.c (sanitize_rewrite_addressable_params): Do not rewrite
11366         parameters that are of a variable-length.
11368 2017-07-28  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11370         * config.gcc (powerpc-*-rtems*): Remove rs6000/eabi.h.  Add
11371         rs6000/biarch64.h.
11372         * config/rs6000/rtems.h (ASM_DECLARE_FUNCTION_SIZE): New macro.
11373         (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise.
11374         (CRT_CALL_STATIC_FUNCTION): Likewise.
11375         (ASM_DEFAULT_SPEC): New define.
11376         (ASM_SPEC32): Likewise.
11377         (ASM_SPEC64): Likewise.
11378         (ASM_SPEC_COMMON): Likewise.
11379         (ASM_SPEC): Likewise.
11380         (INVALID_64BIT): Likewise.
11381         (LINK_OS_DEFAULT_SPEC): Likewise.
11382         (LINK_OS_SPEC32): Likewise.
11383         (LINK_OS_SPEC64): Likewise.
11384         (POWERPC_LINUX): Likewise.
11385         (PTRDIFF_TYPE): Likewise.
11386         (RESTORE_FP_PREFIX): Likewise.
11387         (RESTORE_FP_SUFFIX): Likewise.
11388         (SAVE_FP_PREFIX): Likewise.
11389         (SAVE_FP_SUFFIX): Likewise.
11390         (SIZE_TYPE): Likewise.
11391         (SUBSUBTARGET_OVERRIDE_OPTIONS): Likewise.
11392         (TARGET_64BIT): Likewise.
11393         (TARGET_64BIT): Likewise.
11394         (TARGET_AIX): Likewise.
11395         (WCHAR_TYPE_SIZE): Likewise.
11396         (WCHAR_TYPE): Undefine.
11397         (TARGET_OS_CPP_BUILTINS): Add 64-bit PowerPC defines.
11398         (CPP_OS_DEFAULT_SPEC): Use previous CPP_OS_RTEMS_SPEC.
11399         (CPP_OS_RTEMS_SPEC): Delete.
11400         (SUBSUBTARGET_EXTRA_SPECS): Remove cpp_os_rtems.  Add
11401         asm_spec_common, asm_spec32, asm_spec64, link_os_spec32, and
11402         link_os_spec64.
11403         * config/rs6000/t-rtems: Add mcpu=e6500/m64 multilibs.
11405 2017-07-28  Jakub Jelinek  <jakub@redhat.com>
11407         PR tree-optimization/81578
11408         * tree-parloops.c (build_new_reduction): Bail out if
11409         reduction_code isn't one of the standard OpenMP reductions.
11410         Move the details printing after that decision.
11412 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
11414         * config/rs6000/predicates.md (volatile_mem_operand): Remove code
11415         related to reload_in_progress.
11416         (splat_input_operand): Likewise.
11417         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_rtx):
11418         Delete prototype.
11419         * config/rs6000/rs6000.c (machine_function): Remove sdmode_stack_slot
11420         field.
11421         (TARGET_EXPAND_TO_RTL_HOOK): Delete.
11422         (TARGET_INSTANTIATE_DECLS): Likewise.
11423         (legitimate_indexed_address_p): Delete reload_in_progress code.
11424         (rs6000_debug_legitimate_address_p): Likewise.
11425         (rs6000_eliminate_indexed_memrefs): Likewise.
11426         (rs6000_emit_le_vsx_store): Likewise.
11427         (rs6000_emit_move_si_sf_subreg): Likewise.
11428         (rs6000_emit_move): Likewise.
11429         (register_to_reg_type): Likewise.
11430         (rs6000_pre_atomic_barrier): Likewise.
11431         (rs6000_machopic_legitimize_pic_address): Likewise.
11432         (rs6000_allocate_stack_temp): Likewise.
11433         (rs6000_address_for_fpconvert): Likewise.
11434         (rs6000_address_for_altivec): Likewise.
11435         (rs6000_secondary_memory_needed_rtx): Delete function.
11436         (rs6000_check_sdmode): Likewise.
11437         (rs6000_alloc_sdmode_stack_slot): Likewise.
11438         (rs6000_instantiate_decls): Likewise.
11439         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_RTX): Delete.
11440         * config/rs6000/rs6000.md (splitter for *movsi_got_internal):
11441         Delete reload_in_progress.
11442         (*vec_reload_and_plus_<mptrsize>): Likewise.
11443         * config/rs6000/vsx.md (vsx_mul_v2di): Likewise.
11444         (vsx_div_v2di): Likewise.
11445         (vsx_udiv_v2di): Likewise.
11447 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
11449         * config/rs6000/rs6000.opt (mlra): Replace with stub.
11450         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete OPTION_MASK_LRA.
11451         * config/rs6000/rs6000.c (TARGET_LRA_P): Delete.
11452         (rs6000_debug_reg_global): Delete print of LRA status.
11453         (rs6000_option_override_internal): Delete dead LRA related code.
11454         (rs6000_lra_p): Delete function.
11455         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mlra.
11457 2017-07-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11459         * config.gcc (riscv*-*-elf*): Add (riscv*-*-rtems*).
11460         * config/riscv/rtems.h: New file.
11462 2017-07-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11463             Sudakshina Das  <sudi.das@arm.com>
11465         * config/aarch64/aarch64.md
11466         (define_split for and<mode>3nr_compare): Move
11467         non aarch64_logical_operand to a register.
11468         (define_split for and_<SHIFT:optab><mode>3nr_compare0): Move non
11469         register immediate operand to a register.
11470         * config/aarch64/predicates.md (aarch64_mov_imm_operand): New.
11472 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
11474         PR middle-end/81564
11475         * tree-cfg.c (group_case_labels_stmt): Handle already deleted blocks.
11477 2017-07-27  Richard Biener  <rguenther@suse.de>
11479         PR tree-optimization/81573
11480         PR tree-optimization/81494
11481         * tree-vect-loop.c (vect_create_epilog_for_reduction): Handle
11482         multi defuse cycle case.
11484 2017-07-27  Richard Biener  <rguenther@suse.de>
11486         PR tree-optimization/81571
11487         * tree-vect-slp.c (vect_build_slp_tree): Properly verify reduction
11488         PHIs.
11490 2017-07-27  Eric Botcazou  <ebotcazou@adacore.com>
11492         * config/sparc/sparc.c (sparc_option_override): Set MASK_FSMULD flag
11493         earlier and only if MASK_FPU is set.  Adjust formatting.
11495 2017-07-27  Martin Liska  <mliska@suse.cz>
11497         * opt-functions.awk: Add validation of value of Init.
11498         * optc-gen.awk: Pass new argument.
11500 2017-07-27  Martin Liska  <mliska@suse.cz>
11502         * auto-profile.c (autofdo_source_profile::update_inlined_ind_target):
11503         Fix wrong condition.
11505 2017-07-27  Martin Liska  <mliska@suse.cz>
11507         * auto-profile.c (afdo_annotate_cfg): Assign zero counts to
11508         BBs and edges seen by autoFDO.
11510 2017-07-27  Richard Biener  <rguenther@suse.de>
11512         PR tree-optimization/81502
11513         * tree-ssa.c (non_rewritable_lvalue_p): Handle BIT_INSERT_EXPR
11514         with incompatible but same sized type.
11515         (execute_update_addresses_taken): Likewise.
11517 2017-07-27  James Greenhalgh  <james.greenhalgh@arm.com>
11519         * tree-ssa-loop-ch.c (pass_ch::process_loop_p): Guard on
11520         flag_tree_loop_vectorize rather than flag_tree_vectorize.
11522 2017-07-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11524         PR target/81534
11525         * config/s390/s390.md ("*atomic_compare_and_swap<mode>_1")
11526         ("*atomic_compare_and_swapdi_2", "*atomic_compare_and_swapsi_3"):
11527         Change s_operand to memory_operand.
11529 2017-07-27  Richard Sandiford  <richard.sandiford@linaro.org>
11531         * config/rs6000/rs6000-protos.h (rs6000_emit_le_vsx_permute): Declare.
11532         * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Replace with...
11533         (rs6000_emit_le_vsx_permute): ...this.  Take the destination as input.
11534         Emit instructions rather than returning an expression.  Handle TFmode
11535         and KFmode by casting to TImode.
11536         (rs6000_emit_le_vsx_load): Update to use rs6000_emit_le_vsx_permute.
11537         (rs6000_emit_le_vsx_store): Likewise.
11538         * config/rs6000/vsx.md (VSX_TI): New iterator.
11539         (*vsx_le_permute_<mode>): Use it instead of VSX_LE_128.
11540         (*vsx_le_undo_permute_<mode>): Likewise.
11541         (*vsx_le_perm_load_<mode>): Use rs6000_emit_le_vsx_permute to
11542         emit the split sequence.
11543         (*vsx_le_perm_store_<mode>): Likewise.
11545 2017-07-27  Jakub Jelinek  <jakub@redhat.com>
11547         PR tree-optimization/81555
11548         PR tree-optimization/81556
11549         * tree-ssa-reassoc.c (rewrite_expr_tree): Add NEXT_CHANGED argument,
11550         if true, force CHANGED for the recursive invocation.
11551         (reassociate_bb): Remember original length of ops array, pass
11552         len != orig_len as NEXT_CHANGED in rewrite_expr_tree call.
11554         * attribs.c (decl_attributes): Imply noinline, noclone and no_icf
11555         attributes for noipa attribute.  For naked attribute use
11556         lookup_attribute first before lookup_attribute_spec.
11557         * final.c (rest_of_handle_final): Disable IPA RA for functions with
11558         noipa attribute.
11559         * ipa-visibility.c (non_local_p): Fix comment typos.  Return true
11560         for functions with noipa attribute.
11561         (cgraph_externally_visible_p): Return true for functions with noipa
11562         attribute.
11563         * cgraph.c (cgraph_node::get_availability): Return AVAIL_INTERPOSABLE
11564         for functions with noipa attribute.
11565         * doc/extend.texi: Document noipa function attribute.
11566         * tree-ssa-structalias.c (refered_from_nonlocal_fn): Set *nonlocal_p
11567         also for functions with noipa attribute.
11568         (ipa_pta_execute): Set nonlocal_p also for nodes with noipa attribute.
11570 2017-07-26  Andrew Pinski  <apinski@cavium.com>
11572         * config/aarch64/aarch64.c (thunderx_vector_cost): Decrease cost of
11573         vec_unalign_load_cost and vec_unalign_store_cost.
11575 2017-07-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
11577         * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Delete
11578         -mvsx-small-integer option.
11579         (ISA_3_0_MASKS_IEEE): Likewise.
11580         (OTHER_VSX_VECTOR_MASKS): Likewise.
11581         (POWERPC_MASKS): Likewise.
11582         * config/rs6000/rs6000.opt (-mvsx-small-integer): Likewise.
11583         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Simplify
11584         code, only testing for DImode being allowed in non-VSX floating
11585         point registers.
11586         (rs6000_init_hard_regno_mode_ok): Change TARGET_VSX_SMALL_INTEGER
11587         to TARGET_P8_VECTOR test.  Remove redundant VSX test inside of
11588         another VSX test.
11589         (rs6000_option_override_internal): Delete -mvsx-small-integer.
11590         (rs6000_expand_vector_set): Change TARGET_VSX_SMALL_INTEGER to
11591         TARGET_P8_VECTOR test.
11592         (rs6000_secondary_reload_simple_move): Likewise.
11593         (rs6000_preferred_reload_class): Delete TARGET_VSX_SMALL_INTEGER,
11594         since TARGET_P9_VECTOR was already tested.
11595         (rs6000_opt_masks): Remove -mvsx-small-integer.
11596         * config/rs6000/vsx.md (vsx_extract_<mode>): Delete
11597         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
11598         used.
11599         (vsx_extract_<mode>_p9): Delete TARGET_VSX_SMALL_INTEGER, since a
11600         test for TARGET_VEXTRACTUB was used, and that uses
11601         TARGET_P9_VECTOR.
11602         (p9 extract splitter): Likewise.
11603         (vsx_extract_<mode>_di_p9): Likewise.
11604         (vsx_extract_<mode>_store_p9): Likewise.
11605         (vsx_extract_si): Delete TARGET_VSX_SMALL_INTEGER, since a test
11606         for TARGET_P9_VECTOR was used.  Delete code that is now dead with
11607         the elimination of TARGET_VSX_SMALL_INTEGER.
11608         (vsx_extract_<mode>_p8): Likewise.
11609         (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_fl_<FL_CONV:mode>): Likewise.
11610         (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_ufl_<FL_CONV:mode>): Likewise.
11611         (vsx_set_<mode>_p9): Likewise.
11612         (vsx_set_v4sf_p9): Likewise.
11613         (vsx_set_v4sf_p9_zero): Likewise.
11614         (vsx_insert_extract_v4sf_p9): Likewise.
11615         (vsx_insert_extract_v4sf_p9_2): Likewise.
11616         * config/rs6000/rs6000.md (sign extend splitter): Change
11617         TARGET_VSX_SMALL_INTEGER to TARGET_P8_VECTOR test.
11618         (floatsi<mode>2_lfiwax_mem): Likewise.
11619         (floatunssi<mode>2_lfiwzx_mem): Likewise.
11620         (float<QHI:mode><FP_ISA3:mode>2): Delete TARGET_VSX_SMALL_INTEGER,
11621         since a test for TARGET_P9_VECTOR was used.
11622         (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
11623         (floatuns<QHI:mode><FP_ISA3:mode>2): Likewise.
11624         (floatuns<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
11625         (fix_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to
11626         TARGET_P8_VECTOR test.
11627         (fix_trunc<mode>si2_stfiwx): Likewise.
11628         (fix_trunc<mode>si2_internal): Likewise.
11629         (fix_trunc<SFDF:mode><QHI:mode>2): Delete
11630         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
11631         used.
11632         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
11633         (fixuns_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to
11634         TARGET_P8_VECTOR test.
11635         (fixuns_trunc<mode>si2_stfiwx): Likewise.
11636         (fixuns_trunc<SFDF:mode><QHI:mode>2): Delete
11637         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
11638         used.
11639         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
11640         (fctiw<u>z_<mode>_smallint): Delete TARGET_VSX_SMALL_INTEGER,
11641         since a test for TARGET_P9_VECTOR was used.
11642         (splitter for loading small constants): Likewise.
11644 2017-07-26  Andrew Pinski  <apinski@cavium.com>
11646         * config/aarch64/aarch64.c (thunderx_vector_cost): Fix
11647         vec_fp_stmt_cost.
11649 2017-07-26  H.J. Lu  <hongjiu.lu@intel.com>
11651         PR target/81563
11652         * config/i386/i386.c (sp_valid_at): Properly check CFA offset.
11653         (fp_valid_at): Likewise.
11655 2017-07-26  James Greenhalgh  <james.greenhalgh@arm.com>
11657         * config/aarch64/aarch64.c (cortexa57_addrcost_table): Remove.
11658         (qdf24xx_addrcost_table): Likewise.
11659         (cortexa57_tunings): Update to use generic_branch_cost.
11660         (cortexa72_tunings): Likewise.
11661         (cortexa73_tunings): Likewise.
11662         (qdf24xx_tunings): Likewise.
11664 2017-07-26  James Greenhalgh  <james.greenhalgh@arm.com>
11666         * config/aarch64/aarch64.c (cortexa57_branch_cost): Remove.
11667         (thunderx2t99_branch_cost): Likewise.
11668         (cortexa35_tunings): Update to use generic_branch_cost.
11669         (cortexa53_tunings): Likewise.
11670         (cortexa57_tunings): Likewise.
11671         (cortexa72_tunings): Likewise.
11672         (cortexa73_tunings): Likewise.
11673         (thunderx2t99_tunings): Likewise.
11675 2017-07-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11677         * config/sparc/sparc.c (dump_target_flag_bits): Dump MASK_FSMULD.
11678         (sparc_option_override): Honour MASK_FSMULD.
11679         * config/sparc/sparc.h (MASK_FEATURES): Add MASK_FSMULD.
11680         * config/sparc/sparc.md (muldf3_extend): Use TARGET_FSMULD.
11681         * config/sparc/sparc.opt (mfsmuld): New option.
11682         * doc/invoke.texi (mfsmuld): Document option.
11684 2017-07-26  Marek Polacek  <polacek@redhat.com>
11686         PR middle-end/70992
11687         * tree.c (build2_stat): Don't set TREE_CONSTANT on divisions by zero.
11689 2017-07-26  Richard Biener  <rguenther@suse.de>
11691         * gimple-match-head.c (do_valueize): Return OP if valueize
11692         returns NULL_TREE.
11693         (get_def): New helper to get at the def stmt of a SSA name
11694         if valueize allows.
11695         * genmatch.c (dt_node::gen_kids_1): Use get_def instead of
11696         do_valueize to get at the def stmt.
11697         (dt_operand::gen_gimple_expr): Simplify do_valueize calls.
11699 2017-07-26  Wilco Dijkstra  <wdijkstr@arm.com>
11701         PR middle-end/46932
11702         * auto-inc-dec.c (parse_add_or_inc): Block autoinc on sfp.
11704 2017-07-26  Martin Liska  <mliska@suse.cz>
11706         PR sanitize/81186
11707         * function.c (expand_function_start): Make expansion of
11708         nonlocal_goto_save_area after parm_birth_insn.
11710 2017-07-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11712         * config/sparc/sparc.c (sparc_option_override): Remove MASK_FPU
11713         from all CPU target flags enable members.
11715 2017-07-26  Richard Biener  <rguenther@suse.de>
11717         * genmatch.c (dt_simplify::gen): Make iterator vars const.
11718         (decision_tree::gen): Make 'type' const.
11719         (write_predicate): Likewise.
11721 2017-07-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
11723         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok):
11724         Eliminate TARGET_UPPER_REGS_{DF,DI,SF} usage.
11725         (rs6000_option_override_internal): Likewise.
11726         (rs6000_expand_vector_set): Likewise.
11727         * config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Delete.
11728         (TARGET_UPPER_REGS_SF): Likewise.
11729         (TARGET_UPPER_REGS_DI): Likewise.
11730         (TARGET_VEXTRACTUB): Eliminate TARGET_UPPER_REGS_{DF,DI,SF}.
11731         (TARGET_DIRECT_MOVE_64BIT): Likewise.
11732         * config/rs6000/rs6000.md (ALTIVEC_DFORM): Likewise.
11733         (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
11734         (Splitters for DI constants in Altivec registers): Likewise.
11735         * config/rs6000/vsx.md (vsx_set_<mode>_p9): Likewise.
11736         (vsx_set_v4sf_p9): Likewise.
11737         (vsx_set_v4sf_p9_zero): Likewise.
11738         (vsx_insert_extract_v4sf_p9): Likewise.
11739         (vsx_insert_extract_v4sf_p9_2): Likewise.
11741 2017-07-25  Carl Love  <cel@us.ibm.com>
11743         * doc/extend.texi: Update the built-in documentation file for the
11744         existing built-in functions
11745         vector signed char vec_cnttz (vector signed char);
11746         vector unsigned char vec_cnttz (vector unsigned char);
11747         vector signed short vec_cnttz (vector signed short);
11748         vector unsigned short vec_cnttz (vector unsigned short);
11749         vector signed int vec_cnttz (vector signed int);
11750         vector unsigned int vec_cnttz (vector unsigned int);
11751         vector signed long long vec_cnttz (vector signed long long);
11752         vector unsigned long long vec_cnttz (vector unsigned long long);
11754 2017-07-25  Andrew Pinski  <apinski@cavium.com>
11756         * tree-ssa-uninit.c (warn_uninitialized_vars): Don't warn about memory
11757         accesses where the use is for the first operand of a BIT_INSERT.
11759 2017-07-25  Jim Wilson  <jim.wilson@linaro.org>
11761         PR bootstrap/81521
11762         * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
11763         for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
11765 2017-07-25  Jim Wilson  <jim.wilson@linaro.org>
11767         * config/i386/gstabs.h: Delete.
11768         * config/i386/openbsd.h, config/i386/t-openbsd: Likewise.
11770 2017-07-25  Uros Bizjak  <ubizjak@gmail.com>
11772         * config/i386/i386.c (ix86_decompose_address): Do not check for
11773         register RTX when looking at index_reg or base_reg.
11774         * config/i386/i386.h (INCOMING_RETURN_ADDR_RTX): Use stack_pointer_rtx.
11776 2017-07-25  Eric Botcazou  <ebotcazou@adacore.com>
11778         * gimple.c (gimple_assign_set_rhs_with_ops): Do not ask gsi_replace
11779         to update EH info here.
11781 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
11783         * match.pd ((X * CST1) * CST2): Simplify to X * (CST1 * CST2).
11785 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
11787         * match.pd ((X * CST) * Y): Reassociate to (X * Y) * CST.
11789 2017-07-25  Torsten Duwe  <duwe@suse.de>
11791         * common.opt: Introduce -fpatchable-function-entry
11792         command line option, and its variables function_entry_patch_area_size
11793         and function_entry_patch_area_start.
11794         * opts.c (common_handle_option): Add -fpatchable_function_entry_ case,
11795         including a two-value parser.
11796         * target.def (print_patchable_function_entry): New target hook.
11797         * targhooks.h (default_print_patchable_function_entry): New function.
11798         * targhooks.c (default_print_patchable_function_entry): Likewise.
11799         * toplev.c (process_options): Switch off IPA-RA if
11800         patchable function entries are being generated.
11801         * varasm.c (assemble_start_function): Look at the
11802         patchable-function-entry command line switch and current
11803         function attributes and maybe generate NOP instructions by
11804         calling the print_patchable_function_entry hook.
11805         * doc/extend.texi: Document patchable_function_entry attribute.
11806         * doc/invoke.texi: Document -fpatchable_function_entry
11807         command line option.
11808         * doc/tm.texi.in (TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY):
11809         New target hook.
11810         * doc/tm.texi: Re-generate.
11812 2017-07-25  Jakub Jelinek  <jakub@redhat.com>
11814         PR target/81532
11815         * config/i386/constraints.md (Yd, Ye): Use ALL_SSE_REGS for
11816         TARGET_AVX512DQ rather than TARGET_AVX512BW.
11818 2017-07-25  Tamar Christina  <tamar.christina@arm.com>
11820         * config/arm/parsecpu.awk (all_cores): Remove duplicates.
11822 2017-07-25  Richard Biener  <rguenther@suse.de>
11824         PR tree-optimization/81455
11825         * tree-ssa-loop-unswitch.c (find_loop_guard): Make sure to
11826         not walk in cycles when looking for guards.
11828 2017-07-25  Richard Biener  <rguenther@suse.de>
11830         PR tree-optimization/81529
11831         * tree-vect-stmts.c (process_use): Disregard live induction PHIs
11832         when optimizing backedge uses.
11834 2017-07-25  David Edelsohn  <dje.gcc@gmail.com>
11836         * dwarf2asm.c (dw2_asm_output_nstring): Encode double quote
11837         character for AIX.
11838         * dwarf2out.c (output_macinfo): Copy debug_line_section_label
11839         to dl_section_ref.  On AIX, append an expression to subtract
11840         the size of the section length to dl_section_ref.
11842 2017-07-25  Segher Boessenkool  <segher@kernel.crashing.org>
11844         * configure.ac: If any of the config.* scripts fail, exit 1.
11845         * configure: Regenerate.
11847 2017-07-25  Richard Biener  <rguenther@suse.de>
11849         PR middle-end/81546
11850         * tree-ssa-operands.c (verify_imm_links): Remove cap on number
11851         of immediate uses, be more verbose on errors.
11853 2017-07-25  Richard Biener  <rguenther@suse.de>
11855         PR tree-optimization/81510
11856         * tree-vect-loop.c (vect_is_simple_reduction): When the
11857         reduction stmt is not inside the loop bail out.
11859 2017-07-25  Richard Biener  <rguenther@suse.de>
11861         PR tree-optimization/81303
11862         * tree-vect-loop-manip.c (vect_loop_versioning): Build
11863         profitability check against LOOP_VINFO_NITERSM1.
11865 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
11867         * domwalk.c (cmp_bb_postorder): Simplify.
11868         (sort_bbs_postorder): New function.  Use it...
11869         (dom_walker::walk): ...here to optimize common cases.
11871 2017-07-25  Martin Liska  <mliska@suse.cz>
11873         PR ipa/81520
11874         * ipa-visibility.c (function_and_variable_visibility): Make the
11875         redirection just on target that supports aliasing.
11876         Fix GNU coding style.
11878 2017-07-25  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11880         PR libgcc/61152
11881         * config/aarch64/rtems.h: Add GCC Runtime Library Exception.
11882         Format changes.
11883         * config/arm/rtems.h: Likewise.
11884         * config/bfin/rtems.h: Likewise.
11885         * config/i386/rtemself.h: Likewise.
11886         * config/lm32/rtems.h: Likewise.
11887         * config/m32c/rtems.h: Likewise.
11888         * config/m68k/rtemself.h: Likewise.
11889         * config/microblaze/rtems.h: Likewise.
11890         * config/mips/rtems.h: Likewise.
11891         * config/moxie/rtems.h: Likewise.
11892         * config/nios2/rtems.h: Likewise.
11893         * config/powerpcspe/rtems.h: Likewise.
11894         * config/rs6000/rtems.h: Likewise.
11895         * config/rtems.h: Likewise.
11896         * config/sh/rtems.h: Likewise.
11897         * config/sh/rtemself.h: Likewise.
11898         * config/sparc/rtemself.h: Likewise.
11900 2017-07-25  Georg-Johann Lay  <avr@gjlay.de>
11902         PR 81487
11903         * hsa-brig.c (brig_init): Use xasprintf instead of asprintf.
11904         * gimple-pretty-print.c (dump_profile, dump_probability): Same.
11905         * tree-ssa-structalias.c (alias_get_name): Same.
11907 2017-07-25  Bin Cheng  <bin.cheng@arm.com>
11909         PR target/81414
11910         * config/aarch64/cortex-a57-fma-steering.c (analyze): Skip fmul/fmac
11911         instructions if no du chain is found.
11913 2017-07-25  Georg-Johann Lay  <avr@gjlay.de>
11915         * config/avr/avr-log.c (avr_log_vadump) ['T']: Print NULL-TREE.
11917 2017-07-25  Richard Biener  <rguenther@suse.de>
11919         PR middle-end/81505
11920         * fold-const.c (fold_negate_const): TREE_OVERFLOW should be
11921         sticky.
11923 2017-07-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
11925         * config/rs6000/rs6000-cpus.def (ISA_2_6_MASKS_SERVER): Delete
11926         upper-regs options.
11927         (ISA_2_7_MASKS_SERVER): Likewise.
11928         (ISA_3_0_MASKS_IEEE): Likewise.
11929         (OTHER_P8_VECTOR_MASKS): Likewise.
11930         (OTHER_VSX_VECTOR_MASKS): Likewise.
11931         (POWERPC_MASKS): Likewise.
11932         (power7 cpu): Use ISA_2_6_MASKS_SERVER instead of using a
11933         duplicate list of options.
11934         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove
11935         explicit -mupper-regs options.
11936         * config/rs6000/rs6000.opt (-mvsx-scalar-memory): Delete
11937         -mupper-regs* options.  Delete -mvsx-scalar-memory, which was an
11938         alias for -mupper-regs-df.
11939         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
11940         (rs6000_init_hard_regno_mode_ok): Likewise.
11941         (rs6000_option_override_internal): Likewise.
11942         (rs6000_opt_masks): Likewise.
11943         * config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Define upper regs
11944         options in terms of whether -mvsx or -mpower8-vector was used.
11945         (TARGET_UPPER_REGS_DI): Likewise.
11946         (TARGET_UPPER_REGS_SF): Likewise.
11947         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete the
11948         -mupper-regs-* options.
11950 2017-07-24  Segher Boessenkool  <segher@kernel.crashing.org>
11952         * passes.c (emergency_dump_function): Print some empty lines and a
11953         header before the RTL dump.
11955 2017-07-24  Segher Boessenkool  <segher@kernel.crashing.org>
11957         * cfgrtl.c (rtl_dump_bb): Don't call NEXT_INSN on NULL.
11959 2017-07-24  Wilco Dijkstra  <wdijkstr@arm.com>
11961         PR target/79041
11962         * config/aarch64/aarch64.c (aarch64_classify_symbol):
11963         Avoid SYMBOL_SMALL_ABSOLUTE for literals with pc-relative literals.
11965 2017-07-24  Carl Love  <cel@us.ibm.com>
11967         * config/rs6000/rs6000-c.c: Add support for built-in functions
11968         vector float vec_extract_fp32_from_shorth (vector unsigned short);
11969         vector float vec_extract_fp32_from_shortl (vector unsigned short);
11970         * config/rs6000/altivec.h (vec_extract_fp_from_shorth,
11971         vec_extract_fp_from_shortl): Add defines for the two builtins.
11972         * config/rs6000/rs6000-builtin.def (VEXTRACT_FP_FROM_SHORTH,
11973         VEXTRACT_FP_FROM_SHORTL): Add BU_P9V_OVERLOAD_1 and BU_P9V_VSX_1
11974         new builtins.
11975         * config/rs6000/vsx.md vsx_xvcvhpsp): Add define_insn.
11976         (vextract_fp_from_shorth, vextract_fp_from_shortl): Add define_expands.
11977         * doc/extend.texi: Update the built-in documentation file for the
11978         new built-in function.
11980 2017-07-24  Jakub Jelinek  <jakub@redhat.com>
11982         PR bootstrap/81521
11983         * tree.def: Remove TYPE_METHODS documentation, adjust TYPE_FIELDS
11984         documentation.
11985         * doc/generic.texi: Likewise.
11986         * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
11987         for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
11989 2017-07-24  Jackson Woodruff  <jackson.woodruff@arm.com>
11991         * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): New.
11992         (aarch64_mls_elt_merge<mode>): Likewise.
11994 2017-07-23  Krister Walfridsson  <krister.walfridsson@gmail.com>
11996         * config.gcc (*-*-netbsd*): Remove check for NetBSD versions not
11997         having __cxa_atexit.
11999 2017-07-23  Michael Collison  <michael.collison@arm.com>
12001         * config/arm/arm.c (arm_option_override): Deprecate
12002         use of -mstructure-size-boundary.
12003         * config/arm/arm.opt: Deprecate -mstructure-size-boundary.
12004         * doc/invoke.texi: Deprecate -mstructure-size-boundary.
12006 2017-07-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12008         PR target/80695
12009         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
12010         Reduce cost estimate for direct moves.
12012 2017-07-23  Uros Bizjak  <ubizjak@gmail.com>
12014         PR target/80569
12015         * config/i386/i386.c (ix86_option_override_internal): Disable
12016         BMI, BMI2 and TBM instructions for -m16.
12018 2017-07-21  Carl Love  <cel@us.ibm.com>
12020         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
12021         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
12022         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
12023         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
12024         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
12025         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
12026         VMULOSW): New enum "unspec" values.
12027         (altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
12028         altivec_vmulosw): New patterns.
12029         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
12030         VMULOSW): Add definitions.
12032 2017-07-21  Jim Wilson  <jim.wilson@linaro.org>
12034         * config/aarch64/aarch64-cores.def (falkor): Add AARCH64_FL_RDMA.
12035         (qdf24xx): Likewise.
12036         * config/aarch64/aarch64-options-extensions.def (rdma); New.
12037         * config/aarch64/aarch64.h (AARCH64_FL_RDMA): New.
12038         (AARCH64_FL_V8_1): Renumber.
12039         (AARCH64_FL_FOR_ARCH8_1): Add AARCH64_FL_RDMA.
12040         (AARCH64_ISA_RDMA): Use AARCH64_FL_RDMA.
12041         * config/aarch64/arm_neon.h: Use +rdma instead of arch=armv8.1-a.
12042         * doc/invoke.texi (AArch64 Options): Mention +rmda in -march docs.  Add
12043         rdma to feature modifiers list.
12045 2017-07-21  Yury Gribov  <tetra2005@gmail.com>
12047         PR middle-end/56727
12048         * ipa-visibility (function_and_variable_visibility): Convert
12049         recursive PLT call to direct call if appropriate.
12051 2017-07-21  Andrew Pinski  <apinski@cavium.com>
12053         * tree-ssa-sccvn.c (vn_nary_op_eq): Check BIT_INSERT_EXPR's
12054         operand 1 to see if the types precision matches.
12055         * fold-const.c (operand_equal_p): Likewise.
12057 2017-07-21  Richard Biener  <rguenther@suse.de>
12059         PR tree-optimization/81303
12060         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Pass
12061         in datarefs vector.  Allow NULL dr0 for no peeling cost estimate.
12062         (vect_peeling_hash_get_lowest_cost): Adjust.
12063         (vect_enhance_data_refs_alignment): Likewise.  Use
12064         vect_get_peeling_costs_all_drs to compute the penalty for no
12065         peeling to match up costs.
12067 2017-07-21  Richard Biener  <rguenther@suse.de>
12069         PR tree-optimization/81500
12070         * tree-vect-loop.c (vect_is_simple_reduction): Properly fail if
12071         we didn't identify a reduction path.
12073 2017-07-21  Tom de Vries  <tom@codesourcery.com>
12074             Cesar Philippidis  <cesar@codesourcery.com>
12076         PR gcov-profile/81442
12077         * config/nvptx/nvptx.c (nvptx_goacc_reduction_init): Add missing edge
12078         probabilities.
12080 2017-07-21  Tom de Vries  <tom@codesourcery.com>
12082         PR lto/81430
12083         * config/nvptx/nvptx.c (nvptx_override_options_after_change): New
12084         function.
12085         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define to
12086         nvptx_override_options_after_change.
12088 2017-07-21  Ulrich Drepper  <drepper@redhat.com>
12090         * dwarf2out.c (output_file_names): Avoid double testing for
12091         dwarf_version >= 5.
12093 2017-07-21  Georg-Johann Lay  <avr@gjlay.de>
12095         * doc/invoke.texi (AVR Built-in Functions): Re-layout section.
12097 2016-07-21  Jan Hubicka  <hubicka@ucw.cz>
12099         * cfgcleanup.c (flow_find_cross_jump): Do not crossjump across
12100         hot/cold regions.
12101         (try_crossjump_to_edge): Do not punt on partitioned functions.
12103 2016-07-21  Jan Hubicka  <hubicka@ucw.cz>
12105         * bb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges):
12106         Put all BBs reachable only via paths crossing cold region to cold
12107         region.
12108         * cfgrtl.c (find_bbs_reachable_by_hot_paths): New function.
12110 2016-07-21  Richard Biener  <rguenther@suse.de>
12112         PR tree-optimization/81303
12113         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Take
12114         into account prologue and epilogue iterations when raising
12115         min_profitable_iters to sth at least covering one vector iteration.
12117 2017-07-21  Tamar Christina  <tamar.christina@arm.com>
12119         * config/arm/arm.c (arm_test_cpu_arch_dat):
12120         Check for overlap.
12122 2017-07-20  Nathan Sidwell  <nathan@acm.org>
12124         Remove TYPE_METHODS.
12125         * tree.h (TYPE_METHODS): Delete.
12126         * dwarf2out.c (gen_member_die): Member fns are on TYPE_FIELDS.
12127         * dbxout.c (dbxout_type_fields): Ignore FUNCTION_DECLs.
12128         (dbxout_type_methods): Scan TYPE_FIELDS.
12129         (dbxout_type): Don't check TYPE_METHODS here.
12130         * function.c (use_register_for_decl): Always ignore register for
12131         class types when not optimizing.
12132         * ipa-devirt.c (odr_types_equivalent_p): Delete TYPE_METHODS scan.
12133         * tree.c (free_lang_data_in_type): Stitch out member functions and
12134         templates from TYPE_FIELDS.
12135         (build_distinct_type_copy, verify_type_variant,
12136         verify_type): Member fns are on TYPE_FIELDS.
12137         * tree-dump.c (dequeue_and_dump): No TYPE_METHODS.
12138         * tree-pretty-print.c (dump_generic_node): Likewise.
12140 2017-07-20  Jakub Jelinek  <jakub@redhat.com>
12142         PR target/80846
12143         * config/i386/i386.c (ix86_expand_vector_init_general): Handle
12144         V2TImode and V4TImode.
12145         (ix86_expand_vector_extract): Likewise.
12146         * config/i386/sse.md (VMOVE): Enable V4TImode even for just
12147         TARGET_AVX512F, instead of only for TARGET_AVX512BW.
12148         (ssescalarmode): Handle V4TImode and V2TImode.
12149         (VEC_EXTRACT_MODE): Add V4TImode and V2TImode.
12150         (*vec_extractv2ti, *vec_extractv4ti): New insns.
12151         (VEXTRACTI128_MODE): New mode iterator.
12152         (splitter for *vec_extractv?ti first element): New.
12153         (VEC_INIT_MODE): New mode iterator.
12154         (vec_init<mode>): Consolidate 3 expanders into one using
12155         VEC_INIT_MODE mode iterator.
12157 2017-07-20  Alexander Monakov  <amonakov@ispras.ru>
12159         * lra-assigns.c (pseudo_compare_func): Fix comparison step based on
12160         non_spilled_static_chain_regno_p.
12162 2017-07-20  Alexander Monakov  <amonakov@ispras.ru>
12164         * gimple-ssa-store-merging.c (sort_by_bitpos): Return 0 on equal bitpos.
12166 2017-07-20  Jan Hubicka  <hubicka@ucw.cz>
12168         * bb-reorder.c (connect_traces): Allow copying of blocks within
12169         single partition.
12171 2017-07-20  Richard Biener  <rguenther@suse.de>
12173         * gimple.h (gimple_phi_result): Add gphi * overload.
12174         (gimple_phi_result_ptr): Likewise.
12175         (gimple_phi_arg): Likewise.  Adjust index assert to only
12176         allow actual argument accesses rather than all slots available
12177         by capacity.
12178         (gimple_phi_arg_def): Add gphi * overload.
12179         * tree-phinodes.c (make_phi_node): Initialize only actual
12180         arguments.
12181         (resize_phi_node): Clear memory not covered by old node,
12182         do not initialize excess argument slots.
12183         (reserve_phi_args_for_new_edge): Initialize new argument slot
12184         completely.
12186 2017-07-20  Bin Cheng  <bin.cheng@arm.com>
12188         PR tree-optimization/81388
12189         Revert r238585:
12190         2016-07-21  Bin Cheng  <bin.cheng@arm.com>
12192         * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Clean up
12193         by removing computation of may_be_zero.
12195 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
12196             Tom de Vries  <tom@codesourcery.com>
12198         PR middle-end/81030
12199         * cfgbuild.c (find_many_sub_basic_blocks): Update REG_BR_PROB note
12200         when gimple level profile disagrees with what RTL expander did.
12202 2017-07-20  Richard Biener  <rguenther@suse.de>
12204         PR tree-optimization/61171
12205         * tree-vectorizer.h (slp_instance): Add reduc_phis member.
12206         (vect_analyze_stmt): Add slp instance parameter.
12207         (vectorizable_reduction): Likewise.
12208         * tree-vect-loop.c (vect_analyze_loop_operations): Adjust.
12209         (vect_is_simple_reduction): Deal with chains not detected
12210         as SLP reduction chain, specifically not properly associated
12211         chains containing a mix of plus/minus.
12212         (get_reduction_op): Remove.
12213         (get_initial_defs_for_reduction): Simplify, pass in whether
12214         this is a reduction chain, pass in the SLP node for the PHIs.
12215         (vect_create_epilog_for_reduction): Get the SLP instance as
12216         arg and adjust.
12217         (vectorizable_reduction): Get the SLP instance as arg.
12218         During analysis remember the SLP node with the PHIs in the
12219         instance.  Simplify getting at the vectorized reduction PHIs.
12220         * tree-vect-slp.c (vect_slp_analyze_node_operations): Pass
12221         through SLP instance.
12222         (vect_slp_analyze_operations): Likewise.
12223         * tree-vect-stms.c (vect_analyze_stmt): Likewise.
12224         (vect_transform_stmt): Likewise.
12226 2017-07-20  Tom de Vries  <tom@codesourcery.com>
12228         PR tree-optimization/81489
12229         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Move
12230         read of phi arg location to before loop that modifies phi.
12232 2017-07-20  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
12234         * match.pd (((m1 >/</>=/<= m2) * d -> (m1 >/</>=/<= m2) ? d : 0):
12235         New pattern.
12237 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
12239         PR middle-end/81331
12240         * except.c (execute): Fix ordering issue.
12242 2018-07-19  Segher Boessenkool  <segher@kernel.crashing.org>
12244         PR rtl-optimization/81423
12245         * combine.c (make_compound_operation_int): Don't try to optimize
12246         the AND of a SUBREG of an LSHIFTRT if that SUBREG is paradoxical.
12248 2017-07-19  Segher Boessenkool  <segher@kernel.crashing.org>
12250         PR rtl-optimization/81423
12251         * simplify-rtx.c (simplify_truncation): Handle truncating an IOR
12252         with a constant that is -1 in the truncated to mode.
12254 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
12256         * predict.c (propagate_unlikely_bbs_forward): Break out from ...
12257         (determine_unlikely_bbs): ... here.
12258         * predict.h (propagate_unlikely_bbs_forward): Declare.
12259         * cfgexpand.c (pass_expand::execute): Use it.
12260         * bb-reorder.c (sanitize_hot_paths): Do not consider known to be
12261         unlikely edges.
12262         (find_rarely_executed_basic_blocks_and_crossing_edges): Use
12263         propagate_unlikely_bbs_forward.
12265 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
12267         PR middle-end/81331
12268         * except.c (maybe_add_nop_after_section_switch): New function.
12269         (execute): Use it.
12271 2017-07-19  Tom de Vries  <tom@codesourcery.com>
12273         * gimple.h (gimple_phi_set_arg): Make assert more strict.
12275 2017-07-19  Tom de Vries  <tom@codesourcery.com>
12277         * gimple.h (gimple_phi_arg): Make assert more strict.
12279 2017-07-19  Steven Munroe  <munroesj@gcc.gnu.org>
12281         * config.gcc (powerpc*-*-*): Add mmintrin.h.
12282         * config/rs6000/mmintrin.h: New file.
12283         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include mmintrin.h.
12285 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
12287         PR tree-optimization/81346
12288         * match.pd: Optimize (X - 1U) <= INT_MAX-1U into (int) X > 0.
12290 2017-07-19  Tom de Vries  <tom@codesourcery.com>
12292         * config/nvptx/nvptx.md (VECIM): Add V2DI.
12294 2017-07-19  Tom de Vries  <tom@codesourcery.com>
12296         * config/nvptx/nvptx-modes.def: Add V2DImode.
12297         * config/nvptx/nvptx-protos.h (nvptx_data_alignment): Declare.
12298         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2DImode.
12299         (nvptx_output_mov_insn): Handle lack of mov.b128.
12300         (nvptx_print_operand): Handle 'H' and 'L' codes.
12301         (nvptx_vector_mode_supported): Allow V2DImode.
12302         (nvptx_preferred_simd_mode): New function.
12303         (nvptx_data_alignment): New function.
12304         (TARGET_VECTORIZE_PREFERRED_SIMD_MODE): Redefine to
12305         nvptx_preferred_simd_mode.
12306         * config/nvptx/nvptx.h (STACK_BOUNDARY, BIGGEST_ALIGNMENT): Change from
12307         64 to 128 bits.
12308         (DATA_ALIGNMENT): Define.  Set to nvptx_data_alignment.
12310 2017-07-19  Tom de Vries  <tom@codesourcery.com>
12312         * config/nvptx/nvptx-modes.def: New file.  Add V2SImode.
12313         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2SImode.
12314         (nvptx_vector_mode_supported): New function.  Allow V2SImode.
12315         (TARGET_VECTOR_MODE_SUPPORTED_P): Redefine to nvptx_vector_mode_supported.
12316         * config/nvptx/nvptx.md (VECIM): New mode iterator. Add V2SI.
12317         (mov<VECIM>_insn): New define_insn.
12318         (define_expand "mov<VECIM>): New define_expand.
12320 2017-07-19  Tom de Vries  <tom@codesourcery.com>
12322         * config/nvptx/nvptx.c (nvptx_print_operand): Handle v2 vector mode.
12324 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
12326         PR tree-optimization/81346
12327         * fold-const.h (fold_div_compare, range_check_type): Declare.
12328         * fold-const.c (range_check_type): New function.
12329         (build_range_check): Use range_check_type.
12330         (fold_div_compare): No longer static, rewritten into
12331         a match.pd helper function.
12332         (fold_comparison): Don't call fold_div_compare here.
12333         * match.pd (X / C1 op C2): New optimization using fold_div_compare
12334         as helper function.
12336 2017-07-19  Nathan Sidwell  <nathan@acm.org>
12338         * tree.h (TYPE_MINVAL, TYPE_MAXVAL): Rename to ...
12339         (TYPE_MIN_VALUE_RAW, TYPE_MAX_VALUE_RAW): ... these.
12340         * tree.c (find_decls_types_r, verify_type): Use
12341         TYPE_{MIN,MAX}_VALUE_RAW.
12342         * lto-streamer-out.c (DFS::DFS_write_tree_body): Likewise.
12343         (hash_tree): Likewise.
12344         * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
12345         Likewise.
12346         * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
12347         Likewise.
12349 2017-07-18  Tom de Vries  <tom@codesourcery.com>
12351         PR middle-end/81464
12352         * omp-expand.c (expand_omp_for_static_chunk): Handle
12353         equal-argument loop exit phi.
12355 2017-07-18  Uros Bizjak  <ubizjak@gmail.com>
12357         PR target/81471
12358         * config/i386/i386.md (rorx_immediate_operand): New mode attribute.
12359         (*bmi2_rorx<mode>3_1): Use rorx_immediate_operand as
12360         operand 2 predicate.
12361         (*bmi2_rorxsi3_1_zext): Use const_0_to_31_operand as
12362         operand 2 predicate.
12363         (ror,rol -> rorx splitters): Use const_int_operand as
12364         operand 2 predicate.
12366 2017-06-18  Richard Biener  <rguenther@suse.de>
12368         PR tree-optimization/81410
12369         * tree-vect-stmts.c (vectorizable_load): Properly adjust for
12370         the gap in the ! slp_perm SLP case after each group.
12372 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
12374         PR middle-end/81463
12375         * cfgloopmanip.c (scale_loop_profile): Watch out for zero frequency
12376         again.
12378 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
12380         PR middle-end/81462
12381         * predict.c (set_even_probabilities): Cleanup; do not affect
12382         probabilities that are already known.
12383         (combine_predictions_for_bb): Call even when count is set.
12385 2017-07-18  Nathan Sidwell  <nathan@acm.org>
12387         * tree-parloops.c (try_transform_to_exit_first_loop_alt): Use
12388         TYPE_MAX_VALUE.
12390 2017-07-18  Bin Cheng  <bin.cheng@arm.com>
12392         PR target/81408
12393         * tree-ssa-loop-niter.c (number_of_iterations_exit): Dump missed
12394         optimization for loop niter analysis.
12396 2017-07-18  Georg-Johann Lay  <avr@gjlay.de>
12398         PR target/81473
12399         * config/avr/avr.c (avr_optimize_casesi): Don't use
12400         INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX.
12402 2017-07-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
12404         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Remove
12405         body_cost_vec from _vect_peel_extended_info.
12406         (vect_peeling_hash_get_lowest_cost): Do not set body_cost_vec.
12407         (vect_peeling_hash_choose_best_peeling): Remove body_cost_vec and
12408         npeel.
12410 2017-07-18  Bin Cheng  <bin.cheng@arm.com>
12412         * config/arm/arm.c (emit_unlikely_jump): Remove unused var.
12414 2017-07-18  Richard Biener  <rguenther@suse.de>
12416         PR tree-optimization/80620
12417         PR tree-optimization/81403
12418         * tree-ssa-pre.c (phi_translate_1): Clear range and points-to
12419         info when re-using a VN table entry.
12421 2017-07-18  Richard Biener  <rguenther@suse.de>
12423         PR tree-optimization/81418
12424         * tree-vect-loop.c (vectorizable_reduction): Properly compute
12425         vectype_in.  Verify that with lane-reducing reduction operations
12426         we have a single def-use cycle.
12428 2017-07-17  Carl Love  <cel@us.ibm.com>
12430         Revert commit r249424   2017-06-20  Carl Love  <cel@us.ibm.com>
12432         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
12433         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
12434         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
12435         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
12436         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
12437         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
12438         VMULOSW): New enum "unspec" values.
12439         (vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12440         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
12441         altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
12442         altivec_vmulosw): New patterns.
12443         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
12444         VMULOSW): Add definitions.
12445 2017-07-17  Uros Bizjak  <ubizjak@gmail.com>
12447         * config/alpha/alpha.c: Include predict.h.
12449 2017-07-17  Yury Gribov  <tetra2005@gmail.com>
12451         * tree-vrp.c (compare_assert_loc): Fix comparison function
12452         to return predictable results.
12454 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
12456         * config/arc/arc.md (adddi3): Remove support for mexpand-adddi
12457         option.
12458         (subdi3): Likewise.
12459         * config/arc/arc.opt (mexpand-adddi): Deprecate it.
12460         * doc/invoke.texi (mexpand-adddi): Update text.
12462 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
12464         * config/arc/arc.md (clzsi2): Expand to an arc_clzsi2 instruction
12465         that also clobbers the CC register. The old expand code is moved
12466         to ...
12467         (*arc_clzsi2): ... here.
12468         (ctzsi2): Expand to an arc_ctzsi2 instruction that also clobbers
12469         the CC register. The old expand code is moved to ...
12470         (arc_ctzsi2): ... here.
12472 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
12474         * config/arc/arc.opt (mindexed-loads): Use initial value
12475         TARGET_INDEXED_LOADS_DEFAULT.
12476         (mauto-modify-reg): Use initial value
12477         TARGET_AUTO_MODIFY_REG_DEFAULT.
12478         * config/arc/elf.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
12479         (TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
12480         * config/arc/linux.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
12481         (TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
12483 2017-07-17  Martin Liska  <mliska@suse.cz>
12485         PR sanitizer/81302
12486         * opts.c (finish_options): Do not allow -fgnu-tm
12487         w/ -fsanitize={kernel-,}address.  Say sorry.
12489 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
12491         PR target/81369
12492         * tree-loop-distribution.c (classify_partition): Only assert on
12493         numer of iterations.
12494         (merge_dep_scc_partitions): Delete prameter.  Update function call.
12495         (distribute_loop): Remove code handling loop with unknown niters.
12496         (pass_loop_distribution::execute): Skip loop with unknown niters.
12498 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
12500         PR target/81369
12501         * tree-loop-distribution.c (merge_dep_scc_partitions): Sink call to
12502         function sort_partitions_by_post_order.
12504 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
12506         PR tree-optimization/81374
12507         * tree-loop-distribution.c (pass_loop_distribution::execute): Record
12508         the max index of basic blocks, rather than number of basic blocks.
12510 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
12512         * config/arc/arc-protos.h (arc_legitimate_pc_offset_p): Remove
12513         proto.
12514         (arc_legitimate_pic_operand_p): Likewise.
12515         * config/arc/arc.c (arc_legitimate_pic_operand_p): Remove
12516         function.
12517         (arc_needs_pcl_p): Likewise.
12518         (arc_legitimate_pc_offset_p): Likewise.
12519         (arc_legitimate_pic_addr_p): Remove LABEL_REF case, as this
12520         function is also used in constrains.md.
12521         (arc_legitimate_constant_p): Use arc_legitimate_pic_addr_p to
12522         validate pic constants. Handle CONST_INT, CONST_DOUBLE, MINUS and
12523         PLUS.  Only return true/false in known cases, otherwise assert.
12524         (arc_legitimate_address_p): Remove arc_legitimate_pic_addr_p as it
12525         is already called in arc_legitimate_constant_p.
12526         * config/arc/arc.h (CONSTANT_ADDRESS_P): Consider also LABEL for
12527         pic addresses.
12528         (LEGITIMATE_PIC_OPERAND_P): Use
12529         arc_raw_symbolic_reference_mentioned_p function.
12530         * config/arc/constraints.md (Cpc): Use arc_legitimate_pic_addr_p
12531         function.
12532         (Cal): Likewise.
12533         (C32): Likewise.
12535 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
12536         Andrew Burgess  <andrew.burgess@embecosm.com>
12538         * config/arc/arc-protos.h (arc_compute_function_type): Change prototype.
12539         (arc_return_address_register): New function.
12540         * config/arc/arc.c (arc_handle_fndecl_attribute): New function.
12541         (arc_handle_fndecl_attribute): Add naked attribute.
12542         (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
12543         (TARGET_WARN_FUNC_RETURN): Likewise.
12544         (arc_allocate_stack_slots_for_args): New function.
12545         (arc_warn_func_return): Likewise.
12546         (machine_function): Change type fn_type.
12547         (arc_compute_function_type): Consider new naked function type,
12548         change function return type.
12549         (arc_must_save_register): Adapt to handle new
12550         arc_compute_function_type's return type.
12551         (arc_expand_prologue): Likewise.
12552         (arc_expand_epilogue): Likewise.
12553         (arc_return_address_regs): Delete.
12554         (arc_return_address_register): New function.
12555         (arc_epilogue_uses): Use above function.
12556         * config/arc/arc.h (arc_return_address_regs): Delete prototype.
12557         (arc_function_type): Change encoding, add naked type.
12558         (ARC_INTERRUPT_P): Change to handle the new encoding.
12559         (ARC_FAST_INTERRUPT_P): Likewise.
12560         (ARC_NORMAL_P): Define.
12561         (ARC_NAKED_P): Likewise.
12562         (arc_compute_function_type): Delete prototype.
12563         * config/arc/arc.md (in_ret_delay_slot): Use
12564         arc_return_address_register function.
12565         (simple_return): Likewise.
12566         (p_return_i): Likewise.
12568 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
12570         PR tree-optimization/81428
12571         * match.pd (X / X -> one): Don't optimize _Fract divisions, as 1
12572         can't be built for those types.
12574 2017-07-17  Georg-Johann Lay  <avr@gjlay.de>
12576         Remove stuff dead since r239246.
12578         * config/avr/avr-arch.h (avr_inform_devices): Remove dead proto.
12579         * config/avr/avr-devices.c (mcu_name, comparator, avr_mcus_str)
12580         (avr_inform_devices): Remove dead stuff.
12582 2017-07-17  Tamar Christina  <tamar.christina@arm.com>
12584         * config/arm/arm_neon.h: Fix softp typo.
12586 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
12588         PR tree-optimization/81365
12589         * tree-ssa-phiprop.c (propagate_with_phi): When considering hoisting
12590         aggregate moves onto bb predecessor edges, make sure there are no
12591         loads that could alias the lhs in between the start of bb and the
12592         loads from *phi.
12594 2017-07-17  Georg-Johann Lay  <avr@gjlay.de>
12596         PR 80929
12597         * config/avr/avr.c (avr_mul_highpart_cost): New static function.
12598         (avr_rtx_costs_1) [TRUNCATE]: Use it to compute mul_highpart cost.
12599         [LSHIFTRT, outer_code = TRUNCATE]: Same.
12601 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
12603         PR tree-optimization/81396
12604         * tree-ssa-math-opts.c (struct symbolic_number): Add n_ops field.
12605         (init_symbolic_number): Initialize it to 1.
12606         (perform_symbolic_merge): Add n_ops from both operands into the new
12607         n_ops.
12608         (find_bswap_or_nop): Don't consider n->n == cmpnop computations
12609         without base_addr as useless if they need more than one operation.
12610         (bswap_replace): Handle !bswap case for NULL base_addr.
12612 2017-07-17  Tom de Vries  <tom@codesourcery.com>
12614         PR target/81069
12615         * config/nvptx/nvptx.c (nvptx_single): Insert diverging branch as late
12616         as possible.
12618 2017-07-17  Sebastian Huber  <sebastian.huber@embedded-brains.de>
12620         * config/sparc/rtemself.h (TARGET_OS_CPP_BUILTINS): Add
12621         conditional builtin define __FIX_LEON3FT_B2BST.
12623 2017-07-17  Daniel Cederman  <cederman@gaisler.com>
12625         * config/sparc/t-rtems: Add mfix-gr712rc multilibs. Replace
12626         MULTILIB_EXCEPTIONS with MULTILIB_REQUIRED. Match -mfix-gr712rc
12627         with -mfix-ut700.
12629 2017-07-16  Eric Botcazou  <ebotcazou@adacore.com>
12631         PR rtl-optimization/81424
12632         * optabs.c (prepare_cmp_insn): Use copy_to_reg instead of force_reg
12633         to remove potential trapping from operands if -fnon-call-exceptions.
12635 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
12637         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Use
12638         profile_proability for scalling.
12639         * scale_profile_for_vect_loop.c (scale_profile_for_vect_loop): Likewise.
12641 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
12643         * cgraph.c (cgraph_edge::redirect_call_stmt_to_caller): Cleanup.
12645 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
12647         * cfgloopmanip.c (scale_loop_profile): Avoid use of REG_BR_PROB_BASE
12648         fixpoint arithmetics.
12650 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
12652         * tree-ssa-loop-unswitch.c (hoist_guard): Avoid use of REG_BR_PROB_BASE
12653         fixpoint arithmetics.
12655 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
12657         * asan.c (create_cond_insert_point): Avoid use of REG_BR_PROB_BASE
12658         fixpoint arithmetics.
12660 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
12662         * profile-count.h (profile_probability::from_reg_br_prob_note,
12663         profile_probability::to_reg_br_prob_note): New functions.
12664         * doc/rtl.texi (REG_BR_PROB_NOTE): Update documentation.
12665         * reg-notes.h (REG_BR_PROB, REG_BR_PRED): Update docs.
12666         * predict.c (probability_reliable_p): Update.
12667         (edge_probability_reliable_p): Update.
12668         (br_prob_note_reliable_p): Update.
12669         (invert_br_probabilities): Update.
12670         (add_reg_br_prob_note): New function.
12671         (combine_predictions_for_insn): Update.
12672         * asan.c (asan_clear_shadow): Update.
12673         * cfgbuild.c (compute_outgoing_frequencies): Update.
12674         * cfgrtl.c (force_nonfallthru_and_redirect): Update.
12675         (update_br_prob_note): Update.
12676         (rtl_verify_edges): Update.
12677         (purge_dead_edges): Update.
12678         (fixup_reorder_chain): Update.
12679         * emit-rtl.c (try_split): Update.
12680         * ifcvt.c (cond_exec_process_insns): Update.
12681         (cond_exec_process_if_block): Update.
12682         (dead_or_predicable): Update.
12683         * internal-fn.c (expand_addsub_overflow): Update.
12684         (expand_neg_overflow): Update.
12685         (expand_mul_overflow): Update.
12686         * loop-doloop.c (doloop_modify): Update.
12687         * loop-unroll.c (compare_and_jump_seq): Update.
12688         * optabs.c (emit_cmp_and_jump_insn_1): Update.
12689         * predict.h: Update.
12690         * reorg.c (mostly_true_jump): Update.
12691         * rtl.h: Update.
12692         * config/aarch64/aarch64.c (aarch64_emit_unlikely_jump): Update.
12693         * config/alpha/alpha.c (emit_unlikely_jump): Update.
12694         * config/arc/arc.c: (emit_unlikely_jump): Update.
12695         * config/arm/arm.c: (emit_unlikely_jump): Update.
12696         * config/bfin/bfin.c (cbranch_predicted_taken_p): Update.
12697         * config/frv/frv.c (frv_print_operand_jump_hint): Update.
12698         * config/i386/i386.c (ix86_expand_split_stack_prologue): Update.
12699         (ix86_print_operand): Update.
12700         (ix86_split_fp_branch): Update.
12701         (predict_jump): Update.
12702         * config/ia64/ia64.c (ia64_print_operand): Update.
12703         * config/mmix/mmix.c (mmix_print_operand): Update.
12704         * config/powerpcspe/powerpcspe.c (output_cbranch): Update.
12705         (rs6000_expand_split_stack_prologue): Update.
12706         * config/rs6000/rs6000.c: Update.
12707         * config/s390/s390.c (s390_expand_vec_strlen): Update.
12708         (s390_expand_vec_movstr): Update.
12709         (s390_expand_cs_tdsi): Update.
12710         (s390_expand_split_stack_prologue): Update.
12711         * config/sh/sh.c (sh_print_operand): Update.
12712         (expand_cbranchsi4): Update.
12713         (expand_cbranchdi4): Update.
12714         * config/sparc/sparc.c (output_v9branch): Update.
12715         * config/spu/spu.c (get_branch_target): Update.
12716         (ea_load_store_inline): Update.
12717         * config/tilegx/tilegx.c (cbranch_predicted_p): Update.
12718         * config/tilepro/tilepro.c: Update.
12720 2017-07-16  Eric Botcazou  <ebotcazou@adacore.com>
12722         * gimplify.c (mostly_copy_tree_r): Revert latest change.
12723         (gimplify_save_expr): Likewise.
12725 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
12727         * ipa-visibility.c (function_and_variable_visibility): Fix pasto.
12729 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
12731         * ipa-fnsummary.c (pass_data_ipa_fn_summary): Use
12732         TV_IPA_FNSUMMARY.
12733         * timevar.def (TV_IPA_FNSUMMARY): Define.
12735 2017-07-16  Daniel Cederman  <cederman@gaisler.com>
12737         * config/sparc/sparc.md (divdf3_fix): Add NOP to prevent back
12738         to back store errata sensitive sequence from being generated.
12739         (sqrtdf2_fix): Likewise.
12741 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
12743         * tree-ssa-threadupdate.c (compute_path_counts,
12744         update_joiner_offpath_counts): Use profile_probability.
12746 2017-07-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12748         Revert:
12749         2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12751         * config/arm/arm-c.c (arm_cpu_builtins): Define
12752         __ARM_FEATURE_NUMERIC_MAXMIN solely based on TARGET_VFP5.
12754 2017-07-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12756         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
12757         array entries to represent __ieee128 versions of the
12758         scalar_test_data_class, scalar_test_neg, scalar_extract_exp,
12759         scalar_extract_sig, and scalar_insert_exp built-in functions.
12760         (altivec_resolve_overloaded_builtin): Add special case handling
12761         for the __builtin_scalar_insert_exp function, as represented by
12762         the P9V_BUILTIN_VEC_VSIEDP constant.
12763         * config/rs6000/rs6000-builtin.def (VSEEQP): Add scalar extract
12764         exponent support for __ieee128 argument.
12765         (VSESQP): Add scalar extract signature support for __ieee128
12766         argument.
12767         (VSTDCNQP): Add scalar test negative support for __ieee128
12768         argument.
12769         (VSIEQP): Add scalar insert exponent support for __int128 argument
12770         with __ieee128 result.
12771         (VSIEQPF): Add scalar insert exponent support for __ieee128
12772         argument with __ieee128 result.
12773         (VSTDCQP): Add scalar test data class support for __ieee128
12774         argument.
12775         (VSTDCNQP): Add overload support for scalar test negative with
12776         __ieee128 argument.
12777         (VSTDCQP): Add overload support for scalar test data class
12778         __ieee128 argument.
12779         * config/rs6000/vsx.md (UNSPEC_VSX_SXSIG) Replace
12780         UNSPEC_VSX_SXSIGDP.
12781         (UNSPEC_VSX_SIEXPQP): New constant.
12782         (xsxexpqp): New insn for VSX scalar extract exponent quad
12783         precision.
12784         (xsxsigqp): New insn for VSX scalar extract significand quad
12785         precision.
12786         (xsiexpqpf): New insn for VSX scalar insert exponent quad
12787         precision with floating point argument.
12788         (xststdcqp): New expand for VSX scalar test data class quad
12789         precision.
12790         (xststdcnegqp): New expand for VSX scalar test negative quad
12791         precision.
12792         (xststdcqp): New insn to match expansions for VSX scalar test data
12793         class quad precision and VSX scalar test negative quad precision.
12794         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
12795         special case operand checking to enforce that second operand of
12796         VSX scalar test data class with quad precision argument is a 7-bit
12797         unsigned literal.
12798         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
12799         prototypes and descriptions of __ieee128 versions of
12800         scalar_extract_exp, scalar_extract_sig, scalar_insert_exp,
12801         scalar_test_data_class, and scalar_test_neg built-in functions.
12803 2016-07-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12805         PR tree-optimization/81162
12806         * gimple-ssa-strength-reduction.c (replace_mult_candidate): Don't
12807         replace a negate with an add.
12809 2017-07-14  James Greenhalgh  <james.greenhalgh@arm.com>
12811         * doc/invoke.texi (arm/-mcpu): Document +crypto.
12813 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12815         * config/arm/arm-c.c (arm_cpu_builtins): Define
12816         __ARM_FEATURE_NUMERIC_MAXMIN solely based on TARGET_VFP5.
12818 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12820         * config/arm/arm-cpus.in (cortex-r52): Add new entry.
12821         (armv8-r): Set ARM Cortex-R52 as default CPU.
12822         * config/arm/arm-tables.opt: Regenerate.
12823         * config/arm/arm-tune.md: Regenerate.
12824         * config/arm/driver-arm.c (arm_cpu_table): Add entry for ARM
12825         Cortex-R52.
12826         * doc/invoke.texi: Mention -mtune=cortex-r52 and availability of fp.dp
12827         extension for -mcpu=cortex-r52.
12829 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12831         * config/arm/arm-isa.h (isa_bit_FP_ARMv8): Delete enumerator.
12832         (ISA_FP_ARMv8): Define as ISA_FPv5 and ISA_FP_D32.
12833         * config/arm/arm-cpus.in (armv8-r): Define fp.sp as enabling FPv5.
12834         (fp-armv8): Define it as FP_ARMv8 only.
12835         config/arm/arm.h (TARGET_FPU_ARMV8): Delete.
12836         (TARGET_VFP_FP16INST): Define using TARGET_VFP5 rather than
12837         TARGET_FPU_ARMV8.
12838         config/arm/arm.c (arm_rtx_costs_internal): Replace checks against
12839         TARGET_FPU_ARMV8 by checks against TARGET_VFP5.
12840         * config/arm/arm-builtins.c (arm_builtin_vectorized_function): Define
12841         first ARM_CHECK_BUILTIN_MODE definition using TARGET_VFP5 rather
12842         than TARGET_FPU_ARMV8.
12843         * config/arm/arm-c.c (arm_cpu_builtins): Likewise for
12844         __ARM_FEATURE_NUMERIC_MAXMIN macro definition.
12845         * config/arm/arm.md (cmov<mode>): Condition on TARGET_VFP5 rather than
12846         TARGET_FPU_ARMV8.
12847         * config/arm/neon.md (neon_vrint): Likewise.
12848         (neon_vcvt): Likewise.
12849         (neon_<fmaxmin_op><mode>): Likewise.
12850         (<fmaxmin><mode>3): Likewise.
12851         * config/arm/vfp.md (l<vrint_pattern><su_optab><mode>si2): Likewise.
12852         * config/arm/predicates.md (arm_cond_move_operator): Check against
12853         TARGET_VFP5 rather than TARGET_FPU_ARMV8 and fix spacing.
12855 2017-07-14  Jackson Woodruff  <jackson.woodruff@arm.com>
12857         * config/aarch64/aarch64.c (aarch64_print_operand): Move comments
12858         to top of function.
12860 2017-07-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12862         * gimple-ssa-store-merging.c (clear_bit_region): Replace reference to
12863         loop in comment with memset.
12865 2017-07-14  Martin Liska  <mliska@suse.cz>
12867         * cfgexpand.c (expand_gimple_basic_block): Remove dead comment.
12868         * dwarf2out.c (is_java): Remove the function.
12869         (output_pubname): Remove usage of the function.
12870         (lower_bound_default): Remove usage of DW_LANG_Java.
12871         (gen_compile_unit_die): Likewise.
12872         * gcc.c: Remove compiler defaults for .java and .zip files.
12873         * gimple-expr.c (remove_suffix): Change as there's no longer
12874         extension than 4-letter one.
12875         * gimplify.c (mostly_copy_tree_r): Remove Java-special part.
12876         (gimplify_save_expr): Likewise.
12877         * ipa-utils.h (polymorphic_type_binfo_p): Remove the comment
12878         as it's possible even for other languages than Java.
12879         * langhooks.h (struct lang_hooks): Remove Java from a comment.
12880         * lto-opts.c (lto_write_options): Remove reference to Java.
12881         * opts.c (strip_off_ending): Update file extension handling.
12882         * tree-cfg.c (verify_gimple_call): Remove comment with Java.
12883         * tree-eh.c (lower_resx): Likewise.
12884         * tree.c (free_lang_data_in_type): Remove dead code.
12885         (find_decls_types_r): Likewise.
12886         (build_common_builtin_nodes): Remove Java from a comment.
12887         (verify_type): Remove dead code.
12888         * varasm.c (assemble_external): Remove Java from a comment.
12890 2017-07-14  Martin Liska  <mliska@suse.cz>
12892         * opts.c (finish_options): Add quotes.
12893         (common_handle_option): Likewise.
12895 2017-07-14  Martin Liska  <mliska@suse.cz>
12897         * dbxout.c (get_lang_number): Do not handle GNU Pascal.
12898         * dbxout.h (extern void dbxout_stab_value_internal_label_diff):
12899         Remove N_SO_PASCAL.
12900         * dwarf2out.c (lower_bound_default): Do not handle
12901         DW_LANG_Pascal83.
12902         (gen_compile_unit_die): Likewise.
12903         * gcc.c: Remove default extension binding for GNU Pascal.
12904         * stmt.c: Remove Pascal language from a comment.
12905         * xcoffout.c: Likewise.
12907 2017-07-13  David Malcolm  <dmalcolm@redhat.com>
12909         PR c/81405
12910         * diagnostic-show-locus.c (fixit_cmp): New function.
12911         (layout::layout): Sort m_fixit_hints.
12912         (column_range::column_range): Assert that the values are valid.
12913         (struct char_span): New struct.
12914         (correction::overwrite): New method.
12915         (struct source_line): New struct.
12916         (line_corrections::add_hint): Add assertions.  Reimplement memcpy
12917         calls in terms of classes source_line and char_span, and
12918         correction::overwrite.
12919         (selftest::test_overlapped_fixit_printing_2): New function.
12920         (selftest::diagnostic_show_locus_c_tests): Call it.
12922 2017-07-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
12924         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Return
12925         early if there is no lhs.
12927 2017-07-13  Martin Liska  <mliska@suse.cz>
12929         * dwarf2out.c (gen_pointer_type_die): Remove dead code.
12930         (gen_reference_type_die): Likewise.
12931         * stor-layout.c: Remove Pascal-related comment.
12933 2017-07-13  Martin Liska  <mliska@suse.cz>
12935         * opts.c (finish_options): Add quotes to error messages.
12936         (parse_sanitizer_options): Likewise.
12938 2017-07-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12940         * doc/invoke.texi (armv8-r): Document +fp.sp ARMv8-R extension.
12942 2017-07-13  Richard Earnshaw  <rearnsha@arm.com>
12944         * config/arm/vxworks.h (TARGET_ENDIAN_DEFAULT): Define.
12946 2017-07-13  Maxim Ostapenko  <m.ostapenko@samsung.com>
12948         * asan.c (asan_emit_allocas_unpoison): Use ptr_mode for arguments
12949         during expansion.
12950         * builtins.c (expand_asan_emit_allocas_unpoison): Likewise.
12952 2017-07-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
12954         PR target/81193
12955         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If GLIBC
12956         provides the hardware capability bits, define the macro
12957         __BUILTIN_CPU_SUPPORTS__.
12958         * config/rs6000/rs6000.c (cpu_expand_builtin): Generate a warning
12959         if GLIBC does not provide the hardware capability bits.  Add a
12960         gcc_unreachable call if the built-in cpu function is neither
12961         __builtin_cpu_is nor __builtin_cpu_supports.
12962         (rs6000_get_function_versions_dispatcher): Change the warning
12963         that an old GLIBC is used which does not export the capability
12964         bits to be an error.
12965         * doc/extend.texi (target_clones attribute): Document the
12966         restriction that GLIBC 2.23 or newer is needed on the PowerPC.
12967         (PowerPC built-in functions): Document that GLIBC 2.23 or newer is
12968         needed by __builtin_cpu_is and __builtin_cpu_supports.  Document
12969         the macros defined by GCC if the newer GLIBC is available.
12971 2017-07-12  Jeff Law  <law@redhat.com>
12973         * config/riscv/riscv.c: Remove unnecessary includes.  Reorder
12974         remaining includes slightly.
12975         * config/riscv/riscv-builtins.c: Include profile-count.h.
12977 2017-07-12  Georg-Johann Lay  <avr@gjlay.de>
12979         PR target/79883
12980         * config/avr/avr.c (avr_set_current_function): In diagnostic
12981         messages: Quote keywords and (parts of) identifiers.
12982         [WITH_AVRLIBC]: Warn for functions named "ISR", "SIGNAL" or
12983         "INTERUPT".
12985 2017-07-12  Carl Love  <cel@us.ibm.com>
12987         * config/rs6000/rs6000-c.c: Add support for built-in functions
12988         vector bool char vec_revb (vector bool char);
12989         vector bool short vec_revb (vector short char);
12990         vector bool int vec_revb (vector bool int);
12991         vector bool long long vec_revb (vector bool long long);
12992         * doc/extend.texi: Update the built-in documentation file for the
12993         new built-in functions.
12995 2017-07-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12997         * config/s390/s390.md: Remove movcc splitter.
12999 2017-07-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13001         * config/s390/s390.c (s390_rtx_costs): Return proper costs for
13002         load/store on condition.
13004 2017-07-12  Georg-Johann Lay  <avr@gjlay.de>
13006         PR target/81407
13007         * config/avr/avr.c (avr_encode_section_info)
13008         [progmem && !TREE_READONLY]: Error if progmem object needs
13009         constructing.
13011 2017-07-11  Michael Collison  <michael.collison@arm.com>
13013         * config/aarch64/aarch64-simd.md (aarch64_sub<mode>_compare0):
13014         New pattern.
13016 2017-07-11  Carl Love  <cel@us.ibm.com>
13018         * config/rs6000/rs6000-c.c: Add support for builtins
13019         vector unsigned int vec_parity_lsbb (vector signed int);
13020         vector unsigned int vec_parity_lsbb (vector unsigned int);
13021         vector unsigned __int128 vec_parity_lsbb (vector signed __int128);
13022         vector unsigned __int128 vec_parity_lsbb (vector unsigned __int128);
13023         vector unsigned long long vec_parity_lsbb (vector signed long long);
13024         vector unsigned long long vec_parity_lsbb (vector unsigned long long);
13025         * config/rs6000/rs6000-builtin.def (VPARITY_LSBB): Add BU_P9V_OVERLOAD1.
13026         * config/rs6000/altivec.h (vec_parity_lsbb): Add define.
13027         * doc/extend.texi: Update the built-in documentation file for the
13028         new built-in functions.
13030 2017-07-11  David Malcolm  <dmalcolm@redhat.com>
13032         * diagnostic-show-locus.c: Include "gcc-rich-location.h".
13033         (layout::m_primary_loc): New field.
13034         (layout::layout): Initialize new field.  Move location filtering
13035         logic from here to...
13036         (layout::maybe_add_location_range): ...this new method.  Add
13037         support for filtering to just the lines already specified by other
13038         locations.
13039         (layout::will_show_line_p): New method.
13040         (gcc_rich_location::add_location_if_nearby): New method.
13041         (selftest::test_add_location_if_nearby): New test function.
13042         (selftest::diagnostic_show_locus_c_tests): Call it.
13043         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
13044         New method.
13046 2017-07-11  Tom de Vries  <tom@codesourcery.com>
13048         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG): New macro.
13049         (bb_first_real_insn): New function.
13050         (nvptx_single): Add extra initialization of broadcasted condition
13051         variables.
13053 2017-07-11  Nathan Sidwell  <nathan@acm.org>
13055         * dwarf2out.c (gen_member_die): Remove useless check for anon ctors.
13057 2017-07-11  Georg-Johann Lay  <avr@gjlay.de>
13059         * doc/extend.texi (AVR Function Attributes): Remove weblink to
13060         Binutils doc as TEXI will mess them up.
13061         * doc/invoke.texi (AVR Options): Same here.
13063 2017-07-11  Daniel Cederman  <cederman@gaisler.com>
13065         * config/sparc/sparc.opt (mfix-ut700): New option.
13066         (mfix-gr712rc): Likewise.
13067         (sparc_fix_b2bst): New variable.
13068         * doc/invoke.texi (SPARC options): Document them.
13069         (ARM options): Fix warnings.
13070         * config/sparc/sparc.c (sparc_do_work_around_errata): Insert NOP
13071         instructions to prevent sequences that can trigger the store-store
13072         errata for certain LEON3FT processors.
13073         (pass_work_around_errata::gate): Also test sparc_fix_b2bst.
13074         (sparc_option_override): Set sparc_fix_b2bst appropriately.
13075         * config/sparc/sparc.md (fix_b2bst): New attribute.
13076         (in_branch_delay): Prevent stores in delay slot if fix_b2bst.
13078 2017-07-10  Uros Bizjak  <ubizjak@gmail.com>
13080         PR target/81375
13081         * config/i386/i386.md (divsf3): Add TARGET_SSE to TARGET_SSE_MATH.
13082         (rcpps): Ditto.
13083         (*rsqrtsf2_sse): Ditto.
13084         (rsqrtsf2): Ditto.
13085         (div<mode>3): Macroize insn from divdf3 and divsf3
13086         using MODEF mode iterator.
13088 2017-07-10  Martin Sebor  <msebor@redhat.com>
13090         PR tree-optimization/80397
13091         * gimple-ssa-sprintf.c (format_integer): Use INTEGRAL_TYPE_P()
13092         instead of testing for equality to INTEGER_TYPE.
13094 2017-07-10  Vineet Gupta <vgupta@synopsys.com>
13096         * config.gcc: Remove uclibc from arc target spec.
13098 2017-07-10  Claudiu Zissulescu  <claziss@synopsys.com>
13100         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Define.
13102 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
13104         PR lto/80838
13105         * lto-wrapper.c (remove_option): New function.
13106         (merge_and_complain): Merge PIC/PIE options more realistically.
13108 2017-07-10  Georg-Johann Lay  <avr@gjlay.de>
13110         Better ISR prologues by supporting GASes __gcc_isr pseudo insn.
13112         PR target/20296
13113         PR target/81268
13114         * configure.ac [target=avr]: Add GAS check for -mgcc-isr.
13115         (HAVE_AS_AVR_MGCCISR_OPTION):  If so, AC_DEFINE it.
13116         * config.in: Regenerate.
13117         * configure: Regenerate.
13118         * doc/extend.texi (AVR Function Attributes) <no_gccisr>: Document it.
13119         * doc/invoke.texi (AVR Options) <-mgas-isr-prologues>: Document it.
13120         * config/avr/avr.opt (-mgas-isr-prologues): New option and...
13121         (TARGET_GASISR_PROLOGUES): ...target mask.
13122         * common/config/avr/avr-common.c
13123         (avr_option_optimization_table) [OPT_LEVELS_1_PLUS_NOT_DEBUG]:
13124         Set -mgas-isr-prologues.
13125         * config/avr/avr-passes.def (avr_pass_pre_proep): Add
13126         INSERT_PASS_BEFORE for it.
13127         * config/avr/avr-protos.h (make_avr_pass_pre_proep): New proto.
13128         * config/avr/avr.c (avr_option_override)
13129         [!HAVE_AS_AVR_MGCCISR_OPTION]: Unset TARGET_GASISR_PROLOGUES.
13130         (avr_no_gccisr_function_p, avr_hregs_split_reg): New static functions.
13131         (avr_attribute_table) <no_gccisr>: Add new function attribute.
13132         (avr_set_current_function) <is_no_gccisr>: Init machine field.
13133         (avr_pass_data_pre_proep, avr_pass_pre_proep): New pass data
13134         and rtl_opt_pass.
13135         (make_avr_pass_pre_proep): New function.
13136         (emit_push_sfr) <treg>: Add argument to function and use it
13137         instead of TMP_REG.
13138         (avr_expand_prologue) [machine->gasisr.maybe]: Emit gasisr insn
13139         and set machine->gasisr.yes.
13140         (avr_expand_epilogue) [machine->gasisr.yes]: Similar.
13141         (avr_asm_function_end_prologue) [machine->gasisr.yes]: Add
13142         __gcc_isr.n_pushed to .L__stack_usage.
13143         (TARGET_ASM_FINAL_POSTSCAN_INSN): Define to...
13144         (avr_asm_final_postscan_insn): ...this new static function.
13145         * config/avr/avr.h (machine_function)
13146         <is_no_gccisr, use_L__stack_usage>: New fields.
13147         <gasisr, gasisr.yes, gasisr.maybe, gasisr.regno>: New fields.
13148         * config/avr/avr.md (UNSPECV_GASISR): Add unspecv enum.
13149         (GASISR_Prologue, GASISR_Epilogue, GASISR_Done): New define_constants.
13150         (gasisr, *gasisr): New expander and insn.
13151         * config/avr/gen-avr-mmcu-specs.c (print_mcu)
13152         [HAVE_AS_AVR_MGCCISR_OPTION]: Print asm_gccisr spec.
13153         * config/avr/specs.h (ASM_SPEC) <asm_gccisr>: Add sub spec.
13155 2017-07-10  Richard Earnshaw  <rearnsha@arm.com>
13157         * config/arm/parsecpu.awk (gen_comm_data): Do not escape single quotes
13158         in quoted strings.
13160 2017-07-10  Georg-Johann Lay  <avr@gjlay.de>
13162         Move jump-tables out of .text again.
13164         PR target/81075
13165         * config/avr/avr.c (ASM_OUTPUT_ADDR_VEC_ELT): Remove function.
13166         (ASM_OUTPUT_ADDR_VEC): New function.
13167         (avr_adjust_insn_length) [JUMP_TABLE_DATA_P]: Return 0.
13168         (avr_final_prescan_insn) [avr_log.insn_addresses]: Dump
13169         INSN_ADDRESSes as asm comment.
13170         * config/avr/avr.h (JUMP_TABLES_IN_TEXT_SECTION): Adjust comment.
13171         (ASM_OUTPUT_ADDR_VEC_ELT): Remove define.
13172         (ASM_OUTPUT_ADDR_VEC): Define to avr_output_addr_vec.
13173         * config/avr/avr.md (*tablejump): Adjust comment.
13174         * config/avr/elf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove.
13175         * config/avr/avr-log.c (avr_log_set_avr_log) <insn_addresses>:
13176         New detail.
13177         * config/avr/avr-protos.h (avr_output_addr_vec_elt): Remove proto.
13178         (avr_output_addr_vec): New proto.
13179         (avr_log_t) <insn_addresses>: New field.
13181 2017-07-09  H.J. Lu  <hongjiu.lu@intel.com>
13183         PR target/81313
13184         * config/i386/i386.c (ix86_function_arg_advance): Set
13185         outgoing_args_on_stack to true if there are outgoing arguments
13186         on stack.
13187         (ix86_function_arg): Likewise.
13188         (ix86_get_drap_rtx): Use DRAP only if there are outgoing
13189         arguments on stack and ACCUMULATE_OUTGOING_ARGS is false.
13190         * config/i386/i386.h (machine_function): Add
13191         outgoing_args_on_stack.
13193 2017-07-09  Krister Walfridsson  <krister.walfridsson@gmail.com>
13195         * config.gcc (*-*-netbsd*): Remove check for NetBSD versions not
13196         supporting pthreds.
13197         * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always enable pthreads.
13199 2017-07-08  Richard Sandiford  <richard.sandiford@linaro.org>
13201         * Makefile.in (HOOKS_H, RTL_BASE_H, FUNCTION_H, EXPR_H, REGS_H)
13202         (REAL_H): Remove $(MACHMODE_H).
13203         (FIXED_VALUE_H, TREE_CORE_H, CFGLOOP_H): Remove $(MACHMODE_H) and
13204         double-int.h.
13205         (CORETYPES_H): Add signop.h, wide-int.h, wide-int-print.h,
13206         $(MACHMODE_H) and double-int.h.
13207         (build/min-insn-modes.o): Depend on $(CORETYPES_H) rather than
13208         $(MACHMODE_H).
13209         (gengtype-state.o, gengtype.o, build/gengtype.o): Don't depend on
13210         double-int.h.
13212 2017-07-07  Andrew Pinski  <apinski@cavium.com>
13214         * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Check
13215         prev_set and curr_set for AARCH64_FUSE_ALU_BRANCH.
13217 2017-07-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
13219         * config/rs6000/rs6000.c (rs6000_get_function_versions_dispatcher):
13220         Add warning if GCC was not configured to link against a GLIBC that
13221         exports the hardware capability bits.
13222         (make_resolver_func): Make resolver function private and not a
13223         COMDAT function.  Create the name with clone_function_name instead
13224         of make_unique_name.
13226         PR target/81348
13227         * config/rs6000/rs6000.md (HI sign_extend splitter): Use the
13228         correct operand in doing the split.
13230 2017-07-07 Carl Love  <cel@us.ibm.com>
13232         * config/rs6000/rs6000-c: Add support for built-in function
13233         vector unsigned short vec_pack_to_short_fp32 (vector float,
13234                                                       vector float).
13235         * config/rs6000/rs6000-builtin.def (CONVERT_4F32_8I16): Add
13236         BU_P9V_AV_2 and BU_P9V_OVERLOAD_2 definitions.
13237         * config/rs6000/altivec.h (vec_pack_to_short_fp32): Add define.
13238         * config/rs6000/altivec.md(UNSPEC_CONVERT_4F32_8I16): Add UNSPEC.
13239         (convert_4f32_8i16): Add define_expand.
13240         * doc/extend.texi: Update the built-in documentation file for the
13241         new built-in function.
13243 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13245         * config/sparc/m8.md: New file.
13246         * config/sparc/sparc.md: Include m8.md.
13248 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13250         * config/sparc/sparc.opt: New option -mvis4b.
13251         * config/sparc/sparc.c (dump_target_flag_bits): Handle MASK_VIS4B.
13252         (sparc_option_override): Handle VIS4B.
13253         (enum sparc_builtins): Define
13254         SPARC_BUILTIN_DICTUNPACK{8,16,32},
13255         SPARC_BUILTIN_FPCMP{LE,GT,EQ,NE}{8,16,32}SHL,
13256         SPARC_BUILTIN_FPCMPU{LE,GT}{8,16,32}SHL,
13257         SPARC_BUILTIN_FPCMPDE{8,16,32}SHL and
13258         SPARC_BUILTIN_FPCMPUR{8,16,32}SHL.
13259         (check_constant_argument): New function.
13260         (sparc_vis_init_builtins): Define builtins
13261         __builtin_vis_dictunpack{8,16,32},
13262         __builtin_vis_fpcmp{le,gt,eq,ne}{8,16,32}shl,
13263         __builtin_vis_fpcmpu{le,gt}{8,16,32}shl,
13264         __builtin_vis_fpcmpde{8,16,32}shl and
13265         __builtin_vis_fpcmpur{8,16,32}shl.
13266         (sparc_expand_builtin): Check that the constant operands to
13267         __builtin_vis_fpcmp*shl and _builtin_vis_dictunpack* are indeed
13268         constant and in range.
13269         * config/sparc/sparc-c.c (sparc_target_macros): Handle
13270         TARGET_VIS4B.
13271         * config/sparc/sparc.h (SPARC_IMM2_P): Define.
13272         (SPARC_IMM5_P): Likewise.
13273         * config/sparc/sparc.md (cpu_feature): Add new feagure "vis4b".
13274         (enabled): Handle vis4b.
13275         (UNSPEC_DICTUNPACK): New unspec.
13276         (UNSPEC_FPCMPSHL): Likewise.
13277         (UNSPEC_FPUCMPSHL): Likewise.
13278         (UNSPEC_FPCMPDESHL): Likewise.
13279         (UNSPEC_FPCMPURSHL): Likewise.
13280         (cpu_feature): New CPU feature `vis4b'.
13281         (dictunpack{8,16,32}): New insns.
13282         (FPCSMODE): New mode iterator.
13283         (fpcscond): New code iterator.
13284         (fpcsucond): Likewise.
13285         (fpcmp{le,gt,eq,ne}{8,16,32}{si,di}shl): New insns.
13286         (fpcmpu{le,gt}{8,16,32}{si,di}shl): Likewise.
13287         (fpcmpde{8,16,32}{si,di}shl): Likewise.
13288         (fpcmpur{8,16,32}{si,di}shl): Likewise.
13289         * config/sparc/constraints.md: Define constraints `q' for unsigned
13290         2-bit integer constants and `t' for unsigned 5-bit integer
13291         constants.
13292         * config/sparc/predicates.md (imm5_operand_dictunpack8): New
13293         predicate.
13294         (imm5_operand_dictunpack16): Likewise.
13295         (imm5_operand_dictunpack32): Likewise.
13296         (imm2_operand): Likewise.
13297         * doc/invoke.texi (SPARC Options): Document -mvis4b.
13298         * doc/extend.texi (SPARC VIS Built-in Functions): Document the
13299         ditunpack* and fpcmp*shl builtins.
13301 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13303         * config.gcc: Handle m8 in --with-{cpu,tune} options.
13304         * config.in: Add HAVE_AS_SPARC6 define.
13305         * config/sparc/driver-sparc.c (cpu_names): Add entry for the SPARC
13306         M8.
13307         * config/sparc/sol2.h (CPP_CPU64_DEFAULT_SPEC): Define for
13308         TARGET_CPU_m8.
13309         (ASM_CPU32_DEFAUILT_SPEC): Likewise.
13310         (CPP_CPU_SPEC): Handle m8.
13311         (ASM_CPU_SPEC): Likewise.
13312         * config/sparc/sparc-opts.h (enum processor_type): Add
13313         PROCESSOR_M8.
13314         * config/sparc/sparc.c (m8_costs): New struct.
13315         (sparc_option_override): Handle TARGET_CPU_m8.
13316         (sparc32_initialize_trampoline): Likewise.
13317         (sparc64_initialize_trampoline): Likewise.
13318         (sparc_issue_rate): Likewise.
13319         (sparc_register_move_cost): Likewise.
13320         * config/sparc/sparc.h (TARGET_CPU_m8): Define.
13321         (CPP_CPU64_DEFAULT_SPEC): Define for M8.
13322         (ASM_CPU64_DEFAULT_SPEC): Likewise.
13323         (CPP_CPU_SPEC): Handle M8.
13324         (ASM_CPU_SPEC): Likewise.
13325         (AS_M8_FLAG): Define.
13326         * config/sparc/sparc.md: Add m8 to the cpu attribute.
13327         * config/sparc/sparc.opt: New option -mcpu=m8 for sparc targets.
13328         * configure.ac (HAVE_AS_SPARC6): Check for assembler support for
13329         M8 instructions.
13330         * configure: Regenerate.
13331         * doc/invoke.texi (SPARC Options): Document -mcpu=m8 and
13332         -mtune=m8.
13334 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13336         * config/sparc/niagara7.md: Rework the DFA scheduler to use insn
13337         subtypes.
13338         * config/sparc/sparc.md: Remove the `v3pipe' insn attribute.
13339         ("*movdi_insn_sp32"): Do not set v3pipe.
13340         ("*movsi_insn"): Likewise.
13341         ("*movdi_insn_sp64"): Likewise.
13342         ("*movsf_insn"): Likewise.
13343         ("*movdf_insn_sp32"): Likewise.
13344         ("*movdf_insn_sp64"): Likewise.
13345         ("*zero_extendsidi2_insn_sp64"): Likewise.
13346         ("*sign_extendsidi2_insn"): Likewise.
13347         ("*mov<VM32:mode>_insn"): Likewise.
13348         ("*mov<VM64:mode>_insn_sp64"): Likewise.
13349         ("*mov<VM64:mode>_insn_sp32"): Likewise.
13350         ("<plusminus_insn><VADDSUB:mode>3"): Likewise.
13351         ("<vlop:code><VL:mode>3"): Likewise.
13352         ("*not_<vlop:code><VL:mode>3"): Likewise.
13353         ("*nand<VL:mode>_vis"): Likewise.
13354         ("*<vlnotop:code>_not1<VL:mode>_vis"): Likewise.
13355         ("*<vlnotop:code>_not2<VL:mode>_vis"): Likewise.
13356         ("one_cmpl<VL:mode>2"): Likewise.
13357         ("faligndata<VM64:mode>_vis"): Likewise.
13358         ("alignaddrsi_vis"): Likewise.
13359         ("alignaddrdi_vis"): Likweise.
13360         ("alignaddrlsi_vis"): Likewise.
13361         ("alignaddrldi_vis"): Likewise.
13362         ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise.
13363         ("bmaskdi_vis"): Likewise.
13364         ("bmasksi_vis"): Likewise.
13365         ("bshuffle<VM64:mode>_vis"): Likewise.
13366         ("cmask8<P:mode>_vis"): Likewise.
13367         ("cmask16<P:mode>_vis"): Likewise.
13368         ("cmask32<P:mode>_vis"): Likewise.
13369         ("pdistn<P:mode>_vis"): Likewise.
13370         ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise.
13372 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13374         * config/sparc/sparc.md ("subtype"): New insn attribute.
13375         ("*wrgsr_sp64"): Set insn subtype.
13376         ("*rdgsr_sp64"): Likewise.
13377         ("alignaddrsi_vis"): Likewise.
13378         ("alignaddrdi_vis"): Likewise.
13379         ("alignaddrlsi_vis"): Likewise.
13380         ("alignaddrldi_vis"): Likewise.
13381         ("<plusminus_insn><VADDSUB:mode>3"): Likewise.
13382         ("fexpand_vis"): Likewise.
13383         ("fpmerge_vis"): Likewise.
13384         ("faligndata<VM64:mode>_vis"): Likewise.
13385         ("bshuffle<VM64:mode>_vis"): Likewise.
13386         ("cmask8<P:mode>_vis"): Likewise.
13387         ("cmask16<P:mode>_vis"): Likewise.
13388         ("cmask32<P:mode>_vis"): Likewise.
13389         ("fchksm16_vis"): Likewise.
13390         ("v<vis3_shift_patname><GCM:mode>3"): Likewise.
13391         ("fmean16_vis"): Likewise.
13392         ("fp<plusminus_insn>64_vis"): Likewise.
13393         ("<plusminus_insn>v8qi3"): Likewise.
13394         ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise.
13395         ("<vis4_minmax_patname><VMMAX:mode>3"): Likewise.
13396         ("<vis4_uminmax_patname><VMMAX:mode>3"): Likewise.
13397         ("<vis3_addsub_ss_patname>v8qi3"): Likewise.
13398         ("<vis4_addsub_us_patname><VAUS:mode>3"): Likewise.
13399         ("*movqi_insn"): Likewise.
13400         ("*movhi_insn"): Likewise.
13401         ("*movsi_insn"): Likewise.
13402         ("movsi_pic_gotdata_op"): Likewise.
13403         ("*movdi_insn_sp32"): Likewise.
13404         ("*movdi_insn_sp64"): Likewise.
13405         ("movdi_pic_gotdata_op"): Likewise.
13406         ("*movsf_insn"): Likewise.
13407         ("*movdf_insn_sp32"): Likewise.
13408         ("*movdf_insn_sp64"): Likewise.
13409         ("*zero_extendhisi2_insn"): Likewise.
13410         ("*zero_extendqihi2_insn"): Likewise.
13411         ("*zero_extendqisi2_insn"): Likewise.
13412         ("*zero_extendqidi2_insn"): Likewise.
13413         ("*zero_extendhidi2_insn"): Likewise.
13414         ("*zero_extendsidi2_insn_sp64"): Likewise.
13415         ("ldfsr"): Likewise.
13416         ("prefetch_64"): Likewise.
13417         ("prefetch_32"): Likewise.
13418         ("tie_ld32"): Likewise.
13419         ("tie_ld64"): Likewise.
13420         ("*tldo_ldub_sp32"): Likewise.
13421         ("*tldo_ldub1_sp32"): Likewise.
13422         ("*tldo_ldub2_sp32"): Likewise.
13423         ("*tldo_ldub_sp64"): Likewise.
13424         ("*tldo_ldub1_sp64"): Likewise.
13425         ("*tldo_ldub2_sp64"): Likewise.
13426         ("*tldo_ldub3_sp64"): Likewise.
13427         ("*tldo_lduh_sp32"): Likewise.
13428         ("*tldo_lduh1_sp32"): Likewise.
13429         ("*tldo_lduh_sp64"): Likewise.
13430         ("*tldo_lduh1_sp64"): Likewise.
13431         ("*tldo_lduh2_sp64"): Likewise.
13432         ("*tldo_lduw_sp32"): Likewise.
13433         ("*tldo_lduw_sp64"): Likewise.
13434         ("*tldo_lduw1_sp64"): Likewise.
13435         ("*tldo_ldx_sp64"): Likewise.
13436         ("*mov<VM32:mode>_insn"): Likewise.
13437         ("*mov<VM64:mode>_insn_sp64"): Likewise.
13438         ("*mov<VM64:mode>_insn_sp32"): Likewise.
13440 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13442         * config/sparc/sparc.md ("type"): New insn type viscmp.
13443         ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Set insn type to
13444         viscmp.
13445         ("fpcmp<gcond:code>8<P:mode>_vis"): Likewise.
13446         ("fucmp<gcond:code>8<P:mode>_vis"): Likewise.
13447         ("fpcmpu<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise.
13448         * config/sparc/niagara7.md ("n7_vis_logical_v3pipe"): Handle
13449         viscmp.
13450         ("n7_vis_logical_11cycle"): Likewise.
13451         * config/sparc/niagara4.md ("n4_vis_logical"): Likewise.
13452         * config/sparc/niagara2.md ("niag3_vis": Likewise.
13453         * config/sparc/niagara.md ("niag_vis"): Likewise.
13454         * config/sparc/ultra3.md ("us3_fga"): Likewise.
13455         * config/sparc/ultra1_2.md ("us1_fga_double"): Likewise.
13457 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13459         * config/sparc/sparc.md: New instruction type `bmask'.
13460         (bmaskdi_vis): Use the `bmask' type.
13461         (bmasksi_vis): Likewise.
13462         * config/sparc/ultra3.md (us3_array): Likewise.
13463         * config/sparc/niagara7.md (n7_array): Likewise.
13464         * config/sparc/niagara4.md (n4_array): Likewise.
13465         * config/sparc/niagara2.md (niag2_vis): Likewise.
13466         (niag3_vis): Likewise.
13467         * config/sparc/niagara.md (niag_vis): Likewise.
13469 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
13471         * ipa-comdats.c: Remove optimize check from gate.
13472         * ipa-fnsummary.c (ipa_fn_summary_generate): do not generate summary
13473         for functions not optimized.
13474         (ipa_fn_summary_read): Skip optimize check.
13475         (ipa_fn_summary_write): Likewise.
13476         * ipa-inline-analysis.c (do_estimate_growth_1): Check that caller
13477         is optimized.
13478         * ipa-inline.c (can_inline_edge_p): Not optimized functions are
13479         uninlinable.
13480         (can_inline_edge_p): Check flag_pcc_struct_return for match.
13481         (check_callers): Give up on caller which is not optimized.
13482         (inline_small_functions): Likewise.
13483         (ipa_inline): Do not give up when not optimizing.
13484         * ipa-visbility.c (function_and_variable_visibility): Do not optimize
13485         away unoptimizes cdtors.
13486         (whole_program_function_and_variable_visibility): Do
13487         ipa_discover_readonly_nonaddressable_vars in LTO mode.
13488         * ipa.c (process_references): Do not check optimize.
13489         (symbol_table::remove_unreachable_nodes): Update optimize check.
13490         (set_writeonly_bit): Update optimize check.
13491         (pass_ipa_cdtor_merge::gate): Do not check optimize.
13492         (pass_ipa_single_use::gate): Remove.
13494 2017-07-06  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
13496         * config/rs6000/rs6000.c (union_defs, union_uses, insn_is_load_p,
13497         insn_is_store_p, insn_is_swap_p, const_load_sequence_p, v2df_reduction_p,
13498         rtx_is_swappable_p, insn_is_swappable_p, chain_contains_only_swaps,
13499         mark_swaps_for_removal, swap_const_vector_halves, adjust_subreg_index,
13500         permute_load, permute_store, adjust_extract, adjust_splat,
13501         adjust_xxpermdi, adjust_concat, adjust_vperm, handle_special_swappables,
13502         replace_swap_with_copy, dump_swap_insn_table,
13503         alignment_with_canonical_addr, alignment_mask, find_alignment_op,
13504         recombine_lvx_pattern, recombine_stvx_pattern,
13505         recombine_lvx_stvx_patterns, rs6000_analyze_swaps,
13506         make_pass_analyze_swaps): Move all code related to p8 swap optimizations
13507         to file rs6000-p8swap.c.
13508         * config/rs6000/rs6000-p8swap.c: New file.
13509         * config/rs6000/t-rs6000: Add rule to build rs6000-p8swap.o.
13510         * config.gcc: Add rs6000-p8swap.o to extra_objs for powerpc*-*-*
13511         and rs6000*-*-* targets.
13513 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
13515         * Makefile.in (selftest): Remove dependency on s-selftest-c++.
13517 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
13519         * lto-wrapper.c (merge_and_complain): Do not merge
13520         fexceptions, fnon_call_exceptions, ftrapv, ffp_contract_, fmath_errno,
13521         fsigned_zeros, ftrapping_math, fwrapv.
13522         (append_compiler_options): Do not track these options.
13523         (append_linker_options): Likewie
13525 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
13527         * cgraphunit.c (cgraph_node::finalize_function): When
13528         !flag_toplevel_reorde set no_reorder flag.
13529         (varpool_node::finalize_decl): Likewise.
13530         (symbol_table::compile): Drop no toplevel reorder path.
13532 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
13534         * bb-reorder.c (better_edge_p): Do not build traces across abnormal/eh
13535         edges; zero probability is not better than uninitialized.
13537 2017-07-06  Maxim Ostapenko  <m.ostapenko@samsung.com>
13539         * asan.h (asan_sanitize_allocas_p): Declare.
13540         * asan.c (asan_sanitize_allocas_p): New function.
13541         (handle_builtin_stack_restore): Bail out if !asan_sanitize_allocas_p.
13542         (handle_builtin_alloca): Likewise.
13543         * cfgexpand.c (expand_used_vars): Do not add allocas unpoisoning stuff
13544         if !asan_sanitize_allocas_p.
13545         * params.def (asan-instrument-allocas): Add new option.
13546         * params.h (ASAN_PROTECT_ALLOCAS): Define.
13547         * opts.c (common_handle_option): Disable allocas sanitization for
13548         KASan by default.
13550 2017-07-06  Maxim Ostapenko  <m.ostapenko@samsung.com>
13552         * asan.c: Include gimple-fold.h.
13553         (get_last_alloca_addr): New function.
13554         (handle_builtin_stackrestore): Likewise.
13555         (handle_builtin_alloca): Likewise.
13556         (asan_emit_allocas_unpoison): Likewise.
13557         (get_mem_refs_of_builtin_call): Add new parameter, remove const
13558         quallifier from first paramerer. Handle BUILT_IN_ALLOCA,
13559         BUILT_IN_ALLOCA_WITH_ALIGN and BUILT_IN_STACK_RESTORE builtins.
13560         (instrument_builtin_call): Pass gimple iterator to
13561         get_mem_refs_of_builtin_call.
13562         (last_alloca_addr): New global.
13563         * asan.h (asan_emit_allocas_unpoison): Declare.
13564         * builtins.c (expand_asan_emit_allocas_unpoison): New function.
13565         (expand_builtin): Handle BUILT_IN_ASAN_ALLOCAS_UNPOISON.
13566         * cfgexpand.c (expand_used_vars): Call asan_emit_allocas_unpoison
13567         if function calls alloca.
13568         * gimple-fold.c (replace_call_with_value): Remove static keyword.
13569         * gimple-fold.h (replace_call_with_value): Declare.
13570         * internal-fn.c: Include asan.h.
13571         * sanitizer.def (BUILT_IN_ASAN_ALLOCA_POISON,
13572         BUILT_IN_ASAN_ALLOCAS_UNPOISON): New builtins.
13574 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
13576         * Makefile.in (SELFTEST_FLAGS): Drop "-x c", moving it to...
13577         (C_SELFTEST_FLAGS): New.
13578         (CPP_SELFTEST_FLAGS): New.
13579         (SELFTEST_DEPS): New, from deps of s-selftest.
13580         (C_SELFTEST_DEPS): New, from deps of s-selftest.
13581         (CPP_SELFTEST_DEPS): New.
13582         (selftest): Add dependency on s-selftest-c++.
13583         (s-selftest): Rename to...
13584         (s-selftest-c): ...this, moving deps to SELFTEST_DEPS
13585         and C_SELFTEST_DEPS, and using C_SELFTEST_FLAGS rather
13586         than SELFTEST_FLAGS.
13587         (selftest-gdb): Rename to...
13588         (selftest-c-gdb): ...this, using C_SELFTEST_DEPS and
13589         C_SELFTEST_FLAGS.
13590         (selftest-gdb): Reintroduce as an alias for selftest-c-gdb.
13591         (selftest-valgrind): Rename to...
13592         (selftest-c-valgrind): ...this, using C_SELFTEST_DEPS and
13593         C_SELFTEST_FLAGS.
13594         (selftest-valgrind): Reintroduce as an alias for
13595         selftest-c-valgrind.
13596         (s-selftest-c++): New.
13597         (selftest-c++-gdb): New.
13598         (selftest-c++-valgrind): New.
13600 2017-07-06  Olivier Hainque  <hainque@adacore.com>
13602         * gcc.c (process_command): When deciding if undefined variables
13603         should be ignored when processing specs, accept "gcc -v" as well.
13605 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
13607         * auto-profile.c (afdo_set_bb_count, afdo_propagate_edge,
13608         afdo_annotate_cfg): Set counts/probabilities as determined by afdo.
13610 2017-07-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13612         * config/arm/arm-cpus.in (armv8-r): Add new entry.
13613         * config/arm/arm-isa.h (ISA_ARMv8r): Define macro.
13614         * config/arm/arm-tables.opt: Regenerate.
13615         * config/arm/arm.h (enum base_architecture): Add BASE_ARCH_8R
13616         enumerator.
13617         * doc/invoke.texi: Mention -march=armv8-r and its extensions.
13619 2017-07-06  Carl Love  <cel@us.ibm.com>
13621         * ChangeLog: Clean up from mid air collision
13623 2017-07-06  Carl Love  <cel@us.ibm.com>
13625         * config/rs6000/rs6000-c.c: Add support for built-in functions
13626         vector signed int vec_subc (vector signed int, vector signed int);
13627         vector signed __int128 vec_subc (vector signed __int128,
13628                                          vector signed __int128);
13629         vector unsigned __int128 vec_subc (vector unsigned __int128,
13630                                            vector unsigned __int128);
13631         vector signed int vec_sube (vector signed int, vector signed int,
13632                                     vector signed int);
13633         vector unsigned int vec_sube (vector unsigned int,
13634                                       vector unsigned int,
13635                                       vector unsigned int);
13636         vector signed __int128 vec_sube (vector signed __int128,
13637                                          vector signed __int128,
13638                                          vector signed__int128);
13639         vector unsigned __int128 vec_sube (vector unsigned __int128,
13640                                            vector unsigned __int128,
13641                                            vector unsigned __int128);
13642         vector signed int vec_subec (vector signed int, vector signed int,
13643                                      vector signed int);
13644         vector unsigned int vec_subec (vector unsigned int,
13645                                        vector unsigned int,
13646                                        vector unsigned int);
13647         vector signed __int128 vec_subec (vector signed __int128,
13648                                           vector signed __int128,
13649                                           vector signed__int128);
13650         vector unsigned __int128 vec_subec (vector unsigned __int128,
13651                                             vector unsigned __int128,
13652                                             vector unsigned __int128);
13653         * config/rs6000/rs6000.c (ALTIVEC_BUILTIN_VEC_SUBE,
13654         ALTIVEC_BUILTIN_VEC_SUBEC): Add ef_builtins.
13655         * config/rs6000/rs6000-builtin.def (SUBE, SUBEC): Add
13656         BU_ALTIVEC_OVERLOAD_X definitions.
13657         * config/rs6000/altivec.h (vec_sube, vec_subec): Add builtin defines.
13658         * doc/extend.texi: Update the built-in documentation file for the new
13659         built-in functions.
13661 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
13663         PR c++/79300
13664         * diagnostic-show-locus.c (layout::layout): Use start and finish
13665         spelling location for the start and finish of each range.
13666         * genmatch.c (linemap_client_expand_location_to_spelling_point):
13667         Add unused aspect param.
13668         * input.c (expand_location_1): Add "aspect" param, and use it
13669         to access the correct part of the location.
13670         (expand_location): Pass LOCATION_ASPECT_CARET to new param of
13671         expand_location_1.
13672         (expand_location_to_spelling_point): Likewise.
13673         (linemap_client_expand_location_to_spelling_point): Add "aspect"
13674         param, and pass it to expand_location_1.
13676 2017-07-06  Sebastian Peryt  <sebastian.peryt@intel.com>
13678         * config/i386/avx512fintrin.h (_mm_mask_getexp_round_ss,
13679         _mm_maskz_getexp_round_ss, _mm_mask_getexp_round_sd,
13680         _mm_maskz_getexp_round_sd, _mm_mask_getmant_round_sd,
13681         _mm_maskz_getmant_round_sd, _mm_mask_getmant_round_ss,
13682         _mm_maskz_getmant_round_ss, _mm_mask_getexp_ss, _mm_maskz_getexp_ss,
13683         _mm_mask_getexp_sd, _mm_maskz_getexp_sd, _mm_mask_getmant_sd,
13684         _mm_maskz_getmant_sd, _mm_mask_getmant_ss,
13685         _mm_maskz_getmant_ss): New intrinsics.
13686         (__builtin_ia32_getexpss128_mask): Changed to ...
13687         __builtin_ia32_getexpss128_round ... this.
13688         (__builtin_ia32_getexpsd128_mask): Changed to ...
13689         __builtin_ia32_getexpsd128_round ... this.
13690         * config/i386/i386-builtin-types.def
13691         ((V2DF, V2DF, V2DF, INT, V2DF, UQI, INT),
13692         (V4SF, V4SF, V4SF, INT, V4SF, UQI, INT)): New function type aliases.
13693         * config/i386/i386-builtin.def (__builtin_ia32_getexpsd_mask_round,
13694         __builtin_ia32_getexpss_mask_round,     __builtin_ia32_getmantsd_mask_round,
13695         __builtin_ia32_getmantss_mask_round): New builtins.
13696         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_INT_V2DF_UQI_INT,
13697         V4SF_FTYPE_V4SF_V4SF_INT_V4SF_UQI_INT): Handle new types.
13698         (CODE_FOR_avx512f_vgetmantv2df_mask_round,
13699         CODE_FOR_avx512f_vgetmantv4sf_mask_round): New cases.
13700         * config/i386/sse.md
13701         (avx512f_sgetexp<mode><round_saeonly_name>): Changed to ...
13702         avx512f_sgetexp<mode><mask_scalar_name>
13703         <round_saeonly_scalar_name> ... this.
13704         (vgetexp<ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|
13705         %0, %1, %2<round_saeonly_op3>}): Changed to ...
13706         vgetexp<ssescalarmodesuffix>
13707         \t{<round_saeonly_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
13708         %0<mask_scalar_operand3>, %1, %2<round_saeonly_scalar_mask_op3>} ... this.
13709         (avx512f_vgetmant<mode><round_saeonly_name>): Changed to ...
13710         avx512f_vgetmant<mode><mask_scalar_name>
13711         <round_saeonly_scalar_name> ... this.
13712         (vgetmant<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
13713         %0, %1, %2<round_saeonly_op4>, %3}): Changed to ...
13714         vgetmant<ssescalarmodesuffix>
13715         \t{%3, <round_saeonly_scalar_mask_op4>%2, %1, %0<mask_scalar_operand4>|
13716         %0<mask_scalar_operand4>, %1, %2
13717         <round_saeonly_scalar_mask_op4>, %3} ... this.
13718         * config/i386/subst.md (mask_scalar_operand4,
13719         round_saeonly_scalar_mask_operand4,     round_saeonly_scalar_mask_op4,
13720         round_saeonly_scalar_nimm_predicate): New subst attributes.
13722 2017-07-06  Julia Koval  <julia.koval@intel.com>
13724         * config/i386/i386.c (ix86_erase_embedded_rounding):
13725         Remove code for old rounding pattern.
13727 2017-07-06  Richard Earnshaw  <rearnsha@arm.com>
13729         * config/arm/t-arm (GTM_H): Add arm-cpu.h.
13731 2017-07-06  Christophe Lyon  <christophe.lyon@linaro.org>
13733         * doc/sourcebuild.texi (Test Directives, Variants of
13734         dg-require-support): Add documentation for dg-require-stack-check.
13736 2017-07-05  Sebastian Peryt  <sebastian.peryt@intel.com>
13738         * config/i386/subst.md (mask_scalar, round_scalar,
13739         round_saeonly_scalar): New meta-templates.
13740         (mask_scalar_name, mask_scalar_operand3, round_scalar_name,
13741         round_scalar_mask_operand3, round_scalar_mask_op3,
13742         round_scalar_constraint, round_scalar_prefix, round_saeonly_scalar_name,
13743         round_saeonly_scalar_mask_operand3, round_saeonly_scalar_mask_op3,
13744         round_saeonly_scalar_constraint,
13745         round_saeonly_scalar_prefix): New subst attribute.
13746         * config/i386/sse.md
13747         (<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): Renamed to ...
13748         <sse>_vm<plusminus_insn><mode>3<mask_scalar_name>
13749         <round_scalar_name> ... this.
13750         (<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): Renamed to ...
13751         <sse>_vm<multdiv_mnemonic><mode>3<mask_scalar_name>
13752         <round_scalar_name> ... this.
13753         (<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): Renamed to ...
13754         <sse>_vm<code><mode>3<mask_scalar_name>
13755         <round_saeonly_scalar_name> ... this.
13756         (v<plusminus_mnemonic><ssescalarmodesuffix>
13757         \t{<round_mask_op3>%2, %1, %0<mask_operand3>|
13758         %0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}): Changed to ...
13759         v<plusminus_mnemonic><ssescalarmodesuffix>
13760         \t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
13761         %0<mask_scalar_operand3>, %1, %<iptr>2<round_scalar_mask_op3>} ... this.
13762         (v<multdiv_mnemonic><ssescalarmodesuffix>
13763         \t{<round_mask_op3>%2, %1, %0<mask_operand3>|
13764         %0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}): Changed to ...
13765         v<multdiv_mnemonic><ssescalarmodesuffix>
13766         \t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
13767         %0<mask_scalar_operand3>, %1, %<iptr>2<round_scalar_mask_op3>} ... this.
13768         (v<maxmin_float><ssescalarmodesuffix>
13769         \t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|
13770         %0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}): Changed to ...
13771         v<maxmin_float><ssescalarmodesuffix>
13772         \t{<round_saeonly_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
13773         %0<mask_scalar_operand3>, %1, %<iptr>2
13774         <round_saeonly_scalar_mask_op3>} ... this.
13776 2017-07-05  Richard Earnshaw  <rearnsha@arm.com>
13778         * config/arm/arm.c (arm_fixed_condition_code_regs): New function.
13779         (TARGET_FIXED_CONDITION_CODE_REGS): Redefine.
13781 2017-07-05  Richard Sandiford  <richard.sandiford@linaro.org>
13782             Alan Hayward  <alan.hayward@arm.com>
13783             David Sherwood  <david.sherwood@arm.com>
13785         * combine.c (simplify_if_then_else): Remove "enum" before
13786         "machine_mode".
13787         * compare-elim.c (can_eliminate_compare): Likewise.
13788         * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
13789         Likewise.
13790         (aarch64_lookup_simd_builtin_type): Likewise.
13791         (aarch64_simd_builtin_type): Likewise.
13792         (aarch64_init_simd_builtin_types): Likewise.
13793         (aarch64_simd_expand_args): Likewise.
13794         * config/aarch64/aarch64-protos.h (aarch64_simd_attr_length_rglist):
13795         Likewise.
13796         (aarch64_reverse_mask): Likewise.
13797         (aarch64_simd_emit_reg_reg_move): Likewise.
13798         (aarch64_gen_adjusted_ldpstp): Likewise.
13799         (aarch64_ccmp_mode_to_code): Likewise.
13800         (aarch64_operands_ok_for_ldpstp): Likewise.
13801         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
13802         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13803         Likewise.
13804         (aarch64_min_divisions_for_recip_mul): Likewise.
13805         (aarch64_reassociation_width): Likewise.
13806         (aarch64_get_condition_code_1): Likewise.
13807         (aarch64_simd_emit_reg_reg_move): Likewise.
13808         (aarch64_simd_attr_length_rglist): Likewise.
13809         (aarch64_reverse_mask): Likewise.
13810         (aarch64_operands_ok_for_ldpstp): Likewise.
13811         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
13812         (aarch64_gen_adjusted_ldpstp): Likewise.
13813         * config/aarch64/cortex-a57-fma-steering.c (fma_node::rename):
13814         Likewise.
13815         * config/arc/arc.c (legitimate_offset_address_p): Likewise.
13816         * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
13817         (arm_lookup_simd_builtin_type): Likewise.
13818         (arm_simd_builtin_type): Likewise.
13819         (arm_init_simd_builtin_types): Likewise.
13820         (arm_expand_builtin_args): Likewise.
13821         * config/arm/arm-protos.h (arm_expand_builtin): Likewise.
13822         * config/ft32/ft32.c (ft32_libcall_value): Likewise.
13823         (ft32_setup_incoming_varargs): Likewise.
13824         (ft32_function_arg): Likewise.
13825         (ft32_function_arg_advance): Likewise.
13826         (ft32_pass_by_reference): Likewise.
13827         (ft32_arg_partial_bytes): Likewise.
13828         (ft32_valid_pointer_mode): Likewise.
13829         (ft32_addr_space_pointer_mode): Likewise.
13830         (ft32_addr_space_legitimate_address_p): Likewise.
13831         * config/i386/i386-protos.h (ix86_operands_ok_for_move_multiple):
13832         Likewise.
13833         * config/i386/i386.c (ix86_setup_incoming_vararg_bounds): Likewise.
13834         (ix86_emit_outlined_ms2sysv_restore): Likewise.
13835         (iamcu_alignment): Likewise.
13836         (canonicalize_vector_int_perm): Likewise.
13837         (ix86_noce_conversion_profitable_p): Likewise.
13838         (ix86_mpx_bound_mode): Likewise.
13839         (ix86_operands_ok_for_move_multiple): Likewise.
13840         * config/microblaze/microblaze-protos.h
13841         (microblaze_expand_conditional_branch_reg): Likewise.
13842         * config/microblaze/microblaze.c
13843         (microblaze_expand_conditional_branch_reg): Likewise.
13844         * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
13845         Likewise.
13846         (rs6000_reassociation_width): Likewise.
13847         (rs6000_invalid_binary_op): Likewise.
13848         (fusion_p9_p): Likewise.
13849         (emit_fusion_p9_load): Likewise.
13850         (emit_fusion_p9_store): Likewise.
13851         * config/riscv/riscv-protos.h (riscv_regno_mode_ok_for_base_p):
13852         Likewise.
13853         (riscv_hard_regno_mode_ok_p): Likewise.
13854         (riscv_address_insns): Likewise.
13855         (riscv_split_symbol): Likewise.
13856         (riscv_legitimize_move): Likewise.
13857         (riscv_function_value): Likewise.
13858         (riscv_hard_regno_nregs): Likewise.
13859         (riscv_expand_builtin): Likewise.
13860         * config/riscv/riscv.c (riscv_build_integer_1): Likewise.
13861         (riscv_build_integer): Likewise.
13862         (riscv_split_integer): Likewise.
13863         (riscv_legitimate_constant_p): Likewise.
13864         (riscv_cannot_force_const_mem): Likewise.
13865         (riscv_regno_mode_ok_for_base_p): Likewise.
13866         (riscv_valid_base_register_p): Likewise.
13867         (riscv_valid_offset_p): Likewise.
13868         (riscv_valid_lo_sum_p): Likewise.
13869         (riscv_classify_address): Likewise.
13870         (riscv_legitimate_address_p): Likewise.
13871         (riscv_address_insns): Likewise.
13872         (riscv_load_store_insns): Likewise.
13873         (riscv_force_binary): Likewise.
13874         (riscv_split_symbol): Likewise.
13875         (riscv_force_address): Likewise.
13876         (riscv_legitimize_address): Likewise.
13877         (riscv_move_integer): Likewise.
13878         (riscv_legitimize_const_move): Likewise.
13879         (riscv_legitimize_move): Likewise.
13880         (riscv_address_cost): Likewise.
13881         (riscv_subword): Likewise.
13882         (riscv_output_move): Likewise.
13883         (riscv_canonicalize_int_order_test): Likewise.
13884         (riscv_emit_int_order_test): Likewise.
13885         (riscv_function_arg_boundary): Likewise.
13886         (riscv_pass_mode_in_fpr_p): Likewise.
13887         (riscv_pass_fpr_single): Likewise.
13888         (riscv_pass_fpr_pair): Likewise.
13889         (riscv_get_arg_info): Likewise.
13890         (riscv_function_arg): Likewise.
13891         (riscv_function_arg_advance): Likewise.
13892         (riscv_arg_partial_bytes): Likewise.
13893         (riscv_function_value): Likewise.
13894         (riscv_pass_by_reference): Likewise.
13895         (riscv_setup_incoming_varargs): Likewise.
13896         (riscv_print_operand): Likewise.
13897         (riscv_elf_select_rtx_section): Likewise.
13898         (riscv_save_restore_reg): Likewise.
13899         (riscv_for_each_saved_reg): Likewise.
13900         (riscv_register_move_cost): Likewise.
13901         (riscv_hard_regno_mode_ok_p): Likewise.
13902         (riscv_hard_regno_nregs): Likewise.
13903         (riscv_class_max_nregs): Likewise.
13904         (riscv_memory_move_cost): Likewise.
13905         * config/rl78/rl78-protos.h (rl78_split_movsi): Likewise.
13906         * config/rl78/rl78.c (rl78_split_movsi): Likewise.
13907         (rl78_addr_space_address_mode): Likewise.
13908         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
13909         Likewise.
13910         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
13911         (rs6000_reassociation_width): Likewise.
13912         (rs6000_invalid_binary_op): Likewise.
13913         (fusion_p9_p): Likewise.
13914         (emit_fusion_p9_load): Likewise.
13915         (emit_fusion_p9_store): Likewise.
13916         * config/visium/visium-protos.h (prepare_move_operands): Likewise.
13917         (ok_for_simple_move_operands): Likewise.
13918         (ok_for_simple_move_strict_operands): Likewise.
13919         (ok_for_simple_arith_logic_operands): Likewise.
13920         (visium_legitimize_reload_address): Likewise.
13921         (visium_select_cc_mode): Likewise.
13922         (output_cbranch): Likewise.
13923         (visium_split_double_move): Likewise.
13924         (visium_expand_copysign): Likewise.
13925         (visium_expand_int_cstore): Likewise.
13926         (visium_expand_fp_cstore): Likewise.
13927         * config/visium/visium.c (visium_pass_by_reference): Likewise.
13928         (visium_function_arg): Likewise.
13929         (visium_function_arg_advance): Likewise.
13930         (visium_libcall_value): Likewise.
13931         (visium_setup_incoming_varargs): Likewise.
13932         (visium_legitimate_constant_p): Likewise.
13933         (visium_legitimate_address_p): Likewise.
13934         (visium_legitimize_address): Likewise.
13935         (visium_secondary_reload): Likewise.
13936         (visium_register_move_cost): Likewise.
13937         (visium_memory_move_cost): Likewise.
13938         (prepare_move_operands): Likewise.
13939         (ok_for_simple_move_operands): Likewise.
13940         (ok_for_simple_move_strict_operands): Likewise.
13941         (ok_for_simple_arith_logic_operands): Likewise.
13942         (visium_function_value_1): Likewise.
13943         (rtx_ok_for_offset_p): Likewise.
13944         (visium_legitimize_reload_address): Likewise.
13945         (visium_split_double_move): Likewise.
13946         (visium_expand_copysign): Likewise.
13947         (visium_expand_int_cstore): Likewise.
13948         (visium_expand_fp_cstore): Likewise.
13949         (visium_split_cstore): Likewise.
13950         (visium_select_cc_mode): Likewise.
13951         (visium_split_cbranch): Likewise.
13952         (output_cbranch): Likewise.
13953         (visium_print_operand_address): Likewise.
13954         * expmed.c (flip_storage_order): Likewise.
13955         * expmed.h (emit_cstore): Likewise.
13956         (flip_storage_order): Likewise.
13957         * genrecog.c (validate_pattern): Likewise.
13958         * hsa-gen.c (gen_hsa_addr): Likewise.
13959         * internal-fn.c (expand_arith_overflow): Likewise.
13960         * ira-color.c (allocno_copy_cost_saving): Likewise.
13961         * lra-assigns.c (find_hard_regno_for_1): Likewise.
13962         * lra-constraints.c (prohibited_class_reg_set_mode_p): Likewise.
13963         (process_invariant_for_inheritance): Likewise.
13964         * lra-eliminations.c (move_plus_up): Likewise.
13965         * omp-low.c (lower_oacc_reductions): Likewise.
13966         * simplify-rtx.c (simplify_subreg): Likewise.
13967         * target.def (TARGET_SETUP_INCOMING_VARARG_BOUNDS): Likewise.
13968         (TARGET_CHKP_BOUND_MODE): Likewise..
13969         * targhooks.c (default_chkp_bound_mode): Likewise.
13970         (default_setup_incoming_vararg_bounds): Likewise.
13971         * targhooks.h (default_chkp_bound_mode): Likewise.
13972         (default_setup_incoming_vararg_bounds): Likewise.
13973         * tree-ssa-math-opts.c (divmod_candidate_p): Likewise.
13974         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
13975         (have_whole_vector_shift): Likewise.
13976         * tree-vect-stmts.c (vectorizable_load): Likewise.
13977         * doc/tm.texi: Regenerate.
13979 2017-07-05  Georg-Johann Lay  <avr@gjlay.de>
13981         Graceful degrade if Binutils PR21472 is not available.
13983         PR target/81072
13984         * configure.ac [target=avr]: WARN instead of ERROR if avrxmega3
13985         .rodata in flash test fails.
13986         (HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH): Define it if test passes.
13987         * confgure: Regenerate.
13988         * config.in: Regenerate.
13989         * config/avr/avr.c (avr_asm_named_section)
13990         [HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH]: Only trigger
13991         __do_copy_data for stuff in .rodata if flash_pm_offset = 0.
13992         (avr_asm_init_sections): Same.
13994 2017-07-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13996         * config/arm/neon.md (fma<VCVTF:mode>4): Remove %?.
13997         (fma<VH:mode>4_intrinsic): Likewise.
13998         (*fmsub<VCVTF:mode>4): Likewise.
13999         (*fmsub<VH:mode>4_intrinsic): Likewise.
14001 2017-07-05  Georg-Johann Lay  <avr@gjlay.de>
14003         PR target/81305
14004         * config/avr/avr.c (avr_out_movhi_mr_r_xmega) [CONSTANT_ADDRESS_P]:
14005         Don't depend on "optimize > 0".
14006         (out_movhi_r_mr, out_movqi_mr_r): Same.
14007         (out_movhi_mr_r, out_movqi_r_mr): Same.
14008         (avr_address_cost) [CONSTANT_ADDRESS_P]: Don't depend cost for
14009         io_address_operand on "optimize > 0".
14011 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14013         * tree-loop-distribution.c: Add general explanantion on the pass.
14014         (generate_loops_for_partition): Mark distributed loop.
14015         (pg_add_dependence_edges): New parameter.  Handle alias data
14016         dependence specially and record it in the parameter if asked.
14017         (struct pg_vdata, pg_edata, pg_edge_callback_data): New structs.
14018         (init_partition_graph_vertices, add_partition_graph_edge): New.
14019         (pg_skip_alias_edge, free_partition_graph_edata_cb): New.
14020         (free_partition_graph_vdata, build_partition_graph): New.
14021         (sort_partitions_by_post_order, merge_dep_scc_partitions): New.
14022         (pg_collect_alias_ddrs, break_alias_scc_partitions): New.
14023         (data_ref_segment_size, latch_dominated_by_data_ref): New.
14024         (compute_alias_check_pairs, version_loop_by_alias_check): New.
14025         (version_for_distribution_p, finalize_partitions): New.
14026         (distribute_loop): Handle alias data dependence specially.  Factor
14027         out loop fusion code as functions and call these functions.
14029 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14031         * tree-loop-distribution.c (classify_partition): New parameter and
14032         better handle reduction statement.
14033         (rdg_build_partitions): Revise comment.
14034         (distribute_loop): Compute statements in all partitions and pass it
14035         to classify_partition.
14037 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14039         * tree-loop-distribution.c (enum partition_type): New.
14040         (struct partition): New field type.
14041         (partition_merge_into): Add parameter.  Update partition type.
14042         (data_dep_in_cycle_p, update_type_for_merge): New functions.
14043         (build_rdg_partition_for_vertex): Compute partition type.
14044         (rdg_build_partitions): Dump partition type.
14045         (distribute_loop): Update calls to partition_merge_into.
14047 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14049         * tree-loop-distribution.c (struct ddr_hasher): New.
14050         (ddr_hasher::hash, ::equal, get_data_dependence): New function.
14051         (ddrs_table): New.
14052         (classify_partition): Call get_data_dependence.
14053         (pg_add_dependence_edges): Ditto.
14054         (distribute_loop): Release data dependence hash table.
14056 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14058         * tree-loop-distribution.c (ref_base_address): Delete.
14059         (similar_memory_accesses): Rename ...
14060         (share_memory_accesses): ... to this.  Check if partitions access
14061         the same memory reference.
14062         (distribute_loop): Call share_memory_accesses.
14064 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14066         * tree-loop-distribution.c (struct partition): New field recording
14067         its data reference.
14068         (partition_alloc, partition_free): Init and release data refs.
14069         (partition_merge_into): Merge data refs.
14070         (build_rdg_partition_for_vertex): Collect data refs for partition.
14071         (pg_add_dependence_edges): Change parameters from vector to bitmap.
14072         Update uses.
14073         (distribute_loop): Remve data refs from vertice data of partition
14074         graph.
14076 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14078         * tree-loop-distribution.c (params.h): Include header file.
14079         (MAX_DATAREFS_NUM, DR_INDEX): New macro.
14080         (datarefs_vec): New global var.
14081         (create_rdg_vertices): Use datarefs_vec directly.
14082         (free_rdg): Don't free data references.
14083         (build_rdg): Update use.  Don't free data references.
14084         (distribute_loop): Compute global variable for data references.
14085         Bail out if there are too many data references.
14087 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14089         * tree-loop-distribution.c (loop_nest): New global var.
14090         (build_rdg): Use loop directly, rather than loop nest.
14091         (pg_add_dependence_edges): Remove loop nest parameter.  Use global
14092         variable directly.
14093         (distribute_loop): Compute global variable loop nest.  Update use.
14095 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14097         * tree-loop-distribution.c (enum fuse_type, fuse_message): New.
14098         (partition_merge_into): New parameter.  Dump reason for fusion.
14099         (distribute_loop): Update use of partition_merge_into.
14101 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14103         * tree-loop-distribution.c (bb_top_order_index): New.
14104         (bb_top_order_index_size, bb_top_order_cmp): New.
14105         (stmts_from_loop): Use topological order.
14106         (pass_loop_distribution::execute): Compute and release topological
14107         order for basic blocks.
14109 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14111         * tree-loop-distribution.c (pass_loop_distribution::execute): Skip
14112         if no loops.
14114 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
14116         * cfgloop.h (struct loop): Add comment.  New field orig_loop_num.
14117         * cfgloopmanip.c (lv_adjust_loop_entry_edge): Comment change.
14118         * internal-fn.c (expand_LOOP_DIST_ALIAS): New function.
14119         * internal-fn.def (LOOP_DIST_ALIAS): New.
14120         * tree-vectorizer.c (fold_loop_vectorized_call): Rename to ...
14121         (fold_loop_internal_call): ... this.
14122         (vect_loop_dist_alias_call): New function.
14123         (set_uid_loop_bbs): Call fold_loop_internal_call.
14124         (vectorize_loops): Fold IFN_LOOP_VECTORIZED and IFN_LOOP_DIST_ALIAS
14125         internal calls.
14127 2017-07-04  Uros Bizjak  <ubizjak@gmail.com>
14129         PR target/81300
14130         * config/i386/i386.md (setcc + movzbl/and to xor + setcc peepholes):
14131         Require dead FLAGS_REG at the beginning of a peephole.
14133 2017-07-04  Uros Bizjak  <ubizjak@gmail.com>
14135         PR target/81294
14136         * config/i386/adxintrin.h (_subborrow_u32): Swap _X and _Y
14137         arguments in the call to __builtin_ia32_sbb_u32.
14138         (_subborrow_u64): Swap _X and _Y arguments in the call to
14139         __builtin_ia32_sbb_u64.
14141 2017-07-04  Jakub Jelinek  <jakub@redhat.com>
14143         PR debug/81278
14144         * tree-vrp.c (compare_assert_loc): Turn into a function template
14145         with stable template parameter.  Only test if a->e is NULL,
14146         !a->e == !b->e has been verified already.  Use e == NULL or
14147         e != NULL instead of e or ! e tests.  If stable is true, don't use
14148         iterative_hash_expr, on the other side allow a or b or both NULL
14149         and sort the NULLs last.
14150         (process_assert_insertions): Sort using compare_assert_loc<false>
14151         instead of compare_assert_loc, later sort using
14152         compare_assert_loc<true> before calling process_assert_insertions_for
14153         in a loop.  Use break instead of continue once seen NULL pointer.
14155 2017-07-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14157         * config/arm/driver-arm.c (arm_cpu_table): Add entry for ARM
14158         Cortex-R7 and Cortex-R8 processors.
14160 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
14162         * ipa-utils.c (ipa_merge_profiles): Fix merging when dst is
14163         uninitialized while src is not.
14165 2017-07-04  Richard Earnshaw  <rearnsha@arm.com>
14167         * common/config/arm/arm-common.c: Adjust include path for
14168         arm-cpu-cdata.h
14169         * config/arm/t-arm (TM_H): Adjust path for arm-cpu.h.
14170         (arm-cpu.h): Create in build directory.  Adjust dependency rules.
14171         (arm-cpu-data.h): Likewise.
14172         (arm-cpu-cdata.h): Likewise.
14173         * config/arm/arm-cpu.h: Delete.
14174         * config/arm/arm-cpu-cdata.h: Delete.
14175         * config/arm/arm-cpu-data.h: Delete.
14177 2017-07-04  James Greenhalgh  <james.greenhalgh@arm.com>
14179         * config/arm/arm-cpus.in (cortex-a55): New.
14180         (cortex-a75): Likewise.
14181         (cortex-a75.cortex-a55): Likewise.
14182         * config/arm/driver-arm.c (arm_cpu_table): Add cortex-a55 and
14183         cortex-a75.
14184         * doc/invoke.texi (-mcpu): Document cortex-a55 and cortex-a75.
14185         * config/arm/arm-cpu-cdata.h: Regenerate.
14186         * config/arm/arm-cpu-data.h: Regenerate.
14187         * config/arm/arm-cpu.h: Regenerate.
14188         * config/arm/arm-tables.opt: Regenerate.
14189         * config/arm/arm-tune.md: Regenerate.
14191 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
14193         * haifa-sched.c (sched_create_recovery_edges): Update profile.
14195 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
14197         * bb-reorder.c (better_edge_p): Fix handling of uninitialized
14198         probability.
14200 2017-07-04  Richard Sandiford  <richard.sandiford@linaro.org>
14202         PR tree-optimization/81292
14203         * tree-ssa-strlen.c (handle_builtin_strlen): When setting
14204         full_string_p, also call adjust_related_strinfos if the adjustment
14205         is simple, otherwise invalidate related strinfos.
14207 2017-07-04  Martin Liska  <mliska@suse.cz>
14209         PR sanitizer/81040
14210         * sanopt.c (sanitize_rewrite_addressable_params): Mark the
14211         newly created variable as DECL_IGNORED_P.
14213 2017-07-04  Martin Liska  <mliska@suse.cz>
14215         PR ipa/81293
14216         * ipa-inline.c (inline_small_functions):
14217         Use xstrdup_for_dump.
14219 2017-07-04  Tom de Vries  <tom@codesourcery.com>
14221         * graph.c (draw_cfg_edges): Save and restore EDGE_DFS_BACK.
14223 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
14225         PR target/81033
14226         * config/darwin.c (darwin_function_switched_text_sections):
14227         Fix spaces.
14229 2017-07-03  Jan Hubicka  <hubicka@ucw.cz>
14231         * tree-vect-loop-manip.c (vect_do_peeling): Fix scaling up.
14233 2017-07-03  Richard Earnshaw  <rearnsha@arm.com>
14235         * doc/invoke.texi (ARM Options): Add -mbe8 and -mbe32 to option summary.
14237 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14239         * tree-vect-loop.c (vect_analyze_loop_2): Treat min_scalar_loop_bound,
14240         min_profitable_iters, and th as inclusive lower bounds.
14241         Fix LOOP_VINFO_PEELING_FOR_GAPS condition.
14242         (vect_estimate_min_profitable_iters): Return inclusive lower bounds
14243         for min_profitable_iters and min_profitable_estimate.
14244         (vect_transform_loop): Treat th as an inclusive lower bound.
14245         * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
14247 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
14249         PR target/81033
14250         * config/darwin.c (darwin_function_switched_text_sections):
14251         Replace DECL_NAME with DECL_ASSEMBLER_NAME, split assemble_name_raw
14252         in two pieces, and suppress the use of buf.
14254 2017-07-03  Nathan Sidwell  <nathan@acm.org>
14256         * hash-table.h (hash_table_mod1): Fix indentation.
14258 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14260         PR middle-end/81290
14261         * predict.c (force_edge_cold): Be more careful about propagation
14262         backward.
14263         * profile-count.h (profile_probability::guessed,
14264         profile_probability::fdo, profile_count::guessed, profile_count::fdo):
14265         New.
14266         * tree-ssa-threadupdate.c (recompute_probabilities): Result is guessed.
14268 2017-07-03  James Greenhalgh  <james.greenhalgh@arm.com>
14270         * doc/invoke.texi (rcpc architecture extension): Document it.
14272 2017-07-03  Richard Biener  <rguenther@suse.de>
14274         PR tree-optimization/60510
14275         * tree-vect-loop.c (vect_create_epilog_for_reduction): Pass in
14276         the scalar reduction PHI and use it.
14277         (vectorizable_reduction): Properly guard the single_defuse_cycle
14278         path for non-SLP reduction chains where we cannot use it.
14279         Rework reduc_def/index and vector type deduction.  Rework
14280         vector operand gathering during reduction op code-gen.
14281         * tree-vect-slp.c (vect_analyze_slp): For failed SLP reduction
14282         chains dissolve the chain and leave it to non-SLP reduction
14283         handling.
14285 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14287         * tree-data-ref.h (dr_alignment): Declare.
14288         * tree-data-ref.c (dr_alignment): New function.
14289         * tree-vectorizer.h (dataref_aux): Remove base_element_aligned.
14290         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
14291         set it.
14292         * tree-vect-stmts.c (vectorizable_store): Use dr_alignment.
14294 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14296         * tree-data-ref.h (innermost_loop_behavior): Add base_alignment
14297         and base_misalignment fields.
14298         (DR_BASE_ALIGNMENT, DR_BASE_MISALIGNMENT): New macros.
14299         * tree-data-ref.c: Include builtins.h.
14300         (dr_analyze_innermost): Set up the new innmost_loop_behavior fields.
14301         * tree-vectorizer.h (STMT_VINFO_DR_BASE_ALIGNMENT): New macro.
14302         (STMT_VINFO_DR_BASE_MISALIGNMENT): Likewise.
14303         * tree-vect-data-refs.c: Include tree-cfg.h.
14304         (vect_compute_data_ref_alignment): Use the new innermost_loop_behavior
14305         fields instead of calculating an alignment here.
14306         (vect_analyze_data_refs): Use dr_analyze_innermost.  Dump the new
14307         innermost_loop_behavior fields.
14309 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14311         * tree-data-ref.h (innermost_loop_behavior): Add a step_alignment
14312         field.
14313         (DR_STEP_ALIGNMENT): New macro.
14314         * tree-vectorizer.h (STMT_VINFO_DR_STEP_ALIGNMENT): Likewise.
14315         * tree-data-ref.c (dr_analyze_innermost): Initalize step_alignment.
14316         (create_data_ref): Print it.
14317         * tree-vect-stmts.c (vectorizable_load): Use the step alignment
14318         to tell whether the step preserves vector (mis)alignment.
14319         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
14320         Move the check for an integer step and generalise to all INTEGER_CST.
14321         (vect_analyze_data_refs): Set DR_STEP_ALIGNMENT when setting DR_STEP.
14322         Print the outer step alignment.
14324 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14326         * tree-data-ref.h (innermost_loop_behavior): Replace aligned_to
14327         with offset_alignment.
14328         (DR_ALIGNED_TO): Delete.
14329         (DR_OFFSET_ALIGNMENT): New macro.
14330         * tree-vectorizer.h (STMT_VINFO_DR_ALIGNED_TO): Delete.
14331         (STMT_VINFO_DR_OFFSET_ALIGNMENT): New macro.
14332         * tree-data-ref.c (dr_analyze_innermost): Update after above changes.
14333         (create_data_ref): Likewise.
14334         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
14335         (vect_analyze_data_refs): Likewise.
14336         * tree-if-conv.c (if_convertible_loop_p_1): Use memset before
14337         creating dummy innermost behavior.
14339 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14341         * tree-data-ref.h (dr_analyze_innermost): Replace the dr argument
14342         with a "innermost_loop_behavior *" and refeence tree.
14343         * tree-data-ref.c (dr_analyze_innermost): Likewise.
14344         (create_data_ref): Update call accordingly.
14345         * tree-predcom.c (find_looparound_phi): Likewise.
14347 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14349         * tree-vectorizer.h (_stmt_vec_info): Replace individual dr_*
14350         fields with dr_wrt_vec_loop.
14351         (STMT_VINFO_DR_BASE_ADDRESS, STMT_VINFO_DR_INIT, STMT_VINFO_DR_OFFSET)
14352         (STMT_VINFO_DR_STEP, STMT_VINFO_DR_ALIGNED_TO): Update accordingly.
14353         (STMT_VINFO_DR_WRT_VEC_LOOP): New macro.
14354         (vect_dr_behavior): New function.
14355         (vect_create_addr_base_for_vector_ref): Remove loop parameter.
14356         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
14357         vect_dr_behavior.  Use a step_preserves_misalignment_p boolean to
14358         track whether the step preserves the misalignment.
14359         (vect_create_addr_base_for_vector_ref): Remove loop parameter.
14360         Use vect_dr_behavior.
14361         (vect_setup_realignment): Update call accordingly.
14362         (vect_create_data_ref_ptr): Likewise.  Use vect_dr_behavior.
14363         * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Update
14364         call to vect_create_addr_base_for_vector_ref.
14365         (vect_create_cond_for_align_checks): Likewise.
14366         * tree-vect-patterns.c (vect_recog_bool_pattern): Copy
14367         STMT_VINFO_DR_WRT_VEC_LOOP as a block.
14368         (vect_recog_mask_conversion_pattern): Likewise.
14369         * tree-vect-stmts.c (compare_step_with_zero): Use vect_dr_behavior.
14370         (new_stmt_vec_info): Remove redundant zeroing.
14372 2017-07-03  Richard Earnshaw  <rearnsha@arm.com>
14374         * common/config/arm/arm-common.c (arm_be8_option): New function.
14375         * config/arm/arm-isa.h (isa_feature): Add new feature bit isa_bit_be8.
14376         (ISA_ARMv6): Add isa_bit_be8.
14377         * config/arm/arm.h (arm_be8_option): Add prototype.
14378         (BE8_SPEC_FUNCTION): New define.
14379         (EXTRA_SPEC_FUNCTIONS): Add BE8_SPEC_FUNCTION.
14380         * config/arm/arm.opt (mbig-endian): Mark as Negative of mlittle-endian.
14381         (mlittle-endian): Similarly.
14382         (mbe8, mbe32): New options.
14383         * config/arm/bpabi.h (BE8_LINK_SPEC): Call arm_be8_option.
14384         * doc/invoke.texi (ARM Options): Document -mbe8 and -mbe32.
14386 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14388         * tree-cfg.c (gimple_find_sub_bbs): Fix profile updating.
14390 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14392         * tree-cfgcleanup.c (want_merge_blocks_p): New function.
14393         (cleanup_tree_cfg_bb): Use it.
14394         * profile-count.h (profile_count::of_for_merging, profile_count::merge):
14395         New functions.
14396         * tree-cfg.c (gimple_merge_blocks): Use profile_count::merge.
14398 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14400         PR bootstrap/81285
14401         * loop-doloop.c (add_test): Update profile.
14403 2017-07-03  Martin Liska  <mliska@suse.cz>
14405         PR sanitize/81040
14406         * sanopt.c (rewrite_usage_of_param): New function.
14407         (sanitize_rewrite_addressable_params): Likewise.
14408         (pass_sanopt::execute): Call rewrite_usage_of_param.
14410 2017-07-03  Richard Biener  <rguenther@suse.de>
14412         * tree-vect-loop.c (vect_create_epilog_for_reduction): Revert
14413         back to using VIEW_CONVERT_EXPR.
14415 2017-07-03  Martin Liska  <mliska@suse.cz>
14417         PR other/78366
14418         * doc/extend.texi: Document when a resolver function is
14419         generated for target_clones.
14421 2017-07-03  Martin Liska  <mliska@suse.cz>
14423         * asan.c (asan_emit_stack_protection): Unpoison just red zones
14424         and shadow memory of auto variables which are subject of
14425         use-after-scope sanitization.
14426         (asan_expand_mark_ifn): Add do set only when is_poison.
14428 2016-07-03  Richard Biener  <rguenther@suse.de>
14430         * tree-vect-loop.c (vect_analyze_loop_operations): Also analyze
14431         reduction PHIs.
14432         (vect_force_simple_reduction): Record reduction def -> phi mapping.
14433         (vectorizable_reduction): Perform reduction PHI creation when
14434         visiting a reduction PHI and adjust and simplify code generation
14435         phase of the reduction op.  Cache dts, use fold_binary, not fold_build2.
14436         (vect_transform_loop): Visit reduction PHIs.
14437         * tree-vect-slp.c (vect_get_and_check_slp_defs): Record reduction
14438         defs into the SLP tree.
14439         (vect_build_slp_tree): Reduction defs terminate the recursion.
14440         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Allow lookup
14441         of reduction defs.
14442         (vect_get_vec_defs_for_stmt_copy): Export.
14443         (vect_get_vec_defs): Likewise.
14444         * tree-vectorizer.h (struct _stmt_vec_info): Amend reduc_def
14445         purpose.
14446         (vect_get_vec_defs_for_stmt_copy): Declare.
14447         (vect_get_vec_defs): Likewise.
14449 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
14451         * tree-data-ref.c (dr_analyze_innermost): Replace the "nest"
14452         parameter with a "loop" parameter and use it instead of the
14453         loop containing DR_STMT.  Don't check simple_iv when doing
14454         BB analysis.  Describe the two analysis modes in the comment.
14456 2017-07-03  Tom de Vries  <tom@codesourcery.com>
14458         PR tree-optimization/69468
14459         * tree-ssa-tail-merge.c (ignore_edge_flags): New constant.
14460         (find_same_succ_bb): Handle ignore_edge_flags.
14462 2017-07-03  Tom de Vries  <tom@codesourcery.com>
14464         PR tree-optimization/81192
14465         * tree-ssa-tail-merge.c (same_succ_hash): Use bb->loop_father->num in
14466         hash.
14467         (same_succ::equal): Don't find bbs to be equal if bb->loop_father
14468         differs.
14469         (find_same_succ_bb): Remove obsolete test on bb->loop_father->latch.
14471 2017-07-03  Tom de Vries  <tom@codesourcery.com>
14473         PR tree-optimization/81192
14474         * tree-ssa-tail-merge.c (same_succ_flush_bb): Handle
14475         BB_SAME_SUCC (bb) == NULL.
14477 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14479         * cfgrtl.c (rtl_verify_edges): Enable checking of profile_probability
14480         consistency.
14482 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14484         * dumpfile.c: Include profile-count.h
14485         * tree-cfg.c (gimple_duplicate_sese_tail): Drop UNUSED attributes;
14486         update profile.
14487         (insert_cond_bb): Update profile.
14488         * tree-cfg.h (insert_cond_bb): Update prototype.
14489         * tree-chkp-opt.c (chkp_optimize_string_function_calls): Update.
14490         * tree-dump.c: Do not include tree-cfg.
14492 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14494         * bb-reorder.c (fix_up_crossing_landing_pad): Update profile.
14496 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14498         * expect.c (dw2_build_landing_pads): Update profile of the landing pad
14499         bb.
14501 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
14503         * tree-complex.c (expand_complex_div_wide): update profile.
14505 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
14506             Alan Hayward  <alan.hayward@arm.com>
14507             David Sherwood  <david.sherwood@arm.com>
14509         * Makefile.in (MACHMODE_H): Remove insn-modes.h
14510         (CORETYPES_H): New define.
14511         (MOSTLYCLEANFILES): Add insn-modes-inline.h.
14512         (insn-modes-inline.h, s-modes-inline-h): New rules.
14513         (generated_files): Add insn-modes-inline.h.
14514         (RTL_BASE_H, TREE_CORE_H): Use CORETYPES_H instead of coretypes.h.
14515         (build/gensupport.o, build/ggc-none.o, build/print-rtl.o): Likewise.
14516         (build/read-md.o, build/read-rtl.o, build/rtl.o): Likewise.
14517         (build/vec.o, build/hash-table.o, build/inchash.o): Likewise.
14518         (build/gencondmd.o, build/genattr.o, build/genattr-common.o): Likewise.
14519         (build/genattrtab.o, build/genautomata.o, build/gencheck.o): Likewise.
14520         (build/gencodes.o, build/genconditions.o): Likewise.
14521         (build/genconfig.o, build/genconstants.o, build/genemit.o): Likewise.
14522         (build/genenums.o, build/genextract.o, build/genflags.o): Likewise.
14523         (build/gentarget-def.o, build/genmddeps.o, build/genopinit.o)
14524         (build/genoutput.o, build/genpeep.o, build/genpreds.o): Likewise.
14525         (build/genrecog.o, build/genmddump.o, build/genmatch.o): Likewise.
14526         (build/gencfn-macros.o, build/gcov-iov.o): Likewise.
14527         * coretypes.h: Include everything up to real.h for generators.
14528         Include insn-modes.h first.  Include wide-int-print.h after
14529         wide-int.h.  Include insn-modes-inline.h and then machmode.h.
14530         * machmode.h: Don't include insn-modes.h here.
14531         * function-tests.c: Remove includes of signop.h, machmode.h,
14532         double-int.h and wide-int.h.
14533         * rtl.h: Likewise.
14534         * gcc-rich-location.c: Remove includes of machmode.h, double-int.h
14535         and wide-int.h.
14536         * optc-save-gen.awk: Likewise.
14537         * gencheck.c (BITS_PER_UNIT): Delete dummy definition.
14538         * godump.c: Remove include of wide-int-print.h.
14539         * pretty-print.h: Likewise.
14540         * wide-int-print.cc: Likewise.
14541         * wide-int.cc: Likewise.
14542         * hash-map-tests.c: Remove include of signop.h.
14543         * hash-set-tests.c: Likewise.
14544         * rtl-tests.c: Likewise.
14545         * mkconfig.sh: Remove include of machmode.h.
14546         * genmodes.c (emit_insn_modes_h): Split emission of inline functions
14547         into...
14548         (emit_insn_modes_inline_h): ...this new function.  Emit the code
14549         into an insn-modes-inline.h header file, adding appropriate
14550         include guards and end comments.
14551         (emit_insn_modes_c_header): Remove include of machmode.h.
14552         (emit_min_insn_modes_c_header): Include coretypes.h rather than
14553         machmode.h.
14554         (main): Handle -i flag and call emit_insn_modes_inline_h when
14555         it is passed.
14557 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
14559         * tree-ssa-strlen.c (strinfo): Rename the length field to
14560         nonzero_chars.  Add a full_string_p field.
14561         (compare_nonzero_chars, zero_length_string_p): New functions.
14562         (get_addr_stridx): Add an offset_out parameter.
14563         Use compare_nonzero_chars.
14564         (get_stridx): Update accordingly.  Use compare_nonzero_chars.
14565         (new_strinfo): Update after above changes to strinfo.
14566         (set_endptr_and_length): Set full_string_p.
14567         (get_string_length): Update after above changes to strinfo.
14568         (unshare_strinfo): Update call to new_strinfo.
14569         (maybe_invalidate): Likewise.
14570         (get_stridx_plus_constant): Change off to unsigned HOST_WIDE_INT.
14571         Use compare_nonzero_chars and zero_string_p.  Treat nonzero_chars
14572         as a uhwi instead of an shwi.  Update after above changes to
14573         strinfo and new_strinfo.
14574         (zero_length_string): Assert that chainsi contains full strings.
14575         Use zero_length_string_p.  Update call to new_strinfo.
14576         (adjust_related_strinfos): Update after above changes to strinfo.
14577         Copy full_string_p from origsi.
14578         (adjust_last_stmt): Use zero_length_string_p.
14579         (handle_builtin_strlen): Update after above changes to strinfo and
14580         new_strinfo.  Install the lhs as the string length if the previous
14581         entry didn't describe a full string.
14582         (handle_builtin_strchr): Update after above changes to strinfo
14583         and new_strinfo.
14584         (handle_builtin_strcpy): Likewise.
14585         (handle_builtin_strcat): Likewise.
14586         (handle_builtin_malloc): Likewise.
14587         (handle_pointer_plus): Likewise.
14588         (handle_builtin_memcpy): Likewise.  Track nonzero characters
14589         that aren't necessarily followed by a nul terminator.
14590         (handle_char_store): Likewise.
14592 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
14594         PR tree-optimization/80769
14595         * tree-ssa-strlen.c (strinfo): Document that "stmt" is also used
14596         for malloc and calloc.  Document the new invariant that all related
14597         strinfos have delayed lengths or none do.
14598         (verify_related_strinfos): Move earlier in file.
14599         (set_endptr_and_length): New function, split out from...
14600         (get_string_length): ...here.  Also set the lengths of related
14601         strinfos.
14602         (zero_length_string): Assert that chainsi has known (rather than
14603         delayed) lengths.
14604         (adjust_related_strinfos): Likewise.
14606 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
14608         PR tree-optimization/81136
14609         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Only
14610         assert that two references with the same misalignment have the same
14611         compile-time misalignment if those compile-time misalignments
14612         are known.
14614 2017-07-01  Andi Kleen  <ak@linux.intel.com>
14616         * print-tree.c (print_node): Print all attributes.
14618 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
14620         * cfg.c (scale_bbs_frequencies): New function.
14621         * cfg.h (scale_bbs_frequencies): Declare it.
14622         * cfgloopanal.c (single_likely_exit): Cleanup.
14623         * cfgloopmanip.c (scale_loop_frequencies): Take profile_probability
14624         as parameter.
14625         (scale_loop_profile): Likewise.
14626         (loop_version): Likewise.
14627         (create_empty_loop_on_edge): Update.
14628         * cfgloopmanip.h (scale_loop_frequencies, scale_loop_profile,
14629         scale_loop_frequencies, scale_loop_profile, loopify,
14630         loop_version): Update prototypes.
14631         * modulo-sched.c (sms_schedule): Update.
14632         * predict.c (unlikely_executed_edge_p): Also check probability.
14633         (probably_never_executed_edge_p): Fix typo.
14634         * tree-if-conv.c (version_loop_for_if_conversion): Update.
14635         * tree-parloops.c (gen_parallel_loop): Update.
14636         * tree-ssa-loop-ivcanon.c (try_peel_loop): Update.
14637         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
14638         * tree-ssa-loop-split.c (split_loop): Update.
14639         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
14640         * tree-vect-loop-manip.c (vect_do_peeling): Update.
14641         (vect_loop_versioning): Update.
14642         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
14644 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
14646         * trans-mem.c (split_bb_make_tm_edge): Update profile.
14648 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
14650         * tree-if-conv.c (combine_blocks): Use make_single_succ_edge
14651         to keep profile consistent.
14653 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
14655         * cfgrtl.c (rtl_flow_call_edges_add): Update profile.
14656         * tree-cfg.c (gimple_flow_call_edges_add): Likewise.
14657         * profile-count.h (max_safe_multiplier): Make unsigned.
14658         (profile_count::guessed_zero): New.
14660 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
14662         * bb-reorder.c (fix_up_crossing_landing_pad,
14663         fix_crossing_conditional_branches): Use make_single_succ_edge
14664         to keep profile consistent.
14666 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
14668         * tree-vect-loop.c (optimize_mask_stores): Use make_single_succ_edge
14669         to update profile.
14671 2017-07-01  Jakub Jelinek  <jakub@redhat.com>
14673         PR sanitizer/81262
14674         * bb-reorder.c (fix_up_fall_thru_edges): Move variable declarations to
14675         the right scopes, make sure cond_jump isn't preserved between multiple
14676         iterations.  Search for fallthru edge whenever there are 3+ edges and
14677         use find_fallthru_edge for it.
14679 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
14681         Patch by Alexander Monakov <amonakov@ispras.ru>
14682         * sel-sched-ir.c (compute_succs_info): Handle uninitialized
14683         probabilities consistently.
14685 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
14687         * pa.c (pa_expand_compare_and_swap_loop): Update call of
14688         emit_cmp_and_jump_insns.
14690 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
14692         PR ipa/81261
14693         * tree-inline.c (expand_call_inline): Combine profile statuses.
14695 2017-06-30  Andrew Pinski  <apinski@cavium.com>
14697         * tree-if-conv.c (predicate_scalar_phi): Update new_stmt if
14698         fold_stmt returned true.
14700 2017-06-30  Nathan Sidwell  <nathan@acm.org>
14702         * ggc.h (empty_string): Delete.
14703         * cfgexpand.c (expand_asm_stmt): Use plain "".
14704         * optabs.c (expand_asm_memory_barrier): Likewise.
14705         * stringpool.c (empty_string): Delete.
14706         (digit_vector, digit_string): Delete.
14707         (ggc_alloc_string): Use plain "", don't optimize single digit
14708         strings.  Use ggc_alloc_atomic.
14710 2017-06-30  Richard Earnshaw  <rearnsha@arm.com>
14712         * rtlanal.c (insn_rtx_cost): If a parallel contains exactly one
14713         comparison set and one other set, use the cost of the non-comparison
14714         set.
14716 2017-06-30  Nathan Sidwell  <nathan@acm.org>
14718         * ggc.h: Replace all 'static inline' with plain 'inline'.  Fix
14719         some formatting.
14721 2017-06-30  Peter Bergner  <bergner@vnet.ibm.com>
14723         * tree-cfg.c (group_case_labels_stmt): Merge scanning and compressing
14724         loops.  Remove now unneeded calls to gimple_switch_set_label() that
14725         just set removed labels to NULL_TREE.
14727 2017-06-30  Aldy Hernandez  <aldyh@redhat.com>
14729         * tree-ssanames.c (set_range_info_raw): Abstract from ...
14730         (set_range_info): ...here.  Only call set_range_info_raw if domain
14731         is useful.
14732         (set_nonzero_bits): Call set_range_info_raw.
14733         * tree-ssanames.h (set_range_info_raw): New.
14735 2017-06-30  Jakub Jelinek  <jakub@redhat.com>
14737         PR target/81225
14738         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): For V8FI,
14739         V16FI and VI8F_256 iterators, use <store_mask_predicate> instead
14740         of nonimmediate_operand and <store_mask_constraint> instead of m
14741         for the input operand.  For V8FI iterator, always split if input
14742         is a MEM.  For V16FI and V8SF_256 iterators, don't test if both
14743         operands are MEM if <mask_applied>.  For VI4F_256 iterator, use
14744         <store_mask_predicate> instead of register_operand and
14745         <store_mask_constraint> instead of v for the input operand.  Make
14746         sure both operands aren't MEMs for if not <mask_applied>.
14748 2017-06-30  Sylvestre Ledru  <sylvestre@debian.org>
14750         * lto-wrapper.c (copy_file) Close both file descriptors before
14751         exiting normally.
14753 2017-06-30  Martin Liska  <mliska@suse.cz>
14755         PR ipa/81214
14756         * multiple_target.c (create_dispatcher_calls): Make ifunc
14757         also for function that don't have calls or are not referenced.
14759 2017-06-30  Richard Biener  <rguenther@suse.de>
14761         * tree-vect-slp.c (vect_slp_analyze_node_operations): Only
14762         analyze the first scalar stmt.  Move vector type computation
14763         for the BB case here from ...
14764         * tree-vect-stmts.c (vect_analyze_stmt): ... here.  Guard
14765         live operation processing in the SLP case properly.
14767 2017-06-30  Richard Biener  <rguenther@suse.de>
14769         * graph.c (draw_cfg_node_succ_edges): Fix broken dot syntax.
14771 2017-06-30  Martin Liska  <mliska@suse.cz>
14773         PR sanitizer/81021
14774         * tree-eh.c (lower_resx): Call BUILT_IN_ASAN_HANDLE_NO_RETURN
14775         before BUILT_IN_UNWIND_RESUME when ASAN is used.
14777 2017-06-30  Yvan Roux  <yvan.roux@linaro.org>
14779         * doc/invoke.texi (AArch64): Add missing options and remove redundant
14780         ones.
14782 2017-06-30  Richard Biener  <rguenther@suse.de>
14784         PR tree-optimization/81249
14785         * tree-vect-loop.c (vect_create_epilog_for_reduction): Convert
14786         condition reduction result to original scalar type.
14788 2017-06-30  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14790         * profile-count.h (enum profile_quality): Fix typos and whitespace
14791         issues.
14793 2017-06-30  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14795         * config/s390/s390.c (s390_expand_setmem): Adjust to the new data
14796         type for branch probabilities.
14798 2017-06-29  Julian Brown  <julian@codesourcery.com>
14799             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
14801         * config/aarch64/aarch64-fusion-pairs.def: Add ALU_BRANCH entry.
14802         * config/aarch64/aarch64.c (AARCH64_FUSE_ALU_BRANCH): New fusion type.
14803         (thunderx2t99_tunings): Set AARCH64_FUSE_ALU_BRANCH flag.
14804         (aarch_macro_fusion_pair_p): Add support for AARCH64_FUSE_ALU_BRANCH.
14806 2017-06-29  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
14808         * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Push the
14809         check for CC usage into AARCH64_FUSE_CMP_BRANCH.
14810         * config/i386/i386.c (ix86_macro_fusion_pair_p): Push the check for
14811         CC usage from generic code to here.
14812         * sched-deps.c (sched_macro_fuse_insns): Move the condition for
14813         CC usage into the target macros.
14815 2017-06-29  Maya Rashish  <coypu@sdf.org>
14817         * config/netbsd.h (NETBSD_LIB_SPEC): Add -lc when creating shared
14818         objects.
14820 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
14822         * arm/arm-builtins.c: Include profile-count.h
14823         * except.c (sjlj_emit_function_enter): Use
14824         profile_probability::unlikely.
14826 2017-06-29  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
14828         * config/rs6000/rs6000.c (toc_relative_expr_p): Make tocrel_base
14829         and tocrel_offset be pointer args rather than implicitly using
14830         static versions.
14831         (legitimate_constant_pool_address_p, rs6000_emit_move,
14832         const_load_sequence_p, adjust_vperm): Add local tocrel_base and
14833         tocrel_offset and use in toc_relative_expr_p call.
14834         (print_operand, print_operand_address): Use static tocrel_base_oac
14835         and tocrel_offset_oac.
14836         (rs6000_output_addr_const_extra): Use static tocrel_base_oac and
14837         tocrel_offset_oac.
14839 2017-06-29  Maya Rashish  <coypu@sdf.org>
14841         * config/vax/builtins.md (ffssi2_internal): Correct constraint.
14843 2017-06-29  Eric Botcazou  <ebotcazou@adacore.com>
14845         * expr.c (expand_expr) <normal_inner_ref>: When testing for unaligned
14846         objects, take into account only the alignment of 'op0' and 'mode1' if
14847         'op0' is a MEM.
14849 2017-06-29  Steve Ellcey  <sellcey@cavium.com>
14851         * ccmp.c (ccmp_tree_comparison_p): New function.
14852         (ccmp_candidate_p): Update to use above function.
14853         (get_compare_parts): New function.
14854         (expand_ccmp_next): Update to use new functions.
14855         (expand_ccmp_expr_1): Take tree arg instead of gimple, update to use
14856         new functions.
14857         (expand_ccmp_expr): Pass tree instead of gimple to expand_ccmp_expr_1,
14858         take mode as argument.
14859         * ccmp.h (expand_ccmp_expr): Add mode as argument.
14860         * expr.c (expand_expr_real_1): Pass mode as argument.
14862 2017-06-29  Segher Boessenkool  <segher@kernel.crashing.org>
14864         * combine.c (combine_instructions): Print insns to dump_file, together
14865         with their costs.
14867 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
14869         * asan.c (asan_emit_stack_protection): Update.
14870         (create_cond_insert_point): Update.
14871         * auto-profile.c (afdo_propagate_circuit): Update.
14872         * basic-block.h (struct edge_def): Turn probability to
14873         profile_probability.
14874         (EDGE_FREQUENCY): Update.
14875         * bb-reorder.c (find_traces_1_round): Update.
14876         (better_edge_p): Update.
14877         (sanitize_hot_paths): Update.
14878         * cfg.c (unchecked_make_edge): Initialize probability to uninitialized.
14879         (make_single_succ_edge): Update.
14880         (check_bb_profile): Update.
14881         (dump_edge_info): Update.
14882         (update_bb_profile_for_threading): Update.
14883         * cfganal.c (connect_infinite_loops_to_exit): Initialize new edge
14884         probabilitycount to 0.
14885         * cfgbuild.c (compute_outgoing_frequencies): Update.
14886         * cfgcleanup.c (try_forward_edges): Update.
14887         (outgoing_edges_match): Update.
14888         (try_crossjump_to_edge): Update.
14889         * cfgexpand.c (expand_gimple_cond): Update make_single_succ_edge.
14890         (expand_gimple_tailcall): Update.
14891         (construct_init_block): Use make_single_succ_edge.
14892         (construct_exit_block): Use make_single_succ_edge.
14893         * cfghooks.c (verify_flow_info): Update.
14894         (redirect_edge_succ_nodup): Update.
14895         (split_edge): Update.
14896         (account_profile_record): Update.
14897         * cfgloopanal.c (single_likely_exit): Update.
14898         * cfgloopmanip.c (scale_loop_profile): Update.
14899         (set_zero_probability): Remove.
14900         (duplicate_loop_to_header_edge): Update.
14901         * cfgloopmanip.h (loop_version): Update prototype.
14902         * cfgrtl.c (try_redirect_by_replacing_jump): Update.
14903         (force_nonfallthru_and_redirect): Update.
14904         (update_br_prob_note): Update.
14905         (rtl_verify_edges): Update.
14906         (purge_dead_edges): Update.
14907         (rtl_lv_add_condition_to_bb): Update.
14908         * cgraph.c: (cgraph_edge::redirect_call_stmt_to_calle): Update.
14909         * cgraphunit.c (init_lowered_empty_function): Update.
14910         (cgraph_node::expand_thunk): Update.
14911         * cilk-common.c: Include profile-count.h
14912         * dojump.c (inv): Remove.
14913         (jumpifnot): Update.
14914         (jumpifnot_1): Update.
14915         (do_jump_1): Update.
14916         (do_jump): Update.
14917         (do_jump_by_parts_greater_rtx): Update.
14918         (do_compare_rtx_and_jump): Update.
14919         * dojump.h (jumpifnot, jumpifnot_1, jumpif_1, jumpif, do_jump,
14920         do_jump_1. do_compare_rtx_and_jump): Update prototype.
14921         * dwarf2cfi.c: Include profile-count.h
14922         * except.c (dw2_build_landing_pads): Use make_single_succ_edge.
14923         (sjlj_emit_dispatch_table): Likewise.
14924         * explow.c: Include profile-count.h
14925         * expmed.c (emit_store_flag_force): Update.
14926         (do_cmp_and_jump): Update.
14927         * expr.c (compare_by_pieces_d::generate): Update.
14928         (compare_by_pieces_d::finish_mode): Update.
14929         (emit_block_move_via_loop): Update.
14930         (store_expr_with_bounds): Update.
14931         (store_constructor): Update.
14932         (expand_expr_real_2): Update.
14933         (expand_expr_real_1): Update.
14934         * expr.h (try_casesi, try_tablejump): Update prototypes.
14935         * gimple-pretty-print.c (dump_probability): Update.
14936         (dump_profile): New.
14937         (dump_gimple_label): Update.
14938         (dump_gimple_bb_header): Update.
14939         * graph.c (draw_cfg_node_succ_edges): Update.
14940         * hsa-gen.c (convert_switch_statements): Update.
14941         * ifcvt.c (cheap_bb_rtx_cost_p): Update.
14942         (find_if_case_1): Update.
14943         (find_if_case_2): Update.
14944         * internal-fn.c (expand_arith_overflow_result_store): Update.
14945         (expand_addsub_overflow): Update.
14946         (expand_neg_overflow): Update.
14947         (expand_mul_overflow): Update.
14948         (expand_vector_ubsan_overflow): Update.
14949         * ipa-cp.c (good_cloning_opportunity_p): Update.
14950         * ipa-split.c (split_function): Use make_single_succ_edge.
14951         * ipa-utils.c (ipa_merge_profiles): Update.
14952         * loop-doloop.c (add_test): Update.
14953         (doloop_modify): Update.
14954         * loop-unroll.c (compare_and_jump_seq): Update.
14955         (unroll_loop_runtime_iterations): Update.
14956         * lra-constraints.c (lra_inheritance): Update.
14957         * lto-streamer-in.c (input_cfg): Update.
14958         * lto-streamer-out.c (output_cfg): Update.
14959         * mcf.c (adjust_cfg_counts): Update.
14960         * modulo-sched.c (sms_schedule): Update.
14961         * omp-expand.c (expand_omp_for_init_counts): Update.
14962         (extract_omp_for_update_vars): Update.
14963         (expand_omp_ordered_sink): Update.
14964         (expand_omp_for_ordered_loops): Update.
14965         (expand_omp_for_generic): Update.
14966         (expand_omp_for_static_nochunk): Update.
14967         (expand_omp_for_static_chunk): Update.
14968         (expand_cilk_for): Update.
14969         (expand_omp_simd): Update.
14970         (expand_omp_taskloop_for_outer): Update.
14971         (expand_omp_taskloop_for_inner): Update.
14972         * omp-simd-clone.c (simd_clone_adjust): Update.
14973         * optabs.c (expand_doubleword_shift): Update.
14974         (expand_abs): Update.
14975         (emit_cmp_and_jump_insn_1): Update.
14976         (expand_compare_and_swap_loop): Update.
14977         * optabs.h (emit_cmp_and_jump_insns): Update prototype.
14978         * predict.c (predictable_edge_p): Update.
14979         (edge_probability_reliable_p): Update.
14980         (set_even_probabilities): Update.
14981         (combine_predictions_for_insn): Update.
14982         (combine_predictions_for_bb): Update.
14983         (propagate_freq): Update.
14984         (estimate_bb_frequencies): Update.
14985         (force_edge_cold): Update.
14986         * profile-count.c (profile_count::dump): Add missing space into dump.
14987         (profile_count::debug): Add newline.
14988         (profile_count::differs_from_p): Explicitly convert to unsigned.
14989         (profile_count::stream_in): Update.
14990         (profile_probability::dump): New member function.
14991         (profile_probability::debug): New member function.
14992         (profile_probability::differs_from_p): New member function.
14993         (profile_probability::differs_lot_from_p): New member function.
14994         (profile_probability::stream_in): New member function.
14995         (profile_probability::stream_out): New member function.
14996         * profile-count.h (profile_count_quality): Rename to ...
14997         (profile_quality): ... this one.
14998         (profile_probability): New.
14999         (profile_count): Update.
15000         * profile.c (compute_branch_probabilities): Update.
15001         * recog.c (peep2_attempt): Update.
15002         * sched-ebb.c (schedule_ebbs): Update.
15003         * sched-rgn.c (find_single_block_region): Update.
15004         (compute_dom_prob_ps): Update.
15005         (schedule_region): Update.
15006         * sel-sched-ir.c (compute_succs_info): Update.
15007         * stmt.c (struct case_node): Update.
15008         (do_jump_if_equal): Update.
15009         (get_outgoing_edge_probs): Update.
15010         (conditional_probability): Update.
15011         (emit_case_dispatch_table): Update.
15012         (expand_case): Update.
15013         (expand_sjlj_dispatch_table): Update.
15014         (emit_case_nodes): Update.
15015         * targhooks.c: Update.
15016         * tracer.c (better_p): Update.
15017         (find_best_successor): Update.
15018         * trans-mem.c (expand_transaction): Update.
15019         * tree-call-cdce.c: Update.
15020         * tree-cfg.c (gimple_split_edge): Upate.
15021         (move_sese_region_to_fn): Upate.
15022         * tree-cfgcleanup.c (cleanup_control_expr_graph): Upate.
15023         * tree-eh.c (lower_resx): Upate.
15024         (cleanup_empty_eh_move_lp): Upate.
15025         * tree-if-conv.c (version_loop_for_if_conversion): Update.
15026         * tree-inline.c (copy_edges_for_bb): Update.
15027         (copy_cfg_body): Update.
15028         * tree-parloops.c (gen_parallel_loop): Update.
15029         * tree-profile.c (gimple_gen_ic_func_profiler): Update.
15030         (gimple_gen_time_profiler): Update.
15031         * tree-ssa-dce.c (remove_dead_stmt): Update.
15032         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
15033         * tree-ssa-loop-im.c (execute_sm_if_changed): Update.
15034         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
15035         (unloop_loops): Update.
15036         (try_peel_loop): Update.
15037         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
15038         * tree-ssa-loop-split.c (connect_loops): Update.
15039         (split_loop): Update.
15040         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
15041         (hoist_guard): Update.
15042         * tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
15043         * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
15044         (value_replacement): Update.
15045         * tree-ssa-reassoc.c (branch_fixup): Update.
15046         * tree-ssa-tail-merge.c (replace_block_by): Update.
15047         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
15048         (create_edge_and_update_destination_phis): Update.
15049         (compute_path_counts): Update.
15050         (recompute_probabilities): Update.
15051         (update_joiner_offpath_counts): Update.
15052         (freqs_to_counts_path): Update.
15053         (duplicate_thread_path): Update.
15054         * tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
15055         (struct switch_conv_info): Update.
15056         (gen_inbound_check): Update.
15057         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
15058         (vect_do_peeling): Update.
15059         (vect_loop_versioning): Update.
15060         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
15061         (optimize_mask_stores): Update.
15062         * ubsan.c (ubsan_expand_null_ifn): Update.
15063         * value-prof.c (gimple_divmod_fixed_value): Update.
15064         (gimple_divmod_fixed_value_transform): Update.
15065         (gimple_mod_pow2): Update.
15066         (gimple_mod_pow2_value_transform): Update.
15067         (gimple_mod_subtract): Update.
15068         (gimple_mod_subtract_transform): Update.
15069         (gimple_ic): Update.
15070         (gimple_stringop_fixed_value): Update.
15071         (gimple_stringops_transform): Update.
15072         * value-prof.h: Update.
15074 2017-06-29  Carl Love  <cel@us.ibm.com>
15076         * config/rs6000/rs6000-c.c: Add support for built-in functions
15077         vector signed int vec_signed (vector float);
15078         vector signed long long vec_signed (vector double);
15079         vector signed int vec_signed2 (vector double, vector double);
15080         vector signed int vec_signede (vector double);
15081         vector signed int vec_signedo (vector double);
15082         * config/rs6000/rs6000.c (rs6000_generate_vsigned2_code): Add
15083         instruction generator.
15084         * config/rs6000/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
15085         UNSPEC_VSX_VSIGNED2): Add UNSPECS.
15086         (vsx_xvcvspsxws, vsx_xvcvdpuxds_scale, vsx_xvcvspuxws, vsigned2_v2df):
15087         Add define_insn.
15088         (vsignedo_v2df, vsignede_v2df, vunsigned2_v2df, vunsignedo_v2df,
15089         vunsignede_v2df): Add define_expands.
15090         * config/rs6000/rs6000-builtin.def (VEC_SIGNED, VEC_UNSIGNED,
15091         VEC_SIGNED2, VEC_UNSIGNED2, VEC_SIGNEDE, VEC_UNSIGNEDE, VEC_SIGNEDO,
15092         VEC_UNSIGNEDO): Add definitions.
15093         * config/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
15094         UNSPEC_VSX_VSIGNED2): Add UNSPECs.
15095         (vsx_xvcvspsxws, vsx_xvcvspuxws): Add define_insn.
15096         (vsigned2_v2df, vsigendo_v2df, vsignede_v2df,
15097         vunsigned2_v2df, vunsignedo_v2df, vunsignede_v2df): Add define_expands.
15098         * config/rs6000/altivec.h (vec_signed, vec_signed2,
15099         vec_signede and vec_signedo, vec_unsigned, vec_unsigned2,
15100         vec_unsignede, vec_unsignedo): Add builtin defines.
15101         * config/rs6000-protos.h (rs6000_generate_vsigned2_code): Add extern
15102         declaration.
15103         * doc/extend.texi: Update the built-in documentation file for the
15104         new built-in functions.
15106 2017-06-29  Richard Biener  <rguenther@suse.de>
15108         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Do not add
15109         reduction chains to LOOP_VINFO_REDUCTIONS.
15110         * tree-vect-slp.c (vect_analyze_slp): Continue looking for
15111         SLP reductions after processing reduction chains.
15113 2017-06-29  Nathan Sidwell  <nathan@acm.org>
15115         * builtins.c (fold_builtin_FUNCTION): Use
15116         lang_hooks.decl_printable_name.
15118 2017-06-29  Peter Bergner  <bergner@vnet.ibm.com>
15120         PR middle-end/81194
15121         * cfgexpand.c (expand_gimple_stmt_1): Handle switch statements
15122         with only one label.
15123         * stmt.c (expand_case): Assert NCASES is greater than one.
15125 2017-06-29  Richard Biener  <rguenther@suse.de>
15127         * tree-cfg.c (group_case_labels_stmt): Return whether we changed
15128         anything.
15129         (group_case_labels): Likewise.
15130         (find_taken_edge): Push sanity checking on val to workers...
15131         (find_taken_edge_cond_expr): ... here
15132         (find_taken_edge_switch_expr): ... and here, handle cases
15133         with just a default label.
15134         * tree-cfg.h (group_case_labels_stmt): Adjust prototype.
15135         (group_case_labels): Likewise.
15136         * tree-cfgcleanup.c (execute_cleanup_cfg_post_optimizing): When
15137         group_case_labels does anything cleanup the CFG again.
15139 2017-06-29  Bin Cheng  <bin.cheng@arm.com>
15141         PR tree-optimization/81196
15142         * tree-ssa-loop-niter.c (number_of_iterations_cond): Handle loop
15143         exit condition comparing two IVs.
15145 2017-06-29  Richard Earnshaw  <rearnsha@arm.com>
15147         * config/arm/parsecpu.awk (gen_comm_data): Add initializer for
15148         profile to the dummy entry at the end of the list of architectures.
15149         * config/arm/arm-cpu-cdata.h: Regenerated.
15151 2017-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15152             Michael Collison <michael.collison@arm.com>
15154         PR target/70119
15155         * config/aarch64/aarch64.md (*aarch64_<optab>_reg_<mode>3_mask1):
15156         New pattern.
15157         (*aarch64_reg_<mode>3_neg_mask2): New pattern.
15158         (*aarch64_reg_<mode>3_minus_mask): New pattern.
15159         (*aarch64_<optab>_reg_di3_mask2): New pattern.
15160         * config/aarch64/aarch64.c (aarch64_rtx_costs): Account for cost
15161         of shift when the shift amount is masked with constant equal to
15162         the size of the mode.
15163         * config/aarch64/predicates.md (subreg_lowpart_operator): New
15164         predicate.
15166 2017-06-29  Martin Liska  <mliska@suse.cz>
15168         * config/i386/i386.opt: Change range from [1,5] to [0,5].
15170 2017-06-29  Yury Gribov  <tetra2005@gmail.com>
15172         PR bootstrap/80565
15173         * ipa-cp.c (allocate_and_init_ipcp_value): Add initialization
15174         code.
15175         * ipa-inline.h
15176         (edge_growth_cache_entry::edge_growth_cache_entry): New
15177         function.
15178         (reset_edge_growth_cache): Update to use constructor.
15180 2017-06-28  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
15182         * config/aarch64/aarch64.h (AARCH64_EXPAND_ALIGNMENT): New.
15183         (DATA_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
15184         (LOCAL_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
15186 2017-06-28  Sebastian Peryt  <sebastian.peryt@intel.com>
15188         * config/i386/avx512vlintrin.h (_mm256_permutexvar_epi64)
15189         (_mm256_permutexvar_epi32, _mm256_permutex_epi64): New intrinsics.
15191 2017-06-28  Szabolcs Nagy  <szabolcs.nagy@arm.com>
15193         * config.gcc (*-linux-musl*): Add t-musl tmake_file.
15194         (*-linux-uclibc*): Add t-uclibc tmake_file.
15195         * config/t-musl: New.
15196         * config/t-uclibc: New.
15198 2017-06-28  Richard Earnshaw  <rearnsha@arm.com>
15200         * config/arm/parsecpu.awk (profile): Parse new keyword in an arch
15201         context.
15202         (gen_comm_data): Emit architectural setting of arch_prof.
15203         * config/arm/arm-cpus.in (armv6-m, armv6s-m, armv7-a, armv7ve): Set the
15204         profile.
15205         (armv7-r, armv7-m, armv7e-m, armv8-a, armv8.1-a, armv8.2-a): Likewise.
15206         (armv8-m.base, armv8-m.main): Likewise.
15207         * arm-protos.h (arm_build_target): Add profile field.
15208         (arch_option): Likewise.
15209         * config/arm/arm.c (arm_configure_build_target): Copy the profile to
15210         the active target.
15211         * config/arm/arm.h (TARGET_ARM_ARCH_PROFILE): Use
15212         arm_active_target.profile.
15214 2017-06-28  Richard Biener  <rguenther@suse.de>
15216         PR middle-end/81227
15217         * fold-const.c (negate_expr_p): Use TYPE_UNSIGNED, not
15218         TYPE_OVERFLOW_WRAPS.
15219         * match.pd (negate_expr_p): Likewise.
15220         * tree-ssa-reassoc.c (optimize_range_tests_diff): Use
15221         fold_build2, not fold_binary.
15223 2017-06-28  Wilco Dijkstra  <wdijkstr@arm.com>
15225         * config/aarch64/aarch64 (aarch64_expand_mov_immediate):
15226         Convert memory address to Pmode.
15227         (aarch64_print_operand): Assert MEM operands are always Pmode.
15229 2017-06-28  Wilco Dijkstra  <wdijkstr@arm.com>
15231         PR target/79665
15232         * config/arm/aarch-common.c (arm_no_early_alu_shift_dep):
15233         Remove redundant if.
15234         (aarch_forward_to_shift_is_not_shifted_reg): Remove.
15235         * config/arm/aarch-common-protos.h
15236         (aarch_forward_to_shift_is_not_shifted_re): Remove.
15237         * config/arm/cortex-a53.md: Use arm_no_early_alu_shift_dep in bypass.
15239 2017-06-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
15241         PR ipa/81238
15242         * multiple_target.c (create_dispatcher_calls): Set the default
15243         clone to be static, not public.
15245 2017-06-28  Richard Biener  <rguenther@suse.de>
15247         * tree-vect-loop.c (vectorizable_reduction): Move special
15248         cond reduction IV var creation ...
15249         (vect_create_epilog_for_reduction): ... here.  Remove induction_index
15250         parameter.  Use STMT_VINFO_VECTYPE.
15251         * tree-vect-slp.c (vect_get_constant_vectors): Properly reset
15252         constant_p.
15254 2017-06-28  Martin Liska  <mliska@suse.cz>
15256         PR ipa/81128
15257         * ipa-visibility.c (non_local_p): Handle visibility.
15259 2017-06-28  Martin Liska  <mliska@suse.cz>
15261         PR driver/79659
15262         * common.opt: Add IntegerRange to various options.
15263         * opt-functions.awk (integer_range_info): New function.
15264         * optc-gen.awk: Add integer_range_info to cl_options struct.
15265         * opts-common.c (decode_cmdline_option): Handle
15266         CL_ERR_INT_RANGE_ARG.
15267         (cmdline_handle_error): Likewise.
15268         * opts.c (print_filtered_help): Show valid interval in
15269         when --help is provided.
15270         * opts.h (struct cl_option): Add range_min and range_max fields.
15271         * config/i386/i386.opt: Add IntegerRange for -mbranch-cost.
15273 2017-06-28  Marc Glisse  <marc.glisse@inria.fr>
15275         * match.pd ((X & ~Y) | (~X & Y)): Generalize to + and ^.
15276         (x * C EQ/NE y * C): New transformation.
15278 2017-06-28  Christophe Lyon  <christophe.lyon@linaro.org>
15280         * genmultilib (combination_space): Accept '+' in option names.
15282 2017-06-28  Martin Liska  <mliska@suse.cz>
15284         PR sanitizer/81224
15285         * asan.c (instrument_derefs): Bail out inner references
15286         that are hard register variables.
15288 2017-06-28  Jakub Jelinek  <jakub@redhat.com>
15290         PR target/81175
15291         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Use def_builtin
15292         rather than def_builtin_pure for __builtin_ia32_gatherpf*.
15294 2017-06-28  Richard Biener  <rguenther@suse.de>
15296         * tree-vectorizer.h (vect_get_vec_defs): Remove.
15297         (vect_get_slp_defs): Adjust.
15298         * tree-vect-loop.c (get_initial_defs_for_reduction): Split
15299         out from ...
15300         * tree-vect-slp.c (vect_get_constant_vectors): ... here and
15301         simplify.
15302         * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
15303         get_initial_defs_for_reduction instead of vect_get_vec_defs.
15304         (vectorizable_reduction): Adjust.
15305         * tree-vect-slp.c (vect_get_constant_vectors): Remove reduction
15306         handling.
15307         (vect_get_slp_defs): Likewise.
15308         * tree-vect-stmts.c (vect_get_vec_defs): Make static and adjust.
15309         (vectorizable_bswap): Adjust.
15310         (vectorizable_call): Likewise.
15311         (vectorizable_conversion): Likewise.
15312         (vectorizable_assignment): Likewise.
15313         (vectorizable_shift): Likewise.
15314         (vectorizable_operation): Likewise.
15315         (vectorizable_store): Likewise.
15316         (vectorizable_condition): Likewise.
15317         (vectorizable_comparison): Likewise.
15319 2017-06-28  Michael Collison  <michael.collison@arm.com>
15321         PR target/68535
15322         * config/arm/arm.c (gen_ldm_seq): Remove last unnecessary
15323         set of base_reg
15324         (arm_gen_movmemqi): Removed unused variable 'i'.
15325         Convert 'for' loop into 'while' loop.
15326         (arm_expand_prologue): Remove last unnecessary set of insn.
15327         (thumb_pop): Remove unused variable 'pushed_words'.
15328         (thumb_exit): Remove last unnecessary set of regs_to_pop.
15330 2017-06-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15332         * config/s390/predicates.md: Use s390_rel_address_ok_p.
15333         * config/s390/s390-protos.h: Add prototype of
15334         s390_rel_address_ok_p.
15335         * config/s390/s390.c (s390_got_symbol): New function.
15336         (s390_rel_address_ok_p): New function.
15337         (legitimize_pic_address): Use s390_rel_address_ok_p.
15338         (s390_load_got): Use s390_got_symbol.
15339         (s390_option_override): Issue error if
15340         -mno-pic-data-is-text-relative is used without -fpic/-fPIC.
15341         * config/s390/s390.h (TARGET_DEFAULT_PIC_DATA_IS_TEXT_RELATIVE):
15342         New macro.
15343         * config/s390/s390.opt: New option mpic-data-is-text-relative.
15345 2017-06-27  Andrew Pinski  <apinski@cavium.com>
15347         * match.pd (X >/>=/</<= 0 ? 1.0 : -1.0): New patterns.
15348         (X * copysign (1.0, X)): New pattern.
15349         (X * copysign (1.0, -X)): New pattern.
15350         (copysign (-1.0, CST)): New pattern.
15352 2017-06-27  Joseph Myers  <joseph@codesourcery.com>
15354         * genmultilib (combination_space): Remove variable.
15355         Validate reuse rules against regular expression for any sequence
15356         of multilib options in any order.
15358 2017-06-27  Michael Collison  <michael.collison@arm.com>
15360         * config/aarch64/aarch64-simd.md (aarch64_combine<mode>): Directly
15361         call aarch64_split_simd_combine.
15362         * (aarch64_combine_internal<mode>): Delete pattern.
15363         * config/aarch64/aarch64.c (aarch64_split_simd_combine):
15364         Allow register and subreg operands.
15366 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
15368         * config/i386/vxworks.h (ASM_SPEC): Remove definition. No target
15369         specific need, just fallback on defaults.
15370         (ASM_OUTPUT_ALIGNED_BSS): Add #undef before #define.
15372 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
15373             Olivier Hainque  <hainque@adacore.com>
15375         * config/i386/vxworks.h (DBX_REGISTER_NUMBER): Pick distinct
15376         map for 64bits.
15377         (TARGET_OS_CPP_BUILTINS): builtin_define CPU to X86_64 for 64bit
15378         targets. Pick a default if no particular attempt applied.
15379         (STACK_CHECK_PROTECT): Double for 64bit targets, which have
15380         larger contexts.
15382 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
15384         * config.gcc (i*86-wrs-vxworks7): Handle new acceptable triplet.
15385         (x86_64-wrs-vxworks7): Likewise.
15387 2017-06-27  Marek Polacek  <polacek@redhat.com>
15389         PR sanitizer/81223
15390         * ubsan.c (instrument_null): Check get_base_address's result for null.
15392 2017-06-27  Marc Glisse  <marc.glisse@inria.fr>
15394         * match.pd ((A+-B)+(C-A), (A+B)-(A-C)): New transformations.
15396 2017-06-27  Marc Glisse  <marc.glisse@inria.fr>
15398         * builtin-types.def (BT_FENV_T_PTR, BT_CONST_FENV_T_PTR,
15399         BT_FEXCEPT_T_PTR, BT_CONST_FEXCEPT_T_PTR): New primitive types.
15400         (BT_FN_INT_FENV_T_PTR, BT_FN_INT_CONST_FENV_T_PTR,
15401         BT_FN_INT_FEXCEPT_T_PTR_INT, BT_FN_INT_CONST_FEXCEPT_T_PTR_INT):
15402         New function types.
15403         * builtins.def (BUILT_IN_FECLEAREXCEPT, BUILT_IN_FEGETENV,
15404         BUILT_IN_FEGETEXCEPTFLAG, BUILT_IN_FEGETROUND,
15405         BUILT_IN_FEHOLDEXCEPT, BUILT_IN_FERAISEEXCEPT,
15406         BUILT_IN_FESETENV, BUILT_IN_FESETEXCEPTFLAG,
15407         BUILT_IN_FESETROUND, BUILT_IN_FETESTEXCEPT,
15408         BUILT_IN_FEUPDATEENV): New builtins.
15409         * tree-core.h (TI_FENV_T_PTR_TYPE, TI_CONST_FENV_T_PTR_TYPE,
15410         TI_FEXCEPT_T_PTR_TYPE, TI_CONST_FEXCEPT_T_PTR_TYPE): New entries.
15411         * tree.h (fenv_t_ptr_type_node, const_fenv_t_ptr_type_node,
15412         fexcept_t_ptr_type_node, const_fexcept_t_ptr_type_node): New
15413         macros.
15414         (builtin_structptr_types): Adjust size.
15415         * tree.c (builtin_structptr_types): Add four entries.
15417 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
15418             Olivier Hainque  <hainque@adacore.com>
15420         * config/vxworks.h (VXWORKS_LIB_SPEC): Incorporate ...
15421         (TLS_SYM): New local macro, forcing reference to __tls__ on
15422         link command lines for VxWorks 7 RTPs, triggering initialization
15423         of tlsLib.
15424         (VXWORKS_HAVE_TLS): New macro. State whether the target VxWorks
15425         OS features TLS support, true for RTPs on VxWorks 7.
15426         * config/vxworks.c (vxworks_override_options): Setup emutls
15427         accordingly.
15429 2017-06-27  Jakub Jelinek  <jakub@redhat.com>
15431         * predict.c (test_prediction_value_range): Use -1U instead of -1
15432         to avoid narrowing conversion warning.
15433         * dumpfile.c (dump_options): Wrap all value into dump_flags_t cast
15434         to avoid narrowing conversion warning.
15435         * opt-functions.awk (var_ref): Return (unsigned short) -1 instead of
15436         -1.
15437         * optc-gen.awk (END): Expect (unsigned short) -1 instead of -1.
15439 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
15441         * config/vxworks.h (VXWORKS_LIBS_RTP): Alternative definition for
15442         64bit configurations.
15443         (PTR_DIFF_TYPE): Alternative definition for TARGET_LP64.
15444         (SIZE_TYPE): Likewise.
15445         * config/vxworks.c (vxworks_emutls_var_fields): Use
15446         long_unsigned_type_node instead of unsigned_type_node as the offset
15447         field type, which is "pointer" mode in emutls.c.
15449 2017-06-27  Jakub Jelinek  <jakub@redhat.com>
15451         PR sanitizer/81209
15452         * ubsan.c (ubsan_encode_value): Initialize DECL_CONTEXT on var.
15454         PR middle-end/81207
15455         * gimple-fold.c (replace_call_with_call_and_fold): Handle
15456         gimple_vuse copying separately from gimple_vdef copying.
15458 2017-06-27  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15460         * value-prof.c (free_hist): Remove call to memset and the enclosing if
15461         condition.
15463 2017-06-26  Jerome Lambourg  <lambourg@adacore.com>
15464             Olivier Hainque  <hainque@adacore.com>
15466         * config.gcc (*-*-vxworks*): Add TARGET_VXWORKS7=1 to tm_defines
15467         for all vxworks7 targets.
15468         * config/vxworks.h (TARGET_VXWORKS7): If not defined, define to 0.
15469         (VXWORKS_ADDITIONAL_CPP_SPEC): Alternative definition for VXWORKS7.
15470         (VXWORKS_LIBS_RTP, VXWORKS_LIBS_RTP_DIR): New macros, allowing
15471         variations for VX6/VX7 and 32/64bits later on in ...
15472         (VXWORKS_LIB_SPEC): Leverage new macros.
15473         (VXWORKS_OS_CPP_BUILTINS): Define _VSB_CONFIG_FILE for VXWORKS7,
15474         as well as _ALLOW_KEYWORD_MACROS when "inline" is not a keyword.
15476 2017-06-26  Jerome Lambourg  <lambourg@adacore.com>
15478         * config/vxworks.h (VXWORKS_OS_CPP_BUILTINS): builtin_define
15479         _VX_TOOL_FAMILY and _VX_TOOL to gnu.
15481 2017-06-26  Carl Love  <cel@us.ibm.com>
15483         * config/rs6000/rs6000-c.c: Add support for built-in functions
15484         vector bool char vec_reve (vector bool char);
15485         vector signed char vec_reve (vector signed char);
15486         vector unsigned char vec_reve (vector unsigned char);
15487         vector bool int vec_reve (vector bool int);
15488         vector signed int vec_reve (vector signed int);
15489         vector unsigned int vec_reve (vector unsigned int);
15490         vector bool long long vec_reve (vector bool long long);
15491         vector signed long long vec_reve (vector signed long long);
15492         vector unsigned long long vec_reve (vector unsigned long long);
15493         vector bool short vec_reve (vector bool short);
15494         vector signed short vec_reve (vector signed short);
15495         vector double vec_reve (vector double);
15496         vector float vec_reve (vector float);
15497         * config/rs6000/rs6000-builtin.def (VREVE_V2DI, VREVE_V4SI,
15498         VREVE_V8HI, VREVE_V16QI, VREVE_V2DF, VREVE_V4SF, VREVE): New builtin.
15499         * config/rs6000/altivec.md (UNSPEC_VREVEV): New UNSPEC.
15500         (altivec_vreve): New pattern.
15501         * config/rs6000/altivec.h (vec_reve): New define.
15502         * doc/extend.texi (vec_rev): Update the built-in documentation file
15503         for the new built-in functions.
15505 2016-06-26  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15507         PR tree-optimization/71815
15508         * gimple-ssa-strength-reduction.c (uses_consumed_by_stmt): New
15509         function.
15510         (find_basis_for_candidate): Call uses_consumed_by_stmt rather than
15511         has_single_use.
15512         (slsr_process_phi): Likewise.
15513         (replace_uncond_cands_and_profitable_phis): Don't replace a
15514         multiply candidate with a stride of 1 (copy or cast).
15515         (phi_incr_cost): Call uses_consumed_by_stmt rather than
15516         has_single_use.
15517         (lowest_cost_path): Likewise.
15518         (total_savings): Likewise.
15520 2017-06-26  Richard Biener  <rguenther@suse.de>
15522         PR target/81175
15523         * config/i386/i386.c (ix86_init_mmx_sse_builtins):
15524         Use def_builtin_pure for all gather builtins.
15526 2017-06-26  Richard Biener  <rguenther@suse.de>
15528         PR tree-optimization/81203
15529         * tree-tailcall.c (find_tail_calls): Do not move stmts into
15530         non-dominating BBs.
15532 2017-06-26  Marek Polacek  <polacek@redhat.com>
15534         PR c/80116
15535         * doc/invoke.texi: Document -Wmultistatement-macros.
15537 2017-06-26  Christophe Lyon  <christophe.lyon@linaro.org>
15539         * doc/sourcebuild.texi (ARM-specific attributes): Document new
15540         arm_neon_ok_no_float_abi effective target.
15542 2017-06-26  Richard Biener  <rguenther@suse.de>
15544         PR tree-optimization/80928
15545         * cfghooks.c (duplicate_block): Do not copy BB_DUPLICATED flag.
15546         (copy_bbs): Set BB_DUPLICATED flag early.
15547         (execute_on_growing_pred): Do not execute for BB_DUPLICATED
15548         marked blocks.
15549         (execute_on_shrinking_pred): Likewise.
15550         * tree-ssa.c (ssa_redirect_edge): Do not look for PHI args in
15551         BB_DUPLICATED blocks.
15552         * tree-ssa-phionlycoprop.c (eliminate_degenerate_phis_1): Properly
15553         iterate over all PHIs considering removal of *gsi.
15555 2017-06-23  Jim Wilson  <jim.wilson@linaro.org>
15557         * doc/invoke.texi (AArch64 Options, -mtune): Re-add falkor and
15558         qdf24xx.
15560 2017-06-23  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15562         * config/rs6000/rs6000-string.c: (expand_block_clear,
15563         do_load_for_compare, select_block_compare_mode,
15564         compute_current_alignment, expand_block_compare,
15565         expand_strncmp_align_check, expand_strn_compare,
15566         expand_block_move, rs6000_output_load_multiple)
15567         Move functions related to string/block move/compare
15568         to a separate file.
15569         * config/rs6000/rs6000.c: Move above functions to rs6000-string.c.
15570         * config/rs6000/rs6000-protos.h (rs6000_emit_dot_insn): Add prototype
15571         for this function which is now used in two files.
15572         * config/rs6000/t-rs6000: Add rule to compile rs6000-string.o.
15573         * config.gcc: Add rs6000-string.o to extra_objs for
15574         targets powerpc*-*-* and rs6000*-*-*.
15576 2017-06-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
15578         PR target/80510
15579         * config/rs6000/rs6000.md (ALTIVEC_DFORM): Do not allow DImode in
15580         32-bit, since indexed is not valid for DImode.
15581         (mov<mode>_hardfloat32): Reorder ISA 2.07 load/stores before ISA
15582         3.0 d-form load/stores to be the same as mov<mode>_hardfloat64.
15583         (define_peephole2 for Altivec d-form load): Add 32-bit support.
15584         (define_peephole2 for Altivec d-form store): Likewise.
15586         PR ipa/81185
15587         * multiple_target.c (create_dispatcher_calls): Only create the
15588         dispatcher call if the function is the default clone of a
15589         versioned function.
15591 2017-06-23  Segher Boessenkool  <segher@kernel.crashing.org>
15593         PR middle-end/80902
15594         * builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
15595         a call, force the call to not be a tail call.
15597 2017-06-23  Jeff Law  <law@redhat.com>
15599         * doc/contrib.texi: Add entry for Steven Pemberton's work on
15600         enquire.
15602 2017-06-23  Will Schmidt  <will_schmidt@vnet.ibm.com>
15604         * config/rs6000/rs6000.c: Add include of ssa-propagate.h for
15605         update_call_from_tree().  (rs6000_gimple_fold_builtin): Add
15606         handling for early expansion of vector shifts (sl,sr,sra,rl).
15607         (builtin_function_type): Add vector shift right instructions
15608         to the unsigned argument list.
15610 2017-06-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15612         rtl-optimizatoin/79286
15613         * ira.c (update_equiv_regs): Revert to using may_trap_or_fault_p again.
15614         * rtlanal.c (rtx_addr_can_trap_p_1): SYMBOL_REF_FUNCTION_P can never
15615         trap.  PIC register plus a const unspec without offset can never trap.
15617 2017-06-23  Marc Glisse  <marc.glisse@inria.fr>
15619         * tree.h (builtin_structptr_type): New type.
15620         (builtin_structptr_types): Declare new array.
15621         * tree.c (builtin_structptr_types): New array.
15622         (free_lang_data, build_common_tree_nodes): Use it.
15624 2017-06-23  Jonathan Wakely  <jwakely@redhat.com>
15626         PR c++/81187
15627         * doc/invoke.texi (-Wnoexcept-type): Fix name of option, from
15628         -Wnoexcept.
15630 2017-06-22  Matt Turner  <mattst88@gmail.com>
15632         * config/i386/driver-i386.c (host_detect_local_cpu): Add Kaby
15633         Lake models to skylake case.  Assume skylake for unknown
15634         models with clflushopt.
15636 2017-06-22  Jeff Law  <law@redhat.com>
15638         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Handle
15639         frame sizes that do not satisfy aarch64_uimm12_shift.
15641 2017-06-22  Jan Hubicka <hubicka@ucw.cz>
15643         * profile-count.h (apply_probability,
15644         apply_scale, probability_in): Fix checks for zero.
15646 2017-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15648         * incpath.c (add_sysroot_to_chain): Allow for $SYSROOT prefix.
15649         * doc/cppdiropts.texi (-I @var{dir}): Document it.
15651 2016-06-22  Richard Biener  <rguenther@suse.de>
15653         * tree-vect-loop.c (vect_model_reduction_cost): Handle
15654         COND_REDUCTION and INTEGER_INDUC_COND_REDUCTION without
15655         REDUC_MAX_EXPR support.
15656         (vectorizable_reduction): Likewise.
15657         (vect_create_epilog_for_reduction): Likewise.
15659 2017-06-22  James Greenhalgh  <james.greenhalgh@arm.com>
15661         * match.pd (A / (1 << B) -> A >> B): New.
15662         * generic-match-head.c: Include optabs-tree.h.
15663         * gimple-match-head.c: Likewise.
15664         * optabs-tree.h (target_supports_op_p): New.
15665         * optabs-tree.c (target_supports_op_p): New.
15667 2017-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15669         * configure.ac (gcc_cv_ld_static_dynamic): Also check stderr for
15670         $gcc_cv_ld --help output.
15671         (gcc_cv_ld_demangle): Likewise.
15672         (gcc_cv_ld_eh_frame_hdr): Likewise.
15673         (gcc_cv_ld_pie): Likewise.
15674         (gcc_cv_ld_as_needed): Likewise.  Prefer native forms unless $gnu_ld.
15675         (gcc_cv_ld_buildid): Likewise.
15676         (gcc_cv_ld_sysroot): Likewise.
15677         (ld_bndplt_support): Likewise.
15678         (ld_pushpopstate_support): Likewise.
15679         * configure: Regenerate.
15680         * config/sol2.h [!USE_GLD] (SYSROOT_SPEC): Define.
15682 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
15684         PR target/81151
15685         * config/i386/sse.md (round<mode>2): Renumber match_dup and
15686         operands indexes to avoid gap between operands and match_dups.
15688 2017-06-21  Andrew Pinski  <apinski@cavium.com>
15690         * config/aarch64/aarch64-cost-tables.h (thunderx_extra_costs):
15691         Increment Arith_shift and Arith_shift_reg by 1.
15692         * config/aarch64/aarch64-tuning-flags.def (cheap_shift_extend):
15693         New tuning flag.
15694         * config/aarch64/aarch64.c (thunderx_tunings): Enable
15695         AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND.
15696         (aarch64_strip_extend): Add new argument and test for it.
15697         (aarch64_cheap_mult_shift_p): New function.
15698         (aarch64_rtx_mult_cost): Call aarch64_cheap_mult_shift_p and don't
15699         add a cost if it is true.
15700         Update calls to aarch64_strip_extend.
15701         (aarch64_rtx_costs): Update calls to aarch64_strip_extend.
15703 2017-06-21  Andrew Pinski  <apinski@cavium.com>
15705         * config/aarch64/aarch64-cores.def (thunderxt88p1): Use thunderxt88
15706         tunings.
15707         (thunderxt88): Likewise.
15708         * config/aarch64/aarch64.c (thunderxt88_prefetch_tune): New variable.
15709         (thunderx_prefetch_tune): New variable.
15710         (thunderx2t99_prefetch_tune): Update for the correct values.
15711         (thunderxt88_tunings): New variable.
15712         (thunderx_tunings): Use thunderx_prefetch_tune instead of
15713         generic_prefetch_tune.
15714         (thunderx2t99_tunings): Use AUTOPREFETCHER_WEAK.
15716 2017-06-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15718         * config/aarch64/atomics.md (aarch64_compare_and_swap<mode>_lse,
15719         SHORT): Relax operand 3 to aarch64_reg_or_zero and constraint to Z.
15720         (aarch64_compare_and_swap<mode>_lse, GPI): Likewise.
15721         (aarch64_atomic_cas<mode>, SHORT): Likewise for operand 2.
15722         (aarch64_atomic_cas<mode>, GPI): Likewise.
15724 2017-06-21  Martin Liska  <mliska@suse.cz>
15726         * gimplify.c (gimplify_label_expr): Insert GIMPLE_PREDICT
15727         statements on cold and hot labels.
15728         * predict.c (tree_estimate_probability_bb): Remove the
15729         prediction from this place.
15731 2017-06-21  Martin Liska  <mliska@suse.cz>
15733         PR tree-optimization/79489
15734         * gimplify.c (maybe_add_early_return_predict_stmt): New
15735         function.
15736         (gimplify_return_expr): Call the function.
15737         * predict.c (tree_estimate_probability_bb): Remove handling
15738         of early return.
15739         * predict.def: Update comment about early return predictor.
15740         * gimple-predict.h (is_gimple_predict): New function.
15741         * predict.def: Change default value of early return to 66.
15742         * tree-tailcall.c (find_tail_calls): Skip GIMPLE_PREDICT
15743         statements.
15744         * passes.def: Put pass_strip_predict_hints to the beginning of
15745         IPA passes.
15747 2017-06-21  Pierre-Marie de Rodat  <derodat@adacore.com>
15749         * dwarf2out.c (gen_decl_die): Remove the guard to skip file-scope
15750         FUNCTION_DECL declarations.
15751         (dwarf2out_early_global_decl): Remove the guard to skip FUNCTION_DECL
15752         declarations.
15753         (dwaf2out_decl): Likewise.
15754         * godump.c (go_early_global_decl): Skip call to the real debug hook
15755         for FUNCTION_DECL declarations.
15756         * passes.c (rest_of_decl_compilation): Skip call to the
15757         early_global_decl debug hook for FUNCTION_DECL declarations, unless
15758         -fdump-go-spec is passed.
15760 2017-06-21  Marc Glisse  <marc.glisse@inria.fr>
15762         * config/i386/i386.c (struct builtin_isa): New field pure_p.
15763         Reorder for compactness.
15764         (def_builtin, def_builtin2, ix86_add_new_builtins): Handle pure_p.
15765         (def_builtin_pure, def_builtin_pure2): New functions.
15766         (ix86_init_mmx_sse_builtins) [__builtin_ia32_stmxcsr]: Mark as pure.
15768 2017-06-21  Marc Glisse  <marc.glisse@inria.fr>
15770         * match.pd (nop_convert): New predicate.
15771         ((A +- CST1) +- CST2): Allow some NOP conversions.
15773 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
15775         PR c++/81130
15776         * gimplify.c (omp_add_variable): Don't force GOVD_SEEN for types
15777         with ctors/dtors if GOVD_SHARED is set.
15779 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
15781         * config/aarch64/aarch64.md (movti_aarch64):
15782         Emit mov rather than orr.
15783         (movtf_aarch64): Likewise.
15784         * config/aarch64/aarch64-simd.md (aarch64_simd_mov):
15785         Emit mov rather than orr.
15787 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
15789         * config/aarch64/aarch64-simd.md (aarch64_simd_dup):
15790         Swap alternatives, make integer dup more expensive.
15792 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
15794         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
15795         Return true for non-tls symbols.
15797 2017-06-21  James Greenhalgh  <james.greenhalgh@arm.com>
15799         * config/aarch64/aarch64-cores.def (cortex-a55): New.
15800         (cortex-a75): Likewise.
15801         (cortex-a75.cortex-a55): Likewise.
15802         * config/aarch64/aarch64-tune.md: Regenerate.
15803         * doc/invoke.texi (-mtune): Document new values for -mtune.
15805 2017-06-21  Tom de Vries  <tom@codesourcery.com>
15807         * doc/sourcebuild.texi (Add Options, Features for dg-add-options): Add
15808         stack_size feature.
15809         (Effective-Target Keywords, Other attributes): Suggest using
15810         dg-add-options stack_size feature to get stack limit in stack_size
15811         effective target documentation.
15813 2017-06-21  Julian Brown  <julian@codesourcery.com>
15814             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
15816         * config/aarch64/aarch64-simd.md (aarch64_crypto_pmulldi)
15817         (aarch64_crypto_pmullv2di): Change type attribute to crypto_pmull.
15818         * config/aarch64/thunderx2t99.md (thunderx2t99_pmull): New
15819         reservation.
15820         * config/arm/cortex-a53.md (cortex_a53_advsimd_type): Add crypto_pmull to
15821         attribute type list for neon_multiply.
15822         * config/arm/cortex-a57.md (cortex_a57_neon_type): Add crypto_pmull to
15823         attribute type list for neon_multiply.
15824         * config/arm/crypto.md (crypto_vmullp64): Change type to crypto_pmull.
15825         * config/arm/exynos-m1.md (exynos_m1_neon_type): Add crypto_pmull to
15826         attribute type list for neon_multiply.
15827         * config/arm/types.md (crypto_pmull): Add.
15828         * config/arm/xgene1.md (xgene1_neon_pmull): Add crypto_pmull to
15829         attribute type list.
15831 2017-06-20  Andreas Tobler  <andreast@gcc.gnu.org>
15833         * config.gcc (armv6*-*-freebsd*): Change the target_cpu_cname to
15834         arm1176jzf-s.
15836 2017-06-20  Jakub Jelinek  <jakub@redhat.com>
15838         * ira-costs.c (find_costs_and_classes): Initialize cost_classes later
15839         to make sure not to dereference a NULL cost_classes_ptr pointer.
15841 2017-06-20  Carl Love  <cel@us.ibm.com>
15843         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
15844         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
15845         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
15846         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
15847         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
15848         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
15849         VMULOSW): New enum "unspec" values.
15850         (vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
15851         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
15852         altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
15853         altivec_vmulosw): New patterns.
15854         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
15855         VMULOSW): Add definitions.
15857 2017-06-20  Julia Koval  <julia.koval@intel.com>
15859         * config/i386/i386.c: Fix rounding expand for new pattern.
15860         * config/i386/subst.md: Fix pattern (parallel -> unspec).
15862 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
15864         * config/aarch64/aarch64-option-extensions.def (rcpc): New.
15865         * config/aarch64/aarch64.h (AARCH64_FL_RCPC): New.
15867 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
15869         * config/aarch64/aarch64-option-extensions.def (fp16): Fix expected
15870         feature string.
15872 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
15874         * config/aarch64/aarch64-cores.def: Rearrange to sort by
15875         architecture, then by implementer ID.
15876         * config/aarch64/aarch64-tune.md: Regenerate.
15878 2017-06-20  Richard Biener  <rguenther@suse.de>
15880         PR middle-end/81097
15881         * fold-const.c (split_tree): Fold to type before negating.
15883 2017-06-20  David Malcolm  <dmalcolm@redhat.com>
15885         * diagnostic-show-locus.c
15886         (selftest::test_fixit_deletion_affecting_newline): New function.
15887         (selftest::diagnostic_show_locus_c_tests): Call it.
15889 2017-06-20  Andreas Schwab  <schwab@suse.de>
15891         PR target/80970
15892         * config/m68k/m68k.md (bsetdreg, bchgdreg, bclrdreg): Use "=d"
15893         instead of "+d".
15895 2017-06-20  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
15897         * config/arm/arm-c.c (arm_cpu_builtins): New block to define
15898         __ARM_FEATURE_COPROC according to support.
15900 2017-06-20  Jakub Jelinek  <jakub@redhat.com>
15902         * tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
15903         Rewritten to avoid overflow for > 32-bit pointers.
15905         PR sanitizer/81125
15906         * ubsan.h (ubsan_encode_value): Workaround buggy clang++ parser
15907         by removing enum keyword.
15908         (ubsan_type_descriptor): Likewise.  Formatting fix.
15910         PR target/81121
15911         * config/i386/i386.md (TARGET_USE_VECTOR_CONVERTS float si->{sf,df}
15912         splitter): Require TARGET_SSE2 in the condition.
15914 2017-06-20  Michael Meissner  <meissner@linux.vnet.ibm.com>
15916         PR target/79799
15917         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Add support
15918         for doing vector set of SFmode on ISA 3.0.
15919         * config/rs6000/vsx.md (vsx_set_v4sf_p9): Likewise.
15920         (vsx_set_v4sf_p9_zero): Special case setting 0.0f to a V4SF
15921         element.
15922         (vsx_insert_extract_v4sf_p9): Add an optimization for inserting a
15923         SFmode value into a V4SF variable that was extracted from another
15924         V4SF variable without converting the element to double precision
15925         and back to single precision vector format.
15926         (vsx_insert_extract_v4sf_p9_2): Likewise.
15928 2017-06-19  Jakub Jelinek  <jakub@redhat.com>
15930         * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Multiply
15931         in UWHI to avoid undefined overflow.
15933         PR sanitizer/81125
15934         * ubsan.h (enum ubsan_encode_value_phase): New.
15935         (ubsan_encode_value): Change second argument to
15936         enum ubsan_encode_value_phase with default value of
15937         UBSAN_ENCODE_VALUE_GENERIC.
15938         * ubsan.c (ubsan_encode_value): Change second argument to
15939         enum ubsan_encode_value_phase PHASE from bool IN_EXPAND_P,
15940         adjust uses, for UBSAN_ENCODE_VALUE_GENERIC use just
15941         create_tmp_var_raw instead of create_tmp_var and use a
15942         TARGET_EXPR.
15943         (ubsan_expand_bounds_ifn, ubsan_build_overflow_builtin,
15944         instrument_bool_enum_load, ubsan_instrument_float_cast): Adjust
15945         ubsan_encode_value callers.
15947         PR sanitizer/81111
15948         * ubsan.c (ubsan_encode_value): If current_function_decl is NULL,
15949         use create_tmp_var_raw instead of create_tmp_var, mark it addressable
15950         just by setting TREE_ADDRESSABLE on the result and use a TARGET_EXPR.
15952 2017-06-19  Richard Biener  <rguenther@suse.de>
15954         PR middle-end/81118
15955         * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Clear niter
15956         estimates if we changed anything.
15958 2017-06-19  Richard Biener  <rguenther@suse.de>
15960         PR tree-optimization/80887
15961         * tree-ssa-sccvn.c (mprts_hook_cnt): New global.
15962         (vn_lookup_simplify_result): Allow only mprts_hook_cnt succesful
15963         simplified lookups, then reset mprts_hook.
15964         (vn_nary_build_or_lookup_1): Set mprts_hook_cnt to 9 before
15965         simplifying.
15966         (try_to_simplify): Likewise.
15968 2017-06-19  Martin Liska  <mliska@suse.cz>
15970         PR sanitizer/80879
15971         * gimplify.c (gimplify_switch_expr):
15972         Initialize live_switch_vars for SWITCH_BODY == STATEMENT_LIST.
15974 2017-06-19  Martin Liska  <mliska@suse.cz>
15976         * doc/install.texi: Document that PGO runs in 4 stages.
15978 2017-06-19  Martin Liska  <mliska@suse.cz>
15980         PR ipa/80732
15981         * attribs.c (make_dispatcher_decl): Do not append '.ifunc'
15982         to dispatcher function name.
15983         * multiple_target.c (replace_function_decl): New function.
15984         (create_dispatcher_calls): Redirect both edges and references.
15986 2017-06-19  Jan Hubicka <hubicka@ucw.cz>
15988         * profile-count.c (profile_count::dump): Dump quality.
15989         (profile_count::differs_from_p): Update for unsigned val.
15990         * profile-count.h (profile_count_quality): New enum.
15991         (profile_count): Turn m_val to 62bit unsigned, add quality tracking.
15993 2017-06-19  Richard Biener  <rguenther@suse.de>
15995         * tree-ssa-loop-niter.h (estimate_numbers_of_iterations): Take
15996         struct function as arg.
15997         (estimate_numbers_of_iterations): Export overload with loop arg.
15998         (free_numbers_of_iterations_estimates_loop): Use an overload of
15999         free_numbers_of_iterations_estimates instead.
16000         * tree-cfg.c (remove_bb): Adjust.
16001         * tree-cfgcleanup.c (remove_forwarder_block_with_phi): Likewise.
16002         * tree-parloops.c (gen_parallel_loop): Likewise.
16003         * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables):
16004         Likewise.
16005         (tree_unroll_loops_completely): Likewise.
16006         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop):
16007         Use an overload instead and export.
16008         (estimated_loop_iterations): Adjust.
16009         (max_loop_iterations): Likewise.
16010         (likely_max_loop_iterations): Likewise.
16011         (estimate_numbers_of_iterations): Take struct function as arg
16012         and adjust.
16013         (loop_exits_before_overflow): Adjust.
16014         (free_numbers_of_iterations_estimates_loop): Use an overload.
16015         * tree-vect-loop.c (vect_analyze_loop_form): Adjust.
16016         * tree-vectorizer.c (vect_free_loop_info_assumptions): Likewise.
16018 2017-06-19  Richard Biener  <rguenther@suse.de>
16020         PR ipa/81112
16021         * ipa-prop.c (find_constructor_constant_at_offset): Handle
16022         RANGE_EXPR conservatively.
16024 2017-06-16  Carl Love  <cel@us.ibm.com>
16026         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
16027         definitions for vec_float, vec_float2, vec_floato,
16028         vec_floate built-ins.
16029         * config/rs6000/vsx.md (define_c_enum "unspec"): Add RTL code
16030         for instructions vsx_xvcvsxws vsx_xvcvuxwsp, float2, floato and
16031         floate.
16032         * config/rs6000/rs6000-builtin.def (FLOAT2_V2DI, FLOATE_V2DF,
16033         FLOATE_2DI, FLOATO_V2DF, FLOATEE_V2DI, XVCVSXWSP_V4SF,
16034         UNS_FLOATO_V2DI, UNS_FLOATE_V2DI): Add definitions.
16035         * config/altivec.md (define_insn "p8_vmrgew_<mode>",
16036         define_mode_attr VF_sxddp): Add V4SF type to p8_vmrgew.
16037         * config/rs6000/altivec.h (vec_float, vec_float2, vec_floate,
16038         vec_floato): Add builtin defines.
16039         * doc/extend.texi (vec_float, vec_float2, vec_floate, vec_floato):
16040         Update the built-in documentation file for the new built-in
16041         functions.
16043 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16045         * config/arm/arm.opt (marm): Mark as the negative of of -mthumb.
16046         (mthumb): Mark as the negative of -marm.
16048 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16050         * doc/invoke.texi (ARM Options, -mcpu): Document supported
16051         extension options.
16052         (ARM Options, -mtune): Document that this accepts the same
16053         extension options as -mcpu.
16054         (ARM Options, -mfpu): Document addition of -mfpu=auto.
16056 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16058         * doc/invoke.texi (ARM Options, -march=): Document new syntax and
16059         permitted extensions.
16061 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16063         * config/arm/arm-cpus.in (armv7): Add extension +nofp.
16064         (armv7-r): Add aliases vfpv3xd and vfpv3-d16.
16065         (armv8-m.main): Add option +nodsp.
16066         * config/arm/arm-cpu-cdata.h: Regenerated.
16068 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16070         * config/arm/t-fuchsia: New file.
16071         * config.gcc (arm*-*-fuchsia*): Use it.
16073 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16075         * config/arm/t-symbian: Rewrite for new option infrastructure.
16077 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16079         * config/arm/t-phoenix (MULTILIB_REUSE): Clear variable.
16080         (MULTILIB_REQUIRED): Likewise.
16082 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16084         * config/arm/t-linux-eabi (MULTILIB_EXCEPTIONS): Set to empty.
16085         (MULTILIB_RESUE): Likewise.
16086         (MULTILIB_MATCHES): Likewise.
16087         (MULTLIB_REQUIRED): Likewise.
16089 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16091         * config/arm/t-rtems: Rewrite for new option framework.
16093 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16095         * config/arm/t-aprofile (v7_a_nosimd_variants, v7_a_simd_variants)
16096         (v7ve_nosimd_variatns, v7ve_vfpv3_simd_variants)
16097         (v7ve_vfpv4_simd_variants, v8_a_nosimd_variants, v8_a_simd_variants)
16098         (v8_1_a_simd_variants, v8_2_a_simd_variants): Move to ...
16099         * config/arm/t-multilib: ... here.
16100         (MULTILIB_OPTIONS): Add armv7 and armv7+fp architectures.
16101         (MULTILIB_MATCHES): Use armv7 libraries for armv7-r.  Also use for
16102         armv7-a and armv8*-a when A-profile libraries have not been built.
16103         * config/arm/t-rmprofile: Rewrite.
16105 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16107         * genmultilib (multilib_reuse): Allow an explicit period to be escaped
16108         with a backslash.  Remove the backslash after substituting unescaped
16109         periods.
16110         * doc/fragments.texi (MULTILIB_REUSE): Document it.
16112 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16114         * config.gcc: (arm*-*-*): When building a-profile libraries, force
16115         the driver to pass through the default setting of -mfloat-abi.
16116         * common/config/arm/arm-common.c (arm_target_thumb_only): Return -marm
16117         rather than NULL.
16118         * config/arm/t-multilib (MULTILIB_REUSE): Initialize to empty.
16119         (all_feat_combs): New rule.
16120         (MULTILIB_OPTIONS): Use explicit ARM and Thumb directories.  Rework
16121         default libraries.
16122         * config/arm/t-aprofile: Rewrite.
16124 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16126         * config/arm/arm.h (FPUTYPE_AUTO): Define.
16127         * config/arm/arm.c (arm_option_override): Use FPUTYPE_AUTO if the
16128         fpu is not specified by the user/command-line.
16129         * config/arm/bpabi.h (FPUTYPE_DEFAULT): Delete.
16130         * config/arm/netbsd-elf.h (FPUTYPE_DEFAULT): Delete.
16131         * config/arm/linux-elf.h (FPUTYPE_DEFAULT): Delete.
16132         * config/arm/vxworks.h (FPUTYPE_DEFAULT): Delete.
16133         * common/config/arm/arm-common.c (arm_canon_arch_option): Use
16134         FPUTYPE_AUTO insted of FPUTYPE_DEFAULT.
16136 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16138         * config/arm/elf.h (MULTILIB_DEFAULTS): Delete.
16139         * config/arm/t-arm-elf: Rewritten.
16141 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16143         * config/arm/arm.h (TARGET_HARD_FLOAT): Also check that we
16144         have some floating-point instructions.
16145         (TARGET_SOFT_FLOAT): Define as inverse of TARGET_HARD_FLOAT.
16146         (TARGET_MAYBE_HARD_FLOAT): New macro.
16147         * config/arm/arm-builtins.c (arm_init_builtins): Use
16148         TARGET_MAYBE_HARD_FLOAT.
16149         * config/arm/arm.c (arm_option_override): Use TARGET_HARD_FLOAT_ABI.
16151 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16153         * common/config/arm/arm-common.c: Define INCLUDE_LIST.
16154         (configargs.h): Include it.
16155         (arm_print_hint_for_fpu_option): New function.
16156         (arm_parse_fpu_option): New function.
16157         (candidate_extension): New class.
16158         (arm_canon_for_multilib): New function.
16159         * config/arm/arm.h (CANON_ARCH_SPEC_FUNCTION): New macro.
16160         (EXTRA_SPEC_FUNCTIONS): Add CANON_ARCH_SPEC_FUNCTION.
16161         (ARCH_CANONICAL_SPECS): New macro.
16162         (DRIVER_SELF_SPECS): Add ARCH_CANONICAL_SPECS.
16164 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16166         * config.gcc (arm*-*-*): Ensure both target_cpu_cname and with_cpu
16167         are set after handling multilib fragments.  Set target_cpu_default2
16168         from with_cpu.
16170 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16172         * config.gcc (arm*-*-fucshia*): Set target_cpu_cname to the real
16173         cpu name.
16174         (arm*-*-*): Set target_cpu_default2 to a quoted string.
16175         * config/arm/parsecpu.awk (check_cpu): Validate any extension
16176         options.
16177         (check_arch): Likewise.
16178         * config/arm/arm.c (arm_configure_build_target): Handle
16179         TARGET_CPU_DEFAULT being a string constant.  Scan any feature
16180         options in the default.
16182 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16184         * config/arm/arm-protos.h (cpu_arch_extension): Add field to record
16185         when an option is an alias of another.
16186         * config/arm/parsecpu.awk (optalias): New parser token.
16187         (gen_comm_data): Mark non-alias options as such.  Emit entries
16188         for extension aliases.
16189         * config/arm/arm-cpus.in (armv5e): Make vfpv2 an alias.
16190         (armv5te, armv5tej, armv6, armv6j, armv6k, armv6z): Likewise.
16191         (armv6kz, armv6zk, armv6t2): Likewise.
16192         (armv7): Make vfpv3-d16 an alias.
16193         (armv7-a): Make vfpv3-d16, neon and neon-vfpv3 aliases.  Sort in
16194         canonical order.
16195         (armv7ve): Make vfpv4-d16, neon-vfpv3 and neon-vfpv4 aliases.
16196         Sort in canonical order.
16197         (armv8-a): Sort in canonical order.
16198         (armv8.1-a, armv8.2-a):  Likewise.
16199         (generic-armv7-a): Make neon and neon-vfpv3 aliases.  Sort in
16200         canonical order.
16201         (cortex-a9): Sort in canonical order.
16202         * config/arm/arm.c (selftests.h): Include it.
16203         (arm_test_cpu_arch_data): New function.
16204         (arm_run_self_tests): New function.
16205         (TARGET_RUN_TARGET_SELFTESTS): Redefine.
16206         (targetm): Move declaration to the end of the file.
16207         * arm-cpu-cdata.h: Regenerated.
16209 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16211         * config/arm/arm.h (TARGET_MODE_SPECS): Add additional parameter to
16212         call to target_mode_check describing the type of option passed.
16213         * common/config/arm/arm-common.c (arm_arch_core_flag): Delete.
16214         (arm_target_thumb_only): Use arm_parse_arch_option_name or
16215         arm_parse_cpu_option_name to match parameters against list of
16216         available targets.
16217         * config/arm/parsecpu.awk (gen_comm_data): Don't generate
16218         arm_arch_core_flags data structure.
16219         * config/arm/arm-cpu_cdata.h: Regenerated.
16221 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16223         * common/config/arm/arm-common.c (arm_initialize_isa): Moved here from
16224         config/arm/arm.c.
16225         (arm_print_hint_for_cpu_option): Likewise.
16226         (arm_print_hint_for_arch_option): Likewise.
16227         (arm_parse_cpu_option_name): Likewise.
16228         (arm_parse_arch_option_name): Likewise.
16229         * config/arm/arm.c (arm_identify_fpu_from_isa): Use the computed number
16230         of entries in the all_fpus list.
16231         * config/arm/arm-protos.h (all_architectures, all_cores): Declare.
16232         (arm_parse_cpu_option_name): Declare.
16233         (arm_parse_arch_option_name): Declare.
16234         (arm_parse_option_features): Declare.
16235         (arm_intialize_isa): Declare.
16236         * config/arm/parsecpu.awk (gen_data): Move CPU and architecture
16237         data tables to ...
16238         (gen_comm_data): ... here.  Make definitions non-static.
16239         * config/arm/arm-cpu-data.h: Regenerated.
16240         * config/arm/arm-cpu-cdata.h: Regenerated.
16242 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16244         * config/arm/arm-protos.h (arm_build_target): Remove arch_core.
16245         (cpu_arch_extension): New structure.
16246         (cpu_arch_option, arch_option, cpu_option): New structures.
16247         * config/arm/parsecpu.awk (gen_headers): Build an enumeration of
16248         architecture types.
16249         (gen_data): Generate new format data tables.
16250         * config/arm/arm.c (cpu_tune): New structure.
16251         (cpu_option, processors): Delete.
16252         (arm_print_hint_for_core_or_arch): Delete.  Replace with ...
16253         (arm_print_hint_for_cpu_option): ... this and ...
16254         (arm_print_hint_for_arch_option): ... this.
16255         (arm_parse_arch_cpu_name): Delete.  Replace with ...
16256         (arm_parse_cpu_option_name): ... this and ...
16257         (arm_parse_arch_option_name): ... this.
16258         (arm_unrecognized_feature): Change type of target parameter to
16259         cpu_arch_option.
16260         (arm_parse_arch_cpu_features): Delete.  Replace with ...
16261         (arm_parse_option_features): ... this.
16262         (arm_configure_build_target): Rework to use new configuration data
16263         tables.
16264         (arm_print_tune_info): Rework for new configuration data tables.
16265         * config/arm/arm-cpu-data.h: Regenerated.
16266         * config/arm/arm-cpu.h: Regenerated.
16268 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16270         * Makefile.in (OBJS): Move sbitmap.o from here ...
16271         (OBJS-libcommon): ... to here.
16273 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16275         * config/arm/arm-isa.h (ISA_ALL_FPU_INTERNAL): Renamed from ISA_ALL_FPU.
16276         (ISA_ALL_CRYPTO): New macro.
16277         (ISA_ALL_SIMD): New macro
16278         (ISA_ALL_FP): New macro.
16279         * config/arm/arm.c (fpu_bitlist): Update initializer.
16280         * config/arm/arm-cpus.in: Use new ISA_ALL macros to disable crypto,
16281         simd or fp.
16282         (arm9e): Add fpu.  Add option for nofp
16283         (arm946e-s, arm966e-s, arm968e-s, arm10e, arm1020e, arm1022e): Likewise.
16284         (arm926ej-s, arm1026ej-s): Likewise.
16285         (generic-armv7-a): Add fpu.  Add options for simd, vfpv3, vfpv3-d16,
16286         vfpv3-fp16, vfpv3-d16-fp16, vfpv4, vfpv4-d16, neon, neon-vfp3,
16287         neon-fp16, neon-vfpv4, nofp and nosimd.
16288         (cortex-a5, cortex-a7): Add fpu.  Add options for nosimd and nofp.
16289         (cortex-a8): Add fpu.  Add option for nofp.
16290         (cortex-a9): Add fpu.  Add options for nosimd and nofp.
16291         (cortex-a12, cortex-a15, cortex-a17): Add fpu.  Add option for nofp.
16292         (cortex-r4f): Add fpu.
16293         (cortex-r5): Add fpu.  Add options for nofp.dp and nofp.
16294         (cortex-r7): Use idiv option from architecture.  Add fpu.  Add option
16295         for nofp.
16296         (cortex-r8): Likewise.
16297         (cortex-m4): Add fpu.  Add option for nofp.
16298         (cortex-a15.cortex-a7): Add fpu.  Add option for nofp.
16299         (cortex-a17.cortex-a7): Likewise.
16300         (cortex-a32): Add fpu.  Add options for crypto and nofp.
16301         (cortex-a35, cortex-a53): Likewise.
16302         (cortex-a57): Add fpu.  Add option for crypto.
16303         (cortex-a72, cortex-a73): Likewise.
16304         (exynos-m1): Likewise.
16305         (cortex-a57.cortex-a53, cortex-a72.cortex-a53): Likewise.
16306         (cortex-a73.cortex-a35, cortex-a73.cortex-a53): Likewise.
16307         (cortex-m33): Add fpu.  Add option for nofp.
16308         * config/arm/arm-cpu-cdata.h: Regenerated
16309         * config/arm/arm-cpu-data.h: Regenerated.
16311 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16313         * arm-cpus.in (armv5e): Add options fp, vfpv2 and nofp.
16314         (armv5te, armv5tej): Likewise.
16315         (armv6, armv6j, armv6k, armv6z, armv6kz, armv6zk, armv6t2): Likewise.
16316         (armv7): Add options fp and vfpv3-d16.
16317         (armv7-a): Add options fp, simd, vfpv3, vfpv3-d16, vfpv3-d16-fp16,
16318         vfpv3-fp16, vfpv4, vfpv4-d16, neon, neon-vfpv3, neon-fp16, neon-vfpv4,
16319         nofp and nosimd.
16320         (armv7ve): Likewise.
16321         (armv7-r): Add options fp, fp.sp, idiv, nofp and noidiv.
16322         (armv7e-m): Add options fp, fpv5, fp.dp and nofp.
16323         (armv8-a): Add nocrypto option.
16324         (armv8.1-a, armv8.2-a): Likewise.
16325         (armv8-m.main): add options fp, fp.dp and nofp.
16327 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16329         * config/arm/arm-cpus.in (armv8-a): Add options crc, simd crypto and
16330         nofp.
16331         (armv8-a+crc): Delete.
16332         (armv8.1-a): Add options simd, crypto and nofp.
16333         (armv8.2-a): Add options fp16, simd, crypto and nofp.
16334         (armv8.2-a+fp16): Delete.
16335         (armv8-m.main): Add option dsp.
16336         (armv8-m.main+dsp): Delete.
16337         (cortex-a8): Add fpu.  Add nofp option.
16338         (cortex-a9): Add fpu.  Add nofp and nosimd options.
16339         * config/arm/parsecpu.awk (gen_data): Generate option tables and
16340         link to main cpu and architecture data structures.
16341         (gen_comm_data): Only put isa attributes from the main architecture
16342         in common tables.
16343         (option): New statement for architecture and CPU entries.
16344         * arm.c (struct cpu_option): New structure.
16345         (struct processors): Add entry for options.
16346         (arm_unrecognized_feature): New function.
16347         (arm_parse_arch_cpu_name): Ignore any characters after the first
16348         '+' character.
16349         (arm_parse_arch_cpu_feature): New function.
16350         (arm_configure_build_target): Separate out any CPU and architecture
16351         features and parse separately.  Don't error out if -mfpu=auto is
16352         used with only an architecture string.
16353         (arm_print_asm_arch_directives): New function.
16354         (arm_file_start): Call it.
16355         * config/arm/arm-cpu-cdata.h: Regenerated.
16356         * config/arm/arm-cpu-data.h: Likewise.
16357         * config/arm/arm-tables.opt: Likewise.
16359 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16361         * config/arm/elf.h (ASM_SPEC): Only pass -mfpu through to the
16362         assembler when it is not -mfpu=auto.
16364 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16366         * config/arm/arm.h (BIG_LITTLE_SPEC): Delete macro.
16367         (ASM_REWRITE_SPEC_FUNCTIONS): New macro.
16368         (BIG_LITTLE_CPU_SPEC_FUNCTIONS): Delete macro.
16369         (ASM_CPU_SPEC): Rewrite.
16370         (MCPU_MTUNE_NATIVE_FUNCTIONS): New macro.
16371         (EXTRA_SPEC_FUNCTIONS): Move outside of ifdef.  Use
16372         MCPU_MTUNE_NATIVE_FUNCTIONS and ASM_REWRITE_SPEC_FUNCTIONS.  Remove
16373         reference to BIG_LITTLE_CPU_SPEC_FUNCTIONS.
16374         * common/config/arm/arm-common.c (arm_rewrite_selected_cpu): Ensure
16375         copied string is NUL-terminated.  Also strip any characters prefixed
16376         by '+'.
16377         (arm_rewrite_selected_arch): New function.
16378         (arm_rewrite_march): New function.
16380 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
16382         * config/arm/arm.opt (x_arm_arch_string): New TargetSave option.
16383         (x_arm_cpu_string, x_arm_tune_string): Likewise.
16384         (march, mcpu, mtune): Convert to string-based options.
16385         * config/arm/arm.c (arm_print_hint_for_core_or_arch): New function.
16386         (arm_parse_arch_cpu_name): New function.
16387         (arm_configure_build_target): Use arm_parse_arch_cpu_name to
16388         identify selected architecture or CPU.
16389         (arm_option_save): New function.
16390         (TARGET_OPTION_SAVE): Redefine.
16391         (arm_option_restore): Restore string options.
16392         (arm_option_print): Print string options.
16394 2017-06-16  Martin Sebor  <msebor@redhat.com>
16396         PR tree-optimization/80933
16397         PR tree-optimization/80934
16398         * builtins.c (fold_builtin_3): Do not handle bcmp here.
16399         * gimple-fold.c (gimple_fold_builtin_bcmp): New function.
16400         (gimple_fold_builtin_bcopy, gimple_fold_builtin_bzero): Likewise.
16401         (gimple_fold_builtin): Call them.
16403 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
16405         * gimple-ssa-isolate-paths.c (isolate_path): Set edge leading to path
16406         as unlikely; update profile.
16408 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
16410         * predict.c (force_edge_cold): Handle declaring edges impossible
16411         more aggresively.
16413 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
16415         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update
16416         profile.
16417         (try_unroll_loop_completely): Fix reporting.
16419 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
16421         * tree-ssa-tail-merge.c (replace_block_by): Fix profile updating.
16423 2017-06-16  James Greenhalgh  <james.greenhalgh@arm.com>
16425         PR target/71778
16426         * config/arm/arm-builtins.c (arm_expand_builtin_args): Return TARGET
16427         if given a non-constant argument for an intrinsic which requires a
16428         constant.
16430 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
16432         * profile.c (compare_freqs): New function.
16433         (branch_prob): Sort edge list.
16434         (find_spanning_tree): Assume that the list is priority sorted.
16436 2017-06-16  Richard Biener  <rguenther@suse.de>
16438         PR tree-optimization/81090
16439         * passes.def (pass_record_bounds): Remove.
16440         * tree-pass.h (make_pass_record_bounds): Likewise.
16441         * tree-ssa-loop.c (pass_data_record_bounds, pass_record_bounds,
16442         make_pass_record_bounds): Likewise.
16443         * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables): Do
16444         not free niter estimates at the beginning but at the end.
16445         * tree-scalar-evolution.c (scev_finalize): Free niter estimates.
16447 2017-06-16  Richard Biener  <rguenther@suse.de>
16449         * tree-switch-conversion.c (emit_case_bit_tests): Adjust
16450         initializer to workaround ICE in host GCC 4.8.
16452 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
16454         * ipa-inline-transform.c (update_noncloned_frequencies): Update also
16455         counts.
16456         (clone_inlined_nodes): Update.
16458 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
16460         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune): Update
16461         prefetch settings, and enable prefetching by default at -O3.
16463 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
16465         * config/aarch64/aarch64.c (aarch64_override_options_internal):
16466         Set flag_prefetch_loop_arrays according to tuning data.
16468 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
16470         * config/aarch64/aarch64-protos.h (struct cpu_prefetch_tune):
16471         New tune structure.
16472         (struct tune_params): Use cpu_prefetch_tune instead of cache_line_size.
16473         [Unrelated to main purpose of the patch] Place the pointer field last
16474         to enable type checking errors when tune structure are wrongly merged.
16475         * config/aarch64/aarch64.c (generic_prefetch_tune,)
16476         (exynosm1_prefetch_tune, qdf24xx_prefetch_tune,)
16477         (thunderx2t99_prefetch_tune): New tune constants.
16478         (tune_params *_tunings): Update all tunings (no functional change).
16479         (aarch64_override_options_internal): Set PARAM_SIMULTANEOUS_PREFETCHES,
16480         PARAM_L1_CACHE_SIZE, PARAM_L1_CACHE_LINE_SIZE, and PARAM_L2_CACHE_SIZE
16481         from tunings structures.
16483 2017-06-16  Jakub Jelinek  <jakub@redhat.com>
16485         PR sanitizer/81094
16486         * ubsan.c (instrument_null): Add T argument, use it instead
16487         of computing it based on IS_LHS.
16488         (instrument_object_size): Likewise.
16489         (pass_ubsan::execute): Adjust instrument_null and
16490         instrument_object_size callers to pass gimple_get_lhs or
16491         gimple_assign_rhs1 result to it.  Use instrument_null instead of
16492         calling get_base_address and instrument_mem_ref.  Handle
16493         aggregate call arguments for object-size sanitization.
16495 2017-06-16  Yury Gribov  <tetra2005@gmail.com>
16497         PR tree-optimization/81089
16498         * tree-vrp.c (is_masked_range_test): Validate operands of
16499         subexpression.
16501 2017-06-15  Martin Sebor  <msebor@redhat.com>
16503         PR c++/80560
16504         * dumpfile.c (dump_register): Avoid calling memset to initialize
16505         a class with a default ctor.
16506         * gcc.c (struct compiler): Remove const qualification.
16507         * genattrtab.c (gen_insn_reserv): Replace memset with initialization.
16508         * hash-table.h: Ditto.
16509         * ipa-cp.c (allocate_and_init_ipcp_value): Replace memset with
16510           assignment.
16511         * ipa-prop.c (ipa_free_edge_args_substructures): Ditto.
16512         * omp-low.c (lower_omp_ordered_clauses): Replace memset with
16513         default ctor.
16514         * params.h (struct param_info): Make struct members non-const.
16515         * tree-switch-conversion.c (emit_case_bit_tests): Replace memset
16516         with default initialization.
16517         * vec.h (vec_copy_construct, vec_default_construct): New helper
16518         functions.
16519         (vec<T>::copy, vec<T>::splice, vec<T>::reserve): Replace memcpy
16520         with vec_copy_construct.
16521         (vect<T>::quick_grow_cleared): Replace memset with default ctor.
16522         (vect<T>::vec_safe_grow_cleared, vec_safe_grow_cleared): Same.
16523         * doc/invoke.texi (-Wclass-memaccess): Document.
16525 2017-06-15  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16527         * emit-rtl.h (is_leaf): Update comment about local
16528         register allocator.
16530 2017-06-15  Jozef Lawrynowicz   <jozef.l@somniumtech.com>
16532         PR target/78818
16533         * config/msp430/msp430.c (msp430_data_attr): Check that it's possible
16534         for a variable to have a section before checking if the section has a
16535         name.
16536         Set section to.persistent if persistent attribute is set.
16537         Warn if .persistent attribute is used on an automatic variable.
16539 2017-06-15  Eric Botcazou  <ebotcazou@adacore.com>
16541         PR rtl-optimization/80474
16542         * reorg.c (update_block): Do not ignore instructions in a delay slot.
16544 2017-06-15  Segher Boessenkool  <segher@kernel.crashing.org>
16546         * config/rs6000/rs6000.md (add<mode>3): Use reg_or_subregno instead
16547         of REGNO.
16549 2017-06-14  Maciej W. Rozycki  <macro@imgtec.com>
16551         * config/mips/mips.md (MIPS16_T_REGNUM): Remove constant.
16552         (casesi): Emit bounds checking as RTL.
16553         (casesi_internal_mips16_<mode>): Remove bounds checking.
16555 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
16557         * config/xtensa/xtensa.c (xtensa_option_override): Append
16558         MASK_CONST16 to target_flags in the absence of TARGET_L32R.
16559         (hwloop_optimize, hwloop_fail, hwloop_pattern_reg,
16560          xtensa_doloop_hooks): Define unconditionally.
16561         (xtensa_reorg_loops): Only call reorg_loops in the presence of
16562         TARGET_LOOPS.
16563         * config/xtensa/xtensa.h (TARGET_L32R): New definition.
16564         (TARGET_DEFAULT): Remove XCHAL_HAVE_L32R condition and account
16565         for it in xtensa_option_override.
16566         (HARD_FRAME_POINTER_IS_FRAME_POINTER,
16567          HARD_FRAME_POINTER_IS_ARG_POINTER): New definitions.
16569 2017-06-14  Boris Kolpackov  <boris@codesynthesis.com>
16571         * doc/cppopts.texi: Document '-' special value to -MF.
16573 2017-06-14  Wilco Dijkstra  <wdijkstr@arm.com>
16575         * config/arm/cortex-a53.md (cortex_a53_fpalu) Adjust latency.
16576         (cortex_a53_fconst): Likewise.
16577         (cortex_a53_fpmul): Likewise.
16578         (cortex_a53_f_load_64): Likewise.
16579         (cortex_a53_f_load_many): Likewise.
16580         (cortex_a53_advsimd_alu): Likewise.
16581         (cortex_a53_advsimd_alu_q): Likewise.
16582         (cortex_a53_advsimd_mul): Likewise.
16583         (cortex_a53_advsimd_mul_q): Likewise.
16584         (fpmac bypass): Add new bypass for fpmac-fpmac case.
16585         Add missing fmul, r2f_cvt and fconst cases.
16587 2017-06-14  Richard Biener  <rguenther@suse.de>
16589         PR middle-end/81088
16590         * fold-const.c (split_tree): Drop TREE_OVERFLOW flag from
16591         literal constants.
16592         (fold_binary_loc): When associating do not treat pre-existing
16593         TREE_OVERFLOW on literal constants as a reason to allow
16594         TREE_OVERFLOW on associated literal constants.
16596 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
16598         * config/sparc/sparc.h (MASK_ISA): Add MASK_LEON and MASK_LEON3.
16599         (MASK_FEATURES): New macro.
16600         * config/sparc/sparc.c (sparc_option_override): Remove the special
16601         handling of -mfpu and generalize it to all MASK_FEATURES switches.
16603 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
16605         * simplify-rtx.c (simplify_binary_operation_1) <UDIV>: Do not simplify
16606         a division of 0 if non-call exceptions are enabled.
16608 2017-06-14  Andrew Pinski  <apinski@cavium.com>
16609             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
16611         PR target/71663
16612         * config/aarch64/aarch64.c (aarch64_expand_vector_init):
16613         Improve vector initialization code gen for only variable case.
16615 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
16617         * config/sparc/driver-sparc.c (cpu_names): Add SPARC-T5 entry.
16619 2017-06-14  Richard Biener  <rguenther@suse.de>
16621         PR tree-optimization/81083
16622         * tree-ssa-sccvn.c (vn_reference_lookup_3): Do not use abnormals
16623         as values.
16625 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16627         * config/rs6000/rs6000.c: Update all comments that mentioned SPE.
16628         (rs6000_expand_builtin): Remove RS6000_BTC_EVSEL.
16629         * config/rs6000/rs6000.h (RS6000_BTC_EVSEL): Delete.
16630         * config/rs6000/vxworks.h (VXCPU_FOR_8548): Delete.  Adjust former use.
16631         * config/rs6000/vxworksae.h (VXCPU_FOR_8548): Delete.
16632         * config/rs6000/vxworksmils.h (VXCPU_FOR_8548): Delete.
16634 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16636         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete VECTOR_SPE.
16637         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete VECTOR_SPE.
16639 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16641         * config/rs6000/rs6000.h (FIXED_SCRATCH): Delete.
16643 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16645         * config/rs6000/t-rtems: Don't handle SPE.
16647 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16649         * config/rs6000/t-linux: Don't handle SPE.
16651 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16653         * config/rs6000/eabispe.h: Delete file.
16655 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16657         * config/rs6000/t-spe: Delete file.
16659 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16661         * config/rs6000/rs6000.c (SPE_CONST_OFFSET_OK): Delete.
16662         (rs6000_legitimate_offset_address_p): Return false for anything in
16663         V2SImode or V2SFmode.
16665 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
16667         * config/rs6000/rs6000-modes.def: Remove all 8-byte vector modes
16668         except V2SF and V2SI.  Rearrange the vector modes, and add comments.
16669         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove V8QImode
16670         and V4HImode.
16671         (reg_offset_addressing_ok_p): Remove V4HImode and V1DImode.
16672         (rs6000_legitimate_offset_address_p): Ditto.
16673         (rs6000_emit_move): Ditto.
16674         (rs6000_init_builtins): Remove V4HI_type_node.
16676 2017-06-13  Martin Liska  <mliska@suse.cz>
16678         PR sanitize/78204
16679         * asan.c (asan_sanitize_stack_p): Use sanitize_flags_p.
16680         (gate_asan): Likewise.
16681         * asan.h (asan_no_sanitize_address_p): Remove the function.
16682         (sanitize_flags_p): New function.
16683         * builtins.def: Fix coding style.
16684         * common.opt: Use renamed enum value.
16685         * convert.c (convert_to_integer_1): Use sanitize_flags_p.
16686         * doc/extend.texi: Document no_sanitize attribute.
16687         * flag-types.h (enum sanitize_code): Rename SANITIZE_NONDEFAULT
16688         to SANITIZE_UNDEFINED_NONDEFAULT.
16689         * gcc.c (sanitize_spec_function): Use the renamed enum value.
16690         * gimple-fold.c (optimize_atomic_compare_exchange_p):
16691         Use sanitize_flags_p.
16692         * gimplify.c (gimplify_function_tree): Likewise.
16693         * ipa-inline.c (sanitize_attrs_match_for_inline_p): Likewise.
16694         * opts.c (parse_no_sanitize_attribute): New function.
16695         (common_handle_option): Use renamed enum value.
16696         * opts.h (parse_no_sanitize_attribute): Declare.
16697         * tree.c (sanitize_flags_p): New function.
16698         * tree.h: Declared here.
16699         * tsan.c: Use sanitize_flags_p.
16700         * ubsan.c (ubsan_expand_null_ifn): Likewise.
16701         (instrument_mem_ref): Likewise.
16702         (instrument_bool_enum_load): Likewise.
16703         (do_ubsan_in_current_function): Remove the function.
16704         (pass_ubsan::execute): Use sanitize_flags_p.
16705         * ubsan.h: Remove do_ubsan_in_current_function
16706         * tree-cfg.c (print_no_sanitize_attr_value): New function.
16707         (dump_function_to_file): Use it here.
16709 2017-06-13  Martin Jambor  <mjambor@suse.cz>
16711         PR tree-optimization/80803
16712         PR tree-optimization/81063
16713         * tree-sra.c (subtree_mark_written_and_enqueue): Move up in the file.
16714         (propagate_subaccesses_across_link): Enqueue subtree whenever
16715         necessary instead of relying on the caller.
16717 2017-06-13  Martin Jambor  <mjambor@suse.cz>
16719         * tree-sra.c (add_access_to_work_queue): Only enqueue accesses
16720         that have a first_link.
16721         (sort_and_splice_var_accesses): Do not check first_link before
16722         enquing.
16723         (subtree_mark_written_and_enqueue): Likewise.
16724         (propagate_all_subaccesses): Likewise and do not stop at first
16725         parent with a first_link.
16727 2017-06-13  Martin Jambor  <mjambor@suse.cz>
16729         * tree-sra.c (dump_access_tree_1): Fix accidental dumping to stderr
16730         instead of f.
16732 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
16734         * match.pd: New pattern.
16736 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
16738         * tree-vrp.c (is_masked_range_test): New function.
16739         (register_edge_assert_for): Determine ranges for
16740         some bit tests.
16742 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
16744         PR tree-optimization/67328
16745         * fold-const.c (maskable_range_p): New function.
16746         (build_range_check): Generate bittests if possible.
16748 2017-06-13  Martin Liska  <mliska@suse.cz>
16750         * gimple-pretty-print.c (dump_probability): Add new argument.
16751         (dump_edge_probability): Dump both probability and count.
16752         (dump_gimple_label): Likewise.
16753         (dump_gimple_bb_header): Likewise.
16755 2017-06-13  Georg-Johann Lay  <avr@gjlay.de>
16757         PR target/81072
16758         * config/avr/avr-devices.c: Fix indentation.
16759         * config/avr/gen-avr-mmcu-specs.c: Dito.
16761 2017-06-13  Richard Biener  <rguenther@suse.de>
16763         * tree-vect-loop.c (vect_model_reduction_cost): Do not fail,
16764         instead get vector type from stmt_info.
16765         (vectorizable_reduction): Adjust.  Remove dead code.
16767 2017-06-13  Richard Biener  <rguenther@suse.de>
16769         PR middle-end/81065
16770         * fold-const.c (extract_muldiv_1): Remove bogus distribution
16771         case of C * (x * C2 + C3).
16772         (fold_addr_of_array_ref_difference): Properly fold index difference.
16774 2017-06-12  David S. Miller  <davem@davemloft.net>
16776         PR target/80968
16777         * config/sparc/sparc.md (return expander): Emit frame blockage if
16778         function uses alloca.
16780 2017-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
16782         * combine.c (make_field_assignment): Check len rather than the mode
16783         precision when calling force_to_mode.
16785 2017-06-12  Georg-Johann Lay  <avr@gjlay.de>
16787         Support multilibs and devices that see flash in RAM address range.
16789         PR target/81072
16790         * config/avr/avr-arch.h (avr_arch_id) <ARCH_AVRXMEGA3>: New enum.
16791         (avr_mcu_t) <flash_pm_offset>: New field.
16792         (avr_device_specific_features) <AVR_ISA_RCALL>: New enum.
16793         * config/avr/avr.h (AVR_SHORT_CALLS): New define.
16794         (AVR_HAVE_JMP_CALL): Don't set if AVR_SHORT_CALLS.
16795         (AVR_TINY_PM_OFFSET): Remove macro.
16796         * config/avr/avr.opt (-mshort-calls): New option.
16797         * config/avr/gen-avr-mmcu-specs.c (print_mcu)
16798         [*self_spec]: Add / remove -mshort-calls depending on AVR_ISA_RCALL.
16799         * config/avr/avr-c.c (avr_cpu_cpp_builtins)
16800         <__AVR_SHORT_CALLS__>: Built-in define if AVR_SHORT_CALLS.
16801         <__AVR_HAVE_JMP_CALL__>: Use AVR_HAVE_JMP_CALL as condition
16802         instead of avr_arch->have_jmp_call.
16803         <__AVR_PM_BASE_ADDRESS__>: Built-in define if avr_arch->flash_pm_offset.
16804         [AVR_TINY] <__AVR_TINY_PM_BASE_ADDRESS__>: Use
16805         avr_arch->flash_pm_offset to define.
16806         * config/avr/avr-devices.c (avr_arch_types): Add initializers for
16807         new field flash_pm_offset.  Add entry for avrxmega3.
16808         (avr_texinfo): Add entry for avrxmega3.
16809         * config/avr/avr-mcus.def: Add entries for: avrxmega3,
16810         attiny212, attiny214,
16811         attiny412, attiny414, attiny416, attiny417,
16812         attiny814, attiny816, attiny817,
16813         attiny1614, attiny1616, attiny1617,
16814         attiny3214, attiny3216, attiny3217.
16815         * config/avr/avr.c (avr_assemble_integer)[AVR_TINY]: Use
16816         avr_arch->flash_pm_offset instead of AVR_TINY_PM_OFFSET.
16817         (avr_print_operand_address) [AVR_TINY]: Same.
16818         (avr_asm_init_sections) <readonly_data_section>: Only patch
16819         callback if avr_arch->flash_pm_offset = 0.
16820         (avr_asm_named_section) <avr_need_copy_data_p>: Skip setting it
16821         for rodata if avr_arch->flash_pm_offset != 0.
16822         (avr_encode_section_info) [AVR_TINY]: Adjust comment.
16823         * config/avr/genmultilib.awk (dir_rcall, opt_rcall): New vars.
16824         (opts) [AVR_ISA_RCALL]: Append opt_rcall.
16825         (m_options): Append opt_rcall.
16826         (m_dirnames): Append dir_rcall.
16827         * config/avr/t-multilib: Regenerate.
16829         * configure.ac [target=avr]: Check whether avrxmega3 default
16830         linker description file works as needed.
16831         * configure: Regenerate.
16832         * doc/avr-mmcu.texi: Regenerate.
16833         * doc/invoke.texi (AVR Options) <-mshort-calls>: Document it.
16834         <__AVR_ARCH__>: Document avrxmega3 and 103.
16835         <__AVR_HAVE_JMP_CALL__>: Adjust documentation.
16836         <__AVR_SHORT_CALLS__>: Document it.
16837         <__AVR_PM_BASE_ADDRESS__>: Document it.
16838         * doc/extend.texi (AVR Options) <-mshort-calls>: Document it.
16839         (AVR Variable Attributes) <progmem>: Document this is
16840         not needed for avrxmega3.
16841         (AVR Named Address Spaces) <__flash>: Dito.
16843 2017-06-12  Jan Hubicka  <hubicka@ucw.cz>
16845         * cgraph.c (cgraph_node::dump): Complain about profile insanities.
16847 2017-06-12  Doug Rupp  <rupp@adacore.com>
16849         * config.gcc (*-*-vxworks*): Set use_gcc_stdint to "provide".
16850         Append vxworks-stdint.h to the tm_file list.
16851         * config/vxworks-stdint.h: New file.
16853 2017-06-12  Martin Liska  <mliska@suse.cz>
16855         PR tree-optimization/81041
16856         * tree-profile.c (gimple_gen_ic_func_profiler):
16857         Create an extra BB in profile-generate
16858         (gimple_gen_time_profiler): Likewise.
16860 2017-06-12  Jakub Jelinek  <jakub@redhat.com>
16862         PR tree-optimization/81003
16863         * tree-ssa-reassoc.c (force_into_ssa_name): New function.
16864         (update_range_test): Use it instead of force_gimple_operand_gsi.
16866 2017-06-12  Richard Biener  <rguenther@suse.de>
16868         PR tree-optimization/81053
16869         * tree-vect-loop.c (vect_is_simple_reduction): Handle PHI
16870         with backedge value not defined in loop.  Simplify def stmt
16871         compute.
16873 2017-06-11  Tom de Vries  <tom@codesourcery.com>
16875         PR target/79939
16876         * config/nvptx/nvptx.c (nvptx_cannot_force_const_mem): New function.
16877         Return true.
16878         (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to
16879         nvptx_cannot_force_const_mem.
16881 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
16883         * opts.c (finish_options): Move test for flag_split_stack after
16884         it has been initialized.
16886 2017-06-11  Jason Merrill  <jason@redhat.com>
16888         * tree.h (id_equal): New.
16889         * dwarf2out.c, hsa-gen.c, ipa-devirt.c, omp-expand.c,
16890         omp-simd-clone.c, read-rtl-function.c, tree-chkp.c, tree.c: Use it
16891         instead of strcmp of IDENTIFIER_POINTER.
16893 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
16895         * ipa-inline-transform.c: Include function.h, cfg.h and basic-block.h
16896         (mark_all_inlined_calls_cdtor): Fix formating.
16897         (inline_transform): Rescale profile before inlining.
16899 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
16901         * cgraph.h (cgraph_edge::clone): Update prototype.
16902         * cgraphclones.c (cgraph_edge::clone): Update profile scaling.
16903         (cgraph_node::create_clone): Update.
16904         (cgraph_node::create_version_clone): Update.
16905         * tree-inline.c (copy_bb): Update.
16906         (expand_call_inline): Update.
16908 2017-06-10  Segher Boessenkool  <segher@kernel.crashing.org>
16910         * config/rs6000/rs6000.c (emit_vrsave_prologue): New function,
16911         factored out from ...
16912         (rs6000_emit_prologue): ... here.
16914 2017-06-10  Segher Boessenkool  <segher@kernel.crashing.org>
16916         * config/rs6000/rs6000.c (emit_split_stack_prologue): New function,
16917         factored out from ...
16918         (rs6000_emit_prologue): ... here.
16920 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
16922         * predict.c (drop_profile): Also drop individual bb/edge and cgraph
16923         edge counts.
16924         (handle_missing_profiles): Fix computation of tp_first_run.
16925         (counts_to_freqs): Do not touch freqs when count is 0.
16927 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
16929         * cgraphbuild.c (cgraph_edge::rebuild_references): Do not touch
16930         profile.
16932 2017-06-10  Tom de Vries  <tom@codesourcery.com>
16934         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
16935         attributes): Document signal effective target.
16937 2017-06-10  Tom de Vries  <tom@codesourcery.com>
16939         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
16940         Document effective target stack_size.
16942 2017-06-09  David Malcolm  <dmalcolm@redhat.com>
16944         * diagnostic.c (diagnostic_report_diagnostic): Only add fixits
16945         to the edit_context if they can be auto-applied.
16947 2017-06-9  Ian Lance Taylor  <iant@golang.org>
16949         * opts.c (finish_options): If -fsplit-stack, disable implicit
16950         -forder-blocks-and-partition.
16951         * doc/invoke.texi (Optimize Options): Document that when using
16952         -fsplit-stack -forder-blocks-and-partition is not implicitly
16953         enabled.
16955 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
16957         * builtin-attrs.def (ATTR_NORETURN_NOTHROW_LEAF_COLD_LIST,
16958         ATTR_CONST_NORETURN_NOTHROW_LEAF_COLD_LIST,
16959         ATTR_TMPURE_NORETURN_NOTHROW_LEAF_COLD_LIST): New.
16960         * builtins.def (abort, trap, unreachable): Declare cold.
16961         * calls.c (flags_from_decl_or_type): Lookup ECF_COLD.
16962         * tree-core.h (ECF_COLD): New.
16963         * tree.c (set_call_expr_flags): Handle ECF_COLD.
16964         (build_common_builtin_nodes): Mark unreachable and abort as cold.
16966 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
16968         * predict.c (unlikely_executed_stmt_p): Cleanup.
16970 2017-06-09  Richard Biener  <rguenther@suse.de>
16972         * tree-ssa-loop-im.c (execute_sm): Do not force multi-threaded
16973         model if the ref is always written to.
16975 2017-06-09  Tamar Christina  <tamar.christina@arm.com>
16977         * config/aarch64/aarch64.md (lrint<GPF:mode><GPI:mode>2): New.
16979 2017-06-09  Tamar Christina  <tamar.christina@arm.com>
16981         * config/arm/arm.c (arm_rtx_costs_internal): Make sdiv more expensive
16982         than udiv.
16984 2017-06-09  Tom de Vries  <tom@codesourcery.com>
16986         PR target/80855
16987         * config/nvptx/nvptx.md (define_expand "mov<QHSDISDFM>"): Error out with
16988         "target cannot support label values" when encountering LABEL_REF.
16990 2017-06-09  Martin Liska  <mliska@suse.cz>
16992         * tree-profile.c (gimple_gen_ic_profiler): Update comment.
16993         (gimple_gen_ic_func_profiler): Emit direct comparison
16994         of __gcov_indirect_call_callee with NULL.
16995         (gimple_gen_time_profiler): Change probability from
16996         PROB_VERY_UNLIKELY to PROB_UNLIKELY.
16998 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
17000         * profile.c (edge_gcov_counts): Turn to pointer.
17001         (compute_branch_probabilities, compute_branch_probabilities): Update.
17002         (branch_prob): Do not clear edge_gcov_count.
17003         * profile.h (edge_gcov_counts): Turn to pointer.
17004         (edge_gcov_count): Update.
17006 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
17008         * gimple.h (gimple_check_failed): Mark cold.
17010 2017-06-09  Richard Biener  <rguenther@suse.de>
17012         PR tree-optimization/66623
17013         * tree-vect-loop.c (vect_is_simple_reduction): Cleanup,
17014         refactor check_reduction into two parts, properly computing
17015         whether we have to check reduction validity for outer loop
17016         vectorization.
17018 2017-06-09  Richard Biener  <rguenther@suse.de>
17020         PR tree-optimization/79483
17021         * graphite-scop-detection.c (order): New global.
17022         (get_order): Compute bb to order mapping that satisfies code
17023         generation constraints.
17024         (cmp_pbbs): New helper.
17025         (build_scops): Start domwalk at entry block, sort generated
17026         pbbs.
17028 2017-06-09  Richard Biener  <rguenther@suse.de>
17030         PR middle-end/81007
17031         * ipa-polymorphic-call.c
17032         (ipa_polymorphic_call_context::restrict_to_inner_class):
17033         Skip FIELD_DECLs with error_mark_node type.
17034         * passes.def (all_lowering_passes): Run pass_build_cgraph_edges
17035         last again.
17037 2017-06-09  Martin Liska  <mliska@suse.cz>
17039         * predict.c (struct branch_predictor): New struct.
17040         (test_prediction_value_range): New test.
17041         (predict_c_tests): New function.
17042         * selftest-run-tests.c (selftest::run_tests): Run the function.
17043         * selftest.h: Declare new tests.
17045 2017-06-09  Segher Boessenkool  <segher@kernel.crashing.org>
17047         PR target/80966
17048         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
17049         gen_add3_insn did not fail.
17050         * config/rs6000/rs6000.md (add<mode>3): If asked to add a constant to
17051         r0, construct that number in a temporary reg and add that reg to r0.
17052         If asked to put the result in r0 as well, fail.
17054 2017-06-08  Will Schmidt  <will_schmidt@vnet.ibm.com>
17056         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
17057         for early expansion of vec_eqv.
17059 2017-06-08  Jakub Jelinek  <jakub@redhat.com>
17061         PR middle-end/81005
17062         * ubsan.c (instrument_null): Avoid pointless code temporary.
17063         (pass_ubsan::execute): Instrument aggregate arguments of calls.
17065 2017-06-08  Uros Bizjak  <ubizjak@gmail.com>
17067         PR target/81015
17068         Revert:
17069         2016-12-14  Uros Bizjak  <ubizjak@gmail.com>
17071         PR target/59874
17072         * config/i386/i386.md (*ctzhi2): New insn_and_split pattern.
17073         (*clzhi2): Ditto.
17075 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
17077         * predict.c (unlikely_executed_edge_p): Move ahead.
17078         (probably_never_executed_edge_p): Use it.
17080 2017-06-08  Alexander Ivchenko  <alexander.ivchenko@intel.com>
17082         PR middle-end/79988
17083         * tree-chkp.c (chkp_gimple_call_builtin_p): Remove
17084         gimple_call_builtin_p call.
17086 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
17088         * system.h (fancy_abort): Annotate by ATTRIBUTE_COLD.
17089         * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1,
17090         rtl_check_failed_type2, rtl_check_failed_code1,
17091         rtl_check_failed_code2, rtl_check_failed_code_mode,
17092         rtl_check_failed_block_symbol, cwi_check_failed_bounds,
17093         rtvec_check_failed_bounds, rtl_check_failed_flag,
17094         _fatal_insn_not_found, _fatal_insn): Likewise.
17095         * tree.h (tree_contains_struct_check_failed,
17096         tree_check_failed, tree_not_check_failed,
17097         tree_class_check_failed, tree_range_check_failed,
17098         tree_not_class_check_failed, tree_int_cst_elt_check_failed,
17099         tree_vec_elt_check_failed, phi_node_elt_check_failed,
17100         tree_operand_check_failed, omp_clause_check_failed,
17101         omp_clause_operand_check_failed, omp_clause_range_check_failed):
17102         Likewise.
17104 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
17106         * cgraph.c (cgraph_edge::maybe_hot_p): Do not check
17107         flag_branch_probabilities.
17108         * ipa-inline.c (edge_badness): Likewise.
17109         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
17110         * postreload-gcse.c (eliminate_partially_redundant_load): Likewise.
17111         * predict.c (maybe_hot_frequency_p): Likewise.
17112         (probably_never_executed): Likewise.
17113         * sched-ebb.c (schedule_ebbs): Likewise.
17114         * sched-rgn.c (find_single_block_region): Likewise.
17115         * tracer.c (tail_duplicate): Likewise.
17117 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
17119         * opts.c (finish_options): x_flag_reorder_blocks_and_partition no
17120         longer requires x_flag_profile_use.
17122 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
17124         * cfgrtl.c (cfg_layout_initialize): Check crtl->has_bb_partition
17125         instead of flag_reorder_blocks_and_partition.
17126         * dbxout.c (dbxout_function_end): Likewise.
17127         * dwarf2out.c (gen_subprogram_die): Likewise.
17128         * haifa-sched.c (sched_create_recovery_edges): Likewise.
17129         * hw-doloop.c (reorg_loops): Likewise.
17130         * varasm.c (assemble_start_function,
17131         assemble_end_function): Likewise.
17132         (decide_function_section): Do not check for
17133         flag_reorder_blocks_and_partition.
17135 2017-06-08  Alexander Ivchenko  <alexander.ivchenko@intel.com>
17137         * tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
17138         New function.
17139         (chkp_get_hard_register_fake_addr_expr): Ditto.
17140         (chkp_build_addr_expr): Add check for hard reg case.
17141         (chkp_parse_array_and_component_ref): Ditto.
17142         (chkp_find_bounds_1): Ditto.
17143         (chkp_process_stmt): Don't generate bounds store for
17144         hard reg case.
17146 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
17148         * predict.c (maybe_hot_bb_p): Do not check profile status.
17149         (maybe_hot_edge_p): Likewise.
17150         (probably_never_executed): Check for zero counts even if profile
17151         is not read.
17152         (unlikely_executed_edge_p): New function.
17153         (unlikely_executed_stmt_p): New function.
17154         (unlikely_executed_bb_p): New function.
17155         (set_even_probabilities): Use unlikely predicates.
17156         (combine_predictions_for_bb): Likewise.
17157         (predict_paths_for_bb): Likewise.
17158         (predict_paths_leading_to_edge): Likewise.
17159         (determine_unlikely_bbs): New function.
17160         (estimate_bb_frequencies): Use it.
17161         (compute_function_frequency): Use zero counts even if profile is
17162         not read.
17163         * profile-count.h: Fix typo.
17165 2017-08-08  Julia Koval  <julia.koval@intel.com>
17167         * config/i386/avx512bwintrin.h (_mm512_mask_cvtepi16_storeu_epi8,
17168         _mm512_mask_cvtsepi16_storeu_epi8,
17169         _mm512_mask_cvtusepi16_storeu_epi8): New intrinsics.
17170         * config/i386/avx512vlbwintrin.h (_mm256_mask_cvtepi16_storeu_epi8,
17171         _mm_mask_cvtsepi16_storeu_epi8, _mm256_mask_cvtsepi16_storeu_epi8,
17172         _mm_mask_cvtusepi16_storeu_epi8, _mm256_mask_cvtusepi16_storeu_epi8,
17173         _mm_mask_cvtepi16_storeu_epi8): New intrinsics.
17174         * config/i386/i386-builtin-types.def (PV8Q, V8QI): New pointer type.
17175         (VOID_FTYPE_PV32QI_V32HI_USI, VOID_FTYPE_PV8QI_V8HI_UQI,
17176         VOID_FTYPE_PV16QI_V16HI_UHI): New function types.
17177         * config/i386/i386-builtin.def (__builtin_ia32_pmovwb128mem_mask,
17178         __builtin_ia32_pmovwb256mem_mask, __builtin_ia32_pmovswb128mem_mask,
17179         __builtin_ia32_pmovswb256mem_mask, __builtin_ia32_pmovuswb128mem_mask,
17180         __builtin_ia32_pmovuswb256mem_mask,
17181         __builtin_ia32_pmovuswb512mem_mask, __builtin_ia32_pmovswb512mem_mask)
17182         __builtin_ia32_pmovwb512mem_mask): New builtins.
17184 2017-08-08  Julia Koval  <julia.koval@intel.com>
17186         PR target/73350,80862
17187         * config/i386/subst.md (round): Fix round pattern.
17188         * config/i386/i386.c (ix86_erase_embedded_rounding):
17189         Fix erasing rounding for the fixed pattern.
17191 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
17193         * cfgbuild.c (find_many_sub_basic_blocks): Fix thinko.
17195 2017-06-08  Martin Liska  <mliska@suse.cz>
17197         PR gcov-profile/80911
17198         * gcov.c (block_info::block_info): New constructor.
17200 2017-06-07  Carl Love  <cel@us.ibm.com>
17202         * config/rs6000/rs6000-c: The return type of the following
17203         built-in functions was implemented as int not long long.  Fix sign
17204         of return value for the unsigned version of vec_mulo and vec_mule.
17205         vector unsigned long long vec_bperm (vector unsigned long long,
17206                                              vector unsigned char)
17207         vector signed long long vec_mule (vector signed int,
17208                                           vector signed int)
17209         vector unsigned long long vec_mule (vector unsigned int,
17210                                             vector unsigned int)
17211         vector signed long long vec_mulo (vector signed int,
17212                                           vector signed int)
17213         vector unsigned long long vec_mulo (vector unsigned int,
17214                                             vector unsigned int)
17215         * doc/extend.texi: Fix the documentation for the built-in
17216         functions.
17218 2017-06-07  Carl Love  <cel@us.ibm.com>
17220         PR target/80982
17221         * config/rs6000/altivec.md (double<mode>2): Fix the implementation of
17222         for BE.
17224 2017-06-07  Carl Love  <cel@us.ibm.com>
17226         * config/rs6000/altivec.md: Fix argument swizzle in vec_doublel
17227         support, Generate       doublehv for signed int/float for BE case only.
17229 2017-06-07  Alexander Monakov  <amonakov@ispras.ru>
17231         * doc/invoke.texi (mcx16): Rewrite.
17233 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17235         * config/rs6000/predicates.md (rs6000_nonimmediate_operand): Delete.
17236         * config/rs6000/rs6000.md (*movsi_internal1, movsi_from_sf,
17237         *mov<mode>_softfloat, and an anonymous splitter): Use
17238         nonimmediate_operand instead of rs6000_nonimmediate_operand.
17240 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17242         * config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE_ACC and
17243         SPEFSCR registers.
17244         * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
17245         (enum rs6000_reg_type): Delete SPE_ACC_TYPE and SPEFSCR_REG_TYPE.
17246         (rs6000_debug_reg_global): Adjust.
17247         (rs6000_init_hard_regno_mode_ok): Adjust.
17248         (rs6000_dbx_register_number): Adjust.
17249         * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change to 115.
17250         (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
17251         Remove SPE_ACC and SPEFSCR.
17252         (REG_ALLOC_ORDER): Ditto.
17253         (FRAME_POINTER_REGNUM): Change to 111.
17254         (enum reg_class): Remove the SPE_ACC and SPEFSCR registers.
17255         (REG_CLASS_NAMES): Ditto.
17256         (REG_CLASS_CONTENTS): Delete the SPE_ACC and SPEFSCR registers.
17257         (REGISTER_NAMES): Ditto.
17258         (ADDITIONAL_REG_NAMES): Ditto.
17259         (rs6000_reg_names): Ditto.
17260         * config/rs6000/rs6000.md: Renumber some register number
17261         define_constants.
17263 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17265         * config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE high
17266         registers.
17267         * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
17268         * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change from 149
17269         to 117.
17270         (DWARF_REG_TO_UNWIND_COLUMN): Do not define.
17271         (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
17272         Delete the SPE high registers.
17273         (REG_ALLOC_ORDER): Ditto.
17274         (enum reg_class): Remove SPE_HIGH_REGS.
17275         (REG_CLASS_NAMES): Ditto.
17276         (REG_CLASS_CONTENTS): Delete the SPE high registers.
17277         (REGISTER_NAMES): Ditto.
17278         (rs6000_reg_names): Ditto.
17279         * doc/tm.texi.in: Remove SPE as example.
17280         * doc/tm.texi: Regenerate.
17282 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17284         * config/rs6000/8540.md (ppc8540_brinc): Delete.
17285         * config/rs6000/e500mc.md (e500mc_brinc): Delete.
17286         * config/rs6000/e500mc64.md (e500mc64_brinc): Delete.
17287         * config/rs6000/rs6000.md (type): Remove "brinc".
17289 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17291         * config.gcc (powerpc*-*-*): Don't add spe.h to extra_headers.
17292         (powerpc*-linux*spe*): Use ${cpu_type} instead of rs6000.
17293         * config/rs6000/linuxspe.h: Delete file.
17294         * config/rs6000/rs6000.md: Don't include spe.md.
17295         * config/rs6000/spe.h: Delete file.
17296         * config/rs6000/spe.md: Delete file.
17297         * config/rs6000/t-rs6000: Remove spe.md.
17299 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17301         * config/rs6000/predicates.md (reg_or_mem_operand): Reformat.
17302         (reg_or_none500mem_operand): Delete.
17303         * config/rs6000/rs6000.md (extendsfdf2): Use reg_or_mem_operand
17304         instead of reg_or_none500mem_operand.
17306 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17308         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
17309         handling of SPE flags.
17310         * config/rs6000/rs6000.opt (-mspe, -mspe=no, -mspe=yes): Delete.
17312 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17314         * config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
17315         SPE ABI handling.
17316         * config/rs6000/paired.md (paired_negv2sf2): Rename to negv2sf2.
17317         (paired_absv2sf2, paired_addv2sf3, paired_subv2sf3, paired_mulv2sf3,
17318         paired_divv2sf3): Similar.
17319         * config/rs6000/predicates.md: Replace TARGET_SPE, TARGET_SPE_ABI,
17320         SPE_VECTOR_MODE and SPE_HIGH_REGNO_P by 0; simplify.
17321         * config/rs6000/rs6000-builtin.def: Delete RS6000_BUILTIN_E and
17322         RS6000_BUILTIN_S.
17323         Delete BU_SPE_1, BU_SPE_2, BU_SPE_3, BU_SPE_E, BU_SPE_P, and BU_SPE_X.
17324         Rename the paired_* instruction patterns.
17325         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Do not
17326         define __SPE__.
17327         * config/rs6000/rs6000-protos.h (invalid_e500_subreg): Delete.
17328         * config/rs6000/rs6000.c: Delete RS6000_BUILTIN_E and RS6000_BUILTIN_S.
17329         (struct rs6000_stack): Delete fields spe_gp_save_offset, spe_gp_size,
17330         spe_padding_size, and spe_64bit_regs_used.  Replace TARGET_SPE and
17331         TARGET_SPE_ABI with 0, simplify.  Replace SPE_VECTOR_MODE with
17332         PAIRED_VECTOR_MODE.
17333         (struct machine_function): Delete field spe_insn_chain_scanned_p.
17334         (spe_func_has_64bit_regs_p): Delete.
17335         (spe_expand_predicate_builtin): Delete.
17336         (spe_expand_evsel_builtin): Delete.
17337         (TARGET_DWARF_REGISTER_SPAN): Do not define.
17338         (TARGET_MEMBER_TYPE_FORCES_BLK): Do not define.
17339         (invalid_e500_subreg): Delete.
17340         (rs6000_legitimize_address): Always force_reg op2 as well, for
17341         paired single memory accesses.
17342         (rs6000_member_type_forces_blk): Delete.
17343         (rs6000_spe_function_arg): Delete.
17344         (rs6000_expand_unop_builtin): Delete SPE handling.
17345         (rs6000_expand_binop_builtin): Ditto.
17346         (spe_expand_stv_builtin): Delete.
17347         (bdesc_2arg_spe): Delete.
17348         (spe_expand_builtin): Delete.
17349         (spe_expand_predicate_builtin): Delete.
17350         (spe_expand_evsel_builtin): Delete.
17351         (rs6000_invalid_builtin): Remove RS6000_BTM_SPE handling.
17352         (spe_init_builtins): Delete.
17353         (spe_func_has_64bit_regs_p): Delete.
17354         (savres_routine_name): Delete "info" parameter.  Adjust callers.
17355         (rs6000_emit_stack_reset): Ditto.
17356         (rs6000_dwarf_register_span): Delete.
17357         * config/rs6000/rs6000.h (TARGET_SPE_ABI, TARGET_SPE,
17358         UNITS_PER_SPE_WORD, SPE_HIGH_REGNO_P, SPE_SIMD_REGNO_P,
17359         SPE_VECTOR_MODE, RS6000_BTM_SPE, RS6000_BUILTIN_E, RS6000_BUILTIN_S):
17360         Delete.
17361         * config/rs6000/rs6000.md (FIRST_SPE_HIGH_REGNO, LAST_SPE_HIGH_REGNO):
17362         Delete.
17363         * config/rs6000/rs6000.opt (-mabi=spe, -mabi=no-spe): Delete.
17364         * config/rs6000/spe.md: Delete every pattern that uses TARGET_SPE.
17365         * config/rs6000/vector.md (absv2sf2, negv2sf2, addv2sf3, subv2sf3,
17366         mulv2sf3, divv2sf3): Delete expanders.
17368 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17370         config/rs6000/rs6000.md (UNSPEC_MV_CR_GT): Delete.
17372 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17374         * config/rs6000/rs6000-protos.h (output_e500_flip_gt_bit): Delete.
17375         * config/rs6000/rs6000.c: Ditto.
17377 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17379         * config/rs6000/predicated.md (rs6000_cbranch_operator): Delete.
17380         * config/rs6000/rs6000.md: Replace rs6000_cbranch_operator by
17381         comparison_operator.
17383 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17385         * config/rs6000/rs6000.c: Remove everything related to -mfloat-gprs.
17386         * config/rs6000/rs6000.opt: Ditto.
17387         * config/rs6000/t-rtems: Ditto.
17389 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17391         * config/rs6000/predicates.md: Replace TARGET_E500_DOUBLE and
17392         TARGET_E500_SINGLE by 0, simplify.
17393         * config/rs6000/rs6000.c: Ditto.
17394         (rs6000_option_override_internal): Delete CHECK_E500_OPTIONS.
17395         (spe_build_register_parallel): Delete.
17396         * config/rs6000/rs6000.h: Delete TARGET_E500_SINGLE,
17397         TARGET_E500_DOUBLE, and CHECK_E500_OPTIONS.
17398         * config/rs6000/rs6000.md: Replace TARGET_E500_DOUBLE,
17399         TARGET_E500_SINGLE, and <E500_CONVERT> by 0, simplify.
17400         (E500_CONVERT): Delete.
17401         * config/rs6000/spe.md: Remove many patterns and all define_constants.
17403 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
17405         * config/rs6000/darwin.md: Replace TARGET_FPRS by 1 and simplify.
17406         * config/rs6000/dfp.md: Ditto.
17407         (negdd2, *negdd2_fpr): Merge.
17408         (absdd2, *absdd2_fpr): Merge.
17409         (negtd2, *negtd2_fpr): Merge.
17410         (abstd2, *abstd2_fpr): Merge.
17411         * config/rs6000/e500.h: Delete file.
17412         * config/rs6000/predicates.md (rs6000_cbranch_operator): Replace
17413         TARGET_FPRS by 1 and simplify.
17414         * config/rs6000/rs6000-c.c: Ditto.
17415         * config/rs6000/rs6000.c: Ditto.  Also replace TARGET_SF_SPE and
17416         TARGET_DF_SPE by 0.
17417         * config/rs6000/rs6000.h: Ditto.  Delete TARGET_SF_SPE and
17418         TARGET_DF_SPE.
17419         * config/rs6000/rs6000.md: Ditto.
17420         (floatdidf2, *floatdidf2_fpr): Merge.
17421         (move_from_CR_gt_bit): Delete.
17422         * config/rs6000/spe.md: Replace TARGET_FPRS by 1 and simplify.
17423         (E500_CR_IOR_COMPARE): Delete.
17424         (All patterns that require !TARGET_FPRS): Delete.
17425         * config/rs6000/vsx.md: Replace TARGET_FPRS by 1 and simplify.
17427 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17429         * passes.def (pass_iv_canon): Move before pass_loop_distribution.
17431 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17433         * graphds.c (add_edge): Intitialize edge's attached data.
17434         (foll_in_subgraph, dfs_fst_edge, dfs_next_edge): New function
17435         pointer parameter.  Call pointed function on each edge during
17436         graph traversing.  Skip traversing the edge when the function
17437         returns true.
17438         (graphds_dfs, graphds_scc): Ditto.
17439         (for_each_edge): New parameter.  Pass the new parameter to callback
17440         function.
17441         * graphds.h (skip_edge_callback): New function pointer type.
17442         (graphds_dfs, graphds_scc): New function pointer parameter.
17443         (graphds_edge_callback, for_each_edge): New parameter.
17445 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17447         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test): Factor
17448         out code checking if runtime alias check is possible to below ...
17449         Call the new function.
17450         * tree-data-ref.c (runtime_alias_check_p): ... to new function.
17451         * tree-data-ref.h (runtime_alias_check_p): New decalaration.
17453 2017-06-07  Marek Polacek  <polacek@redhat.com>
17455         PR sanitizer/80932
17456         * fold-const.c (extract_muldiv_1) <case MINUS_EXPR>: Add
17457         TYPE_OVERFLOW_WRAPS check.
17459 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17461         * tree-vect-loop-manip.c (vect_do_peeling): Don't skip vector loop
17462         if versioning is required.
17463         * tree-vect-loop.c (vect_analyze_loop_2): Merge niter check for loop
17464         peeling with the check for versioning.
17466 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17468         * tree-vectorizer.h (vect_build_loop_niters): New parameter.
17469         * tree-vect-loop-manip.c (vect_build_loop_niters): New parameter.
17470         Set true to new parameter if new ssa variable is defined.
17471         (vect_gen_vector_loop_niters): Refactor.  Set range information
17472         for the new vector loop bound variable.
17473         (vect_do_peeling): Ditto.
17475 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17477         * tree-affine.c (ssa.h): Include header file.
17478         (tree_to_aff_combination): Handle (T1)(X - CST) when inner type
17479         has wrapping overflow behavior.
17481 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17483         * tree-affine.c (tree_to_aff_combination): Handle (T1)(X + X).
17485 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17487         (aff_combination_expand): Move (T1)(X *+- CST) simplification to ...
17488         (tree_to_aff_combination): ... here.
17490 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
17492         * tree-ssa-loop-ivopts.c (ivopts_estimate_reg_pressure): New
17493         reg_pressure model function.
17494         (ivopts_global_cost_for_size): Delete.
17495         (determine_set_costs, iv_ca_recount_cost): Call new model function
17496         ivopts_estimate_reg_pressure.
17498 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
17500         * config/aarch64/aarch64.c (aarch64_rtx_costs): Make sdiv more
17501         expensive than udiv.  Remove floating point cases from mod.
17503 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
17505         * config/arm/aarch-cost-tables.h (cortexa53_extra_cost):
17506         Increase idiv cost.
17508 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
17510         * config/aarch64/aarch64.md
17511         (copysignsf3): Fix mask generation.
17513 2017-06-07  Jakub Jelinek  <jakub@redhat.com>
17515         * dumpfile.h (enum tree_dump_index): Rename TDI_generic to
17516         TDI_gimple.
17517         (class dump_manager): Add register_dumps method.
17518         * dumpfile.c: Include langhooks.h.
17519         (dump_files): Use 0 instead of 3/4/5 for TDI_{original,gimple,nested}.
17520         (FIRST_AUTO_NUMBERED_DUMP): Decrease to 1.
17521         (FIRST_ME_AUTO_NUMBERED_DUMP): Define.
17522         (dump_manager::dump_register): Start with 512 entries instead of 32.
17523         (dump_manager::register_dumps): New method.
17524         * toplev.c (general_init): Instead of invoking register_dumps
17525         langhook, invoke register_dumps method on the dump manager.
17526         * gimplify.c (gimplify_function_tree): Use TDI_gimple instead of
17527         TDI_generic.
17529 2017-06-07  Richard Sandiford  <richard.sandiford@linaro.org>
17531         * doc/md.texi: Clarify the restrictions on a define_insn condition.
17532         Say that # requires an associated define_split to exist, and that
17533         the define_split must be suitable for use after register allocation.
17535 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
17537         * cfgbuild.c (find_bb_boundaries): Initialize profile of split blocks.
17538         (compute_outgoing_frequencies): Also initialize zero counts.
17539         (find_many_sub_basic_blocks): Do not produce uninitialized profile
17540         around loops; preserve more of profile when nothing changes.
17542 2017-06-06  Jim Wilson  <jim.wilson@linaro.org>
17544         * config/aarch64/aarch64-cost-tables.h (qdf24xx_extra_costs): Move to
17545         here.
17546         * config/arm/aarch-cost-tables.h (qdf24xx_extra_costs): From here.
17547         * config/arm/arm-cpu-cdata.h: Regenerate.
17548         * config/arm/arm-cpu-data.h, config/arm/arm-cpu.h: Likewise.
17549         * config/arm/arm-tables.opt, config/arm/arm-tune.md: Likewise.
17550         * config/arm/arm-cpus.in: Delete falkor and qdf24xx entries.
17551         * config/arm/arm.c (arm_qdf24xx_tune): Delete.
17552         * config/arm/bpabi.h (BE8_LINK_SPEC): Delete falkor and qdf24xx
17553         support.
17554         * config/arm/t-aprofile (MULTILIB_MATCHES): Delete falkor and qdf24xx
17555         support.
17556         * config/arm/t-rmprofile: Likewise.
17557         * doc/invoke.texi (ARM Options): Drop falkor and qdf24xx support.
17559 2017-06-06  David S. Miller  <davem@davemloft.net>
17561         PR target/80968
17562         * config/sparc/sparc.c (sparc_expand_prologue): Emit frame
17563         blockage if function uses alloca.
17565 2017-06-06  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
17567         * tree-ssa-loop-prefetch.c (struct mem_ref_group, struct mem_ref):
17568         New "uid" fields to hold pretty-print IDs of group and ref.
17569         Memory references are now identified as <group_id>:<ref_id>
17570         instead of using [random] addresses.
17571         (dump_mem_details): Simplify, no functional change.
17572         (dump_mem_ref): Simplify and make output more concise.
17573         Replace couple of fprintf's throughout code with calls to dump_mem_ref.
17574         (find_or_create_group): Initialize group uid.
17575         (record_ref): Initialize ref uid.  Improve debug output.
17576         (prune_group_by_reuse, should_issue_prefetch_p,)
17577         (should_issue_prefetch_p, schedule_prefetches, issue_prefetch_ref,)
17578         (mark_nontemporal_store, determine_loop_nest_reuse):
17579         Improve debug output.
17581 2017-06-06  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
17583         * dbgcnt.def (prefetch): New debug counter.
17584         * tree-ssa-loop-prefetch.c (dbgcnt.h): New include.
17585         (schedule_prefetches): Stop issueing prefetches if debug counter
17586         tripped.
17588 2017-06-06  Tom de Vries  <tom@codesourcery.com>
17590         * doc/sourcebuild.texi (Testsuites, C Language Testsuites,
17591         gcc.c-torture/compile): Remove mention of NO_LABEL_VALUES in fixme.
17593 2017-06-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17595         * config/aarch64/atomics.md (atomic_compare_and_swap<mode> expander):
17596         Use aarch64_reg_or_zero predicate for operand 4.
17597         (aarch64_compare_and_swap<mode> define_insn_and_split):
17598         Use aarch64_reg_or_zero predicate for operand 3.  Add 'Z' constraint.
17599         (aarch64_store_exclusive<mode>): Likewise for operand 2.
17601 2017-06-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
17603         * config/arm/arm.c (arm_compute_save_reg_mask): Rename into ...
17604         (arm_compute_save_core_reg_mask): This.
17605         (thumb1_compute_save_reg_mask): Rename into ...
17606         (thumb1_compute_save_core_reg_mask): This.
17607         (arm_compute_save_reg0_reg12_mask): Adapt comment.
17608         (arm_compute_frame_layout): Likewise.
17610 2017-06-06  Richard Biener  <rguenther@suse.de>
17612         PR tree-optimization/80974
17613         * tree-ssa-sccvn.c (set_ssa_val_to): Do not change but only
17614         keep or clear leaders SSA info.
17616 2017-06-06  Tom de Vries  <tom@codesourcery.com>
17618         * config/nvptx/nvptx.c (split_mode_p): New function.
17619         (nvptx_declare_function_name, nvptx_print_operand): Use split_mode_p.
17621 2017-06-06  Tom de Vries  <tom@codesourcery.com>
17623         * config/nvptx/nvptx.c (nvptx_print_operand): Use maybe_split_mode.
17625 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
17627         PR bootstrap/80978
17628         * tree-cfg.c (execute_fixup_cfg): Fix condition on when to rescale
17629         profile.
17631 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
17633         * shrink-wrap.c (handle_simple_exit): Update profile.
17634         (try_shrink_wrapping): Upate profile.
17636 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
17638         * predict.c (tree_estimate_probability_bb): Add LOCAL_ONLY.
17639         (tree_guess_outgoing_edge_probabilities): New.
17640         * predict.h (tree_guess_outgoing_edge_probabilities): Declare.
17641         * tree-cfg.c (gimple_find_sub_bbs): Propagate profile.
17643 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
17645         * ipa-split.c (split_function): Initialize return bb profile.
17647 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
17649         * profile.c (compute_branch_probabilities): Also initialize
17650         EXIT_BLOCK profile.
17652 2017-06-06  Richard Biener  <rguenther@suse.de>
17654         PR tree-optimization/80928
17655         * tree-vect-loop.c (vect_update_vf_for_slp): Amend dumps.
17656         (vect_analyze_loop_operations): Properly guard analysis for
17657         pure SLP case.
17658         (vect_transform_loop): Likewise.
17659         (vect_analyze_loop_2): Also reset SLP type on PHIs.
17660         (vect_model_induction_cost): Do not cost for pure SLP.
17661         (vectorizable_induction): Pass in SLP node, implement SLP vectorization
17662         of induction in inner loop vectorization.
17663         * tree-vect-slp.c (vect_create_new_slp_node): Handle PHIs.
17664         (vect_get_and_check_slp_defs): Handle vect_induction_def.
17665         (vect_build_slp_tree): Likewise.  Handle PHIs as terminating the
17666         recursion.
17667         (vect_analyze_slp_cost_1): Cost induction.
17668         (vect_detect_hybrid_slp_stmts): Handle PHIs.
17669         (vect_get_slp_vect_defs): Likewise.
17670         * tree-vect-stmts.c (vect_analyze_stmt): Handle induction.
17671         (vect_transform_stmt): Handle SLP reductions.
17672         * tree-vectorizer.h (vectorizable_induction): Adjust.
17674 2017-06-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
17676         * config/rs6000/rs6000.c (make_resolver_func): Update
17677         init_lowered_empty_function call.
17679 2017-06-05  Bernd Edlinger  <bernd.edlinger@hotmail.de>
17681         * doc/invoke.texi: Document the -fprofile-abs-path option.
17682         * common.opt (fprofile-abs-path): New option.
17683         * gcov-io.h (gcov_write_filename): Declare.
17684         * gcov-io.c (gcov_write_filename): New function.
17685         * coverage.c (coverage_begin_function): Use gcov_write_filename.
17686         * profile.c (output_location): Likewise.
17688 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
17690         * shring-wrap.c: Revert accidental commit.
17692 2017-06-05  Volker Reichelt  <v.reichelt@netcologne.de>
17694         * doc/invoke.texi (-Wduplicated-branches): Add to warning list.
17696 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
17698         * cfgexpand.c (expand_gimple_tailcall): Initialize profile of
17699         new edge.
17700         * ipa-inline.c (want_inline_self_recursive_call_p): Watch for missing
17701         profile in callgraph edge.
17702         * profile-count.h (apply_probability): If THIS is 0, then result is 0
17703         (apply_scale): Likewise.
17704         * tree-inline.c (copy_bb, copy_edges_for_bb, copy_cfg_body):
17705         Also scale profile when inlining function with zero profile.
17706         (initialize_cfun): Update exit block profile even when it is zero.
17707         * tree-ssa-threadupdate.c (clear_counts_path): Handle correctly case
17708         when profile is read.
17710 2017-06-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
17712         * config/rs6000/rs6000.c (toplevel): Include attribs.h.
17713         (CLONE_*): New constants to define the processors we can generate
17714         code for with the target_clone attribute.
17715         (rs6000_clone_map): New array to identify which clone processors
17716         the current program is running on.
17717         (TARGET_COMPARE_VERSION_PRIORITY): Define to enable the
17718         target_clone attribute.
17719         (TARGET_GENERATE_VERSION_DISPATCHER_BODY): Likewise.
17720         (TARGET_GET_FUNCTION_VERSIONS_DISPATCHER): Likewise.
17721         (TARGET_OPTION_FUNCTION_VERSIONS): Likewise.
17722         (cpu_expand_builtin): Add support for target_clone attribute.
17723         (rs6000_valid_attribute_p): Allow "default" attribute.
17724         (get_decl_name): New debug function to simplify printing the
17725         current function name in debugging statements.
17726         (rs6000_clone_priority): New functions to support the target_clone
17727         attribute, and be able to generate code to switch between ISA 2.05
17728         through ISA 3.0 (power6 through power9).
17729         (rs6000_compare_version_priority): Likewise.
17730         (rs6000_get_function_versions_dispatcher): Likewise.
17731         (make_resolver_func): Likewise.
17732         (add_condition_to_bb): Likewise.
17733         (dispatch_function_versions): Likewise.
17734         (rs6000_generate_version_dispatcher_body): Likewise.
17735         (rs6000_can_inline_p): Call get_decl_name for debugging usage.
17736         (fusion_gpr_load_p): Fix a spacing issue.
17737         * doc/extend.texi (Common Function Attributes): Document that the
17738         PowerPC supports the target_clone attribute.
17740 2017-06-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>
17742         * config/arm/arm.h: explain F symbol found in description of ARM
17743         register allocation in its legend.
17745 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
17747         * config/mips/frame-header-opt.c: Include profile-count.h.
17748         * config/riscv/riscv.c: Include profile-count.h
17750 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
17752         * tree-ssa-loop-im.c (execute_sm_if_changed): Add FLAG_BBS parameter;
17753         update profile.
17754         (sm_set_flag_if_changed): Add bbs field.
17755         (execute_sm_if_changed_flag_set): Pass BBS.
17756         (execute_sm): Update.
17758 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17760         * config/aarch64/aarch64-simd.md (aarch64_store_lane0<mode>):
17761         New pattern.
17763 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17765         * config/aarch64/aarch64.md (sub<mode>3_compare1_imm): New define_insn.
17766         (peephole2): New peephole2 to emit the above.
17767         * config/aarch64/predicates.md (aarch64_sub_immediate): New predicate.
17769 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17771         * config/aarch64/aarch64.c (define_peephole2 above
17772         *sub_<shift>_<mode>): New peephole.
17774 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
17776         * config/i386/i386.c (make_resolver_func): Update.
17777         * Makefile.in: Add profile-count.h and profile-count.o
17778         * auto-profile.c (afdo_indirect_call): Update to new API.
17779         (afdo_set_bb_count): Update.
17780         (afdo_propagate_edge): Update.
17781         (afdo_propagate_circuit): Update.
17782         (afdo_calculate_branch_prob): Update.
17783         (afdo_annotate_cfg): Update.
17784         * basic-block.h: Include profile-count.h
17785         (struct edge_def): Turn count to profile_count.
17786         (struct basic_block_def): Likewie.
17787         (REG_BR_PROB_BASE): Move to profile-count.h
17788         (RDIV): Move to profile-count.h
17789         * bb-reorder.c (max_entry_count): Turn to profile_count.
17790         (find_traces): Update.
17791         (rotate_loop):Update.
17792         (connect_traces):Update.
17793         (sanitize_hot_paths):Update.
17794         * bt-load.c (migrate_btr_defs): Update.
17795         * cfg.c (RDIV): Remove.
17796         (init_flow): Use alloc_block.
17797         (alloc_block): Uninitialize count.
17798         (unchecked_make_edge): Uninitialize count.
17799         (check_bb_profile): Update.
17800         (dump_edge_info): Update.
17801         (dump_bb_info): Update.
17802         (update_bb_profile_for_threading): Update.
17803         (scale_bbs_frequencies_int): Update.
17804         (scale_bbs_frequencies_gcov_type): Update.
17805         (scale_bbs_frequencies_profile_count): New.
17806         * cfg.h (update_bb_profile_for_threading): Update.
17807         (scale_bbs_frequencies_profile_count): Declare.
17808         * cfgbuild.c (compute_outgoing_frequencies): Update.
17809         (find_many_sub_basic_blocks): Update.
17810         * cfgcleanup.c (try_forward_edges): Update.
17811         (try_crossjump_to_edge): Update.
17812         * cfgexpand.c (expand_gimple_tailcall): Update.
17813         (construct_exit_block): Update.
17814         * cfghooks.c (verify_flow_info): Update.
17815         (dump_bb_for_graph): Update.
17816         (split_edge): Update.
17817         (make_forwarder_block): Update.
17818         (duplicate_block): Update.
17819         (account_profile_record): Update.
17820         * cfgloop.c (find_subloop_latch_edge_by_profile): Update.
17821         (get_estimated_loop_iterations): Update.
17822         * cfgloopanal.c (expected_loop_iterations_unbounded): Update.
17823         (single_likely_exit): Update.
17824         * cfgloopmanip.c (scale_loop_profile): Update.
17825         (loopify): Update.
17826         (set_zero_probability): Update.
17827         (lv_adjust_loop_entry_edge): Update.
17828         * cfgrtl.c (force_nonfallthru_and_redirect): Update.
17829         (purge_dead_edges): Update.
17830         (rtl_account_profile_record): Update.
17831         * cgraph.c (cgraph_node::create): Uninitialize count.
17832         (symbol_table::create_edge): Uninitialize count.
17833         (cgraph_update_edges_for_call_stmt_node): Update.
17834         (cgraph_edge::dump_edge_flags): Update.
17835         (cgraph_node::dump): Update.
17836         (cgraph_edge::maybe_hot_p): Update.
17837         * cgraph.h: Include profile-count.h
17838         (create_clone), create_edge, create_indirect_edge): Update.
17839         (cgraph_node): Turn count to profile_count.
17840         (cgraph_edge0: Likewise.
17841         (make_speculative, clone): Update.
17842         (create_edge): Update.
17843         (init_lowered_empty_function): Update.
17844         * cgraphclones.c (cgraph_edge::clone): Update.
17845         (duplicate_thunk_for_node): Update.
17846         (cgraph_node::create_clone): Update.
17847         * cgraphunit.c (cgraph_node::analyze): Update.
17848         (cgraph_node::expand_thunk): Update.
17849         * final.c (dump_basic_block_info): Update.
17850         * gimple-streamer-in.c (input_bb): Update.
17851         * gimple-streamer-out.c (output_bb): Update.
17852         * graphite.c (print_global_statistics): Update.
17853         (print_graphite_scop_statistics): Update.
17854         * hsa-brig.c: Include basic-block.h.
17855         * hsa-dump.c: Include basic-block.h.
17856         * hsa-gen.c (T sum_slice): Update.
17857         (convert_switch_statements):Update.
17858         * hsa-regalloc.c: Include basic-block.h.
17859         * ipa-chkp.c (chkp_produce_thunks): Update.
17860         * ipa-cp.c (struct caller_statistics): Update.
17861         (init_caller_stats): Update.
17862         (gather_caller_stats): Update.
17863         (ipcp_cloning_candidate_p): Update.
17864         (good_cloning_opportunity_p): Update.
17865         (get_info_about_necessary_edges): Update.
17866         (dump_profile_updates): Update.
17867         (update_profiling_info): Update.
17868         (update_specialized_profile): Update.
17869         (perhaps_add_new_callers): Update.
17870         (decide_about_value): Update.
17871         (ipa_cp_c_finalize): Update.
17872         * ipa-devirt.c (struct odr_type_warn_count): Update.
17873         (struct decl_warn_count): Update.
17874         (struct final_warning_record): Update.
17875         (possible_polymorphic_call_targets): Update.
17876         (ipa_devirt): Update.
17877         * ipa-fnsummary.c (redirect_to_unreachable): Update.
17878         * ipa-icf.c (sem_function::merge): Update.
17879         * ipa-inline-analysis.c (do_estimate_edge_time): Update.
17880         * ipa-inline.c (compute_uninlined_call_time): Update.
17881         (compute_inlined_call_time): Update.
17882         (want_inline_small_function_p): Update.
17883         (want_inline_self_recursive_call_p): Update.
17884         (edge_badness): Update.
17885         (lookup_recursive_calls): Update.
17886         (recursive_inlining): Update.
17887         (inline_small_functions): Update.
17888         (dump_overall_stats): Update.
17889         (dump_inline_stats): Update.
17890         * ipa-profile.c (ipa_profile_generate_summary): Update.
17891         (ipa_propagate_frequency): Update.
17892         (ipa_profile): Update.
17893         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
17894         * ipa-utils.c (ipa_merge_profiles): Update.
17895         * loop-doloop.c (doloop_modify): Update.
17896         * loop-unroll.c (report_unroll): Update.
17897         (unroll_loop_runtime_iterations): Update.
17898         * lto-cgraph.c (lto_output_edge): Update.
17899         (lto_output_node): Update.
17900         (input_node): Update.
17901         (input_edge): Update.
17902         (merge_profile_summaries): Update.
17903         * lto-streamer-in.c (input_cfg): Update.
17904         * lto-streamer-out.c (output_cfg): Update.
17905         * mcf.c (create_fixup_graph): Update.
17906         (adjust_cfg_counts): Update.
17907         (sum_edge_counts): Update.
17908         * modulo-sched.c (sms_schedule): Update.
17909         * postreload-gcse.c (eliminate_partially_redundant_load): Update.
17910         * predict.c (maybe_hot_count_p): Update.
17911         (probably_never_executed): Update.
17912         (dump_prediction): Update.
17913         (combine_predictions_for_bb): Update.
17914         (propagate_freq): Update.
17915         (handle_missing_profiles): Update.
17916         (counts_to_freqs): Update.
17917         (rebuild_frequencies): Update.
17918         (force_edge_cold): Update.
17919         * predict.h: Include profile-count.h
17920         (maybe_hot_count_p, counts_to_freqs): UPdate.
17921         * print-rtl-function.c: Do not include cfg.h
17922         * print-rtl.c: Include basic-block.h
17923         * profile-count.c: New file.
17924         * profile-count.h: New file.
17925         * profile.c (is_edge_inconsistent): Update.
17926         (correct_negative_edge_counts): Update.
17927         (is_inconsistent): Update.
17928         (set_bb_counts): Update.
17929         (read_profile_edge_counts): Update.
17930         (compute_frequency_overlap): Update.
17931         (compute_branch_probabilities): Update; Initialize and deinitialize
17932         gcov_count tables.
17933         (branch_prob): Update.
17934         * profile.h (bb_gcov_counts, edge_gcov_counts): New.
17935         (edge_gcov_count): New.
17936         (bb_gcov_count): New.
17937         * shrink-wrap.c (try_shrink_wrapping): Update.
17938         * tracer.c (better_p): Update.
17939         * trans-mem.c (expand_transaction): Update.
17940         (ipa_tm_insert_irr_call): Update.
17941         (ipa_tm_insert_gettmclone_call): Update.
17942         * tree-call-cdce.c: Update.
17943         * tree-cfg.c (gimple_duplicate_sese_region): Update.
17944         (gimple_duplicate_sese_tail): Update.
17945         (gimple_account_profile_record): Update.
17946         (execute_fixup_cfg): Update.
17947         * tree-inline.c (copy_bb): Update.
17948         (copy_edges_for_bb): Update.
17949         (initialize_cfun): Update.
17950         (freqs_to_counts): Update.
17951         (copy_cfg_body): Update.
17952         (expand_call_inline): Update.
17953         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
17954         * tree-ssa-loop-ivcanon.c (unloop_loops): Update.
17955         (try_unroll_loop_completely): Update.
17956         (try_peel_loop): Update.
17957         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
17958         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop): Update.
17959         * tree-ssa-loop-split.c (connect_loops): Update.
17960         * tree-ssa-loop-unswitch.c (hoist_guard): Update.
17961         * tree-ssa-reassoc.c (branch_fixup): Update.
17962         * tree-ssa-tail-merge.c (replace_block_by): Update.
17963         * tree-ssa-threadupdate.c (create_block_for_threading): Update.
17964         (compute_path_counts): Update.
17965         (update_profile): Update.
17966         (recompute_probabilities): Update.
17967         (update_joiner_offpath_counts): Update.
17968         (estimated_freqs_path): Update.
17969         (freqs_to_counts_path): Update.
17970         (clear_counts_path): Update.
17971         (ssa_fix_duplicate_block_edges): Update.
17972         (duplicate_thread_path): Update.
17973         * tree-switch-conversion.c (case_bit_test_cmp): Update.
17974         (struct switch_conv_info): Update.
17975         * tree-tailcall.c (decrease_profile): Update.
17976         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
17977         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
17978         * value-prof.c (check_counter): Update.
17979         (gimple_divmod_fixed_value): Update.
17980         (gimple_mod_pow2): Update.
17981         (gimple_mod_subtract): Update.
17982         (gimple_ic_transform): Update.
17983         (gimple_stringop_fixed_value): Update.
17984         * value-prof.h (gimple_ic): Update.
17986 2017-06-02  Carl Love  <cel@us.ibm.com>
17988         * config/rs6000/rs6000-c: Add support for built-in functions
17989         vector double vec_doublee (vector signed int);
17990         vector double vec_doublee (vector unsigned int);
17991         vector double vec_doublee (vector float);
17992         vector double vec_doubleh (vector signed int);
17993         vector double vec_doubleh (vector unsigned int);
17994         vector double vec_doubleh (vector float);
17995         vector double vec_doublel (vector signed int);
17996         vector double vec_doublel (vector unsigned int);
17997         vector double vec_doublel (vector float);
17998         vector double vec_doubleo (vector signed int);
17999         vector double vec_doubleo (vector unsigned int);
18000         vector double vec_doubleo (vector float);.
18001         * config/rs6000/rs6000-builtin.def: Add definitions for DOUBLEE,
18002         DOUBLEO, DOUBLEH, DOUBLEL, UNS_DOUBLEO, UNS_DOUBLEE, UNS_DOUBLEH,
18003         UNS_DOUBLEL.
18004         * config/rs6000/altivec.md: Add code generator for doublee<mode>2,
18005         unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2, doubleh<mode>2,
18006         unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2, add mode attribute
18007         VS_sxwsp.
18008         * config/rs6000/altivec.h: Add define for vec_doublee, vec_doubleo,
18009         vec_doublel, vec_doubleh.
18010         * doc/extend.texi: Update the built-in documentation file for the
18011         new built-in functions.
18013 2017-06-02  David Malcolm  <dmalcolm@redhat.com>
18015         PR jit/80954
18016         * ipa-inline-analysis.c (free_growth_caches): Set
18017         edge_removal_hook_holder to NULL after removing it.
18019 2017-06-02  Sudakshina Das  <sudi.das@arm.com>
18021         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Return CC_SWP for
18022         comparision with zero.
18024 2017-06-02  Will Schmidt  <will_schmidt@vnet.ibm.com>
18025         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
18026         for early expansion of vec_min and vec_max builtins.
18027         (builtin_function_type): Add min/max unsigned variants to those
18028         identified as having unsigned arguments.
18030 2017-06-02  Olivier Hainque  <hainque@adacore.com>
18032         * config/vx-common.h (DWARF_UNWIND_INFO): Switch #define to 1.
18034 2017-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18036         * config/aarch64/aarch64-simd.md (*aarch64_simd_vec_copy_lane<mode>):
18037         Use VALL_F16 iterator rather than VALL.
18039 2017-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18041         * config/aarch64/aarch64.c (aarch64_split_compare_and_swap):
18042         Emit CBNZ inside loop when doing a strong exchange and comparing
18043         against zero.  Generate the CC flags after the loop.
18045 2017-06-02  David Edelsohn  <dje.gcc@gmail.com>
18047         * dwarf2out.c (DWARF_INITIAL_LENGTH_SIZE_STR): New.
18048         (dl_section_ref): New.
18049         (dwarf2out_finish): Copy debug_line_section_label to dl_section_ref.
18050         On AIX, append an expression to subtract the size of the
18051         section length to dl_section_ref.
18053 2017-06-02  Will Schmidt  <will_schmidt@vnet.ibm.com>
18055         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
18056         for early expansion of vector absolute builtins.
18058 2017-06-02  Richard Biener  <rguenther@suse.de>
18060         * tree-vect-slp.c (vect_detect_hybrid_slp_2): Match up
18061         what we consider a relevant use stmt with vect_detect_hybrid_slp_stmts.
18063 2017-06-02  Richard Biener  <rguenther@suse.de>
18065         PR tree-optimization/80948
18066         * tree-tailcall.c (find_tail_calls): Track stmts to move in
18067         stmt order as well.
18069 2017-06-02  Richard Biener  <rguenther@suse.de>
18071         * tree-vect-loop.c (vect_analyze_loop_operations): Not relevant
18072         PHIs are ok.
18073         * tree-vect-stmts.c (process_use): Do not mark backedge defs
18074         for inductions as relevant.
18076 2017-06-02  Richard Biener  <rguenther@suse.de>
18078         * tree-vect-loop.c (get_initial_def_for_induction): Inline into ...
18079         (vectorizable_induction): ... this.  Remove dead code.
18081 2017-06-02  Eric Botcazou  <ebotcazou@adacore.com>
18083         * builtins. (expand_builtin_alloca): Remove second parameter and
18084         infer its value from the first parameter instead.
18085         (expand_builtin) <BUILT_IN_ALLOCA>: Adjust call to above.
18087 2017-06-02  Jakub Jelinek  <jakub@redhat.com>
18089         PR rtl-optimization/80903
18090         * loop-doloop.c (add_test): Unshare sequence.
18092 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
18094         * doc/invoke.texi: Document the -Wsizeof-pointer-div warning.
18096 2017-06-01  Bernd Edlinger  <bernd.edlinger@hotmail.de>
18098         * config/i386/i386.c (x86_64_ms_sysv_extra_clobbered_registers): Make
18099         static.
18100         (xlogue_layout::get_stack_space_used, xlogue_layout::s_instances,
18101         xlogue_layout::get_instance, logue_layout::xlogue_layout,
18102         sp_valid_at, fp_valid_at, choose_basereg): Formatting.
18103         (xlogue_layout::get_stub_rtx): Make static.
18104         (xlogue_layout::get_stub_name): Avoid const-cast, make static.
18105         (xlogue_layout::compute_stub_managed_regs): Rename to...
18106         (xlogue_layout::count_stub_managed_regs): ...this.
18107         (xlogue_layout::is_stub_managed_reg): New function.
18108         (xlogue_layout::m_stub_names): Rename to...
18109         (xlogue_layout::s_stub_names): ...this, make static.
18110         (xlogue_layout::STUB_INDEX_OFFSET, xlogue_layout::MIN_REGS,
18111         xlogue_layout::MAX_REGS, xlogue_layout::MAX_EXTRA_REGS,
18112         xlogue_layout::VARIANT_COUNT, xlogue_layout::STUB_NAME_MAX_LEN,
18113         xlogue_layout::s_stub_names): Instantiate statics.
18114         (stub_managed_regs): Remove.
18115         (ix86_save_reg): Use xlogue_layout::compute_stub_managed_regs.
18116         (disable_call_ms2sysv_xlogues): Rename to...
18117         (warn_once_call_ms2sysv_xlogues): ...this, and warn only once.
18118         (ix86_initial_elimination_offset, ix86_expand_call): Fix call_ms2sysv
18119         warning logic.
18120         (ix86_static_chain): Make sure that ix86_static_chain_on_stack can't
18121         change after reload_completed.
18122         (ix86_can_use_return_insn_p): Use the ix86_frame data structure
18123         directly.
18124         (ix86_expand_prologue): Likewise.
18125         (ix86_expand_epilogue): Likewise.
18126         (ix86_expand_split_stack_prologue): Likewise.
18127         (ix86_compute_frame_layout): Remove frame parameter ...
18128         (TARGET_COMPUTE_FRAME_LAYOUT): ... and export it as a target hook.
18129         (ix86_finalize_stack_realign_flags): Call ix86_compute_frame_layout
18130         only if necessary.
18131         (ix86_init_machine_status): Don't set use_fast_prologue_epilogue_nregs.
18132         (ix86_frame): Move from here ...
18133         * config/i386/i386.h (ix86_frame): ... to here.
18134         (machine_function): Remove use_fast_prologue_epilogue_nregs, cache the
18135         complete ix86_frame data structure instead.  Remove some_ld_name.
18137 2017-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
18139         * dwarf2out.c (dwarf2out_late_global_decl): Add locations for
18140         symbols that hold a DECL_VALUE_EXPR.
18142 2017-06-01  Martin Jambor  <mjambor@suse.cz>
18144         PR tree-optimization/80898
18145         * tree-sra.c (process_subtree_disqualification): Removed.
18146         (disqualify_candidate): Do not acll
18147         process_subtree_disqualification.
18148         (subtree_mark_written_and_enqueue): New function.
18149         (propagate_all_subaccesses): Set grp_write of LHS subtree if the
18150         RHS has been disqualified and re-queue LHS if necessary.  Apart
18151         from that, ignore disqualified RHS.
18153 2017-06-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18155         * config/s390/s390.c (s390_emit_epilogue): Disable early return
18156         address fetch for z10 or later.
18158 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18160         * config/arc/arc.md (tst_movb): Add guard when splitting.
18162 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18164         * config/arc/arc.c (arc_can_eliminate): Test against
18165         arc_frame_pointer_needed.
18167 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18169         * config/arc/arc.c (arc_expand_prologue): Emit a special barrier
18170         to prevent store reordering.
18171         * config/arc/arc.md (UNSPEC_ARC_STKTIE): Define.
18172         (type): Add block type.
18173         (stack_tie): Define special instruction to be used in
18174         expand_prologue.
18176 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18178         * config/arc/arc.md (commutative_binary_comparison): Remove 'I'
18179         constraint. It is not valid for the pattern.
18180         (noncommutative_binary_comparison): Likewise.
18182 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18184         * config/arc/simdext.md (movv2hi_insn): Change predicate to avoid
18185         scaled addresses.
18187 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18189         * config/arc/arc.c (arc_conditional_register_usage): Allow r30 to
18190         be used by the reg-alloc.
18192 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18194         * config/arc/arc.md (mulsi3): Avoid use of hard registers before
18195         reg-alloc when having mul64 or mul32x16 instructions.
18196         (mulsidi3): Likewise.
18197         (umulsidi3): Likewise.
18198         (mulsi32x16): New pattern.
18199         (mulsi64): Likewise.
18200         (mulsidi64): Likewise.
18201         (umulsidi64): Likewise.
18202         (MUL32x16_REG): Define.
18203         (mul64_600): Use MUL32x16_REG.
18204         (mac64_600): Likewise.
18205         (umul64_600): Likewise.
18206         (umac64_600): Likewise.
18208 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
18210         * config/arc/arc.md (mulsi3_700): Make it commutative.
18212 2017-06-01  Jose E. Marchesi  <jose.marchesi@oracle.com>
18214         * config/sparc/sparc.md (*zero_extendsidi2_insn_sp64): Set insn
18215         type for movstouw.
18216         (*sign_extendsidi2_insn): Likewise for movstosw.
18218 2017-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
18220         * dwarf2out.c (get_discr_value): Call the get_debug_type hook on
18221         the type of the input discriminant value.  Convert the
18222         discriminant value of signedness vary.
18224 2017-06-01  Volker Reichelt  <v.reichelt@netcologne.de>
18226         * doc/invoke.texi (-Wcatch-value): Document new shortcut.
18227         Add to -Wall section.
18229 2017-06-01  Richard Biener  <rguenther@suse.de>
18231         PR middle-end/66313
18232         * fold-const.c (fold_plusminus_mult_expr): If the factored
18233         factor may be zero use a wrapping type for the inner operation.
18234         * tree-tailcall.c (independent_of_stmt_p): Pass in to_move bitmap
18235         and handle moved defs.
18236         (process_assignment): Properly guard the unary op case.  Return a
18237         tri-state indicating that moving the stmt before the call may allow
18238         to continue.  Pass through to_move.
18239         (find_tail_calls): Handle moving unrelated defs before
18240         the call.
18242 2017-05-31  Segher Boessenkool  <segher@kernel.crashing.org>
18244         PR target/80618
18245         * config/rs6000/vector.md (*vector_uneq<mode>): Write the nor in the
18246         splitter result in the canonical way.
18248 2017-05-31  Uros Bizjak  <ubizjak@gmail.com>
18250         * config/i386/i386.md (*zero_extendsidi2): Enable alternative (?r, *Yj)
18251         also for 32bit target.  Update insn attributes.
18252         (zero-extendsidi2 splitter): Allow all registers for operand 1.
18254 2017-05-31  Sebastian Peryt  <sebastian.peryt@intel.com>
18256         * config/i386/avx512fintrin.h (_mm_mask_max_sd)
18257         (_mm_maskz_max_sd, _mm_mask_max_ss, _mm_maskz_max_ss)
18258         (_mm_mask_min_sd, _mm_maskz_min_sd, _mm_mask_min_ss)
18259         (_mm_maskz_min_ss): New intrinsics.
18261 2017-05-31  Martin Liska  <mliska@suse.cz>
18263         * tree-vect-loop.c (vect_create_epilog_for_reduction):
18264         Change comment style to one we normally use.
18265         (vectorizable_reduction): Likewise.
18266         (vectorizable_induction): Likewise.
18267         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
18268         (vectorizable_call): Likewise.
18269         (vectorizable_simd_clone_call): Likewise.
18270         (vectorizable_conversion): Likewise.
18271         (vectorizable_assignment): Likewise.
18272         (vectorizable_shift): Likewise.
18273         (vectorizable_operation): Likewise.
18274         (vectorizable_store): Likewise.
18275         (vectorizable_load): Likewise.
18276         * tree-vectorizer.h: Likewise.
18278 2017-05-31  Alexander Monakov  <amonakov@ispras.ru>
18280         * passes.c (emergency_dump_function): New.
18281         * tree-pass.h (emergency_dump_function): Declare.
18282         * plugin.c (plugins_internal_error_function): Remove.
18283         * plugin.h (plugins_internal_error_function): Remove declaration.
18284         * toplev.c (internal_error_function): New static function.  Use it...
18285         (general_init): ...here.
18287 2017-05-31  Graham Markall  <graham.markall@embecosm.com>
18289         * config/arc/arc.c (arc_print_operand): Handle constant operands.
18290         (arc_rtx_costs): Add costs for new patterns.
18291         * config/arc/arc.md: Additional *add_n and *sub_n patterns.
18292         * config/arc/predicates.md: Add _1_2_3_operand predicate.
18294 2017-05-31  Richard Sandiford  <richard.sandiford@linaro.org>
18296         * tree-ssa-strlen.c (get_next_strinfo): New function.
18297         (get_stridx_plus_constant): Use it.
18298         (zero_length_string): Likewise.
18299         (adjust_related_strinfos): Likewise.
18300         (adjust_last_stmt): Likewise.
18302 2017-05-31  Richard Biener  <rguenther@suse.de>
18304         PR target/80880
18305         * config/i386/i386.c (ix86_expand_builtin): Remove assert
18306         for arg being an SSA name when expanding IX86_BUILTIN_BNDRET.
18308 2017-05-31  Richard Sandiford  <richard.sandiford@linaro.org>
18310         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Remove
18311         loop_vinfo argument and use of dependence distance vectors.
18312         Check instead whether the two references differ only in their
18313         initial value and assume that they have the same alignment if the
18314         difference is a multiple of the vector alignment.
18315         (vect_analyze_data_refs_alignment): Update call accordingly.
18317 2017-05-31  Martin Liska  <mliska@suse.cz>
18319         PR target/79155
18320         * config/i386/cpuid.h: Fix typo in a comment in cpuid.h.
18322 2017-05-31  Bin Cheng  <bin.cheng@arm.com>
18324         * tree-vect-loop-manip.c (create_intersect_range_checks_index)
18325         (create_intersect_range_checks): Move from ...
18326         * tree-data-ref.c (create_intersect_range_checks_index)
18327         (create_intersect_range_checks): ... to here.
18328         (create_runtime_alias_checks): New function factored from ...
18329         * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): ...
18330         here.  Call above function.
18331         * tree-data-ref.h (create_runtime_alias_checks): New function.
18333 2017-05-31  Bin Cheng  <bin.cheng@arm.com>
18335         * tree-data-ref.c (prune_runtime_alias_test_list): Relax minimal
18336         segment length for dr_b and compute it in wide_int.
18338 2017-05-31  Richard Biener  <rguenther@suse.de>
18340         PR tree-optimization/80906
18341         * graphite-isl-ast-to-gimple.c (copy_loop_close_phi_nodes): Get
18342         and pass through iv_map.
18343         (copy_bb_and_scalar_dependences): Adjust.
18344         (translate_pending_phi_nodes): Likewise.
18345         (copy_loop_close_phi_args): Handle code-generating IVs instead
18346         of ICEing.
18348 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
18350         * diagnostic-color.c (color_dict): Add "type-diff".
18351         (parse_gcc_colors): Update comment.
18352         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
18353         -fdiagnostics-show-template-tree and -fno-elide-type.
18354         (GCC_COLORS): Add type-diff to example.
18355         (type-diff=): New.
18356         (-fdiagnostics-show-template-tree): New.
18357         (-fno-elide-type): New.
18358         * pretty-print.c (pp_format): Pass quote and formatters[argno] to
18359         the pp_format_decoder callback.  Call any m_format_postprocessor's
18360         "handle" method.
18361         (pretty_printer::pretty_printer): Initialize
18362         m_format_postprocessor.
18363         (pretty_printer::~pretty_printer): Delete any
18364         m_format_postprocessor.
18365         * pretty-print.h (printer_fn): Add bool and const char ** parameters.
18366         (class format_postprocessor): New class.
18367         (struct pretty_printer::format_decoder): Document the new parameters.
18368         (struct pretty_printer::m_format_postprocessor): New field.
18369         * tree-diagnostic.c (default_tree_printer): Update for new
18370         bool and const char ** params.
18371         * tree-diagnostic.h (default_tree_printer): Likewise.
18373 2017-05-30  Segher Boessenkool  <segher@kernel.crashing.org>
18375         * config/rs6000/predicates.md (cc_reg_not_micro_cr0_operand): Delete.
18376         (lwa_operand): Delete rs6000_gen_cell_microcode test.
18377         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
18378         rs6000_gen_cell_microcode code.
18379         (rs6000_final_prescan_insn): Delete.
18380         (rs6000_opt_vars): Delete the "gen-cell-microcode" and
18381         "warn-cell-microcode" entries.
18382         * config/rs6000/rs6000.h (FINAL_PRESCAN_INSN): Delete.
18383         * config/rs6000/rs6000.md: Delete rs6000_gen_cell_microcode tests
18384         throughout.  Change cc_reg_not_micro_cr0_operand to
18385         cc_reg_not_cr0_operand throughout.
18386         (*extendhi<mode>2_noload): Delete.
18387         * config/rs6000/rs6000.opt (mgen-cell-microcode): Replace by stub.
18388         (mwarn-cell-microcode): Delete.
18389         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete
18390         -mgen-cell-microcode and -mwarn-cell-microcode.
18392 2017-05-30  Uros Bizjak  <ubizjak@gmail.com>
18394         PR target/80833
18395         * config/i386/constraints.md (Yd): New constraint.
18396         (Ye): Ditto.
18397         * config/i386/i386.md (*movti_internal): Add (?r, Ye)
18398         and (?Yd, r) alternatives.  Update insn attributes.
18399         * config/i386/i386.md (*movti_internal): Add (?r, *Ye)
18400         and (?*Yd, r) alternatives.  Update insn attributes.
18401         (double-mode inter-unit splitters): Add new GR<->XMM splitters.
18403 2017-05-30  Pierre-Marie de Rodat  <derodat@adacore.com>
18405         * gimplify.c (gimplify_modify_expr): Don't create a
18406         DECL_DEBUG_EXPR link if *FROM_P does not belong to the current
18407         function.
18409 2017-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
18411         * config/arm/arm-builtins.c (arm_expand_builtin): Remove const.
18413 2017-05-30  Richard Biener  <rguenther@suse.de>
18415         * tree-vectorizer.h (struct _stmt_vec_info): Add reduc_type
18416         and reduc_def fields.
18417         (STMT_VINFO_REDUC_TYPE): New define.
18418         (STMT_VINFO_REDUC_DEF): Likewise.
18419         (vect_force_simple_reduction): Adjust prototype.
18420         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Adjust.
18421         (vect_is_simple_reduction): Remove check_reduction argument.
18422         (vect_force_simple_reduction): Adjust and set
18423         STMT_VINFO_REDUC_TYPE and STMT_VINFO_REDUC_DEF.
18424         (vectorizable_reduction): Do not re-do reduction analysis
18425         but use STMT_VINFO_REDUC_TYPE and STMT_VINFO_REDUC_DEF.
18426         * tree-parloops.c (gather_scalar_reductions): Adjust.
18428 2017-05-30  Richard Biener  <rguenther@suse.de>
18430         PR middle-end/80901
18431         * cfgexpand.c (expand_gimple_cond): Match up loop fixup with
18432         split_edge code.
18434 2017-05-24  Robin Dapp  <rdapp@linux.vnet.ibm.com>
18436         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs):
18437         Introduce unknown_misalignment parameter and remove vf.
18438         (vect_peeling_hash_get_lowest_cost):
18439         Pass unknown_misalignment parameter.
18440         (vect_enhance_data_refs_alignment):
18441         Fix unsupportable data ref treatment.
18443 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
18445         * tree-vect-data-refs.c (vect_get_data_access_cost):
18446         Workaround for SLP handling.
18447         (vect_enhance_data_refs_alignment):
18448         Compute costs for doing no peeling at all, compare to the best
18449         peeling costs so far and avoid peeling if cheaper.
18451 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
18453         * tree-vect-data-refs.c (vect_peeling_hash_choose_best_peeling):
18454         Return peeling info and set costs to zero for unlimited cost
18455         model.
18456         (vect_enhance_data_refs_alignment): Also inspect all datarefs
18457         with unknown misalignment. Compute and costs for unknown
18458         misalignment, compare them to the costs for known misalignment
18459         and choose the cheapest for peeling.
18461 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
18463         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Rename.
18464         (vect_get_peeling_costs_all_drs): Create function.
18465         (vect_peeling_hash_get_lowest_cost):
18466         Use vect_get_peeling_costs_all_drs.
18467         (vect_peeling_supportable): Create function.
18468         (vect_enhance_data_refs_alignment): Use vect_peeling_supportable.
18470 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
18472         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Create
18473         DR_HAS_NEGATIVE_STEP.
18474         (vect_update_misalignment_for_peel): Define DR_MISALIGNMENT.
18475         (vect_enhance_data_refs_alignment): Use.
18476         (vect_duplicate_ssa_name_ptr_info): Use.
18477         * tree-vectorizer.h (dr_misalignment): Use.
18478         (known_alignment_for_access_p): Use.
18480 2017-05-30  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
18482         PR target/78838
18483         * config/msp430/msp430.c (gen_prefix): Return NULL when section name is
18484         .lowtext.
18485         (has_section_name): New function.
18487 2017-05-30  Martin Liska  <mliska@suse.cz>
18489         PR other/80909
18490         * auto-profile.c (get_function_decl_from_block): Fix
18491         parenthesis.
18493 2017-05-30  Richard Biener  <rguenther@suse.de>
18495         PR middle-end/80876
18496         * cfgexpand.c (expand_gimple_cond): Fixup preserving loops again.
18498 2017-05-30  Martin Liska  <mliska@suse.cz>
18500         * dumpfile.c: Use newly added macro DUMP_FILE_INFO.
18501         * dumpfile.h (struct dump_file_info): Remove ctors.
18503 2017-05-30  Martin Liska  <mliska@suse.cz>
18505         * predict.def: Fix GNU coding style.
18507 2017-05-29  Max Filippov  <jcmvbkbc@gmail.com>
18509         * config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
18510         Mark 'to' argument with ATTRIBUTE_UNUSED.
18512 2017-05-29  Max Filippov  <jcmvbkbc@gmail.com>
18514         * config/xtensa/xtensa.c (xtensa_emit_call): Use
18515         HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string.
18516         (print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld
18517         format string.
18519 2017-05-29  Eric Botcazou  <ebotcazou@adacore.com>
18521         * doc/install.texi (Options specification): Restore entry of
18522         --enable-sjlj-exceptions.
18524 2017-05-27  Michael Eager  <eager@eagercon.com>
18526         Revert:
18527         2016-01-21  Ajit Agarwal  <ajitkum@xilinx.com>
18529         See https://gcc.gnu.org/ml/gcc/2017-05/msg00221.html.
18531         * config/microblaze/microblaze.h
18532         (FIXED_REGISTERS): Update in macro.
18533         (CALL_USED_REGISTERS): Update in macro.
18535 2017-05-27  François-Xavier Coudett  <fxcoudert@gcc.gnu.org>
18537         * doc/install.texi: Add links to macOS binary distributions.
18539 2017-05-27  Jakub Jelinek  <jakub@redhat.com>
18541         PR bootstrap/80887
18542         Revert:
18543         2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
18545         * match.pd ((A +- CST1) +- CST2): Allow some conversions.
18547 2017-05-26  Martin Liska  <mliska@suse.cz>
18549         * dumpfile.h (enum dump_kind): Renumber TDF_* flags to be contiguous.
18551 2017-05-26  Martin Liska  <mliska@suse.cz>
18553         * cfg.c (check_bb_profile): Do not use TDF_COMMENT and print
18554         always leading ';; '.
18555         (dump_bb_info): Likewise.
18556         (brief_dump_cfg): Likewise.
18557         * cfgrtl.c (print_rtl_with_bb): Do not use TDF_COMMENT.
18558         * dumpfile.c: Remove usage of TDF_VERBOSE.
18559         * dumpfile.h (enum dump_kind): Likewise.
18560         (dump_gimple_bb_header): Do not use TDF_COMMENT.
18561         * print-tree.c (debug_verbose): Remove.
18562         * tree-cfg.c (gimple_dump_cfg): Do not use TDF_COMMENT.
18563         (dump_function_to_file): Remove dumps guarded with TDF_VERBOSE.
18564         * tree-diagnostic.c (default_tree_printer): Replace
18565         TDF_DIAGNOSTIC with TDF_SLIM.
18567 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
18569         * tree-vect-loop-manip.c (create_intersect_range_checks_index): Pass
18570         in parameter loop, rather than loop_vinfo.
18571         (create_intersect_range_checks): Ditto.
18572         (vect_create_cond_for_alias_checks): Update call to above functions.
18574 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
18576         PR tree-optimization/80815
18577         * tree-data-ref.c (prune_runtime_alias_test_list): Simplify condition
18578         for merging runtime alias checks.  Handle negative DR_STEPs.
18580 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
18582         * tree-vect-data-refs.c (Operator==, comp_dr_with_seg_len_pair):
18583         Move from ...
18584         * tree-data-ref.c (Operator==, comp_dr_with_seg_len_pair): To here.
18585         * tree-vect-data-refs.c (vect_prune_runtime_alias_test_list): Factor
18586         out code pruning runtime alias checks.
18587         * tree-data-ref.c (prune_runtime_alias_test_list): New function
18588         factored out from above.
18589         * tree-vectorizer.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
18590         Move from ...
18591         * tree-data-ref.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
18592         ... to here.
18593         (prune_runtime_alias_test_list): New decalaration.
18595 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
18597         * tree-vect-data-refs.c (compare_tree): Rename and move ...
18598         * tree-data-ref.c (data_ref_compare_tree): ... to here.
18599         * tree-data-ref.h (data_ref_compare_tree): New decalaration.
18600         * tree-vect-data-refs.c (dr_group_sort_cmp): Update uses.
18601         (operator==, comp_dr_with_seg_len_pair): Ditto.
18602         (vect_prune_runtime_alias_test_list): Ditto.
18604 2017-05-26  Martin Liska  <mliska@suse.cz>
18606         PR ipa/80663
18607         * params.def: Bound partial-inlining-entry-probability param.
18609 2017-05-26  Marek Polacek  <polacek@redhat.com>
18611         PR sanitizer/80875
18612         * fold-const.c (fold_binary_loc) <case MULT_EXPR>: Check if OP1
18613         can be negated.
18615 2017-05-26  Richard Biener  <rguenther@suse.de>
18617         PR tree-optimization/80842
18618         * tree-ssa-ccp.c (set_lattice_value): Always meet with the old
18619         value.
18621 2017-05-26  Richard Biener  <rguenther@suse.de>
18623         PR tree-optimization/80844
18624         * tree-vectorizer.c (adjust_simduid_builtins): Propagate results.
18626 2017-05-25  Sebastian Peryt  <sebastian.peryt@intel.com>
18628         * doc/md.texi (Machine Constraints): Update x86 family
18629         machine constraints section to match 'config/i386/constraints.md'.
18631 2017-05-25  Volker Reichelt  <v.reichelt@netcologne.de>
18633         * doc/invoke.texi (-Wcatch-value=): Document new warning option.
18635 2017-05-25  Nathan Sidwell  <nathan@acm.org>
18637         * doc/invoke.texi (--enable-languages): Update documentation.
18639 2017-05-25  Martin Liska  <mliska@suse.cz>
18641         * dumpfile.c: Add TDF_FOLDING.
18642         * dumpfile.h (enum dump_kind): Likewise.
18643         * genmatch.c (dt_simplify::gen_1): Use it.
18645 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
18647         * match.pd (view_convert (convert@0 @1)): Handle zero-extension.
18649 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
18651         * match.pd ((A +- CST1) +- CST2): Allow some conversions.
18652         * tree.c (drop_tree_overflow): Handle COMPLEX_CST and VECTOR_CST.
18654 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
18656         * fold-const.c (fold_binary_loc) [(A & C) == D]: Remove transformation.
18657         * match.pd (X == C): Rewrite it here.
18658         (with_possible_nonzero_bits, with_possible_nonzero_bits2,
18659         with_certain_nonzero_bits2): New predicates.
18660         * tree-ssanames.c (get_nonzero_bits): Handle INTEGER_CST.
18662 2017-05-24  Nathan Sidwell  <nathan@acm.org>
18664         * lto-streamer-in.c (lto_input_data_block): Adjust T const cast to
18665         avoid warning.
18667         * auto-profile.c (afdo_propagate): Adjust T const cast to avoid
18668         warning.
18670 2017-05-24  Segher Boessenkool  <segher@kernel.crashing.org>
18672         * config/powerpcspe: New port.  Files are copied from the rs6000
18673         port, with "rs6000" in filenames replaced by "powerpcspe".
18675 2017-05-24  Wilco Dijkstra  <wdijkstr@arm.com>
18677         PR rtl-optimization/80754
18678         * lra-remat.c (do_remat): Add overlap checks for dst_regno.
18680 2017-05-24  Sheldon Lobo  <smlobo@sheldon.us.oracle.com>
18682         * config/sparc/sparc.md (length): Return the correct value for -mflat
18683         sibcalls to match output_sibcall.
18685 2017-05-24  Segher Boessenkool  <segher@kernel.crashing.org>
18687         PR bootstrap/80860
18688         PR bootstrap/80843
18689         * config/rs6000/rs6000.c (struct machine_function): Add new field
18690         n_components.
18691         (rs6000_get_separate_components): Init that field, use it.
18692         (rs6000_components_for_bb): Use the field.
18694 2017-05-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18696         * config/arm/arm.c (arm_expand_prologue): Fix typo in comment.
18698 2017-05-24  Peter Bergner  <bergner@vnet.ibm.com>
18700         PR middle-end/80823
18701         * tree-cfg.c (group_case_labels_stmt): Delete increment of "i";
18703 2017-05-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18705         PR target/80725
18706         * config/s390/s390.c (s390_check_qrst_address): Check incoming
18707         address against address_operand predicate.
18708         * config/s390/s390.md ("*indirect_jump"): Swap alternatives.
18710 2017-05-24  Eric Botcazou  <ebotcazou@adacore.com>
18712         * var-tracking.c (track_expr_p): Do not return 0 for tracked record
18713         parameters passed indirectly.
18715 2017-05-23  Uros Bizjak  <ubizjak@gmail.com>
18717         * config/i386/i386.md (*movdi_internal): Remove SSE4
18718         alternative 18 (?r, *v).  Update insn attributes.
18719         (*movsi_internal): Remove SSE4 alternative 13 (?r, *v).
18720         Update insn attributes.
18721         (*zero_extendsidi2): Remove SSE4 alternative (?r, *x).
18722         Update insn attributes.
18723         * config/i386/sse.md (vec_extract<ssevecmodelower>_0): Remove SSE4
18724         alternative 1 (r, v). Remove isa attribute.
18725         * config/i386/i386.c (dimode_scalar_chain::make_vector_copies):
18726         Always move value through stack for !TARGET_INTER_UNIT_MOVES_TO_VEC
18727         and !TARGET_INTER_UNIT_MOVES_TO_VEC targets.
18729 2017-05-23  Tom de Vries  <tom@codesourcery.com>
18731         * doc/sourcebuild.texi (Directives, Verify compiler message): Document
18732         dg-line directive.
18734 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
18736         * cgraphunit.c (symbol_table::process_new_functions): Update.
18737         * ipa-fnsummary.c (pass_data_inline_parameters): Remove.
18738         (inline_generate_summary): Rename to ...
18739         (ipa_fn_summary_generate): ... this one.
18740         (inline_read_summary): Rename to ...
18741         (ipa_fn_summary_read): ... this one.
18742         (inline_write_summary): Rename to ...
18743         (ipa_fn_summary_write): ... this one.
18744         (inline_free_summary): Rename to ...
18745         (ipa_free_fn_summary): ... this one.
18746         (pass_data_local_fn_summary, pass_local_fn_summary,
18747         make_pass_local_fn_summary, pass_data_ipa_free_fn_summary,
18748         pass_ipa_free_fn_summary, make_pass_ipa_free_fn_summary,
18749         pass_data_ipa_fn_summary, pass_ipa_fn_summary,
18750         make_pass_ipa_fn_summary): New.
18751         * ipa-fnsummary.h (inline_generate_summary, inline_read_summary,
18752         inline_write_summary, inline_free_summary): Remove.
18753         (ipa_free_fn_summary) : New.
18754         * ipa-inline.c (ipa_inline): Update.
18755         (pass_ipa_inline): Do not generate summaries.
18756         * ipa.c (pass_data_ipa_free_fn_summary, pass_ipa_free_fn_summary):
18757         Remove.
18758         * passes.def: Replace pass_inline_parameters by pass_local_fn_summary
18759         and add pass_ipa_fn_summary.
18760         * tree-pass.h (make_pass_ipa_fn_summary, make_pass_local_fn_summary):
18761         New.
18762         (make_pass_inline_parameters): Remove.
18764 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
18766         * omp-low.c (struct omp_context): Remove "default_kind" member.
18767         Adjust all users.
18769         * omp-offload.c (execute_oacc_device_lower): Remove the
18770         parallelism dimensions function attributes for unparallelized
18771         OpenACC kernels constructs.
18773 2017-05-23  Martin Liska  <mliska@suse.cz>
18775         * cgraph.c (cgraph_node::get_create): Use symtab_node::dump_{asm_,}name
18776         functions.
18777         (cgraph_edge::make_speculative): Likewise.
18778         (cgraph_edge::resolve_speculation): Likewise.
18779         (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
18780         (cgraph_node::dump): Likewise.
18781         * cgraph.h: Likewise.
18782         * cgraphunit.c (analyze_functions): Likewise.
18783         (symbol_table::compile): Likewise.
18784         * ipa-cp.c (print_all_lattices): Likewise.
18785         (determine_versionability): Likewise.
18786         (initialize_node_lattices): Likewise.
18787         (ipcp_verify_propagated_values): Likewise.
18788         (estimate_local_effects): Likewise.
18789         (update_profiling_info): Likewise.
18790         (create_specialized_node): Likewise.
18791         (perhaps_add_new_callers): Likewise.
18792         (decide_about_value): Likewise.
18793         (decide_whether_version_node): Likewise.
18794         (identify_dead_nodes): Likewise.
18795         (ipcp_store_bits_results): Likewise.
18796         * ipa-devirt.c (dump_targets): Likewise.
18797         (ipa_devirt): Likewise.
18798         * ipa-icf.c (sem_item::dump): Likewise.
18799         (sem_function::equals): Likewise.
18800         (sem_variable::equals): Likewise.
18801         (sem_item_optimizer::read_section): Likewise.
18802         (sem_item_optimizer::execute): Likewise.
18803         (congruence_class::dump): Likewise.
18804         * ipa-inline-analysis.c (dump_ipa_call_summary): Likewise.
18805         (dump_inline_summary): Likewise.
18806         (estimate_node_size_and_time): Likewise.
18807         (inline_analyze_function): Likewise.
18808         * ipa-inline-transform.c (inline_call): Likewise.
18809         * ipa-inline.c (report_inline_failed_reason): Likewise.
18810         (want_early_inline_function_p): Likewise.
18811         (edge_badness): Likewise.
18812         (update_edge_key): Likewise.
18813         (inline_small_functions): Likewise.
18814         * ipa-profile.c (ipa_profile): Likewise.
18815         * ipa-prop.c (ipa_print_node_jump_functions): Likewise.
18816         (ipa_make_edge_direct_to_target): Likewise.
18817         (remove_described_reference): Likewise.
18818         (ipa_impossible_devirt_target): Likewise.
18819         (propagate_controlled_uses): Likewise.
18820         (ipa_print_node_params): Likewise.
18821         (ipcp_transform_function): Likewise.
18822         * ipa-pure-const.c (pure_const_read_summary): Likewise.
18823         (propagate_pure_const): Likewise.
18824         * ipa-reference.c (generate_summary): Likewise.
18825         (read_write_all_from_decl): Likewise.
18826         (propagate): Likewise.
18827         (ipa_reference_read_optimization_summary): Likewise.
18828         * ipa-utils.c (ipa_merge_profiles): Likewise.
18829         * ipa.c (walk_polymorphic_call_targets): Likewise.
18830         (symbol_table::remove_unreachable_nodes): Likewise.
18831         (ipa_single_use): Likewise.
18832         * passes.c (execute_todo): Likewise.
18833         * predict.c (drop_profile): Likewise.
18834         * symtab.c (symtab_node::get_dump_name): New function.
18835         (symtab_node::dump_name): Likewise.
18836         (symtab_node::dump_asm_name): Likewise.
18837         (symtab_node::dump_references): Likewise.
18838         (symtab_node::dump_referring): Likewise.
18839         (symtab_node::dump_base): Likewise.
18840         (symtab_node::debug_symtab): Likewise.
18841         * tree-sra.c (convert_callers_for_node): Likewise.
18842         * tree-ssa-structalias.c (ipa_pta_execute): Likewise.
18843         * value-prof.c (init_node_map): Likewise.
18845 2017-05-23  Martin Liska  <mliska@suse.cz>
18847         * cgraph.h: Move symtab_node::dump_table to symbol_table::dump
18848         and symtab_node::debug_symtab to symbol_table::debug.
18849         * cgraphunit.c (analyze_functions): Use the renamed function.
18850         (symbol_table::compile): Likewise.
18851         * ipa-cp.c (ipcp_verify_propagated_values): Likewise.
18852         * ipa-icf.c (sem_item_optimizer::execute): Likewise.
18853         * passes.c (execute_todo): Likewise.
18854         * symtab.c (symbol_table::dump): New function.
18855         * tree-ssa-structalias.c (ipa_pta_execute): Use the renamed function.
18857 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
18859         * ipa-fnsummary.c (estimate_node_size_and_time): Do not sanity check
18860         that nonconst implies exec.
18862 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
18864         * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
18865         inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
18866         (inline_edge_summary_vec): Turn into ...
18867         (ipa_call_summaries): ... this one.
18868         (redirect_to_unreachable, edge_set_predicate,
18869         evaluate_properties_for_edge, inline_summary_alloc,
18870         reset_ipa_call_summary, reset_inline_summary,
18871         inline_summary_t::duplicate): Update.
18872         (inline_edge_duplication_hook): Turn to ...
18873         (ipa_call_summary_t::duplicate): ... this one.
18874         (inline_edge_removal_hook): Turn to ...
18875         (ipa_call_summary_t::remove): ... this one.
18876         (dump_inline_edge_summary): Turn to ...
18877         (dump_ipa_call_summary): ... this one.
18878         (estimate_function_body_sizes): Update.
18879         (inline_update_callee_summaries): Update.
18880         (remap_edge_change_prob): Update.
18881         (remap_edge_summaries): Update.
18882         (inline_merge_summary): Update.
18883         (do_estimate_edge_time): Update.
18884         (inline_generate_summary): Update.
18885         (inline_read_section): Update.
18886         (inline_read_summary): Update.
18887         (inline_free_summary): Update.
18888         * ipa-inline.c (can_inline_edge_p): Update.
18889         (compute_inlined_call_time): Update.
18890         (want_inline_small_function_p): Update.
18891         (edge_badness): Update.
18892         (early_inliner): Update.
18893         * ipa-inline.h (inline_edge_summary): Turn to ...
18894         (ipa_call_summary): ... this one.
18895         (ipa_call_summary_t): New class.
18896         (inline_edge_summary_t, inline_edge_summary_vec): Remove.
18897         (ipa_call_summaries): New.
18898         (inline_edge_summary): Remove.
18899         (estimate_edge_growth): Update.
18900         * ipa-profile.c (ipa_propagate_frequency_1): Update.
18901         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
18902         * ipa-split.c (execute_split_functions): Update.
18903         * ipa.c (symbol_table::remove_unreachable_nodes): Update.
18905 2017-05-23  Tom de Vries  <tom@codesourcery.com>
18907         * doc/sourcebuild.texi (Effective-Target Keywords, Other hardware
18908         attributes): Document rdrand effective target.
18910 2017-05-23  Tom de Vries  <tom@codesourcery.com>
18912         * doc/sourcebuild.texi (Effective-Target Keywords, Other hardware
18913         attributes): Sort alphabetically.
18915 2017-05-23  Georg-Johann Lay  <avr@gjlay.de>
18917         * config/avr/genmultilib.awk: Use gsub instead of gensub.
18919 2017-05-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
18921         PR target/80718
18922         * config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Split
18923         V2DF/V2DI splat into two separate patterns, one that handles
18924         registers, and the other that only handles memory.  Drop support
18925         for splatting from a GPR on ISA 2.07 and then splitting the
18926         splat into direct move and splat.
18927         (vsx_splat_<mode>_reg): Likewise.
18928         (vsx_splat_<mode>_mem): Likewise.
18930 2017-05-22  Segher Boessenkool  <segher@kernel.crashing.org>
18932         * cfgcleanup.c (bb_is_just_return): Allow CLOBBERs.
18934 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
18936         PR middle-end/80809
18937         * omp-low.c (finish_taskreg_remap): New function.
18938         (finish_taskreg_scan): If unit size of ctx->record_type
18939         is non-constant, unshare the size expression and replace
18940         decls in it with possible outer var refs.
18942         PR middle-end/80809
18943         * gimplify.c (omp_add_variable): For GOVD_DEBUG_PRIVATE use
18944         GOVD_SHARED rather than GOVD_PRIVATE with it.
18945         (gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Expect
18946         GOVD_SHARED rather than GOVD_PRIVATE with GOVD_DEBUG_PRIVATE.
18948         PR middle-end/80853
18949         * omp-low.c (lower_reduction_clauses): Pass OMP_CLAUSE_PRIVATE
18950         as last argument to build_outer_var_ref for pointer bases of array
18951         section reductions.
18953 2017-05-19  Martin Sebor  <msebor@redhat.com>
18955         * print-tree.c (print_node): Print DECL_READ_P flag.
18957 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
18959         * Makefile.in: Add ipa-fnsummary.o and ipa-fnsummary.h
18960         * auto-profile.c: Replace ipa-inline.h by ipa-fnsummary.h
18961         * cgraph.c: Likewise.
18962         * cgraphunit.c: Likewise.
18963         * gengtype.c: Likewise.
18964         * ipa-cp.c: Likewise.
18965         * ipa-devirt.c: Likewise.
18966         * ipa-icf.c: Likewise.
18967         * ipa-predicate.c: Likewise.
18968         * ipa-profile.c: Likewise.
18969         * ipa-prop.c: Likewise.
18970         * ipa-split.c: Likewise.
18971         * ipa.c: Likewise.
18972         * ipa-inline-analysis.c (inline_summaries, ipa_call_summaries,
18973         edge_predicate_pool, dump_inline_hints,
18974         inline_summary::account_size_time, redirect_to_unreachable,
18975         edge_set_predicate, set_hint_predicate,
18976         evaluate_conditions_for_known_args, evaluate_properties_for_edge,
18977         inline_summary_alloc, ipa_call_summary::reset, inline_summary::reset,
18978         inline_summary_t::remove, remap_hint_predicate_after_duplication,
18979         inline_summary_t::duplicate, ipa_call_summary_t::duplicate,
18980         ipa_call_summary_t::remove, initialize_growth_caches,
18981         free_growth_caches, dump_ipa_call_summary, dump_inline_summary,
18982         debug_inline_summary, dump_inline_summaries, initialize_inline_failed,
18983         mark_modified, unmodified_parm_1, unmodified_parm,
18984         unmodified_parm_or_parm_agg_item, eliminated_by_inlining_prob,
18985         set_cond_stmt_execution_predicate, set_switch_stmt_execution_predicate,
18986         compute_bb_predicates, will_be_nonconstant_expr_predicate,
18987         will_be_nonconstant_predicate, record_modified_bb_info,
18988         get_minimal_bb, record_modified, param_change_prob,
18989         phi_result_unknown_predicate, predicate_for_phi_result,
18990         array_index_predicate, clobber_only_eh_bb_p, fp_expression_p,
18991         estimate_function_body_sizes, compute_inline_parameters,
18992         compute_inline_parameters_for_curren, pass_data_inline_parameters,
18993         estimate_node_size_and_time, estimate_ipcp_clone_size_and_time,
18994         inline_update_callee_summaries, remap_edge_change_prob,
18995         remap_edge_summaries, remap_hint_predicate, inline_merge_summary,
18996         inline_update_overall_summary, inline_indirect_intraprocedural_analysis,
18997         inline_analyze_function, inline_summary_t::insert,
18998         inline_generate_summary, read_ipa_call_summary, inline_read_section,
18999         inline_read_summary, write_ipa_call_summary, inline_write_summary,
19000         inline_free_summary): Move to ipa-fnsummary.h
19001         (predicate_t): Remove.
19002         * ipa-fnsummary.c: New file.
19003         * ipa-inline.h:  Do not include sreal.h and ipa-predicate.h
19004         (enum inline_hints_vals, inline_hints, agg_position_info,
19005         INLINE_SIZE_SCALE, size_time_entry, inline_summary, inline_summary_t,
19006         inline_summaries, ipa_call_summary, ipa_call_summary_t,
19007         ipa_call_summaries, debug_inline_summary, dump_inline_summaries,
19008         dump_inline_summary, dump_inline_hints, inline_generate_summary,
19009         inline_read_summary, inline_write_summary, inline_free_summary,
19010         inline_analyze_function, initialize_inline_failed,
19011         inline_merge_summary, inline_update_overall_summary,
19012         compute_inline_parameters): Move to ipa-fnsummary.h
19013         * ipa-fnsummary.h: New file.
19014         * ipa-inline-transform.h: Include ipa-inline.h.
19015         * ipa-inline.c: LIkewise.
19017 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
19019         * ipa-inline.c (edge_badness): Use inlined_time instead of
19020         inline_summaries->get.
19022 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
19024         * ipa-inline.c (edge_badness): Use estimate_size_after_inlining.
19026 2017-05-22  Nathan Sidwell  <nathan@acm.org>
19028         * doc/invoke.texi (fdump-translation-unit): Delete documentation.
19029         (fdump-lang): Document 'raw' option.
19030         * dumpfile.h (TDI_tu): Delete.
19031         * dumpfile.c (dump_files): Remove translation-unit.
19032         (FIRST_AUTO_NUMBERED_DUMP): Decrement.
19034 2017-05-22  Georg-Johann Lay  <avr@gjlay.de>
19036         * config/avr/t-avr (AWK) [t-multilib]: Remove "-v FORMAT=Makefile"
19037         command option from $(AWK) call.
19038         * config/avr/genmultilib.awk: Simplify and rewrite so that it
19039         generates MULTILIB_REQUIRED instead of MULTILIB_EXCEPTIONS.
19040         [FORMAT]: Remove handling of variable.
19041         * config/avr/t-multilib: Regenerate.
19043 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
19045         * ipa-inline-analysis.c (inline_summary::reset): Do not reset
19046         self_time.
19047         (dump_inline_summary): Do not print self_time.
19048         (estimate_function_body_sizes): Do not set self_time.
19049         (compute_inline_parameters): Likewise.
19050         (inline_read_section, inline_write_summary): Do not stream self_time.
19051         * ipa-inline.h (inline_summary): Drop self_time.
19053 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
19055         * ipa-inline-analysis.c (account_size_time): Rename to ...
19056         (inline_summary::account_size_time): ... this one.
19057         (reset_ipa_call_summary): Turn to ...
19058         (ipa_call_summary::reset): ... this one.
19059         (reset_inline_summary): Turn to ...
19060         (inline_summary::reset): ... this one.
19061         (inline_summary_t::remove): Update.
19062         (inline_summary_t::duplicate): Update.
19063         (ipa_call_summary_t::remove): Update.
19064         (dump_inline_summary): Update.
19065         (estimate_function_body_sizes): Update.
19066         (compute_inline_parameters): Update.
19067         (estimate_node_size_and_time): Update.
19068         (inline_merge_summary): Update.
19069         (inline_update_overall_summary): Update.
19070         (inline_read_section): Update.
19071         (inline_write_summary): Update.
19072         * ipa-inline.h (inline_summary): Rename entry to size_time_table;
19073         add account_size_time and reset member functions.
19074         (ipa_call_summary): Add reset function.
19075         * ipa-predicate.h (predicate::operator &): Constify.
19077 2017-05-22  Richard Biener  <rguenther@suse.de>
19079         * df-scan.c (df_insn_refs_verify): Speedup when not verifying.
19081 2017-05-19  Jason Merrill  <jason@redhat.com>
19083         * tree.c (make_tree_vec_stat, grow_tree_vec_stat): Use size_t.
19085 2017-05-19  Marek Polacek  <polacek@redhat.com>
19087         PR sanitizer/80800
19088         * fold-const.c (extract_muldiv_1) <case TRUNC_DIV_EXPR>: Add
19089         TYPE_OVERFLOW_WRAPS checks.
19091 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
19093         * tree-core.h (enum omp_clause_default_kind): Add
19094         "OMP_CLAUSE_DEFAULT_PRESENT".
19095         * tree-pretty-print.c (dump_omp_clause): Handle it.
19096         * gimplify.c (enum gimplify_omp_var_data): Add
19097         "GOVD_MAP_FORCE_PRESENT".
19098         (gimplify_adjust_omp_clauses_1): Map it to
19099         "GOMP_MAP_FORCE_PRESENT".
19100         (oacc_default_clause): Handle "OMP_CLAUSE_DEFAULT_PRESENT".
19102         * gimplify.c (oacc_default_clause): Clarify.
19104 2017-05-19  Nathan Sidwell  <nathan@acm.org>
19106         LANG_HOOK_REGISTER_DUMPS
19107         * toplev.c (general_init): Call register dump lang hook.
19108         * doc/invoke.texi: Document -fdump-lang option family.
19109         * dumpfile.c (dump_files): Remove class dump here.
19110         (FIRST_AUTO_NUMBERED_DUMP): Adjust.
19111         * dumpfile.h (tree_dump_index): Remove TDI_class.
19112         * langhooks-def.h (lhd_register_dumps): Declare.
19113         (LANG_HOOKS_REGISTER_DUMPS): Define.
19114         (LANG_HOOKS_INITIALIZER): Add it.
19115         * langhooks.c (lhd_register_dumps): Define.
19116         * langhooks.h (struct lang_hooks): Add register_dumps.
19118 2017-05-19  Nathan Sidwell  <nathan@acm.org>
19120         * context.h (context::set_passes): New.
19121         * context.c (context::context): Do not create pass manager.
19122         * toplev.c (general_init): Create pass manager here.
19124 2017-05-19  Segher Boessenkool  <segher@kernel.crashing.org>
19126         * config/rs6000/rs6000.md (splitter to load of -1 and mask): Don't
19127         use this splitter if two add or or instructions would also work for
19128         the constant we want to generate.
19130 2017-05-19  Richard Biener  <rguenther@suse.de>
19132         PR build/80821
19133         * genmatch.c (dt_node::gen_kids_1): Add missing scope around
19134         predicate evaluation.
19136 2017-05-19  Jan Hubicka  <hubicka@ucw.cz>
19138         * ipa-inline.h (ipa_call_summary): Turn sizes into signed;
19139         add ctor.
19140         * ipa-inline.c (want_inline_small_function_p): Do not cast to
19141         unsigned.
19143 2017-05-19  Jan Hubicka  <hubicka@ucw.cz>
19145         * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
19146         inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
19147         (inline_edge_summary_vec): Turn into ...
19148         (ipa_call_summaries): ... this one.
19149         (redirect_to_unreachable, edge_set_predicate,
19150         evaluate_properties_for_edge, inline_summary_alloc,
19151         reset_ipa_call_summary, reset_inline_summary,
19152         inline_summary_t::duplicate): Update.
19153         (inline_edge_duplication_hook): Turn to ...
19154         (ipa_call_summary_t::duplicate): ... this one.
19155         (inline_edge_removal_hook): Turn to ...
19156         (ipa_call_summary_t::remove): ... this one.
19157         (dump_inline_edge_summary): Turn to ...
19158         (dump_ipa_call_summary): ... this one.
19159         (estimate_function_body_sizes): Update.
19160         (inline_update_callee_summaries): Update.
19161         (remap_edge_change_prob): Update.
19162         (remap_edge_summaries): Update.
19163         (inline_merge_summary): Update.
19164         (do_estimate_edge_time): Update.
19165         (inline_generate_summary): Update.
19166         (inline_read_section): Update.
19167         (inline_read_summary): Update.
19168         (inline_free_summary): Update.
19169         * ipa-inline.c (can_inline_edge_p): Update.
19170         (compute_inlined_call_time): Update.
19171         (want_inline_small_function_p): Update.
19172         (edge_badness): Update.
19173         (early_inliner): Update.
19174         * ipa-inline.h (inline_edge_summary): Turn to ...
19175         (ipa_call_summary): ... this one.
19176         (ipa_call_summary_t): New class.
19177         (inline_edge_summary_t, inline_edge_summary_vec): Remove.
19178         (ipa_call_summaries): New.
19179         (inline_edge_summary): Remove.
19180         (estimate_edge_growth): Update.
19181         * ipa-profile.c (ipa_propagate_frequency_1): Update.
19182         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
19183         * ipa-split.c (execute_split_functions): Update.
19184         * ipa.c (symbol_table::remove_unreachable_nodes): Update.
19186 2017-05-19  Richard Biener  <rguenther@suse.de>
19188         PR middle-end/80764
19189         * cfgexpand.c (expand_gimple_cond): Fix loop fixup.
19191 2017-05-18  Segher Boessenkool  <segher@kernel.crashing.org>
19193         * config/rs6000/rs6000.c (struct machine_function): Add field
19194         fpr_is_wrapped_separately.
19195         (rs6000_get_separate_components): Use 64 components.  Handle the
19196         new FPR components.
19197         (rs6000_components_for_bb): Handle the FPR components.
19198         (rs6000_emit_prologue_components): Handle the FPR components.
19199         (rs6000_emit_epilogue_components): Handle the FPR components.
19200         (rs6000_set_handled_components): Handle the FPR components.
19201         (rs6000_emit_prologue): Don't output prologue code for those FPRs
19202         that are already separately shrink-wrapped.
19203         (rs6000_emit_epilogue): Don't output epilogue code for those FPRs
19204         that are already separately shrink-wrapped.
19206 2017-05-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
19208         PR target/80510
19209         * config/rs6000/predicates.md (simple_offsettable_mem_operand):
19210         New predicate.
19212         * config/rs6000/rs6000.md (ALTIVEC_DFORM): New iterator.
19213         (define_peephole2 for Altivec d-form load): Add peepholes to catch
19214         cases where the register allocator uses a move and an offsettable
19215         memory operation to/from a FPR register on ISA 2.06/2.07.
19216         (define_peephole2 for Altivec d-form store): Likewise.
19218 2017-05-18  Uros Bizjak  <ubizjak@gmail.com>
19220         PR target/80799
19221         * config/i386/mmx.md (*mov<mode>_internal): Enable
19222         alternatives 11, 12, 13 and 14 also for 32bit targets.
19223         Remove alternatives 15, 16, 17 and 18.
19224         * config/i386/sse.md (vec_concatv2di): Change
19225         alternative (!x, *y) to (x, ?!*Yn).
19227 2017-05-18  Paolo Carlini  <paolo.carlini@oracle.com>
19229         * dumpfile.h (enum dump_kind): Remove stray comma.
19231 2017-05-18  Jan Hubicka  <hubicka@ucw.cz>
19233         * Makefile.in: Add ipa-predicate.o and ipa-predicate.h
19234         * ipa-inline-analysis.c (NUM_CONDITIONS): turn into
19235         predicate::num_conditions
19236         (IS_NOT_CONSTANT): turn into predicate::is_not_constant.
19237         (CHANGED): turn into predicate::changed.
19238         (agg_position_info): Move to ipa-predicate.h
19239         (add_condition, predicate::add_clause, predicate::operator &=,
19240         predicate::or_with, predicate::evaluate, predicate::probability,
19241         dump_condition, dump_clause, predicate::dump,
19242         predicate::remap_after_duplication, predicate::remap_after_inlining,
19243         predicate::stream_in, predicate::stream_out): Move to ipa-predicate.c
19244         (evaluate_conditions_for_known_args): Update.
19245         (set_cond_stmt_execution_predicate): Update.
19246         * ipa-inline.h: Include ipa-predicate.h
19247         (condition, inline_param_summary, conditions, agg_position_info,
19248         predicate): Move to ipa-predicate.h
19249         * ipa-predicate.c: New file.
19250         * ipa-predicate.h: New file.
19252 2017-05-18  Wilco Dijkstra  <wdijkstr@arm.com>
19254         * final.c (leaf_function_p): Check we are not in a sequence.
19256 2017-05-18  Martin Liska  <mliska@suse.cz>
19258         * cfgrtl.c (rtl_verify_edges): Remove usage of TDF_RTL.
19259         * dumpfile.c (dump_register): Use new enum dump_kind.
19260         (get_dump_file_name): Likewise.
19261         (dump_enable_all): Likewise.
19262         (dump_switch_p_1): Likewise.
19263         (enable_rtl_dump_file): Remove usage of TDF_RTL.
19264         * dumpfile.h (enum dump_kind): New enum type.
19265         (struct dump_file_info): Create constructor and
19266         format fields and comments.
19267         * passes.c (pass_manager::register_one_dump_file):
19268         Use num dump_kind.
19269         * statistics.c (statistics_early_init): Likewise.
19270         * tree-ssa-loop-prefetch.c (dump_mem_details): Replace
19271         TDF_TREE with TDF_SLIM.
19272         (gather_memory_references_ref): Likewise.
19274 2017-05-18  Martin Liska  <mliska@suse.cz>
19276         * vec.h (struct vnull): Use it.
19278 2017-05-18  Jan Hubicka  <hubicka@ucw.cz>
19280         * ipa-inline-analysis.c (predicate_conditions): Move to ipa-inline.h
19281         (true_predicate, false_predicate, true_predicate_p,
19282         false_predicate_p): Remove.
19283         (single_cond_predicate, not_inlined_predicate): Turn to member function
19284         in ipa-inline.h
19285         (add_condition): Update.
19286         (add_clause): Turn to...
19287         (predicate::add_clause): ... this one; update; allow passing NULL
19288         as parameter.
19289         (and_predicates): Turn to ...
19290         (predicate::operator &=): ... this one.
19291         (predicates_equal_p): Move to predicate::operator == in ipa-inline.h
19292         (or_predicates): Turn to ...
19293         (predicate::or_with): ... this one.
19294         (evaluate_predicate): Turn to ...
19295         (predicate::evaluate): ... this one.
19296         (predicate_probability): Turn to ...
19297         (predicate::probability): ... this one.
19298         (dump_condition): Update.
19299         (dump_predicate): Turn to ...
19300         (predicate::dump): ... this one.
19301         (account_size_time): Update.
19302         (edge_set_predicate): Update.
19303         (set_hint_predicate): UPdate.
19304         (evaluate_conditions_for_known_args): Update.
19305         (evaluate_properties_for_edge): Update.
19306         (remap_predicate_after_duplication): Turn to...
19307         (predicate::remap_after_duplication): ... this one.
19308         (remap_hint_predicate_after_duplication): Update.
19309         (inline_summary_t::duplicate): UPdate.
19310         (dump_inline_edge_summary): Update.
19311         (dump_inline_summary): Update.
19312         (set_cond_stmt_execution_predicate): Update.
19313         (set_switch_stmt_execution_predicate): Update.
19314         (compute_bb_predicates): Update.
19315         (will_be_nonconstant_expr_predicate): Update.
19316         (will_be_nonconstant_predicate): Update.
19317         (phi_result_unknown_predicate): Update.
19318         (predicate_for_phi_result): Update.
19319         (array_index_predicate): Update.
19320         (estimate_function_body_sizes): Update.
19321         (estimate_node_size_and_time): Update.
19322         (estimate_ipcp_clone_size_and_time): Update.
19323         (remap_predicate): Rename to ...
19324         (predicate::remap_after_inlining): ... this one.
19325         (remap_hint_predicate): Update.
19326         (inline_merge_summary): Update.
19327         (inline_update_overall_summary): Update.
19328         (estimate_size_after_inlining): Update.
19329         (read_predicate): Rename to ...
19330         (predicate::stream_in): ... this one.
19331         (read_inline_edge_summary): Update.
19332         (write_predicate): Rename to ...
19333         (predicate::stream_out): ... this one.
19334         (write_inline_edge_summary): Update.
19335         * ipa-inline.h (MAX_CLAUSES): Turn to predicate::max_clauses.
19336         (clause_t): Turn to uint32_t
19337         (predicate): Turn to class; implement constructor and operators
19338         ==, !=, &
19339         (size_time_entry): Update.
19340         (inline_summary): Update.
19341         (inline_edge_summary): Update.
19343 2017-05-18  Marc Glisse  <marc.glisse@inria.fr>
19345         * fold-const.c (fold_binary_loc): Move transformation...
19346         * match.pd (C - X CMP X): ... here.
19348 2017-05-18  Sheldon Lobo  <sheldon.lobo@oracle.com>
19350         * config/sparc/sparc.c (sparc_option_override): Set function
19351         alignment for -mcpu=niagara7 to 64 to match the I$ line.
19352         * config/sparc/sparc.h (BRANCH_COST): Set the SPARC M7 branch
19353         latency to 1.
19354         * config/sparc/sparc.h (BRANCH_COST): Set the SPARC T4 branch
19355         latency to 2.
19356         * config/sparc/sol2.h: Fix a ASM_CPU32_DEFAULT_SPEC typo.
19358 2017-05-18  Marek Polacek  <polacek@redhat.com>
19360         PR sanitizer/80797
19361         * ubsan.c (instrument_null): Unwrap ADDR_EXPRs.
19362         (pass_ubsan::execute): Call gimple_assign_single_p instead of
19363         gimple_assign_load_p.
19365 2017-05-17  Segher Boessenkool  <segher@kernel.crashing.org>
19367         PR middle-end/80692
19368         * real.c (do_compare): Give decimal_do_compare preference over
19369         comparing just the signs.
19371 2017-05-17  Uros Bizjak  <ubizjak@gmail.com>
19373         * doc/md.texi (Canonicalization of Instructions): Describe the
19374         canonical form of instructions that inherently set a condition
19375         code register.
19377 2017-05-17  Peter Bergner  <bergner@vnet.ibm.com>
19379         PR middle-end/80775
19380         * tree-cfg.c: Move deletion of unreachable case statements to after
19381         the merging of consecutive case labels.
19383 2017-05-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>
19385         * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Refer
19386         readers to __gnu_cmse_nonsecure_call libcall for saving, clearing and
19387         restoring of callee-saved registers.
19389 2017-05-17  Eric Botcazou  <ebotcazou@adacore.com>
19391         * compare-elim.c (equivalent_reg_at_start): Adjust outdated comment.
19392         * config/visium/visium.c (single_set_and_flags): Likewise.
19393         * config/visium/visium.md (Substitutions): Likewise.
19395 2017-05-17  Martin Liska  <mliska@suse.cz>
19397         * cfg.c: Introduce dump_flags_t type and
19398         use it instead of int type.
19399         * cfg.h: Likewise.
19400         * cfghooks.c: Likewise.
19401         * cfghooks.h (struct cfg_hooks): Likewise.
19402         * cfgrtl.c: Likewise.
19403         * cfgrtl.h: Likewise.
19404         * cgraph.c (cgraph_node::get_body): Likewise.
19405         * coretypes.h: Likewise.
19406         * domwalk.c: Likewise.
19407         * domwalk.h: Likewise.
19408         * dumpfile.c (struct dump_option_value_info): Likewise.
19409         (dump_enable_all): Likewise.
19410         (dump_switch_p_1): Likewise.
19411         (opt_info_switch_p): Likewise.
19412         * dumpfile.h (enum tree_dump_index): Likewise.
19413         (struct dump_file_info): Likewise.
19414         * genemit.c: Likewise.
19415         * generic-match-head.c: Likewise.
19416         * gengtype.c (open_base_files): Likewise.
19417         * gimple-pretty-print.c: Likewise.
19418         * gimple-pretty-print.h: Likewise.
19419         * graph.c (print_graph_cfg): Likewise.
19420         * graphite-scop-detection.c (dot_all_sese): Likewise.
19421         * ipa-devirt.c (build_type_inheritance_graph): Likewise.
19422         * loop-unroll.c (report_unroll): Likewise.
19423         * passes.c (pass_manager::register_one_dump_file): Likewise.
19424         * print-tree.c: Likewise.
19425         * statistics.c: Likewise.
19426         * tree-cfg.c: Likewise.
19427         * tree-cfg.h: Likewise.
19428         * tree-dfa.c: Likewise.
19429         * tree-dfa.h: Likewise.
19430         * tree-dump.c (dump_function): Likewise.
19431         * tree-dump.h (struct dump_info): Likewise.
19432         * tree-pretty-print.c: Likewise.
19433         * tree-pretty-print.h: Likewise.
19434         * tree-ssa-live.c: Likewise.
19435         * tree-ssa-live.h: Likewise.
19436         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Likewise.
19437         * tree-vect-loop.c: Likewise.
19438         * tree-vect-slp.c: Likewise.
19440 2017-05-16  James Greenhalgh  <james.greenhalgh@arm.com>
19441             Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19443         PR tree-optimization/80457
19444         * tree-vect-stmts.c (vect_model_simple_cost): Model the cost
19445         of all arguments to a statement as scalar_to_vec operations.
19446         (vectorizable_call): Adjust call to vect_model_simple_cost for
19447         new parameter.
19448         (vectorizable_conversion): Likewise.
19449         (vectorizable_assignment): Likewise.
19450         (vectorizable_shift): Likewise.
19451         (vectorizable_operation): Likewise.
19452         (vectorizable_comparison): Likewise.
19453         (vect_is_simple_cond): Record the def types for operands.
19454         (vectorizable_condition): Likewise, call vect_model_simple_cost.
19455         * tree-vectorizer.h (vect_model_simple_cost): Add new parameter
19456         for statement argument count.
19458 2017-05-16  Carl Love  <cel@us.ibm.com>
19460         * config/rs6000/rs6000-c: Add support for built-in functions
19461         vector unsigned long long vec_bperm (vector unsigned long long,
19462                                              vector unsigned char)
19463         vector signed long long vec_mule (vector signed int,
19464                                           vector signed int)
19465         vector unsigned long long vec_mule (vector unsigned int,
19466                                             vector unsigned int)
19467         vector signed long long vec_mulo (vector signed int,
19468                                           vector signed int)
19469         vector unsigned long long vec_mulo (vector unsigned int,
19470                                             vector unsigned int)
19471         vector signed char vec_sldw (vector signed char,
19472                                      vector signed char,
19473                                      const int)
19474         vector unsigned char vec_sldw (vector unsigned char,
19475                                        vector unsigned char,
19476                                        const int)
19477         vector signed short vec_sldw (vector signed short,
19478                                       vector signed short,
19479                                       const int)
19480         vector unsigned short vec_sldw (vector unsigned short,
19481                                         vector unsigned short,
19482                                         const int)
19483         vector signed int vec_sldw (vector signed int,
19484                                     vector signed int,
19485                                     const int)
19486         vector unsigned int vec_sldw (vector unsigned int,
19487                                       vector unsigned int,
19488                                       const int)
19489         vector signed long long vec_sldw (vector signed long long,
19490                                           vector signed long long,
19491                                           const int)
19492         vector unsigned long long vec_sldw (vector unsigned long long,
19493                                             vector unsigned long long,
19494                                             const int)
19495         * config/rs6000/rs6000-c: Add support for built-in functions
19496         * config/rs6000/rs6000-builtin.def: Add definition for SLDW.
19497         * config/rs6000/altivec.h: Add defintion for vec_sldw.
19498         * doc/extend.texi: Update the built-in documentation for the
19499         new built-in functions.
19501 2017-05-16  Marek Polacek  <polacek@redhat.com>
19503         PR sanitizer/80536
19504         PR sanitizer/80386
19505         * tree.c (save_expr): Don't fold the expression.
19507 2017-05-16  Uros Bizjak  <ubizjak@gmail.com>
19509         * config/i386/i386.md (*movsi_internal): Split (?rm,*y) alternative
19510         to (?r,*Yn) and (?m,*y) alternatives, and (?*y,rm) to (?*Ym,r)
19511         and (?*y,m).  Update insn attributes.
19513 2017-05-16  Martin Liska  <mliska@suse.cz>
19515         * cgraph.c (cgraph_edge::resolve_speculation): Add default value for
19516         flags argument of print_gimple_stmt, print_gimple_expr,
19517         print_generic_stmt and print_generic_expr.
19518         * cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
19519         * coretypes.h: Likewise.
19520         * except.c (dump_eh_tree): Likewise.
19521         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
19522         * gimple-pretty-print.h: Likewise.
19523         * gimple-ssa-backprop.c (dump_usage_prefix): Likewise.
19524         (backprop::push_to_worklist): Likewise.
19525         (backprop::pop_from_worklist): Likewise.
19526         (backprop::process_use): Likewise.
19527         (backprop::intersect_uses): Likewise.
19528         (note_replacement): Likewise.
19529         * gimple-ssa-store-merging.c
19530         (pass_store_merging::terminate_all_aliasing_chains): Likewise.
19531         (imm_store_chain_info::coalesce_immediate_stores): Likewise.
19532         (pass_store_merging::execute): Likewise.
19533         * gimple-ssa-strength-reduction.c (dump_candidate): Likewise.
19534         (ssa_base_cand_dump_callback): Likewise.
19535         (dump_incr_vec): Likewise.
19536         (replace_refs): Likewise.
19537         (replace_mult_candidate): Likewise.
19538         (create_add_on_incoming_edge): Likewise.
19539         (create_phi_basis): Likewise.
19540         (insert_initializers): Likewise.
19541         (all_phi_incrs_profitable): Likewise.
19542         (introduce_cast_before_cand): Likewise.
19543         (replace_one_candidate): Likewise.
19544         * gimplify.c (gimplify_expr): Likewise.
19545         * graphite-isl-ast-to-gimple.c (is_valid_rename): Likewise.
19546         (set_rename): Likewise.
19547         (rename_uses): Likewise.
19548         (copy_loop_phi_nodes): Likewise.
19549         (add_close_phis_to_merge_points): Likewise.
19550         (copy_loop_close_phi_args): Likewise.
19551         (copy_cond_phi_args): Likewise.
19552         (graphite_copy_stmts_from_block): Likewise.
19553         (translate_pending_phi_nodes): Likewise.
19554         * graphite-poly.c (print_pdr): Likewise.
19555         (dump_gbb_cases): Likewise.
19556         (dump_gbb_conditions): Likewise.
19557         (print_scop_params): Likewise.
19558         * graphite-scop-detection.c (build_cross_bb_scalars_def): Likewise.
19559         (build_cross_bb_scalars_use): Likewise.
19560         (gather_bbs::before_dom_children): Likewise.
19561         * hsa-dump.c (dump_hsa_immed): Likewise.
19562         * ipa-cp.c (print_ipcp_constant_value): Likewise.
19563         (get_replacement_map): Likewise.
19564         * ipa-inline-analysis.c (dump_condition): Likewise.
19565         (estimate_function_body_sizes): Likewise.
19566         * ipa-polymorphic-call.c (check_stmt_for_type_change): Likewise.
19567         (ipa_polymorphic_call_context::get_dynamic_type): Likewise.
19568         * ipa-prop.c (ipa_dump_param): Likewise.
19569         (ipa_print_node_jump_functions_for_edge): Likewise.
19570         (ipa_modify_call_arguments): Likewise.
19571         (ipa_modify_expr): Likewise.
19572         (ipa_dump_param_adjustments): Likewise.
19573         (ipa_dump_agg_replacement_values): Likewise.
19574         (ipcp_modif_dom_walker::before_dom_children): Likewise.
19575         * ipa-pure-const.c (check_stmt): Likewise.
19576         (pass_nothrow::execute): Likewise.
19577         * ipa-split.c (execute_split_functions): Likewise.
19578         * omp-offload.c (dump_oacc_loop_part): Likewise.
19579         (dump_oacc_loop): Likewise.
19580         * trans-mem.c (tm_log_emit): Likewise.
19581         (tm_memopt_accumulate_memops): Likewise.
19582         (dump_tm_memopt_set): Likewise.
19583         (dump_tm_memopt_transform): Likewise.
19584         * tree-cfg.c (gimple_verify_flow_info): Likewise.
19585         (print_loop): Likewise.
19586         * tree-chkp-opt.c (chkp_print_addr): Likewise.
19587         (chkp_gather_checks_info): Likewise.
19588         (chkp_get_check_result): Likewise.
19589         (chkp_remove_check_if_pass): Likewise.
19590         (chkp_use_outer_bounds_if_possible): Likewise.
19591         (chkp_reduce_bounds_lifetime): Likewise.
19592         * tree-chkp.c (chkp_register_addr_bounds): Likewise.
19593         (chkp_mark_completed_bounds): Likewise.
19594         (chkp_register_incomplete_bounds): Likewise.
19595         (chkp_mark_invalid_bounds): Likewise.
19596         (chkp_maybe_copy_and_register_bounds): Likewise.
19597         (chkp_build_returned_bound): Likewise.
19598         (chkp_get_bound_for_parm): Likewise.
19599         (chkp_build_bndldx): Likewise.
19600         (chkp_get_bounds_by_definition): Likewise.
19601         (chkp_generate_extern_var_bounds): Likewise.
19602         (chkp_get_bounds_for_decl_addr): Likewise.
19603         * tree-chrec.c (chrec_apply): Likewise.
19604         * tree-data-ref.c (dump_data_reference): Likewise.
19605         (dump_subscript): Likewise.
19606         (dump_data_dependence_relation): Likewise.
19607         (analyze_overlapping_iterations): Likewise.
19608         * tree-inline.c (expand_call_inline): Likewise.
19609         (tree_function_versioning): Likewise.
19610         * tree-into-ssa.c (dump_defs_stack): Likewise.
19611         (dump_currdefs): Likewise.
19612         (dump_names_replaced_by): Likewise.
19613         (dump_update_ssa): Likewise.
19614         (update_ssa): Likewise.
19615         * tree-object-size.c (pass_object_sizes::execute): Likewise.
19616         * tree-parloops.c (build_new_reduction): Likewise.
19617         (try_create_reduction_list): Likewise.
19618         (ref_conflicts_with_region): Likewise.
19619         (oacc_entry_exit_ok_1): Likewise.
19620         (oacc_entry_exit_single_gang): Likewise.
19621         * tree-pretty-print.h: Likewise.
19622         * tree-scalar-evolution.c (set_scalar_evolution): Likewise.
19623         (get_scalar_evolution): Likewise.
19624         (add_to_evolution): Likewise.
19625         (get_loop_exit_condition): Likewise.
19626         (analyze_evolution_in_loop): Likewise.
19627         (analyze_initial_condition): Likewise.
19628         (analyze_scalar_evolution): Likewise.
19629         (instantiate_scev): Likewise.
19630         (number_of_latch_executions): Likewise.
19631         (gather_chrec_stats): Likewise.
19632         (final_value_replacement_loop): Likewise.
19633         (scev_const_prop): Likewise.
19634         * tree-sra.c (dump_access): Likewise.
19635         (disqualify_candidate): Likewise.
19636         (create_access): Likewise.
19637         (reject): Likewise.
19638         (maybe_add_sra_candidate): Likewise.
19639         (create_access_replacement): Likewise.
19640         (analyze_access_subtree): Likewise.
19641         (analyze_all_variable_accesses): Likewise.
19642         (sra_modify_assign): Likewise.
19643         (initialize_constant_pool_replacements): Likewise.
19644         (find_param_candidates): Likewise.
19645         (decide_one_param_reduction): Likewise.
19646         (replace_removed_params_ssa_names): Likewise.
19647         * tree-ssa-ccp.c (ccp_fold_stmt): Likewise.
19648         * tree-ssa-copy.c (dump_copy_of): Likewise.
19649         (copy_prop_visit_cond_stmt): Likewise.
19650         * tree-ssa-dce.c (mark_operand_necessary): Likewise.
19651         * tree-ssa-dom.c (pass_dominator::execute): Likewise.
19652         (record_equivalences_from_stmt): Likewise.
19653         * tree-ssa-dse.c (compute_trims): Likewise.
19654         (delete_dead_call): Likewise.
19655         (delete_dead_assignment): Likewise.
19656         * tree-ssa-forwprop.c (forward_propagate_into_gimple_cond): Likewise.
19657         (forward_propagate_into_cond): Likewise.
19658         (pass_forwprop::execute): Likewise.
19659         * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
19660         * tree-ssa-loop-im.c (invariantness_dom_walker::before_dom_children):
19661         Likewise.
19662         (move_computations_worker): Likewise.
19663         (execute_sm): Likewise.
19664         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Likewise.
19665         (remove_exits_and_undefined_stmts): Likewise.
19666         (remove_redundant_iv_tests): Likewise.
19667         * tree-ssa-loop-ivopts.c (dump_use): Likewise.
19668         (adjust_iv_update_pos): Likewise.
19669         * tree-ssa-math-opts.c (bswap_replace): Likewise.
19670         * tree-ssa-phiopt.c (factor_out_conditional_conversion): Likewise.
19671         (value_replacement): Likewise.
19672         * tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
19673         * tree-ssa-pre.c (print_pre_expr): Likewise.
19674         (get_representative_for): Likewise.
19675         (create_expression_by_pieces): Likewise.
19676         (insert_into_preds_of_block): Likewise.
19677         (eliminate_insert): Likewise.
19678         (eliminate_dom_walker::before_dom_children): Likewise.
19679         (eliminate): Likewise.
19680         (remove_dead_inserted_code): Likewise.
19681         * tree-ssa-propagate.c (substitute_and_fold): Likewise.
19682         * tree-ssa-reassoc.c (get_rank): Likewise.
19683         (eliminate_duplicate_pair): Likewise.
19684         (eliminate_plus_minus_pair): Likewise.
19685         (eliminate_not_pairs): Likewise.
19686         (undistribute_ops_list): Likewise.
19687         (eliminate_redundant_comparison): Likewise.
19688         (update_range_test): Likewise.
19689         (optimize_range_tests_var_bound): Likewise.
19690         (optimize_vec_cond_expr): Likewise.
19691         (rewrite_expr_tree): Likewise.
19692         (rewrite_expr_tree_parallel): Likewise.
19693         (linearize_expr): Likewise.
19694         (break_up_subtract): Likewise.
19695         (linearize_expr_tree): Likewise.
19696         (attempt_builtin_powi): Likewise.
19697         (attempt_builtin_copysign): Likewise.
19698         (transform_stmt_to_copy): Likewise.
19699         (transform_stmt_to_multiply): Likewise.
19700         (dump_ops_vector): Likewise.
19701         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Likewise.
19702         (print_scc): Likewise.
19703         (set_ssa_val_to): Likewise.
19704         (visit_reference_op_store): Likewise.
19705         (visit_use): Likewise.
19706         (sccvn_dom_walker::before_dom_children): Likewise.
19707         (run_scc_vn): Likewise.
19708         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
19709         Likewise.
19710         (expr_hash_elt::print): Likewise.
19711         (const_and_copies::pop_to_marker): Likewise.
19712         (const_and_copies::record_const_or_copy_raw): Likewise.
19713         * tree-ssa-structalias.c (compute_dependence_clique): Likewise.
19714         * tree-ssa-uninit.c (collect_phi_def_edges): Likewise.
19715         (dump_predicates): Likewise.
19716         (find_uninit_use): Likewise.
19717         (warn_uninitialized_phi): Likewise.
19718         (pass_late_warn_uninitialized::execute): Likewise.
19719         * tree-ssa.c (verify_vssa): Likewise.
19720         (verify_ssa): Likewise.
19721         (maybe_optimize_var): Likewise.
19722         * tree-vrp.c (dump_value_range): Likewise.
19723         (dump_all_value_ranges): Likewise.
19724         (dump_asserts_for): Likewise.
19725         (register_edge_assert_for_2): Likewise.
19726         (vrp_visit_cond_stmt): Likewise.
19727         (vrp_visit_switch_stmt): Likewise.
19728         (vrp_visit_stmt): Likewise.
19729         (vrp_visit_phi_node): Likewise.
19730         (simplify_cond_using_ranges_1): Likewise.
19731         (fold_predicate_in): Likewise.
19732         (evrp_dom_walker::before_dom_children): Likewise.
19733         (evrp_dom_walker::push_value_range): Likewise.
19734         (evrp_dom_walker::pop_value_range): Likewise.
19735         (execute_early_vrp): Likewise.
19737 2017-05-16  Richard Biener  <rguenther@suse.de>
19739         * dwarf2out.c (loc_list_from_tree_1): Do not create
19740         DW_OP_GNU_variable_value for DECL_IGNORED_P decls.
19742 2017-05-16  Richard Biener  <rguenther@suse.de>
19744         * dwarf2out.c (resolve_variable_value_in_expr): Lookup DIE
19745         just generated.
19746         (note_variable_value_in_expr): If we resolved the decl ref
19747         do not push to the stack.
19749 2017-05-16  Matthew Wahab  <matthew.wahab@arm.com>
19751         * config/arm/arm_neon.h (vadd_f16): Use standard arithmetic
19752         operations in fast-math mode.
19753         (vaddq_f16): Likewise.
19754         (vmul_f16): Likewise.
19755         (vmulq_f16): Likewise.
19756         (vsub_f16): Likewise.
19757         (vsubq_f16): Likewise.
19758         * config/arm/neon.md (add<mode>3): New.
19759         (sub<mode>3): New.
19760         (fma:<VH:mode>3): New.  Also remove outdated comment.
19761         (mul<mode>3): New.
19763 2017-05-16  Martin Liska  <mliska@suse.cz>
19765         PR ipa/79849.
19766         PR ipa/79850.
19767         * ipa-devirt.c (warn_types_mismatch): Fix typo.
19768         (odr_types_equivalent_p): Likewise.
19770 2017-05-15  Sylvestre Ledru  <sylvestre@debian.org>
19772         * plugin.c (try_init_one_plugin): Fix ressource leaks (CID 726637).
19774 2017-05-15  Uros Bizjak  <ubizjak@gmail.com>
19776         PR target/80425
19777         * config/i386.i386.md (*zero_extendsidi2): Do not penalize
19778         non-interunit SSE move alternatives with '?'.
19779         (zero-extendsidi peephole2): New peephole to skip intermediate
19780         general register in SSE zero-extend sequence.
19782 2017-05-15  Jeff Law  <law@redhat.com>
19784         * reorg.c (relax_delay_slots): Create a new variable to hold
19785         the temporary target rather than clobbering TARGET_LABEL.
19787         * config/tilegx/tilegx.c (tilegx_expand_unaligned_load): Add
19788         missing argument to extract_bit_field call.
19789         * config/tilepro/tilepro.c (tilepro_expand_unaligned_load): Likewise.
19791 2017-05-15  Martin Liska  <mliska@suse.cz>
19793         PR driver/31468
19794         * gcc.c (process_command): Do not allow empty argument of -o option.
19796 2017-05-15  Renlin Li  <renlin.li@arm.com>
19798         * config/aarch64/aarch64-protos.h (aarch64_expand_call): Declare.
19799         * config/aarch64/aarch64.c (aarch64_expand_call): Define.
19800         * config/aarch64/constraints.md (Usf): Add long call check.
19801         * config/aarch64/aarch64.md (call): Use aarch64_expand_call.
19802         (call_value): Likewise.
19803         (sibcall): Likewise.
19804         (sibcall_value): Likewise.
19805         (call_insn): New.
19806         (call_value_insn): New.
19807         (sibcall_insn): Update rtx pattern.
19808         (sibcall_value_insn): Likewise.
19809         (call_internal): Remove.
19810         (call_value_internal): Likewise.
19811         (sibcall_internal): Likewise.
19812         (sibcall_value_internal): Likewise.
19813         (call_reg): Likewise.
19814         (call_symbol): Likewise.
19815         (call_value_reg): Likewise.
19816         (call_value_symbol): Likewise.
19818 2017-05-14  Krister Walfridsson  <krister.walfridsson@gmail.com>
19820         PR target/80600
19821         * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always add -lgcc.
19823 2017-05-14  Uros Bizjak  <ubizjak@gmail.com>
19825         * config/i386.i386.c (ix86_cc_modes_compatible): CCNOmode is
19826         compatible with CCGOCmode and with CCZmode.
19828 2017-05-14  Martin Sebor  <msebor@redhat.com>
19830         PR middle-end/77671
19831         * gimple-fold.c (gimple_fold_builtin_sprintf): Make extern.
19832         (gimple_fold_builtin_snprintf): Same.
19833         * gimple-fold.h (gimple_fold_builtin_sprintf): Declare.
19834         (gimple_fold_builtin_snprintf): Same.
19835         * gimple-ssa-sprintf.c (get_format_string): Correct the detection
19836         of character types.
19837         (is_call_safe): New function.
19838         (try_substitute_return_value): Call it.
19839         (try_simplify_call): New function.
19840         (pass_sprintf_length::handle_gimple_call): Call it.
19842 2017-05-14  Martin Sebor  <msebor@redhat.com>
19844         PR middle-end/80669
19845         * builtins.c (expand_builtin_stpncpy): Simplify.
19847 2017-05-14  Daniel Santos  <daniel.santos@pobox.com>
19849         * config/i386/i386.opt: Add option -mcall-ms2sysv-xlogues.
19850         * config/i386/i386.h
19851         (x86_64_ms_sysv_extra_clobbered_registers): Change type to unsigned.
19852         (NUM_X86_64_MS_CLOBBERED_REGS): New macro.
19853         (struct machine_function): Add new members call_ms2sysv,
19854         call_ms2sysv_pad_in, call_ms2sysv_pad_out and call_ms2sysv_extra_regs.
19855         (struct machine_frame_state): New fields sp_realigned and
19856         sp_realigned_offset.
19857         * config/i386/i386.c
19858         (enum xlogue_stub): New enum.
19859         (enum xlogue_stub_sets): New enum.
19860         (class xlogue_layout): New class.
19861         (struct ix86_frame): New fields stack_realign_allocate_offset,
19862         stack_realign_offset and outlined_save_offset.  Modify comments to
19863         detail stack layout when using out-of-line stubs.
19864         (ix86_target_string): Add -mcall-ms2sysv-xlogues option.
19865         (ix86_option_override_internal): Add sorry() for TARGET_SEH and
19866         -mcall-ms2sysv-xlogues.
19867         (stub_managed_regs): New static variable.
19868         (ix86_save_reg): Add new parameter ignore_outlined to optionally omit
19869         registers managed by out-of-line stub.
19870         (disable_call_ms2sysv_xlogues): New function.
19871         (ix86_compute_frame_layout): Modify re-alignment calculations, disable
19872         m->call_ms2sysv when appropriate and compute frame layout for
19873         out-of-line stubs.
19874         (sp_valid_at, fp_valid_at): New inline functions.
19875         (choose_basereg): New function.
19876         (choose_baseaddr): Add align parameter, use choose_basereg and modify
19877         all callers.
19878         (ix86_emit_save_reg_using_mov, ix86_emit_restore_sse_regs_using_mov):
19879         Use align parameter of choose_baseaddr to generated aligned SSE movs
19880         when possible.
19881         (pro_epilogue_adjust_stack): Modify to track
19882         machine_frame_state::sp_realigned.
19883         (ix86_nsaved_regs): Modify to accommodate changes to ix86_save_reg.
19884         (ix86_nsaved_sseregs): Likewise.
19885         (ix86_emit_save_regs): Likewise.
19886         (ix86_emit_save_regs_using_mov): Likewise.
19887         (ix86_emit_save_sse_regs_using_mov): Likewise.
19888         (get_scratch_register_on_entry): Likewise.
19889         (gen_frame_set): New function.
19890         (gen_frame_load): Likewise.
19891         (gen_frame_store): Likewise.
19892         (emit_outlined_ms2sysv_save): Likewise.
19893         (emit_outlined_ms2sysv_restore): Likewise.
19894         (ix86_expand_prologue): Modify stack re-alignment code and call
19895         emit_outlined_ms2sysv_save when appropriate.
19896         (ix86_emit_leave): Clear machine_frame_state::sp_realigned.  Add
19897         parameter rtx_insn *insn, which allows the function to be used to only
19898         generate the notes.
19899         (ix86_expand_epilogue): Modify validity checks of frame and stack
19900         pointers, and call emit_outlined_ms2sysv_restore when appropriate.
19901         (ix86_expand_call): Modify to enable m->call_ms2sysv when appropriate.
19902         * config/i386/predicates.md
19903         (save_multiple): New predicate.
19904         (restore_multiple): Likewise.
19905         * config/i386/sse.md
19906         (save_multiple<mode>): New pattern.
19907         (save_multiple_realign<mode>): Likewise.
19908         (restore_multiple<mode>): Likewise.
19909         (restore_multiple_and_return<mode>): Likewise.
19910         (restore_multiple_leave_return<mode>): Likewise.
19911         * Makefile.in: Export HOSTCXX and HOSTCXXFLAGS to site.exp
19913 2017-05-14  Julia Koval  <julia.koval@intel.com>
19915         * config/i386/i386-builtin-types.def (VOID_FTYPE_INT_INT64): New type.
19916         * config/i386/i386-builtin.def (__builtin_ia32_xgetbv)
19917         (__builtin_ia32_xsetbv): New builtins.
19918         * config/i386/i386.c (ix86_expand_special_args_builtin):
19919         Process new types.
19920         (ix86_expand_builtin): Special expand for new intrinsics.
19921         * config/i386/i386.md (UNSPECV_XGETBV, UNSPECV_XSETBV): New.
19922         (xsetbv, xsetbv_rex64, xgetbv, xgetbv_rex64): New insn patterns.
19923         * config/i386/xsaveintrin.h (_xsetbv, _getbv): New intrinsics.
19925 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19927         * cfganal.c (inverted_post_order_compute): Change argument type
19928         to vec *.
19929         * cfganal.h (inverted_post_order_compute): Adjust prototype.
19930         * df-core.c (rest_of_handle_df_initialize): Adjust.
19931         (rest_of_handle_df_finish): Likewise.
19932         (df_analyze_1): Likewise.
19933         (df_analyze): Likewise.
19934         (loop_inverted_post_order_compute): Change argument to be a vec *.
19935         (df_analyze_loop): Adjust.
19936         (df_get_n_blocks): Likewise.
19937         (df_get_postorder): Likewise.
19938         * df.h (struct df_d): Change field to be a vec.
19939         * lcm.c (compute_laterin): Adjust.
19940         (compute_available): Likewise.
19941         * lra-lives.c (lra_create_live_ranges_1): Likewise.
19942         * tree-ssa-dce.c (remove_dead_stmt): Likewise.
19943         * tree-ssa-pre.c (compute_antic): Likewise.
19945 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19947         * cfganal.c (connect_infinite_loops_to_exit): Adjust.
19948         (depth_first_search::depth_first_search): Change structure init
19949         function to this constructor.
19950         (depth_first_search::add_bb): Rename function to this member.
19951         (depth_first_search::execute): Likewise.
19952         (flow_dfs_compute_reverse_finish): Adjust.
19954 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19956         * ddg.c (find_nodes_on_paths): Use auto_sbitmap.
19957         (longest_simple_path): Likewise.
19958         * shrink-wrap.c (spread_components): Likewise.
19959         (disqualify_problematic_components): Likewise.
19960         (emit_common_heads_for_components): Likewise.
19961         (emit_common_tails_for_components): Likewise.
19962         (insert_prologue_epilogue_for_components): Likewise.
19964 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19966         * tree-ssa-dse.c (dse_dom_walker): Make m_live_byes a
19967         auto_sbitmap.
19969 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19971         * df-core.c (df_set_blocks): Start using auto_bitmap.
19972         (df_compact_blocks): Likewise.
19973         * df-problems.c (df_rd_confluence_n): Likewise.
19974         * df-scan.c (df_insn_rescan_all): Likewise.
19975         (df_process_deferred_rescans): Likewise.
19976         (df_update_entry_block_defs): Likewise.
19977         (df_update_exit_block_uses): Likewise.
19978         (df_entry_block_bitmap_verify): Likewise.
19979         (df_exit_block_bitmap_verify): Likewise.
19980         (df_scan_verify): Likewise.
19981         * lra-constraints.c (lra_constraints): Likewise.
19982         (undo_optional_reloads): Likewise.
19983         (lra_undo_inheritance): Likewise.
19984         * lra-remat.c (calculate_gen_cands): Likewise.
19985         (do_remat): Likewise.
19986         * lra-spills.c (assign_spill_hard_regs): Likewise.
19987         (spill_pseudos): Likewise.
19988         * tree-ssa-pre.c (bitmap_set_and): Likewise.
19989         (bitmap_set_subtract_values): Likewise.
19991 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
19993         * haifa-sched.c (estimate_shadow_tick): Replace manual bitmap
19994         management with auto_bitmap.
19995         (fix_inter_tick): Likewise.
19996         (fix_recovery_deps): Likewise.
19997         * ira.c (add_store_equivs): Likewise.
19998         (find_moveable_pseudos): Likewise.
19999         (split_live_ranges_for_shrink_wrap): Likewise.
20000         * print-rtl.c (rtx_reuse_manager::rtx_reuse_manager): Likewise.
20001         (rtx_reuse_manager::seen_def_p): Likewise.
20002         (rtx_reuse_manager::set_seen_def): Likewise.
20003         * print-rtl.h (class rtx_reuse_manager): Likewise.
20005 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20007         * bt-load.c (combine_btr_defs): Use auto_bitmap to manage bitmap
20008         lifetime.
20009         (migrate_btr_def): Likewise.
20010         * cfgloop.c (get_loop_body_in_bfs_order): Likewise.
20011         * df-core.c (loop_post_order_compute): Likewise.
20012         (loop_inverted_post_order_compute): Likewise.
20013         * hsa-common.h: Likewise.
20014         * hsa-gen.c (hsa_bb::~hsa_bb): Likewise.
20015         * init-regs.c (initialize_uninitialized_regs): Likewise.
20016         * ipa-inline.c (resolve_noninline_speculation): Likewise.
20017         (inline_small_functions): Likewise.
20018         * ipa-reference.c (ipa_reference_write_optimization_summary): Likewise.
20019         * ira.c (combine_and_move_insns): Likewise.
20020         (build_insn_chain): Likewise.
20021         * loop-invariant.c (find_invariants): Likewise.
20022         * lower-subreg.c (propagate_pseudo_copies): Likewise.
20023         * predict.c (tree_predict_by_opcode): Likewise.
20024         (predict_paths_leading_to): Likewise.
20025         (predict_paths_leading_to_edge): Likewise.
20026         (estimate_loops_at_level): Likewise.
20027         (estimate_loops): Likewise.
20028         * shrink-wrap.c (try_shrink_wrapping): Likewise.
20029         (spread_components): Likewise.
20030         * tree-cfg.c (remove_edge_and_dominated_blocks): Likewise.
20031         * tree-loop-distribution.c (rdg_build_partitions): Likewise.
20032         * tree-predcom.c (tree_predictive_commoning_loop): Likewise.
20033         * tree-ssa-coalesce.c (coalesce_ssa_name): Likewise.
20034         * tree-ssa-phionlycprop.c (pass_phi_only_cprop::execute): Likewise.
20035         * tree-ssa-pre.c (remove_dead_inserted_code): Likewise.
20036         * tree-ssa-sink.c (nearest_common_dominator_of_uses): Likewise.
20037         * tree-ssa-threadupdate.c (compute_path_counts): Likewise.
20038         (mark_threaded_blocks): Likewise.
20039         (thread_through_all_blocks): Likewise.
20040         * tree-ssa.c (verify_ssa): Likewise.
20041         (execute_update_addresses_taken): Likewise.
20042         * tree-ssanames.c (verify_ssaname_freelists): Likewise.
20044 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20046         * cfganal.c (mark_dfs_back_edges): Replace manual stack with
20047         auto_vec.
20048         (post_order_compute): Likewise.
20049         (inverted_post_order_compute): Likewise.
20050         (pre_and_rev_post_order_compute_fn): Likewise.
20052 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20054         * genrecog.c (int_set::int_set): Explicitly construct our
20055         auto_vec base class.
20056         * vec.h (auto_vec::auto_vec): New constructor.
20058 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20060         * bitmap.h (class auto_bitmap): New constructor taking
20061         bitmap_obstack * argument.
20063 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
20065         * bitmap.h (class auto_bitmap): Change type of m_bits to
20066         bitmap_head, and adjust ctor / dtor and member operators.
20068 2017-05-13  Uros Bizjak  <ubizjak@gmail.com>
20070         * compare-elim.c (equivalent_reg_at_start): Return NULL_RTX
20071         when returned register mode doesn't match original mode.
20073 2017-05-12  Jeff Law  <law@redhat.com>
20074             Jakub Jelinek  <jakub@redhat.com>
20076         * config/mn10300/mn10300.c (mn10300_match_ccmode): Fix where
20077         we look for cc setter after the compare-elim changes.
20078         * config/mn10300/mn10300.md (addsi3_flags): Fix order of patterns
20079         within the vector to match what compare-elim now expects.
20080         (subsi3_flags, andsi3_flags, iorsi3_flags): Likewise.
20081         (xorsi3_flags, one_cmplsi2_flags): Likewise.
20083         * config/rx/rx.c (rx_match_ccmode): Fix where we look cc setter
20084         after the compare-elim changes.
20085         * config/rx/rx.md (abssi2_flags): Fix order of patterns within
20086         the vector to match what compare-elim now expects.
20087         (addsi3_flags, adc_flags, addsi3_flags peepholes): Likewise.
20088         (andsi3_flags, negsi2_flags, one_cmplsi2_flags): Likewise.
20089         (iorsi3_flags, rotlsi3_flags, rotrsi3_flags): Likewise.
20090         (ashrsi3_flags, lshrsi3_flags, ashlsi3_flags): Likewise.
20091         (ssaddsi3, subsi3_flags, sbb_flags, xorsi3_flags): Likewise.
20093         * config/visium/visium.c (single_set_and_flags): Fix where
20094         we look for cc setter after the compare-elim changes.
20095         * config/visium/visium.md (flags_subst_logic): Fix order of patterns
20096         with the vector to match what compare-elim now expects.
20097         (flags_subst_arith, add<mode>3_insn_set_carry): Likewise.
20098         (add<mode>3_insn_set_overflow, addsi3_insn_set_carry): Likewise.
20099         (addsi3_insn_set_overflow, sub<mode>3_insn_set_carry): Likewise.
20100         (sub<mode>3_insn_set_overflow, subsi3_insn_set_carry): Likewise.
20101         (subsi3_insn_set_overflow, negsi2_insn_set_carry): Likewise.
20102         (neg<mode>2_insn_set_overflow): Likewise.
20104 2017-05-12  Jim Wilson  <jim.wilson@linaro.org>
20106         PR middle-end/79794
20107         * expmed.c (extract_bit_field_1): Add alt_rtl argument.  Before
20108         maybe_expand_insn call, set ops[0].target.  If still set after call,
20109         set alt_rtl.  Add extra arg to recursive calls.
20110         (extract_bit_field): Add alt_rtl argument.  Pass to
20111         extract_bit_field.
20112         * expmed.h (extract_bit_field): Fix prototype.
20113         * expr.c (emit_group_load_1, copy_blkmode_from_reg)
20114         (copy_blkmode_to_reg, read_complex_part, store_field): Pass extra NULL
20115         to extract_bit_field_calls.
20116         (expand_expr_real_1): Pass alt_rtl to expand_expr_real instead of 0.
20117         Pass alt_rtl to extract_bit_field calls.
20118         * calls.c (store_unaligned_arguments_into_psuedos)
20119         load_register_parameters): Pass extra NULL to extract_bit_field calls.
20120         * optabs.c (maybe_legitimize_operand): Clear op->target when call
20121         gen_reg_rtx.
20122         * optabs.h (struct expand_operand): Add target bitfield.
20124 2017-05-12  Uros Bizjak  <ubizjak@gmail.com>
20126         * compare-elim.c (try_eliminate_compare): Canonicalize
20127         operation with embedded compare to
20128         [(set (reg:CCM) (compare:CCM (operation) (immediate)))
20129          (set (reg) (operation)].
20131         * config/i386/i386.c (TARGET_FLAGS_REGNUM): New define.
20133 2017-05-12  Uros Bizjak  <ubizjak@gmail.com>
20135         PR target/80723
20136         * config/i386/i386.c (ix86_rtx_cost) [case PLUS]: Ignore the
20137         cost of adding a carry flag for ADC instruction.
20138         [case MINUS]: Ignore the cost of subtracting a carry flag
20139         for SBB instruction.
20141 2017-05-12  Steven Munroe  <munroesj@gcc.gnu.org>
20143         * config.gcc (powerpc*-*-*): Add bmi2intrin.h, bmiintrin.h,
20144         and x86intrin.h
20145         * config/rs6000/bmiintrin.h: New file.
20146         * config/rs6000/bmi2intrin.h: New file.
20147         * config/rs6000/x86intrin.h: New file.
20149 2017-05-12  Jeff Law  <law@redhat.com>
20151         * tree-vrp.c (vrp_dom_walker::before_dom_children): Push unwinding
20152         markers.
20154 2017-05-12  Peter Bergner  <bergner@vnet.ibm.com>
20156         PR middle-end/80707
20157         * tree-cfg.c: Remove cfg edges of unreachable case statements.
20159 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
20161         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
20162         early expansion of vector divide builtins.
20163         (builtin_function_type): Add VSX_BUILTIN_UDIV_V2DI to the list of
20164         builtins identified as having unsigned arguments.
20166 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
20168         * config/rs6000/rs6000.c (gimple-fold.h): New #include.
20169         (rs6000_gimple_fold_builtin): Add handling for early GIMPLE
20170         expansion of vector logical operations (and, andc, or, xor,
20171         nor, orc, nand).
20173 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
20175         * gimple-fold.c (create_tmp_reg_or_ssa_name): Remove static declaration.
20176         * gimple-fold.h (create_tmp_reg_or_ssa_name): New prototype.
20178 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
20180         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
20181         early GIMPLE expansion of vector multiplies.
20183 2017-05-12  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
20185         * config/arm/arm.md (movsi): Add TARGET_32BIT in addition to the
20186         TARGET_HAVE_MOVT conditional.
20187         (movt splitter): Likewise.
20189 2017-05-12  Richard Biener  <rguenther@suse.de>
20191         * tree-ssa-sccvn.h (has_VN_INFO): Declare.
20192         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
20193         Fold all stmts not inplace.
20195 2017-05-12  Richard Biener  <rguenther@suse.de>
20197         PR tree-optimization/80713
20198         * tree-ssa-pre.c (remove_dead_inserted_code): Clear
20199         inserted_exprs bit for not removed stmts.
20201 2017-05-12  Thomas Schwinge  <thomas@codesourcery.com>
20203         PR middle-end/69921
20204         * tree-parloops.c (create_parallel_loop): Set "oacc kernels
20205         parallelized" attribute for parallelized OpenACC kernels.
20206         * omp-offload.c (execute_oacc_device_lower): Use it.
20208         * omp-expand.c (expand_omp_target) <GF_OMP_TARGET_KIND_OACC_KERNELS>:
20209         Set "oacc kernels" attribute.
20210         * omp-general.c (oacc_set_fn_attrib): Remove is_kernel formal
20211         parameter.  Adjust all users.
20212         (oacc_fn_attrib_kernels_p): Remove function.
20213         * omp-offload.c (execute_oacc_device_lower): Look for "oacc
20214         kernels" attribute instead of calling oacc_fn_attrib_kernels_p.
20215         * tree-ssa-loop.c (gate_oacc_kernels): Likewise.
20216         * tree-parloops.c (create_parallel_loop): If oacc_kernels_p,
20217         assert "oacc kernels" attribute is set.
20219 2017-05-11  Carl Love  <cel@us.ibm.com>
20221         * config/rs6000/rs6000-c: Add support for built-in functions
20222         vector unsigned char vec_popcnt (vector signed char)
20223         vector unsigned char vec_popcnt (vector unsigned char)
20224         vector unsigned short vec_popcnt (vector signed short)
20225         vector unsigned short vec_popcnt (vector unsigned short)
20226         vector unsigned int vec_popcnt (vector signed int)
20227         vector unsigned int vec_popcnt (vector unsigned int)
20228         vector unsigned long long vec_popcnt (vector signed long long)
20229         vector unsigned long long vec_popcnt (vector unsigned long long)
20230         vector signed long long vec_slo (vector signed long long,
20231                                          vector signed char)
20232         vector signed long long vec_slo (vector signed long long,
20233                                          vector unsigned char)
20234         vector unsigned long long vec_slo (vector unsigned long long,
20235                                            vector signed char)
20236         vector unsigned long long vec_slo (vector unsigned long long,
20237                                            vector unsigned char)
20238         * config/rs6000/rs6000-builtin.def: Add definitions for VPOPCNTUB,
20239         VPOPCNTUH, VPOPCNTUW, and VPOPCNTUD overloads.
20240         * config/rs6000/altivec.h: Add define for vec_popcnt, vec_popcntb,
20241         vec_popcnth, vec_popcntw and vec_popcntd built-in functions.
20242         * doc/extend.texi: Update the built-in documentation file for the
20243         new built-in functions.
20245 2017-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
20247         * attribs.h (sorted_attr_string): Move machine independent
20248         functions for target clone support from the i386 port to common
20249         code.  Rename ix86_function_versions to common_function_versions.
20250         Rename make_name to make_unique_name.
20251         (common_function_versions): Likewise.
20252         (make_unique_name): Likewise.
20253         (make_dispatcher_decl): Likewise.
20254         (is_function_default_version): Likewise.
20255         * attribs.c (attr_strcmp): Likewise.
20256         (sorted_attr_string): Likewise.
20257         (common_function_versions): Likewise.
20258         (make_unique_name): Likewise.
20259         (make_dispatcher_decl): Likewise.
20260         (is_function_default_version): Likewise.
20261         * config/i386/i386.c (attr_strcmp): Likewise.
20262         (sorted_attr_string): Likewise.
20263         (ix86_function_versions): Likewise.
20264         (make_name): Likewise.
20265         (make_dispatcher_decl): Likewise.
20266         (is_function_default_version): Likewise.
20267         (TARGET_OPTION_FUNCTION_VERSIONS): Update target function hook.
20269 2017-05-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20271         PR target/80695
20272         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
20273         Account for direct move costs for vec_construct of integer
20274         vectors.
20276 2017-05-11  Uros Bizjak  <ubizjak@gmail.com>
20278         PR target/80706
20279         * config/i386/sync.md (UNSPEC_LDX_ATOMIC): New unspec.
20280         (UNSPEC_STX_ATOMIC): Ditto.
20281         (loaddi_via_sse): New insn.
20282         (storedi_via_sse): Ditto.
20283         (atomic_loaddi_fpu): Emit loaddi_via_sse and storedi_via_sse.
20284         Update corresponding peephole2 patterns.
20285         (atomic_storedi_fpu): Ditto.
20287 2017-05-11  Julia Koval  <julia.koval@intel.com>
20289         * config/i386/avx512fintrin.h (_mm_mask_rsqrt14_sd)
20290         (_mm_maskz_rsqrt14_sd, _mm_mask_rsqrt14_ss, _mm_maskz_rsqrt14_ss):
20291         New intrinsics.
20292         * config/i386/i386-builtin.def (__builtin_ia32_rsqrt14sd_mask)
20293         (__builtin_ia32_rsqrt14ss_mask): New builtins.
20294         * config/i386/sse.md (rsqrt14_<mode>_mask): New pattern.
20296 2017-05-11  Nathan Sidwell  <nathan@acm.org>
20298         * graphite-poly.c: Include dumpfile.h.
20300         * dumpfle.h (dump_function): Declare here ...
20301         * tree-dump.h (dump_function): ... not here.
20302         * dumpfile.c: #include tree-cfg.h.
20303         (dump_function): Move here from ...
20304         * tree-dump.c (dump_function): ... here.
20305         * gimplify.c: #include splay-tree.h, not tree-dump.h.
20306         * graphite-poly.c: Don't include tree-dump.h.
20307         * cgraphclones.c: Include dumpfile.h not tree-dump.h.
20308         * print-tree.c: Likewise.
20309         * stor-layout.c: Likewise.
20310         * tree-nested.c: Likewise.
20312         * dumpfile.c (dump_start): Use TDF_FLAGS.
20313         (dump_enable_all): Fix TDF_KIND check thinko.
20315 2017-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20317         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
20318         array entries to represent two legal parameterizations of the
20319         overloaded __builtin_cmpb function, as represented by the
20320         P6_OV_BUILTIN_CMPB constant.
20321         (altivec_resolve_overloaded_builtin): Add special case handling
20322         for the __builtin_cmpb function, as represented by the
20323         P6_OV_BUILTIN_CMPB constant.
20324         * config/rs6000/rs6000-builtin.def (BU_P6_2): New macro.
20325         (BU_P6_64BIT_2): New macro.
20326         (BU_P6_OVERLOAD_2): New macro
20327         (CMPB_32): Add 32-bit compare-bytes support for 32-bit only targets.
20328         (CMPB): Add 64-bit compare-bytes support for 32-bit and 64-bit targets.
20329         (CMPB): Add overload support to represent both 32-bit and 64-bit
20330         compare-bytes function.
20331         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
20332         support for TARGET_CMPB.
20333         * config/rs6000/rs6000.h: Add support for RS6000_BTM_CMPB.
20334         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
20335         documentation of the __builtin_cmpb overloaded built-in function.
20337 2017-05-11  Richard Biener  <rguenther@suse.de>
20339         PR tree-optimization/80705
20340         * tree-vect-data-refs.c (vect_analyze_data_refs): DECL_NONALIASED
20341         bases are not vectorizable.
20343 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20345         * tree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger
20346         when counting register pressure.
20348 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20350         * tree-ssa-loop-ivopts.c (compare_cost_pair): New.
20351         (iv_ca_more_deps): Renamed to ...
20352         (iv_ca_compare_deps): ... this.
20353         (iv_ca_extend): Extend iv_ca if NEW_CP is cheaper than OLD_CP.
20355 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20357         * tree-ssa-loop-ivopts.c (find_interesting_uses): Move inv vars dump
20358         to ...
20359         (determine_group_iv_costs): ... here.
20360         (find_inv_vars_cb): Record inv var if it's not recorded before.
20362 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20364         * tree-ssa-loop-ivopts.c (allow_ip_end_pos_p): Refine comments.
20365         (get_shiftadd_cost): Ditto.
20367 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20369         * tree-ssa-address.c: Include header file.
20370         (move_hint_to_base): Return TRUE if BASE_HINT is moved to memory
20371         address.
20372         (add_to_parts): Refactor.
20373         (addr_to_parts): New parameter.  Update use of move_hint_to_base.
20374         (create_mem_ref): Update use of addr_to_parts.  Re-associate addr
20375         in new order.
20377 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20379         PR tree-optimization/53090
20380         * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New enum value
20381         COMP_IV_EXPR_2.
20382         (extract_cond_operands): Detect condition with IV on both sides
20383         and return COMP_IV_EXPR_2.
20384         (find_interesting_uses_cond): Add iv_use for both IVs in condition.
20385         (rewrite_use_compare): Simplify by removing call to function
20386         extract_cond_operands.
20388 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20390         * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New.
20391         (extract_cond_operands): Detect condition comparing against non-
20392         invariant bound and return appropriate enum value.
20393         (find_interesting_uses_cond): Update use of extract_cond_operands.
20394         Handle its return value accordingly.
20395         (determine_group_iv_cost_cond, rewrite_use_compare): Ditto.
20397 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20399         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Re-associate
20400         nonlinear iv_use computation in loop invariant sensitive way.
20402 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20404         * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.
20405         (find_iv_candidates): Call relate_compare_use_with_all_cands.
20407 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20409         * tree-ssa-loop-ivopts.c (struct iv_cand): New field inv_exprs.
20410         (dump_cand): Support iv_cand.inv_exprs.
20411         (add_candidate_1): Record invariant exprs in iv_cand.inv_exprs
20412         for candidates.
20413         (iv_ca_set_no_cp, iv_ca_set_cp, free_loop_data): Support
20414         iv_cand.inv_exprs.
20416 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20418         * tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Move
20419         from ...
20420         * tree-ssa-address.c (multiplier_allowed_in_address_p): ... to here
20421         as local function.  Include necessary header files.
20422         * tree-ssa-loop-ivopts.h (multiplier_allowed_in_address_p): Delete.
20424 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20426         * tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify.
20428 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20430         * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Handle more
20431         operators: TRUNC_DIV_EXPR, BIT_AND_EXPR, BIT_IOR_EXPR, LSHIFT_EXPR,
20432         RSHIFT_EXPR and BIT_NOT_EXPR.
20434 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20436         * tree-ssa-loop-ivopts.c (get_loop_invariant_expr): Simplify.
20437         (adjust_setup_cost): New parameter supporting round up adjustment.
20438         (struct address_cost_data): Delete.
20439         (force_expr_to_var_cost): Don't bound cost with spill_cost.
20440         (split_address_cost, ptr_difference_cost): Delete.
20441         (difference_cost, compare_aff_trees, record_inv_expr): Delete.
20442         (struct ainc_cost_data): New struct.
20443         (get_address_cost_ainc): New function.
20444         (get_address_cost, get_computation_cost): Reimplement.
20445         (determine_group_iv_cost_address): Record inv_expr for all uses of
20446         a group.
20447         (determine_group_iv_cost_cond): Call get_loop_invariant_expr.
20448         (iv_ca_has_deps): Reimplemented to ...
20449         (iv_ca_more_deps): ... this.  Check if NEW_CP introduces more deps
20450         than OLD_CP.
20451         (iv_ca_extend): Call iv_ca_more_deps.
20453 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20455         * tree-ssa-address.c (struct mem_address): Move to header file.
20456         (valid_mem_ref_p, move_fixed_address_to_symbol): Make it global.
20457         * tree-ssa-address.h (struct mem_address): Move from C file.
20458         (valid_mem_ref_p, move_fixed_address_to_symbol): Declare.
20460 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20462         * tree-affine.h (aff_combination_type): New interface.
20463         (aff_combination_zero_p): Remove static.
20464         (aff_combination_const_p): New interface.
20465         (aff_combination_singleton_var_p): New interfaces.
20467 2017-05-11  Richard Biener  <rguenther@suse.de>
20469         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
20470         Skip unreachable blocks and destinations.
20471         (eliminate): Move stmt removal and fixup ...
20472         (fini_eliminate): ... here.  Skip inserted exprs.
20473         (pass_pre::execute): Move fini_pre after fini_eliminate.
20474         * tree-ssa-tailmerge.c: Include tree-cfgcleanup.h.
20475         (tail_merge_optimize): Run cleanup_tree_cfg if requested by
20476         PRE to get rid of dead code that has invalid SSA form and
20477         split critical edges again.
20479 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
20481         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
20483 2017-05-11  Richard Biener  <rguenther@suse.de>
20485         * passes.c (execute_function_todo): Verify loops if they are
20486         said to be up-to-date.
20487         * cfgexpand.c (pass_expand::execute): Discard loops for -dx.
20488         * trans-mem.c (pass_tm_edges::execute): Mark loops for fixup.
20490 2017-05-10  John David Anglin  <danglin@gcc.gnu.org>
20492         PR target/80090
20493         * config/pa/pa.c (pa_assemble_integer): When outputting a SYMBOL_REF,
20494         handle calling assemble_external ourself.
20496         PR target/79027
20497         * config/pa/pa.c (pa_cannot_change_mode_class): Reject changes to/from
20498         modes with zero size.  Enhance comment.
20500 2017-05-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20502         * config/rs6000/rs6000.c (altivec_init_builtins): Define POWER8
20503         built-ins for vec_xl and vec_xst with short and char pointer
20504         arguments.
20506 2017-05-10  Sebastian Peryt  <sebastian.peryt@intel.com>
20508         * config/i386/avx512fintrin.h (_mm_mask_max_round_sd)
20509         (_mm_maskz_max_round_sd, _mm_mask_max_round_ss)
20510         (_mm_maskz_max_round_ss, _mm_mask_min_round_sd)
20511         (_mm_maskz_min_round_sd, _mm_mask_min_round_ss)
20512         (_mm_maskz_min_round_ss): New intrinsics.
20513         * config/i386/i386-builtin-types.def (V2DF, V2DF, V2DF, V2DF, UQI, INT)
20514         (V4SF, V4SF, V4SF, V4SF, UQI, INT): New function type aliases.
20515         * config/i386/i386-builtin.def (__builtin_ia32_maxsd_mask_round)
20516         (__builtin_ia32_maxss_mask_round, __builtin_ia32_minsd_mask_round)
20517         (__builtin_ia32_minss_mask_round): New builtins.
20518         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
20519         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
20520         * config/i386/sse.md (<sse>_vm<code><mode>3<round_saeonly_name>):
20521         Rename to ...
20522         (<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): ... this.
20523         (v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|%0, %1, %<iptr>2<round_saeonly_op3>}):
20524         Change to ...
20525         (v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}):
20526         ... this.
20528 2017-05-10  Sebastian Peryt  <sebastian.peryt@intel.com>
20530         * config/i386/avx512fintrin.h (_mm_mask_mul_round_sd)
20531         (_mm_maskz_mul_round_sd, _mm_mask_mul_round_ss)
20532         (_mm_maskz_mul_round_ss, _mm_mask_div_round_sd)
20533         (_mm_maskz_div_round_sd, _mm_mask_div_round_ss)
20534         (_mm_maskz_div_round_ss, _mm_mask_mul_sd, _mm_maskz_mul_sd)
20535         (_mm_mask_mul_ss, _mm_maskz_mul_ss, _mm_mask_div_sd)
20536         (_mm_maskz_div_sd, _mm_mask_div_ss, _mm_maskz_div_ss): New intrinsics.
20537         * config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
20538         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
20539         * config/i386/i386-builtin.def (__builtin_ia32_divsd_mask_round)
20540         (__builtin_ia32_divss_mask_round, __builtin_ia32_mulsd_mask_round)
20541         (__builtin_ia32_mulss_mask_round): New builtins.
20542         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
20543         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
20544         * config/i386/sse.md (<sse>_vm<multdiv_mnemonic><mode>3<round_name>):
20545         Rename to ...
20546         (<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): ... this.
20547         (v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
20548         Change to ...
20549         (v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
20550         ... this.
20552 2017-05-10  Julia Koval  <julia.koval@intel.com>
20554         * config/i386/avxintrin.h (_mm256_set_m128, _mm256_set_m128d)
20555         (_mm256_set_m128i, _mm256_setr_m128, _mm256_setr_m128d)
20556         (_mm256_setr_m128i): New intrinsics.
20558 2017-05-10  Julia Koval  <julia.koval@intel.com>
20560         * config/i386/avx512fintrin.h (_mm_mask_rcp14_sd)
20561         (_mm_maskz_rcp14_sd, _mm_mask_rcp14_ss)
20562         (_mm_maskz_rcp14_ss): New intrinsics.
20563         * config/i386/i386-builtin.def (__builtin_ia32_rcp14sd_mask)
20564         (__builtin_ia32_rcp14ss_mask): New builtins.
20565         * config/i386/sse.md (srcp14<mode>_mask): New pattern.
20567 2017-05-10  Peter Bergner  <bergner@vnet.ibm.com>
20569         PR tree-optimization/51513
20570         * tree-cfg.c (gimple_seq_unreachable_p): New function.
20571         (assert_unreachable_fallthru_edge_p): Use it.
20572         (group_case_labels_stmt): Likewise.
20573         * tree-cfg.h: Prototype it.
20574         * stmt.c: Include cfghooks.h and tree-cfg.h.
20575         (emit_case_dispatch_table) <gap_label>: New local variable.
20576         Use it to fill dispatch table gaps.
20577         Test for default_label before updating probabilities.
20578         (expand_case) <default_label>: Remove unneeded initialization.
20579         Test for unreachable default case statement and remove its edge.
20580         Set default_label accordingly.
20581         * tree-ssa-ccp.c (optimize_unreachable): Update comment.
20583 2017-05-10  Carl Love  <cel@us.ibm.com>
20585         * config/rs6000/rs6000-c: Add support for built-in functions
20586         vector signed char      vec_neg (vector signed char)
20587         vector signed short int vec_neg (vector short int)
20588         vector signed int       vec_neg (vector signed int)
20589         vector signed long long vec_neg (vector signed long long)
20590         vector float            vec_neg (vector float)
20591         vector double           vec_neg (vector double)
20592         * config/rs6000/rs6000-builtin.def: Add definitions for NEG function
20593         overload.
20594         * config/rs6000/altivec.h: Add define for vec_neg
20595         * doc/extend.texi: Update the built-in documentation for the
20596         new built-in functions.
20598 2017-05-10  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20600         PR tree-optimization/77644
20601         * match.pd (sqrt(x) cmp sqrt(y) -> x cmp y): New pattern.
20603 2017-05-10  Nathan Sidwell  <nathan@acm.org>
20605         * dumpfile.h (TDI_lang_all): New.
20606         (TDF_KIND): New. Renumber others
20607         (TDF_LANG, TDF_TREE, TDF_RTL, TDF_IPA): Enumerate value, rather
20608         than bits.
20609         * dumpfile.c (dump_files): Mark language dumps as TDF_LANG.  add
20610         lang-all.
20611         (get_dump_file_name): Adjust suffix generation.
20612         (dump_enable_all): Use TDF_KIND.
20613         * doc/invoke.texi (-fdump-lang-all): Document.
20615         * dumpfile.h: Tabify.
20617 2017-05-10  Wilco Dijkstra  <wdijkstr@arm.com>
20619         PR target/80671
20620         * config/aarch64/cortex-a57-fma-steering.c (merge_forest):
20621         Move member access before delete.
20623 2017-05-10  Alexandre Oliva <aoliva@redhat.com>
20625         * tree-inline.c (expand_call_inline): Split block at stmt
20626         before the call.
20628 2017-05-09  Michael Meissner  <meissner@linux.vnet.ibm.com>
20630         PR target/68163
20631         * config/rs6000/rs6000.md (f32_lr): Delete mode attributes that
20632         are now unused after splitting mov{sf,sd}_hardfloat.
20633         (f32_lr2): Likewise.
20634         (f32_lm): Likewise.
20635         (f32_lm2): Likewise.
20636         (f32_li): Likewise.
20637         (f32_li2): Likewise.
20638         (f32_lv): Likewise.
20639         (f32_sr): Likewise.
20640         (f32_sr2): Likewise.
20641         (f32_sm): Likewise.
20642         (f32_sm2): Likewise.
20643         (f32_si): Likewise.
20644         (f32_si2): Likewise.
20645         (f32_sv): Likewise.
20646         (f32_dm): Likewise.
20647         (f32_vsx): Likewise.
20648         (f32_av): Likewise.
20649         (mov<mode>_hardfloat): Split into separate movsf and movsd pieces.
20650         For movsf, order stores so the VSX stores occur before the GPR
20651         store which encourages the register allocator to use a traditional
20652         FPR instead of a GPR.  For movsd, order the stores so that the GPR
20653         store comes before the VSX stores to allow the power6 to work.
20654         This is due to the power6 not having a 32-bit integer store
20655         instruction from a FPR.
20656         (movsf_hardfloat): Likewise.
20657         (movsd_hardfloat): Likewise.
20659 2017-05-09  Martin Sebor  <msebor@redhat.com>
20661         PR translation/80280
20662         * config/sol2-c.c (cmn_err_flag_specs): Initialize new data member
20663         added in r247778.
20665         PR translation/80280
20666         * config/i386/msformat-c.c (ms_printf_flag_specs): Initialize new
20667         data member added in r247778.
20668         (ms_scanf_flag_specs, ms_strftime_flag_specs): Same.
20670 2017-05-09  Nathan Sidwell  <nathan@acm.org>
20672         * tree.h (tree_fits_shwi_p, tree_fits_uhwi_p): Unconditionally pure.
20674         * ipa-devirt.c (default_hash_traits<type_pair>): Skip struct-scope
20675         typedefs.
20677 2017-05-09  Marek Polacek  <polacek@redhat.com>
20679         * doc/invoke.texi: Fix typo.
20681 2017-05-09  Richard Biener  <rguenther@suse.de>
20683         * tree-vrp.c (vrp_val_is_max): Adjust comment.
20684         (vrp_val_is_min): Likewise.
20685         (set_value_range_to_value): Likewise.
20686         (set_value_range_to_nonnegative): Likewise.
20687         (gimple_assign_nonzero_p): Likewise.
20688         (gimple_stmt_nonzero_p): Likewise.
20689         (vrp_int_const_binop): Likewise.  Remove unreachable case.
20690         (adjust_range_with_scev): Adjust comments.
20691         (compare_range_with_value): Likewise.
20692         (extract_range_from_phi_node): Likewise.
20693         (test_for_singularity): Likewise.
20695 2017-05-09  Richard Biener  <rguenther@suse.de>
20697         * tree-vrp.c (get_single_symbol): Add assert that we don't
20698         get overflowed constants as invariant part.
20699         (compare_values_warnv): Add comment before the TREE_NO_WARNING
20700         checks.  Use wi::cmp instead of recursing for integer constants.
20701         (compare_values): Just ignore whether we assumed undefined
20702         overflow instead of failing the compare.
20703         (extract_range_for_var_from_comparison_expr): Add comment before the
20704         TREE_NO_WARNING sets.
20705         (test_for_singularity): Likewise.
20706         (extract_range_from_comparison): Do not disable optimization
20707         when we assumed undefined overflow.
20708         (extract_range_basic): Remove init of unused var.
20710 2017-05-09  Richard Biener  <rguenther@suse.de>
20712         * tree-vrp.c (vrp_int_const_binop): Use wide-ints and simplify.
20713         (extract_range_from_multiplicative_op_1): Adjust.
20714         (extract_range_from_binary_expr_1): Use int_const_binop.
20716 2017-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20718         PR target/80101
20719         * config/rs6000/power6.md: Replace store_data_bypass_p calls with
20720         rs6000_store_data_bypass_p in seven define_bypass directives and
20721         in several comments.
20722         * config/rs6000/rs6000-protos.h: Add prototype for
20723         rs6000_store_data_bypass_p function.
20724         * config/rs6000/rs6000.c (rs6000_store_data_bypass_p): New
20725         function implements slightly different (rs6000-specific) semantics
20726         than store_data_bypass_p, returning false rather than aborting
20727         with assertion error when arguments do not satisfy the
20728         requirements of store data bypass.
20729         (rs6000_adjust_cost): Replace six calls of store_data_bypass_p with
20730         rs6000_store_data_bypass_p.
20732 2017-05-08  Max Filippov  <jcmvbkbc@gmail.com>
20734         * config/xtensa/xtensa-protos.h
20735         (xtensa_initial_elimination_offset): New declaration.
20736         * config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
20737         New function. Move its body from the INITIAL_ELIMINATION_OFFSET
20738         macro definition, add case for FRAME_POINTER_REGNUM when
20739         FRAME_GROWS_DOWNWARD.
20740         * config/xtensa/xtensa.h (FRAME_GROWS_DOWNWARD): New macro definition.
20741         (INITIAL_ELIMINATION_OFFSET): Replace body with call to
20742         xtensa_initial_elimination_offset.
20744 2017-05-08  Nathan Sidwell  <nathan@acm.org>
20746         * doc/invoke.texi: Alphabetize -fdump options.
20748 2017-05-08  Martin Sebor  <msebor@redhat.com>
20750         PR translation/80280
20751         * config/sol2-c.c (solaris_pragma_align): Correct quoting.
20753 2017-05-08  Bernd Edlinger  <bernd.edlinger@hotmail.de>
20755         * target.def (compute_frame_layout): New optional target hook.
20756         * doc/tm.texi.in (TARGET_COMPUTE_FRAME_LAYOUT): Add hook.
20757         * doc/tm.texi (TARGET_COMPUTE_FRAME_LAYOUT): Add documentation.
20758         * lra-eliminations.c (update_reg_eliminate): Call compute_frame_layout
20759         target hook.
20760         * reload1.c (verify_initial_elim_offsets): Likewise.
20761         * config/arm/arm.c (TARGET_COMPUTE_FRAME_LAYOUT): Define.
20762         (use_simple_return_p): Call arm_compute_frame_layout if needed.
20763         (arm_get_frame_offsets): Split up into this ...
20764         (arm_compute_frame_layout): ... and this function.
20766 2017-05-08  Richard Sandiford  <richard.sandiford@arm.com>
20768         * config/aarch64/constraints.md (Usa): New constraint.
20769         * config/aarch64/aarch64.md (*movsi_aarch64, *movdi_aarch64): Use it.
20771 2017-05-08  Thomas Preud'homme  <thomas.preudhomme@arm.com>
20773         * config.gcc (arm*-*-*): Set TM_MULTILIB_CONFIG from
20774         with_multilib_list after it has been checked.
20776 2017-05-08  Richard Biener  <rguenther@suse.de>
20778         * tree-ssa-pre.c (bitmap_set_and): Avoid bitmap copy.
20779         (bitmap_set_subtract_values): Likewise.
20781 2017-05-08  Richard Biener  <rguenther@suse.de>
20783         * tree-vrp.c (gimple_assign_nonzero_warnv_p): Rename to ...
20784         (gimple_assign_nonzero): ... this and remove strict_overflow_p
20785         argument.
20786         (gimple_stmt_nonzero_warnv_p): Rename to ...
20787         (gimple_stmt_nonzero_p): ... this and remove strict_overflow_p
20788         argument.
20789         (vrp_stmt_computes_nonzero): Remove strict_overflow_p argument.
20790         (extract_range_basic): Adjust, do not disable propagation on
20791         strict overflow sensitive simplification.
20792         (vrp_visit_cond_stmt): Likewise.
20794 2017-05-05  Jan Hubicka  <hubicka@ucw.cz>
20796         * ipa-inline-analysis.c (estimate_function_body_sizes): Recompute
20797         body size unconditionally.
20799 2017-05-07  Jeff Law  <law@redhat.com>
20801         Revert:
20802         2017-05-06  Jeff Law  <law@redhat.com>
20803         PR tree-optimization/78496
20804         * tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
20805         code.
20807         PR tree-optimization/78496
20808         * tree-vrp.c (simplify_assert_expr_using_ranges): New function.
20809         (simplify_stmt_using_ranges): Call it.
20810         (vrp_dom_walker::before_dom_children): Extract equivalences
20811         from an ASSERT_EXPR with an equality comparison against a
20812         constant.
20814 2017-05-06  Jeff Law  <law@redhat.com>
20816         PR tree-optimization/78496
20817         * tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
20818         code.
20820         PR tree-optimization/78496
20821         * tree-vrp.c (simplify_assert_expr_using_ranges): New function.
20822         (simplify_stmt_using_ranges): Call it.
20823         (vrp_dom_walker::before_dom_children): Extract equivalences
20824         from an ASSERT_EXPR with an equality comparison against a
20825         constant.
20827 2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
20829         * lra-constraints.c (lra_copy_reg_equiv): New function.
20830         (split_reg): Use it to copy equivalence information from the
20831         original register to the spill register.
20833 2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
20835         PR rtl-optimization/75964
20836         * simplify-rtx.c (simplify_const_relational_operation): Remove
20837         invalid handling of comparisons of integer ABS.
20839 2017-05-06  Uros Bizjak  <ubizjak@gmail.com>
20841         * config/i386/i386.c (ext_80387_constant_init): Do not explicitly
20842         initialize to zero.
20843         (init_regs): Remove declaration.
20844         (function_arg_advance_32): Initialize error_p as boolean variable.
20846 2017-05-05  Nathan Sidwell  <nathan@acm.org>
20848         * store-motion.c (remove_reachable_equiv_notes): Reformat long
20849         lines.  Use for (;;).
20851 2017-05-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20853         * config/rs6000/rs6000.c (rs6000_vect_nonmem): New static var.
20854         (rs6000_init_cost): Initialize rs6000_vect_nonmem.
20855         (rs6000_add_stmt_cost): Update rs6000_vect_nonmem.
20856         (rs6000_finish_cost): Avoid vectorizing simple copy loops with
20857         VF=2 that require versioning.
20859 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
20861         * diagnostic.h (CARET_LINE_MARGIN): Convert from macro to const
20862         int.
20864 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
20866         * diagnostic.h (diagnostic_override_option_index): Convert from
20867         macro to inline function.
20869 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
20871         * diagnostic.c (last_module_changed_p): New function.
20872         (set_last_module): New function.
20873         (diagnostic_report_current_module): Convert macro usage to
20874         the above functions.
20875         * diagnostic.h (diagnostic_context::last_module): Strengthen
20876         from const line_map * to const line_map_ordinary *.
20877         (diagnostic_last_module_changed): Delete macro.
20878         (diagnostic_set_last_module): Delete macro.
20880 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
20882         * diagnostic.c (diagnostic_impl): Replace report_diagnostic
20883         with diagnostic_report_diagnostic.
20884         (diagnostic_n_impl_richloc): Likewise.
20885         * diagnostic.h (report_diagnostic): Delete macro.
20886         * rtl-error.c (diagnostic_for_asm): Replace report_diagnostic
20887         with diagnostic_report_diagnostic.
20888         * substring-locations.c (format_warning_va): Likewise.
20890 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
20892         * diagnostic.c (diagnostic_report_diagnostic): Eliminate
20893         save/restor of format_spec.  Move option-printing code to...
20894         (print_option_information): ...this new function, and
20895         reimplement by simply printing to the pretty_printer,
20896         rather than appending to the format string.
20898 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
20900         * diagnostic.c (diagnostic_report_diagnostic): Split out pragma
20901         handling logic into...
20902         (update_effective_level_from_pragmas): ...this new function.
20904 2017-05-04  Andrew Waterman  <andrew@sifive.com>
20906         * config/riscv/riscv.opt (mstrict-align): New option.
20907         * config/riscv/riscv.h (STRICT_ALIGNMENT): Use it.  Update comment.
20908         (SLOW_UNALIGNED_ACCESS): Define.
20909         (riscv_slow_unaligned_access): Declare.
20910         * config/riscv/riscv.c (riscv_tune_info): Add slow_unaligned_access
20911         field.
20912         (riscv_slow_unaligned_access): New variable.
20913         (rocket_tune_info): Set slow_unaligned_access to true.
20914         (optimize_size_tune_info): Set slow_unaligned_access to false.
20915         (riscv_cpu_info_table): Add entry for optimize_size_tune_info.
20916         (riscv_valid_lo_sum_p): Use TARGET_STRICT_ALIGN.
20917         (riscv_option_override): Set riscv_slow_unaligned_access.
20918         * doc/invoke.texi: Add -mstrict-align to RISC-V.
20920 2017-05-04  Kito Cheng  <kito.cheng@gmail.com>
20922         * config/riscv/riscv.md: Unify indentation.
20924 2017-05-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
20926         PR target/79038
20927         PR target/79202
20928         PR target/79203
20929         * config/rs6000/rs6000.md (u code attribute): Add FIX and
20930         UNSIGNED_FIX.
20931         (extendsi<mode>2): Add support for doing sign extension via
20932         VUPKHSW and XXPERMDI if the value is in Altivec registers and we
20933         don't have ISA 3.0 instructions.
20934         (extendsi<mode>2 splitter): Likewise.
20935         (fix_trunc<mode>si2): If we are at ISA 2.07 (VSX small integer),
20936         generate the normal insns since SImode can now go in vector
20937         registers.  Disallow the special UNSPECs needed for previous
20938         machines to hide SImode being used.  Add new insns
20939         fctiw{,w}_<mode>_smallint if SImode can go in vector registers.
20940         (fix_trunc<mode>si2_stfiwx): Likewise.
20941         (fix_trunc<mode>si2_internal): Likewise.
20942         (fixuns_trunc<mode>si2): Likewise.
20943         (fixuns_trunc<mode>si2_stfiwx): Likewise.
20944         (fctiw<u>z_<mode>_smallint): Likewise.
20945         (fctiw<u>z_<mode>_mem): New combiner pattern to prevent conversion
20946         of floating point to 32-bit integer from doing a direct move to
20947         the GPR registers to do a store.
20948         (fctiwz_<mode>): Break long line.
20950 2017-05-05  Bin Cheng  <bin.cheng@arm.com>
20952         * Makefile.in (GTFILES): Add tree-ssa-loop-ivopts.c.
20953         * tree-ssa-loop-ivopts.c (compute_max_addr_offset): Delete.
20954         (addr_list, addr_offset_valid_p): New.
20955         (split_address_groups): Check offset validity with above function.
20956         (gt-tree-ssa-loop-ivopts.h): Include header file.
20958 2017-05-05  Nathan Sidwell  <nathan@acm.org>
20960         * config.gcc (arm*-*-*): Add missing 'fi'.
20962 2017-05-05  Steve Ellcey  <sellcey@cavium.com>
20964         * doc/invoke.texi (-fopt-info): Explicitly say order of options
20965         included in -fopt-info does not matter.
20966         * doc/optinfo.texi (-fopt-info): Fix description of default
20967         behavour. Explicitly say order of options included in -fopt-info
20968         does not matter.
20970 2017-05-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>
20972         * config.gcc: Allow combinations of aprofile and rmprofile values for
20973         --with-multilib-list.
20974         * config/arm/t-multilib: New file.
20975         * config/arm/t-aprofile: Remove initialization of MULTILIB_*
20976         variables.  Remove setting of ISA and floating-point ABI in
20977         MULTILIB_OPTIONS and MULTILIB_DIRNAMES.  Set architecture and FPU in
20978         MULTI_ARCH_OPTS_A and MULTI_ARCH_DIRS_A rather than MULTILIB_OPTIONS
20979         and MULTILIB_DIRNAMES respectively.  Add comment to introduce all
20980         matches.  Add architecture matches for marvel-pj4 and generic-armv7-a
20981         CPU options.
20982         * config/arm/t-rmprofile: Likewise except for the matches changes.
20983         * doc/install.texi (--with-multilib-list): Document the combination of
20984         aprofile and rmprofile values and warn about pitfalls in doing that.
20986 2017-05-05  Wilco Dijkstra  <wdijkstr@arm.com>
20988         * config/aarch64/aarch64.md (movsi_aarch64): Remove '*' from r=w.
20989         (movdi_aarch64): Likewise.
20991 2017-05-05  Jakub Jelinek  <jakub@redhat.com>
20993         PR tree-optimization/80632
20994         * tree-switch-conversion.c (struct switch_conv_info): Add target_vop
20995         field.
20996         (build_arrays): Initialize it for virtual phis.
20997         (fix_phi_nodes): Use it for virtual phis.
20999         PR tree-optimization/80558
21000         * tree-vrp.c (extract_range_from_binary_expr_1): Optimize
21001         [x, y] op z into [x op, y op z] for op & or | if conditions
21002         are met.
21004 2017-05-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
21005             Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
21007         PR target/71607
21008         * config/arm/arm.md (use_literal_pool): Remove.
21009         (64-bit immediate split): No longer takes cost into consideration
21010         if arm_disable_literal_pool is enabled.
21011         * config/arm/arm.c (arm_tls_referenced_p): Add diagnostic if TLS is
21012         used when arm_disable_literal_pool is enabled.
21013         (arm_max_const_double_inline_cost): Remove use of
21014         arm_disable_literal_pool.
21015         (push_minipool_fix): Add assert.
21016         (arm_reorg): Add return if arm_disable_literal_pool is enabled.
21017         * config/arm/vfp.md (no_literal_pool_df_immediate): New.
21018         (no_literal_pool_sf_immediate): New.
21020 2017-05-05  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21022         PR tree-optimization/80613
21023         * tree-ssa-dce.c (propagate_necessity): Remove cases for
21024         BUILT_IN_STRDUP and BUILT_IN_STRNDUP.
21026 2017-05-05  Richard Biener  <rguenther@suse.de>
21028         * tree-ssa-pre.c (get_or_alloc_expr_for): Simplify.
21030 2017-05-05  Georg-Johann Lay  <avr@gjlay.de>
21032         * config/avr/avr.md [flag_strict_overflow]: Remove any occurence
21033         of this flag from insn conditions due to removal from r247495.
21035 2017-05-05  Wilco Dijkstra  <wdijkstr@arm.com>
21037         * config/arm/aarch-common.c (arm_early_load_addr_dep_ptr):
21038         New function.
21039         (arm_early_store_addr_dep_ptr): Likewise.
21040         * config/arm/aarch-common-protos.h
21041         (arm_early_load_addr_dep_ptr): Add prototype.
21042         (arm_early_store_addr_dep_ptr): Likewise.
21043         * config/arm/cortex-a53.md: Add new bypasses.
21045 2017-05-05  Jakub Jelinek  <jakub@redhat.com>
21047         * tree.c (next_type_uid): Change type to unsigned.
21048         (type_hash_canon): Decrement back next_type_uid if
21049         freeing a type node with the highest TYPE_UID.  For INTEGER_TYPEs
21050         also ggc_free TYPE_MIN_VALUE, TYPE_MAX_VALUE and TYPE_CACHED_VALUES
21051         if possible.
21053 2017-05-04  Martin Sebor  <msebor@redhat.com>
21055         * builtins.c: Fix a trivial typo in a comment.
21057         PR middle-end/79234
21058         * builtins.c (check_sizes): Adjust to handle reading past the end.
21059         Avoid printing excessive upper bound of ranges.  Use %E to print
21060         tree nodes instead of converting them to %wu.
21061         (expand_builtin_memchr): New function.
21062         (compute_dest_size): Rename...
21063         (compute_objsize): ...to this.
21064         (expand_builtin_memcpy): Adjust.
21065         (expand_builtin_mempcpy): Adjust.
21066         (expand_builtin_strcat): Adjust.
21067         (expand_builtin_strcpy): Adjust.
21068         (check_strncat_sizes): Adjust.
21069         (expand_builtin_strncat): Adjust.
21070         (expand_builtin_strncpy): Adjust and simplify.
21071         (expand_builtin_memset): Adjust.
21072         (expand_builtin_bzero): Adjust.
21073         (expand_builtin_memcmp): Adjust.
21074         (expand_builtin): Handle memcmp.
21075         (maybe_emit_chk_warning): Check strncat just once.
21077 2017-05-04  Martin Sebor  <msebor@redhat.com>
21079         PR preprocessor/79214
21080         PR middle-end/79222
21081         PR middle-end/79223
21082         * builtins.c (check_sizes): Add inlining context and issue
21083         warnings even when -Wno-system-headers is set.
21084         (check_strncat_sizes): Same.
21085         (expand_builtin_strncat): Same.
21086         (expand_builtin_memmove): New function.
21087         (expand_builtin_stpncpy): Same.
21088         (expand_builtin): Handle memmove and stpncpy.
21090 2017-05-04  Bin Cheng  <bin.cheng@arm.com>
21092         * tree-ssa-loop-ivopts.c (struct cost_pair): Remove field inv_expr
21093         which is not used any more.
21095 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
21097         * config/aarch64/aarch64.c (generic_tunings): Update prefetch model.
21099 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
21101         * config/aarch64/aarch64.c (cortexa35_tunings): Set jump alignment to 4.
21102         (cortexa53_tunings): Likewise.
21103         (cortexa57_tunings): Likewise.
21104         (cortexa72_tunings): Likewise.
21105         (cortexa73_tunings): Likewise.
21107 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
21109         * config/aarch64/aarch64.c (generic_tunings): Set jump alignment to 4.
21110         Set loop alignment to 8.
21112 2017-05-04  Martin Sebor  <msebor@redhat.com>
21114         PR translation/80280
21115         * builtins.c (expand_builtin_object_size): Add missing quoting to
21116         %D and like directives.
21117         * hsa-gen.c (hsa_type_for_scalar_tree_type): Same.
21118         (hsa_type_for_tree_type): Same.
21119         (verify_function_arguments): Same.
21120         * symtab.c (symbol_table::change_decl_assembler_name): Same.
21121         * varasm.c (get_section): Same.
21122         (mark_weak): Same.
21124 2017-05-04  Martin Sebor  <msebor@redhat.com>
21126         PR translation/80280
21127         * config/i386/i386.c (ix86_function_versions): Quote a %D directive.
21129 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
21131         * config/aarch64/aarch64.c (generic_addrcost_table):
21132         Change HI/TI mode setting.
21134 2017-05-04  Martin Jambor  <mjambor@suse.cz>
21136         PR tree-optimization/80622
21137         * tree-sra.c (comes_initialized_p): New function.
21138         (build_accesses_from_assign): Only set write lazily when
21139         comes_initialized_p is false.
21140         (analyze_access_subtree): Use comes_initialized_p.
21141         (propagate_subaccesses_across_link): Assert !comes_initialized_p
21142         instead of testing for PARM_DECL.
21144 2017-05-04  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21146         * config/aarch64/aarch64.md (prefetch); Adjust predicate and
21147         constraint on operand 0 to allow more general addressing modes.
21148         Adjust output template.
21149         * config/aarch64/aarch64.c (aarch64_address_valid_for_prefetch_p):
21150         New function.
21151         * config/aarch64/aarch64-protos.h
21152         (aarch64_address_valid_for_prefetch_p): Declare prototype.
21153         * config/aarch64/constraints.md (Dp): New address constraint.
21154         * config/aarch64/predicates.md (aarch64_prefetch_operand): New
21155         predicate.
21157 2017-05-04  Jan Hubicka  <hubicka@ucw.cz>
21159         * ipa-cp.c (perform_estimation_of_a_value): Drop base_time parameter;
21160         update use of estimate_ipcp_clone_size_and_time.
21161         (estimate_local_effects): Update use of
21162         estimate_ipcp_clone_size_and_time and perform_estimation_of_a_value.
21163         * ipa-inline.h (estimate_ipcp_clone_size_and_time): Update prototype.
21164         * ipa-inline-analysis.c (estimate_ipcp_clone_size_and_time):
21165         Return nonspecialized time.
21167 2017-05-04  Richard Biener  <rguenther@suse.de>
21169         * tree-ssa-alias.c (get_continuation_for_phi): Improve looking
21170         for the last VUSE which def dominates the PHI.  Directly call
21171         maybe_skip_until.
21172         (get_continuation_for_phi_1): Remove.
21174 2017-05-04  Richard Sandiford  <richard.sandiford@linaro.org>
21176         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): Add commentary
21177         to explain the use of truncating division.  Cap the number of
21178         iterations to the maximum given by nb_iterations_upper_bound,
21179         if defined.
21181 2017-05-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21183         * configure.ac (--enable-mingw-wildcard): Add new configurable feature.
21184         * configure: Regenerate.
21185         * config.in: Regenerate.
21186         * config/i386/driver-mingw32.c: new file.
21187         * config/i386/x-mingw32: Add rule to build driver-mingw32.o.
21188         * config.host: Link driver-mingw32.o on MinGW host.
21189         * doc/install.texi: Document new --enable-mingw-wildcard configure
21190         option.
21192 2017-05-04  Marek Polacek  <polacek@redhat.com>
21194         PR tree-optimization/80612
21195         * calls.c (get_size_range): Check for INTEGRAL_TYPE_P.
21197 2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
21198             Andre Simoes Dias Vieira  <andre.simoesdiasvieira@arm.com>
21200         * config/arm/arm.md (movsi): Change TARGET_32BIT to TARGET_HAVE_MOVT.
21201         (movt splitter): Likewise.
21202         * config/arm/arm.c (arm_option_check_internal): Change arm_arch_thumb2
21203         to TARGET_HAVE_MOVT, and merge with -mslow-flash-data check.
21204         (const_ok_for_arm): Change else to else if (TARGET_THUMB2) and add else
21205         block for Thumb-1 with MOVT.
21206         (thumb2_legitimate_address_p): Move code block ...
21207         (can_avoid_literal_pool_for_label_p): ... into this new function.
21208         (thumb1_legitimate_address_p): Add check for TARGET_HAVE_MOVT and
21209         literal pool.
21210         (thumb_legitimate_constant_p): Add conditional on TARGET_HAVE_MOVT
21211         * doc/invoke.texi (-mpure-code): Change "ARMv7-M targets" for
21212         "M-profile targets with the MOVT instruction".
21214 2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
21216         * config/arm/arm-builtins.c (arm_init_builtins): Rename
21217         __builtin_arm_ldfscr to __builtin_arm_get_fpscr, and rename
21218         __builtin_arm_stfscr to __builtin_arm_set_fpscr.
21220 2017-05-04  Martin Liska  <mliska@suse.cz>
21222         * tree-vrp.c (simplify_cond_using_ranges_2): Remove unused
21223         variable cond_code.
21225 2017-05-04  Richard Biener  <rguenther@suse.de>
21227         * tree.c (array_at_struct_end_p): Handle arrays at struct
21228         end with flexarrays more conservatively.  Refactor and treat
21229         arrays of arrays or aggregates more strict.  Fix
21230         VIEW_CONVERT_EXPR handling.  Remove allow_compref argument.
21231         * tree.c (array_at_struct_end_p): Adjust prototype.
21232         * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust.
21233         * gimple-fold.c (get_range_strlen): Likewise.
21234         * tree-chkp.c (chkp_may_narrow_to_field): Likewise.
21236 2017-05-04  Richard Biener  <rguenther@suse.de>
21238         PR tree-optimization/31130
21239         * tree-vrp.c (needs_overflow_infinity): Remove as always returning
21240         false.
21241         (supports_overflow_infinity): Likewise.
21242         (is_negative_overflow_infinity): Likewise.
21243         (is_positive_overflow_infinity): Likewise.
21244         (is_overflow_infinity): Likewise.
21245         (stmt_overflow_infinity): Likewise.
21246         (overflow_infinity_range_p): Likewise.
21247         (usable_range_p): Remove as always returning true.
21248         (make_overflow_infinity): Remove.
21249         (negative_overflow_infinity): Likewise.
21250         (positive_overflow_infinity): Likewise.
21251         (avoid_overflow_infinity): Likewise.
21252         (set_value_range): Adjust accordingly.
21253         (set_value_range_to_nonnegative): Likewise, remove now unused
21254         overflow_infinity arg.
21255         (vrp_operand_equal_p): Adjust.
21256         (update_value_range): Likewise.
21257         (range_int_cst_singleton_p): Likewise.
21258         (operand_less_p): Likewise.
21259         (compare_values_warnv): Likewise.
21260         (extract_range_for_var_from_comparison_expr): Likewise.
21261         (vrp_int_const_binop): Likewise.
21262         (zero_nonzero_bits_from_vr): Likewise.
21263         (extract_range_from_multiplicative_op_1): Likewise.
21264         (extract_range_from_binary_expr_1): Likewise.
21265         (extract_range_from_unary_expr): Likewise.
21266         (extract_range_from_comparison): Likewise.
21267         (extract_range_basic): Likewise.
21268         (adjust_range_with_scev): Likewise.
21269         (compare_ranges): Likewise.
21270         (compare_range_with_value): Likewise.
21271         (dump_value_range): Likewise.
21272         (test_for_singularity): Likewise, remove strict_overflow_p parameter
21273         never used.
21274         (simplify_cond_using_ranges): Adjust.
21276 2017-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
21278         * brig-builtins.def: Added a builtin for class_f64.
21279         * builtin-types.def: Added a builtin type needed by class_f64.
21281 2017-05-03  Jason Merrill  <jason@redhat.com>
21283         * timevar.def: Add TV_CONSTEXPR.
21285 2017-05-03  David Malcolm  <dmalcolm@redhat.com>
21287         * common.opt (fdiagnostics-parseable-fixits): Fix typo.
21289 2017-05-03  Martin Jambor  <mjambor@suse.cz>
21291         * ipa-prop.c (ipa_update_after_lto_read): Removed.
21292         * ipa-prop.h (ipa_update_after_lto_read): Remove declaration.
21293         * ipa-cp.c (ipcp_propagate_stage): Do not call
21294         ipa_update_after_lto_read.
21295         * ipa-inline.c (ipa_inline): Likewise.
21297 2017-05-03  Martin Jambor  <mjambor@suse.cz>
21299         * ipa-prop.h (ipa_edge_args): Make a class.  Mark with for_user GTY
21300         tag.  Added a default constructor and a destructor.
21301         (ipa_edge_args_sum_t): New class;
21302         (ipa_edge_args_sum): Declare.
21303         (ipa_edge_args_vector): Remove declaration.
21304         (IPA_EDGE_REF): Use ipa_edge_args_sum.
21305         (ipa_free_edge_args_substructures): Remove declaration.
21306         (ipa_check_create_edge_args): Use ipa_edge_args_sum.
21307         (ipa_edge_args_info_available_for_edge_p): Likewise.
21308         * ipa-prop.c (ipa_edge_args_vector): Removed.
21309         (edge_removal_hook_holder): Likewise.
21310         (edge_duplication_hook_holder): Likewise.
21311         (ipa_edge_args_sum): New variable.
21312         (ipa_propagate_indirect_call_infos): Test ipa_edge_args_sum instead of
21313         ipa_edge_args_vector.
21314         (ipa_free_edge_args_substructures): Likewise.
21315         (ipa_free_all_edge_args): Free ipa_edge_args_sum instead of
21316         ipa_edge_args_vector.
21317         (ipa_edge_removal_hook): Turned into method
21318         ipa_edge_args_sum_t::remove.
21319         (ipa_edge_duplication_hook): Turned into method
21320         ipa_edge_args_sum_t::duplicate.
21321         (ipa_register_cgraph_hooks): Create ipa_edge_args_sum instead of
21322         registering edge hooks.
21323         (ipa_unregister_cgraph_hooks): Do not unregister edge hooks.
21324         * ipa-inline-analysis.c (estimate_function_body_sizes): Test
21325         ipa_edge_args_sum instead of ipa_edge_args_vector.
21326         * ipa-profile.c (ipa_profile): Likewise.
21328 2017-05-03  Martin Jambor  <mjambor@suse.cz>
21330         * symbol-summary.h (function_summary): New method exists.
21331         (function_summary::symtab_removal): Deallocate through release.
21332         (call_summary): New class.
21333         (gt_ggc_mx): New overload.
21334         (gt_pch_nx): Likewise.
21335         (gt_pch_nx): Likewise.
21337 2017-05-03  Jeff Law  <law@redhat.com>
21339         PR tree-optimization/78496
21340         * tree-vrp.c (simplify_cond_using_ranges_1): Renamed
21341         from simplify_cond_using_ranges.  Split off code to walk
21342         backwards through casts into ...
21343         (simplify_cond_using_ranges_2): New function.
21344         (simplify_stmt_using_ranges): Call simplify_cond_using_ranges_1.
21345         (execute_vrp): After identifying jump threads, call
21346         simplify_cond_using_ranges_2.
21348 2017-05-03  Jan Hubicka  <hubicka@ucw.cz>
21350         PR bootstrap/80609
21351         * ipa-inline.h (inline_summary): Add ctor.
21352         (create_ggc): Do not use ggc_cleared_alloc.
21354 2017-05-03  Jeff Downs  <heydowns@somuchpressure.net>
21355             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21357         * gcc.c (handle_braces): Support escaping in switch matching
21358         text.
21359         * doc/invoke.texi (Spec Files): Document it.
21360         Remove superfluous @code markup in items.
21362 2017-05-03  David Malcolm  <dmalcolm@redhat.com>
21364         * diagnostic-show-locus.c (struct column_range): New struct.
21365         (get_affected_columns): New function.
21366         (get_printed_columns): New function.
21367         (struct correction): New struct.
21368         (correction::ensure_capacity): New function.
21369         (correction::ensure_terminated): New function.
21370         (struct line_corrections): New struct.
21371         (line_corrections::~line_corrections): New dtor.
21372         (line_corrections::add_hint): New function.
21373         (layout::print_trailing_fixits): Reimplement in terms of the new
21374         classes.
21375         (selftest::test_overlapped_fixit_printing): New function.
21376         (selftest::diagnostic_show_locus_c_tests): Call it.
21378 2017-05-03  Nathan Sidwell  <nathan@acm.org>
21380         Canonicalize canonical type hashing
21381         * tree.h (type_hash_canon_hash): Declare.
21382         * tree.c (type_hash_list, attribute_hash_list): Move into
21383         type_hash_canon_hash.
21384         (build_type_attribute_qual_variant): Break out hash code calc into
21385         type_hash_canon_hash.
21386         (type_hash_canon_hash): New.  Generic type hash computation.
21387         (build_range_type_1, build_array_type_1, build_function_type,
21388         build_method_type_directly, build_offset_type, build_complex_type,
21389         make_vector_type): Call it.
21391 2017-05-03  Richard Biener  <rguenther@suse.de>
21393         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
21394         When all DRs have unknown misaligned do not always peel
21395         when there is a store but apply the same costing model as if
21396         there were only loads.
21398 2017-05-03  Richard Biener  <rguenther@suse.de>
21400         Revert
21401         PR tree-optimization/80492
21402         * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
21403         compare_base_decls returning dont-know properly.
21405 2017-05-03  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21407         * config/arm/iterators.md (CCSI): New mode iterator.
21408         (arch): New mode attribute.
21409         * config/arm/sync.md (atomic_compare_and_swap<mode>_1): Rename into ...
21410         (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1): This and ...
21411         (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): This.  Use CCSI
21412         code iterator for success result mode.
21413         * config/arm/arm.c (arm_expand_compare_and_swap): Adapt code to use
21414         the corresponding new insn generators.
21416 2017-05-03  Bin Cheng  <bin.cheng@arm.com>
21418         Revert r247509
21419         2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21420         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
21422 2017-05-03  Richard Sandiford  <richard.sandiford@linaro.org>
21424         * tree-data-ref.h (SUB_CONFLICTS_IN_A): Wrap SUB argument in brackets.
21425         (SUB_CONFLICTS_IN_B, SUB_LAST_CONFLICT, SUB_DISTANCE): Likewise.
21426         (DDR_A): Wrap DDR argument in brackets.
21427         (DDR_B, DDR_AFFINE_P, DDR_ARE_DEPENDENT, DDR_SUBSCRIPTS): Likewise.
21428         (DDR_LOOP_NEST, DDR_INNER_LOOP, DDR_SELF_REFERENCE): Likewise.
21429         (DDR_REVERSED_P): Likewise.
21431 2017-05-03  Jakub Jelinek  <jakub@redhat.com>
21433         PR tree-optimization/79472
21434         * tree-switch-conversion.c (struct switch_conv_info): Add
21435         contiguous_range and default_case_nonstandard fields.
21436         (collect_switch_conv_info): Compute contiguous_range and
21437         default_case_nonstandard fields, don't clear final_bb if
21438         contiguous_range and only the default case doesn't have the required
21439         structure.
21440         (check_all_empty_except_final): Set default_case_nonstandard instead
21441         of failing if contiguous_range and the default case doesn't have empty
21442         block.
21443         (check_final_bb): Add SWTCH argument, don't fail if contiguous_range
21444         and only the default case doesn't have the required constants.  Skip
21445         virtual phis.
21446         (gather_default_values): Skip virtual phis.  Allow non-NULL CASE_LOW
21447         if default_case_nonstandard.
21448         (build_constructors): Build constant 1 just once.  Assert that default
21449         values aren't inserted in between cases if contiguous_range.  Skip
21450         virtual phis.
21451         (build_arrays): Skip virtual phis.
21452         (prune_bbs): Add DEFAULT_BB argument, don't remove that bb.
21453         (fix_phi_nodes): Don't add e2f phi arg if default_case_nonstandard.
21454         Handle virtual phis.
21455         (gen_inbound_check): Handle default_case_nonstandard case.
21456         (process_switch): Adjust check_final_bb caller.  Call
21457         gather_default_values with the first non-default case instead of
21458         default case if default_case_nonstandard.
21460 2017-05-02  Nathan Sidwell  <nathan@acm.org>
21462         * ggc-page.c (move_ptes_to_front): Replace unsigned >0 with i--
21463         check.  Fix formatting.
21465 2017-05-02  Jan Hubicka  <hubicka@ucw.cz>
21467         * ipa-inline-analysis.c (estimate_node_size_and_time): Allow roundoff
21468         errors when comparing specialized and unspecialized times.
21470 2017-05-02  David Malcolm  <dmalcolm@redhat.com>
21472         * diagnostic-show-locus.c
21473         (layout::should_print_annotation_line_p): Make private.
21474         (layout::print_annotation_line): Make private.
21475         (layout::annotation_line_showed_range_p): Make private.
21476         (layout::show_ruler): Make private.
21477         (layout::print_source_line): Make private.  Pass in line and
21478         line_width, rather than calling location_get_source_line.  Drop
21479         returned value.
21480         (layout::print_leading_fixits): New method.
21481         (layout::print_any_fixits): Rename to...
21482         (layout::print_trailing_fixits): ...this, and make private.
21483         Don't print newline fixits.
21484         (diagnostic_show_locus): Move logic for printing one row into...
21485         (layout::print_line): ...this new function.  Move the
21486         location_get_source_line call and error-handling from
21487         print_source_line to here.  Call print_leading_fixits, and rename
21488         print_any_fixits to print_trailing_fixits.
21489         (selftest::test_fixit_insert_containing_newline): Update now that
21490         newlines are partially supported.
21491         (selftest::test_fixit_insert_containing_newline_2): New test.
21492         (selftest::test_fixit_replace_containing_newline): Update comments.
21493         (selftest::diagnostic_show_locus_c_tests): Call the new test.
21494         * edit-context.c (class added_line): New class.
21495         (class edited_line): Describe newline handling in comment.
21496         (edited_line::actually_edited_p): New method.
21497         (edited_line::print_content): Delete redundant decl.
21498         (edited_line::m_predecessors): New field.
21499         (edited_file::print_content): Call edited_line::print_content.
21500         (edited_file::print_diff): Update to support newlines.
21501         (edited_file::print_diff_hunk): Likewise.
21502         (edited_file::print_run_of_changed_lines): New function.
21503         (edited_file::print_diff_line): Convert to...
21504         (print_diff_line): ...this.
21505         (edited_file::get_effective_line_count): New function.
21506         (edited_line::edited_line): Initialize new field m_predecessors.
21507         (edited_line::~edited_line): Clean up m_predecessors.
21508         (edited_line::apply_fixit): Handle newlines.
21509         (edited_line::get_effective_line_count): New function.
21510         (edited_line::print_content): New function.
21511         (edited_line::print_diff_lines): New function.
21512         (selftest::test_applying_fixits_insert_containing_newline): New
21513         test.
21514         (selftest::test_applying_fixits_replace_containing_newline): New
21515         test.
21516         (selftest::insert_line): New function.
21517         (selftest::test_applying_fixits_multiple_lines): Add example of
21518         inserting a line.
21519         (selftest::edit_context_c_tests): Call the new tests.
21521 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21523         * tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Delete
21524         parameter cand.  Update dump information.
21525         (get_computation_cost): Update uses.
21527 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21529         * tree-ssa-loop-ivopts.c (get_computation_aff_1): New.
21530         (get_computation_aff): Reorder parameters.  Use get_computation_aff_1.
21531         (get_computation_at, rewrite_use_address): Update use of
21532         get_computation_aff.
21534 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21536         * tree-ssa-loop-ivopts.c (get_computation_at): Reorder parameters.
21537         (get_computation): Delete.
21538         (get_computation_cost): Implement like get_computation_cost_at.
21539         Use get_computation_at.
21540         (get_computation_cost_at): Delete.
21541         (rewrite_use_nonlinear_expr): Use get_computation_at.
21542         (rewrite_use_compare, remove_unused_ivs): Ditto.
21544 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21546         * tree-ssa-loop-ivopts.c (rewrite_use_address): Simple refactor.
21548 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21550         * tree-ssa-loop-ivopts.c (struct iv_ca): Rename n_regs to n_invs.
21551         (ivopts_global_cost_for_size): Rename parameter and update uses.
21552         (iv_ca_recount_cost): Update uses.
21553         (iv_ca_set_remove_invs, iv_ca_set_no_cp): Record invariants and
21554         candidates seperately in n_invs and n_cands.
21555         (iv_ca_set_add_invs, iv_ca_set_cp, iv_ca_new): Ditto.
21557 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21559         * tree-ssa-loop-ivopts.c (struct walk_tree_data): New.
21560         (find_inv_vars_cb): New.
21561         (find_depends): Renamed to ...
21562         (find_inv_vars): ... this.
21563         (add_candidate_1, force_var_cost): Call find_inv_vars.
21564         (split_address_cost, determine_group_iv_cost_cond): Ditto.
21566 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21568         * tree-ssa-loop-ivopts.c (struct cost_pair): Rename depends_on to
21569         inv_vars.  Add inv_exprs.
21570         (struct iv_cand): Rename depends_on to inv_vars.
21571         (struct ivopts_data): Rename max_inv_id/n_invariant_uses to
21572         max_inv_var_id/n_inv_var_uses.  Move max_inv_expr_id around.
21573         Refactor field used_inv_exprs from has_map to array n_inv_expr_uses.
21574         (dump_cand): Dump inv_vars.
21575         (tree_ssa_iv_optimize_init): Support inv_vars and inv_exprs.
21576         (record_invariant, find_depends, add_candidate_1): Ditto.
21577         (set_group_iv_cost, force_var_cost): Ditto.
21578         (split_address_cost, ptr_difference_cost, difference_cost): Ditto.
21579         (get_computation_cost_at, get_computation_cost): Ditto.
21580         (determine_group_iv_cost_generic): Ditto.
21581         (determine_group_iv_cost_address): Ditto.
21582         (determine_group_iv_cost_cond, autoinc_possible_for_pair): Ditto.
21583         (determine_group_iv_costs): Ditto.
21584         (iv_ca_recount_cost): Update call to ivopts_global_cost_for_size.
21585         (iv_ca_set_remove_invariants): Renamed to ...
21586         (iv_ca_set_remove_invs): ... this.  Support inv_vars and inv_exprs.
21587         (iv_ca_set_no_cp): Use iv_ca_set_remove_invs.
21588         (iv_ca_set_add_invariants):  Renamed to ...
21589         (iv_ca_set_add_invs): ... this.  Support inv_vars and inv_exprs.
21590         (iv_ca_set_cp): Use iv_ca_set_add_invs.
21591         (iv_ca_has_deps): Support inv_vars and inv_exprs.
21592         (iv_ca_new, iv_ca_free, iv_ca_dump, free_loop_data): Ditto.
21593         (create_new_ivs): Remove useless dump.
21595 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21597         * tree-ssa-loop-ivopts.c (get_computation_cost_at): Remove pseudo
21598         iv_cand code.
21599         (determine_group_iv_cost_cond, determine_iv_cost): Ditto.
21600         (iv_ca_set_no_cp, create_new_iv): Ditto.
21602 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
21604         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
21606 2017-05-02  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
21608         * tree.h (EXPR_CILK_SPAWN): Use macro TREE_CHECK2 instead of
21609         function tree_check2.
21611 2017-05-02  Martin Liska  <mliska@suse.cz>
21613         * doc/gcov.texi: Add missing preposition.
21614         * gcov.c (function_info::function_info): Properly fill up
21615         all member variables.
21617 2017-05-02  Tamar Christina  <tamar.christina@arm.com>
21619         * expr.c (expand_expr_real_2): Re-cost if previous costs are the same.
21621 2017-05-02  Tamar Christina  <tamar.christina@arm.com>
21623         * simplify-rtx.c (simplify_binary_operation_1): Add LSHIFTRT case.
21625 2017-05-02  Martin Liska  <mliska@suse.cz>
21627         PR lto/77954.
21628         * lto-streamer-in.c (lto_read_tree_1): Remove
21629         LTO_STREAMER_DEBUG.
21630         * lto-streamer.c (struct tree_hash_entry): Likewise.
21631         (struct tree_entry_hasher): Likewise.
21632         (tree_entry_hasher::hash): Likewise.
21633         (tree_entry_hasher::equal): Likewise.
21634         (lto_streamer_init): Likewise.
21635         (lto_orig_address_map): Likewise.
21636         (lto_orig_address_get): Likewise.
21637         (lto_orig_address_remove): Likewise.
21638         * lto-streamer.h: Likewise.
21639         * tree-streamer-in.c (streamer_alloc_tree): Likewise.
21640         * tree-streamer-out.c (streamer_write_tree_header): Likewise.
21642 2017-05-02  Sebastian Peryt  <sebastian.peryt@intel.com>
21644         * config/i386/avx512fintrin.h (_mm_mask_add_round_sd)
21645         (_mm_maskz_add_round_sd, _mm_mask_add_round_ss)
21646         (mm_maskz_add_round_ss, _mm_mask_sub_round_sd)
21647         (mm_maskz_sub_round_sd, _mm_mask_sub_round_ss)
21648         (mm_maskz_sub_round_ss, _mm_mask_add_sd)
21649         (mm_maskz_add_sd, _mm_mask_add_ss, _mm_maskz_add_ss)
21650         (mm_mask_sub_sd, _mm_maskz_sub_sd, _mm_mask_sub_ss)
21651         (mm_maskz_sub_ss): New intrinsics.
21652         * config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
21653         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
21654         * config/i386/i386-builtin.def (__builtin_ia32_addsd_mask_round)
21655         (__builtin_ia32_addss_mask_round, __builtin_ia32_subsd_mask_round)
21656         (__builtin_ia32_subss_mask_round): New builtins.
21657         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
21658         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
21659         * config/i386/sse.md (<sse>_vm<plusminus_insn><mode>3<round_name>):
21660         Renamed to ...
21661         (<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): ... this.
21662         (v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
21663         Changed to ...
21664         (v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
21665         ... this.
21667 2017-05-02  Martin Jambor  <mjambor@suse.cz>
21669         PR tree-optimization/78687
21670         * tree-sra.c (access): New field parent.
21671         (process_subtree_disqualification): New function.
21672         (disqualify_candidate): Call it.
21673         (build_accesses_from_assign): Reset write flag if creating an
21674         assighnment link.
21675         (build_access_subtree): Fill in parent field and also prpagate
21676         down grp_write flag.
21677         (create_artificial_child_access): New parameter set_grp_write, set
21678         grp_write to its value.
21679         (propagate_subaccesses_across_link): Also propagate grp_write flag
21680         values.
21681         (propagate_all_subaccesses): Push the closest parent back to work
21682         queue if add_access_to_work_queue returned true.
21684 2017-05-02  Richard Biener  <rguenther@suse.de>
21686         * common.opt (fstrict-overflow): Alias negative to fwrapv.
21687         * doc/invoke.texi (fstrict-overflow): Remove all traces of
21688         -fstrict-overflow documentation.
21689         * tree.h (TYPE_OVERFLOW_UNDEFINED): Do not test flag_strict_overflow.
21690         (POINTER_TYPE_OVERFLOW_UNDEFINED): Test !flag_wrapv instead of
21691         flag_strict_overflow.
21692         * ipa-inline.c (can_inline_edge_p): Do not test flag_strict_overflow.
21693         * lto-opts.c (lto_write_options): Do not stream it.
21694         * lto-wrapper.c (merge_and_complain): Do not handle it.
21695         * opts.c (default_options_table): Do not set -fstrict-overflow.
21696         (finish_options): Likewise do not clear it when sanitizing.
21697         * simplify-rtx.c (simplify_const_relational_operation): Do not
21698         test flag_strict_overflow.
21700 2017-05-02  Uros Bizjak  <ubizjak@gmail.com>
21702         * config/alpha/alpha.md (*add<mode>3_ieee): Merge to add<mode>3
21703         using enabled attribute.
21704         (*sub<mode>3_ieee): Merge to sub<mode>3 using enabled attribute.
21705         (*mul<mode>3_ieee): Merge to mul<mode>3 using enabled attribute.
21706         (*div<mode>3_ieee): Merge to div<mode>3 using enabled attribute.
21707         (*sqrt<mode>2_ieee): Merge to sqrt<mode>2 using enabled attribute.
21708         (*fix_truncdfdi_ieee): Merge to *fix_truncdfdi2 using enabled attribute.
21709         (*fix_truncsfdi_ieee): Merge to *fix_truncsfdi2 using enabled attribute.
21710         (*floatdisf_ieee): Merge to floatdisf2 using enabled attribute.
21711         (*floatdidf_ieee): Merge to floatdidf2 using enabled attribute.
21712         (*truncdfsf2_ieee): Merge to truncdfsf2 using enabled attribute.
21713         (*cmpdf_ieee): Merge to *cmpdf_internal using enabled attribute.
21715 2017-05-02  Uros Bizjak  <ubizjak@gmail.com>
21717         * config/i386/i386.c (ix86_code_end): Use {FIRST,LAST}_INT_REG.
21719 2017-05-02  Richard Biener  <rguenther@suse.de>
21721         PR tree-optimization/80591
21722         Revert
21723         2017-04-10  Richard Biener  <rguenther@suse.de>
21725         * tree-ssa-structalias.c (find_func_aliases): Properly handle
21726         asm inputs.
21728 2017-05-02  Richard Biener  <rguenther@suse.de>
21730         PR tree-optimization/80549
21731         * tree-cfgcleanup.c (mfb_keep_latches): New helper.
21732         (cleanup_tree_cfg_noloop): Create forwarders to known loop
21733         headers if they do not have a preheader.
21735 2017-05-02  Martin Liska  <mliska@suse.cz>
21737         PR other/80589
21738         * common.opt: Fix typo.
21739         * doc/invoke.texi: Likewise.
21741 2017-05-01  Jan Beulich  <jbeulich@suse.com>
21743         * config/i386/sse.md (xop_vpermil2<mode>3): Do not allow operand
21744         swapping, add (x,x,m,x,n) alternative.
21746 2017-05-01  Nathan Sidwell  <nathan@acm.org>
21748         * calls.c (combine_pending_stack_adjustment_and_call): Remove
21749         unnecessary unadjusted_alignment check.
21751 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
21753         PR c++/80038
21754         * cilk_common.c (expand_builtin_cilk_detach): Move pedigree
21755         operations here.
21756         * gimplify.c (gimplify_cilk_detach): New function.
21757         (gimplify_call_expr, gimplify_modify_expr): Call it as needed.
21758         * tree-core.h: Document EXPR_CILK_SPAWN.
21759         * tree.h (EXPR_CILK_SPAWN): Define.
21761 2017-05-01  David Malcolm  <dmalcolm@redhat.com>
21763         * diagnostic-show-locus.c (layout::get_expanded_location): Rewrite
21764         to use new fixit_hint representation, using the "replace" logic.
21765         (get_line_span_for_fixit_hint): Likewise.
21766         (layout::print_any_fixits): Likewise.
21767         (selftest::test_one_liner_many_fixits): Rename to...
21768         (selftest::test_one_liner_many_fixits_1): ...this, and update
21769         comment and expected output to reflect that the multiple fix-it
21770         hints are now consolidated into one insertion.
21771         (selftest::test_one_liner_many_fixits_2): New test.
21772         (selftest::test_diagnostic_show_locus_one_liner): Update for
21773         above.
21774         (selftest::test_fixit_consolidation): Update for fix-it API
21775         change.
21776         * diagnostic.c (print_parseable_fixits): Likewise.
21777         * edit-context.c (edited_line::m_line_events): Convert from
21778         auto_vec <line_event *> to auto_vec <line_event>.
21779         (class line_event): Convert from abstract base class to a concrete
21780         class, taking over the role of replace_event.
21781         (class insert_event): Delete.
21782         (class replace_event): Rename to class line_event.  Convert to
21783         half-open range.
21784         (edit_context::add_fixits): Reimplement.
21785         (edit_context::apply_insert): Delete.
21786         (edit_context::apply_replace): Rename to...
21787         (edit_context::apply_fixit): ...this.  Convert to half-open range.
21788         (edited_file::apply_insert): Delete.
21789         (edited_file::apply_replace): Rename to...
21790         (edited_file::apply_fixit): ...this.
21791         (edited_line::~edited_line): Drop deletion of events.
21792         (edited_line::apply_insert): Delete.
21793         (edited_line::apply_replace): Rename to...
21794         (edited_line::apply_fixit): ...this.  Convert to half-open range.
21795         Update for change to type of m_line_events.
21796         * edit-context.h (edit_context::apply_insert): Delete.
21797         (edit_context::apply_replace): Rename to...
21798         (edit_context::apply_fixit): ...this.
21800 2017-05-01  Martin Sebor  <msebor@redhat.com>
21802         * gimple-ssa-sprintf.c (format_integer): Set knownrange when it's
21803         known.
21805 2017-05-01  Uros Bizjak  <ubizjak@gmail.com>
21807         PR target/68491
21808         * config/i386/cpuid.h (__get_cpuid): Always return 0 when
21809         __get_cpuid_max returns 0.
21810         (__get_cpuid_count): Ditto.
21812 2017-05-01  Eric Botcazou  <ebotcazou@adacore.com>
21814         * tree.c (substitute_in_expr) <tcc_vl_exp>: Also inline a call if the
21815         replacement expression is another instance of one of its arguments.
21817 2017-05-01  Jakub Jelinek  <jakub@redhat.com>
21819         PR target/79430
21820         * rtlanal.c (reg_set_p): If reg is a stack_pointer_rtx, also
21821         check for stack push/pop autoinc.
21822         * config/i386/i386.c (ix86_agi_dependent): Return false
21823         if the only reason why modified_in_p returned true is that
21824         addr is SP based and set_insn is a push or pop.
21826 2017-04-29  Jan Hubicka  <hubicka@ucw.cz>
21828         * ipa-inline.c (compute_inlined_call_time): Remove now unnecesary
21829         overflow check.
21831 2017-04-29  Jan Hubicka  <hubicka@ucw.cz>
21833         PR ipa/79224
21834         * ipa-inline-analysis.c (dump_predicate): Add optional parameter NL.
21835         (account_size_time): Use two predicates - exec_pred and
21836         nonconst_pred_ptr.
21837         (evaluate_conditions_for_known_args): Compute both clause and
21838         nonspec_clause.
21839         (evaluate_properties_for_edge): Evaulate both clause and nonspec_clause.
21840         (inline_summary_t::duplicate): Update.
21841         (estimate_function_body_sizes): Caluculate exec and nonconst predicates
21842         separately.
21843         (compute_inline_parameters): Likewise.
21844         (estimate_edge_size_and_time): Update caluclation of time.
21845         (estimate_node_size_and_time): Compute both time and nonspecialized
21846         time.
21847         (estimate_ipcp_clone_size_and_time): Update.
21848         (inline_merge_summary): Update.
21849         (do_estimate_edge_time): Update.
21850         (do_estimate_edge_size): Update.
21851         (do_estimate_edge_hints): Update.
21852         (inline_read_section, inline_write_summary): Stream both new predicates.
21853         * ipa-inline.c (compute_uninlined_call_time): Take uninlined_call_time
21854         as argument.
21855         (compute_inlined_call_time): Cleanup.
21856         (big_speedup_p): Update.
21857         (edge_badness): Update.
21858         * ipa-inline.h (INLINE_TIME_SCALE): Remove.
21859         (size_time_entry): Replace predicate by exec_predicate and
21860         nonconst_predicate.
21861         (edge_growth_cache_entry): Cache both time nad nonspecialized time.
21862         (estimate_edge_time): Return also nonspec_time.
21863         (reset_edge_growth_cache): Update.
21865 2017-04-29  Jakub Jelinek  <jakub@redhat.com>
21867         PR rtl-optimization/80491
21868         * ifcvt.c (noce_process_if_block): When looking for x setter
21869         with missing else_bb, don't check only the insn right before
21870         cond_earliest, but look for the last insn that x is modified in
21871         within the same bb.
21873         PR rtl-optimization/80491
21874         * alias.c (memory_modified_in_insn_p): Return true for CALL_INSNs.
21876 2017-04-29  Marc Glisse  <marc.glisse@inria.fr>
21878         PR tree-optimization/80487
21879         * tree-ssa-alias.c (stmt_kills_ref_p): Handle stpncpy and strncpy.
21881 2017-04-29  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21883         PR tree-optimization/79697
21884         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Check if callee
21885         is BUILT_IN_STRDUP, BUILT_IN_STRNDUP, BUILT_IN_REALLOC.
21886         (propagate_necessity): Check if def_callee is BUILT_IN_STRDUP or
21887         BUILT_IN_STRNDUP.
21888         * gimple-fold.c (gimple_fold_builtin_realloc): New function.
21889         (gimple_fold_builtin): Call gimple_fold_builtin_realloc.
21891 2017-04-28  Martin Sebor  <msebor@redhat.com>
21893         PR tree-optimization/80523
21894         * gimple-ssa-sprintf.c (target_to_host_charmap): New global variable.
21895         (init_target_to_host_charmap, target_to_host, target_strtol10): New
21896         functions.
21897         (maybe_warn, format_directive, parse_directive): Use new functions.
21898         (pass_sprintf_length::execute): Call init_target_to_host_charmap.
21900 2017-04-28  Marc Glisse  <marc.glisse@inria.fr>
21902         * match.pd (X+Z OP Y+Z, X-Z OP Y-Z, Z-X OP Z-Y): New transformations.
21904 2017-04-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
21906         * configure.ac (SYSTEM_HEADER_DIR, BUILD_SYSTEM_HEADER_DIR,
21907         target_header_dir): Set correctly.
21908         * configure: Regenerated.
21909         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
21910         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
21911         instead of SYSTEM_HEADER_DIR.
21913 2017-04-28  Jan Hubicka  <hubicka@ucw.cz>
21915         * ipa-cp.c (perform_estimation_of_a_value): Turn time to sreal.
21916         (estimate_local_effects): Likewise.
21917         * ipa-inline.c (compute_inlined_call_time, want_inline_small_function_p,
21918         edge_badness, inline_small_functions, dump_overall_stats): LIkewise.
21919         * ipa-inline.h (edge_growth_cache_entry, estimate_time_after_inlining,
21920         estimate_ipcp_clone_size_and_time, do_estimate_edge_time,
21921         do_estimate_edge_time, estimate_edge_time): Likewise.
21922         * ipa-inline-analysis.c (estimate_node_size_and_time,
21923         estimate_ipcp_clone_size_and_time, do_estimate_edge_time): Likewise.
21924         (estimate_time_after_inlining): Remove.
21926 2017-04-28  Martin Liska  <mliska@suse.cz>
21928         * doc/gcov.texi: Enhance documentation of gcov.
21930 2017-04-28  Martin Liska  <mliska@suse.cz>
21932         * doc/gcov.texi: Sort options in alphabetic order.
21933         * doc/gcov-dump.texi: Likewise.
21934         * doc/gcov-tool.texi: Likewise.
21935         * gcov.c (print_usage): Likewise.
21936         * gcov-dump.c (print_usage): Likewise.
21937         * gcov-tool.c (print_merge_usage_message): Likewise.
21938         (print_rewrite_usage_message): Likewise.
21939         (print_overlap_usage_message): Likewise.
21941 2017-04-28  Martin Liska  <mliska@suse.cz>
21943         PR gcov-profile/53915
21944         * gcov.c (format_gcov): Print 'NAN %' when top > bottom.
21946 2017-04-28  Martin Liska  <mliska@suse.cz>
21948         PR gcov-profile/79891
21949         * gcov.c (add_line_counts): Assign BBs to lines just if the BB
21950         is marked by compiler as living on a line.
21951         (get_cycles_count): Remove usage of the union.
21952         (output_intermediate_file): Likewise.
21953         (find_source): Fix GNU coding style.
21954         (accumulate_line_counts): Remove old non-all block mode.
21955         (output_lines): Remove usage of the union.
21956         * profile.c (output_location): Include all BBs, even if
21957         belonging to a same line (and file) as a previous BB.
21959 2017-04-28  Martin Liska  <mliska@suse.cz>
21961         * gcov.c (process_args): Handle new argument 'w'.
21962         (read_graph_file): Assign ID to BBs.
21963         (output_branch_count): Display BB # if verbose flag is set.
21964         (output_lines): Likewise for arcs.
21965         (print_usage): Add '--verbose' option help.
21966         * doc/gcov.texi: Document --verbose (-w) option.
21968 2017-04-28  Martin Liska  <mliska@suse.cz>
21970         * gcov.c (struct block_location_info): New struct.
21971         (process_file): Fill up the new structure.
21972         (read_graph_file): Replace usage of encoding by the newly added
21973         struct.
21974         (add_line_counts): Likewise.
21975         (accumulate_line_counts): Remove usage of the union.
21976         (function_info::function_info): New function.
21977         (function_info::~function_info): Likewise.
21978         (process_file): Call delete instead of release_function.
21979         (release_function): Release the function.
21980         (release_structures): Call delete instead of release_function.
21981         (solve_flow_graph): Replace usage of num_blocks.
21982         (find_exception_blocks): Likewise.
21983         (output_lines): Fix GNU coding style.
21985 2017-04-28  Martin Liska  <mliska@suse.cz>
21987         PR driver/56469
21988         * coverage.c (coverage_remove_note_file): New function.
21989         * coverage.h: Declare the function.
21990         * toplev.c (finalize): Clean if an error has been seen.
21992 2017-04-28  Martin Liska  <mliska@suse.cz>
21994         PR gcov-profile/80031
21995         * gcov-dump.c (tag_blocks): Just print number of basic blocks.
21996         * gcov-io.h (GCOV_TAG_BLOCKS_NUM): Remove unused macro.
21997         * gcov.c (read_graph_file): Read just number of blocks.
21998         * profile.c (branch_prob): Do not stream 0 flags per a basic
21999         block.
22001 2017-04-28  Martin Liska  <mliska@suse.cz>
22003         * gcov-dump.c (tag_*): Add new argument to declarations.
22004         (dump_gcov_file): Likewise.
22005         (tag_blocks): Add and use new argument depth.
22006         (tag_arcs): Likewise.
22007         (tag_lines): Likewise.
22008         (tag_counters): Likewise.
22009         (tag_summary): Likewise.
22010         (dump_working_sets): Use depth to do a proper indentation.
22012 2017-04-28  Jakub Jelinek  <jakub@redhat.com>
22014         PR bootstrap/80531
22015         * cgraph.h (symtab_node::debug_symtab): No longer inline.
22016         * symtab.c (symtab_node::debug_symtab): Move definition here.
22018 2017-04-28  Richard Biener  <rguenther@suse.de>
22020         * lto-streamer.h (LTO_major_version): Bump to 7.
22022 2017-04-28  Richard Biener  <rguenther@suse.de>
22024         * tree-vrp.c (assert_info): New struct.
22025         (add_assert_info): New helper.
22026         (register_edge_assert_for_2): Refactor to add asserts to a vector
22027         of assert_info.
22028         (register_edge_assert_for_1): Likewise.
22029         (register_edge_assert_for): Likewise.
22030         (finish_register_edge_assert_for): New helper actually registering
22031         asserts where live on edge.
22032         (find_conditional_asserts): Adjust.
22033         (find_switch_asserts): Likewise.
22034         (evrp_dom_walker::try_find_new_range): Generalize.
22035         (evrp_dom_walker::before_dom_children): Use register_edge_assert_for.
22037 2017-04-27  Marek Polacek  <polacek@redhat.com>
22039         PR sanitizer/80349
22040         * fold-const.c (fold_binary_loc) <case EQ_EXPR, NE_EXPR>: Convert
22041         arg10 and arg11 to itype.
22043 2017-04-27  Jonathan Wakely  <jwakely@redhat.com>
22045         * doc/extend.texi (Object Size Checking): Improve grammar.
22047 2017-04-27  Richard Earnshaw  <rearnsha@arm.com>
22049         PR target/80530
22050         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Ensure
22051         that the logic for permitting reciprocal estimates matches that
22052         in use_rsqrt_p.
22054 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
22056         PR c++/80534
22057         * tree.c (type_cache_hasher::equal): Only compare
22058         TYPE_TYPELESS_STORAGE flag on non-aggregate element types.
22059         (build_array_type_1): Only hash TYPE_TYPELESS_STORAGE flag on
22060         non-aggregate element types.
22061         * tree.h (TYPE_TYPELESS_STORAGE): Fix comment typo, add more details
22062         about the flag on ARRAY_TYPEs in the comment, formatting fix.
22064 2017-04-27  Richard Biener  <rguenther@suse.de>
22066         PR middle-end/80533
22067         * emit-rtl.c (set_mem_attributes_minus_bitpos): When
22068         stripping ARRAY_REFs from MEM_EXPR make sure we're not
22069         keeping a reference to a trailing array.
22071 2017-04-27  Richard Biener  <rguenther@suse.de>
22073         PR middle-end/80539
22074         * tree-chrec.c (chrec_fold_plus_poly_poly): Deal with not
22075         being in loop-closed SSA form conservatively.
22076         (chrec_fold_multiply_poly_poly): Likewise.
22078 2017-04-27  Tamar Christina  <tamar.christina@arm.com>
22080         PR middle-end/79665
22081         * expr.c (expand_expr_real_2): Move TRUNC_MOD_EXPR, FLOOR_MOD_EXPR,
22082         CEIL_MOD_EXPR, ROUND_MOD_EXPR cases.
22084 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
22086         PR target/77728
22087         * config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): Remove.
22088         (aarch64_function_arg_alignment): Return unsigned int again, but still
22089         ignore TYPE_FIELDS chain decls other than FIELD_DECLs.
22090         (aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
22091         Don't emit -Wpsabi note.
22092         (aarch64_function_arg_boundary): Likewise.
22093         (aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
22094         caller.
22096 2017-04-26  Nathan Sidwell  <nathan@acm.org>
22098         * tree.h (crc32_unsigned_n): Declare.
22099         (crc32_unsigned, crc32_unsigned): Make inline.
22100         * tree.c (crc32_unsigned_bits): Replace with ...
22101         (crc32_unsigned_n): ... this.
22102         (crc32_unsigned, crc32_byte): Remove.
22103         (crc32_string): Remove unnecessary braces.
22105 2017-04-25  Jan Hubicka  <hubicka@ucw.cz>
22107         * ipa-cp.c (estimate_local_effects): Convert sreal to int.
22108         * ipa-inline-analysis.c (MAX_TIME): Remove.
22109         (account_size_time): Use sreal for time.
22110         (dump_inline_summary): Update.
22111         (estimate_function_body_sizes): Update.
22112         (estimate_edge_size_and_time): Update.
22113         (estimate_calls_size_and_time): Update.
22114         (estimate_node_size_and_time): Update.
22115         (inline_merge_summary): Update.
22116         (inline_update_overall_summary): Update.
22117         (estimate_time_after_inlining): Update.
22118         (inline_read_section): Update.
22119         (inline_write_summary): Update.
22120         * ipa-inline.c (compute_uninlined_call_time): Update.
22121         (compute_inlined_call_time): Update.
22122         (recursive_inlining): Update.
22123         (inline_small_functions): Update.
22124         (dump_overall_stats): Update.
22125         * ipa-inline.h: Include sreal.h.
22126         (size_time_entry): Turn time to sreal.
22127         (inline_summary): Turn self_time nad time to sreal.
22129 2017-04-25  Jan Hubicka  <hubicka@ucw.cz>
22131         * sreal.c: Include backend.h, tree.h, gimple.h, cgraph.h and
22132         data-streamer.h
22133         (sreal::stream_out, sreal::stream_in): New.
22134         * sreal.h (sreal::stream_out, sreal::stream_in): Declare.
22136 2017-04-25  Jakub Jelinek  <jakub@redhat.com>
22138         * Makefile.in (s-options): Invoke opt-gather.awk with LC_ALL=C in the
22139         environment.
22141 2017-04-25  Uros Bizjak  <ubizjak@gmail.com>
22143         PR target/70799
22144         * config/i386/i386.c (dimode_scalar_to_vector_candidate_p):
22145         Handle ASHIFTRT.
22146         (dimode_scalar_chain::compute_convert_gain): Ditto.
22147         (dimode_scalar_chain::make_vector_copies): Ditto.
22148         (dimode_scalar_chain::convert_reg): Ditto.
22149         (dimode_scalar_chain::convert_insn): Ditto.
22150         * config/i386/sse.md (VI24_AVX512BW_1): Remove mode iterator.
22151         (VI248_AVX512BW_1): New mode iterator.
22152         (<mask_codefor>ashr<mode>3<mask_name>): Merge insn pattern with
22153         <mask_codefor>ashrv2di3<mask_name> insn using VI248_AVX512BW_1
22154         mode iterator.
22156 2017-04-25  Martin Sebor  <msebor@redhat.com>
22158         PR tree-optimization/80497
22159         * gimple-ssa-sprintf.c (get_int_range): Avoid assuming all integer
22160         constants are representable in HOST_WIDE_INT.
22161         (parse_directive): Ditto.
22163 2017-04-25  Martin Sebor  <msebor@redhat.com>
22165         PR bootstrap/80486
22166         * dominance.c (dom_info::m_n_basic_blocks): Change type to unsigned.
22167         (new_zero_array): Adjust signature.
22168         (dom_info::dom_init): Used unsigned rather that size_t.
22169         (dom_info::dom_info): Same.
22171 2017-04-25  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
22172             Jakub Jelinek  <jakub@redhat.com>
22174         PR target/77728
22175         * config/arm/arm.c: Include gimple.h.
22176         (aapcs_layout_arg): Emit -Wpsabi note if arm_needs_doubleword_align
22177         returns negative, increment ncrn only if it returned positive.
22178         (arm_needs_doubleword_align): Return int instead of bool,
22179         ignore DECL_ALIGN of non-FIELD_DECL TYPE_FIELDS chain
22180         members, but if there is any such non-FIELD_DECL
22181         > PARM_BOUNDARY aligned decl, return -1 instead of false.
22182         (arm_function_arg): Emit -Wpsabi note if arm_needs_doubleword_align
22183         returns negative, increment nregs only if it returned positive.
22184         (arm_setup_incoming_varargs): Likewise.
22185         (arm_function_arg_boundary): Emit -Wpsabi note if
22186         arm_needs_doubleword_align returns negative, return
22187         DOUBLEWORD_ALIGNMENT only if it returned positive.
22189 2017-04-25  Marek Polacek  <polacek@redhat.com>
22191         PR sanitizer/80349
22192         * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
22193         first argument to type.
22195 2017-04-25  Bill Seurer  <seurer@linux.vnet.ibm.com>
22197         PR target/80482
22198         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change
22199         type checks to test for compatibility instead of equality.
22201 2017-04-25  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
22202             Jakub Jelinek  <jakub@redhat.com>
22204         PR target/77728
22205         * config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): New
22206         type.
22207         (aarch64_function_arg_alignment): Return aarch64_fn_arg_alignment
22208         struct.  Ignore DECL_ALIGN of decls other than FIELD_DECL for
22209         the alignment computation, but return their maximum in warn_alignment.
22210         (aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
22211         Emit a -Wpsabi note if warn_alignment is 16 bytes, but alignment
22212         is smaller.
22213         (aarch64_function_arg_boundary): Likewise.  Simplify using MIN/MAX.
22214         (aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
22215         caller.
22217 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22219         * config/arc/simdext.md (dmpyh): Fix typo.
22221 2017-04-25  Richard Biener  <rguenther@suse.de>
22223         PR tree-optimization/80492
22224         * alias.c (compare_base_decls): Handle registers with asm
22225         specification conservatively.
22226         * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
22227         compare_base_decls returning dont-know properly.
22229 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22231         * config/arc/arc.c (LEGITIMATE_OFFSET_ADDRESS_P): Delete macro.
22232         (legitimate_offset_address_p): New function.
22233         (arc_legitimate_address_p): Use above function.
22235 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22237         * config/arc/arc.c (arc_output_mi_thunk): Emit PIC calls.
22239 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22241         * config/arc/arc.c (arc_conditional_register_usage): Use ACCL,
22242         ACCH registers whenever they are available.
22244 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22246         * config/arc/arc.c (arc_conditional_register_usage): Make D0, D1
22247         double regs fix when not used.
22249 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22251         * config/arc/arc.h (REGNO_OK_FOR_BASE_P): Consider also extension
22252         core registers.
22253         (REG_OK_FOR_INDEX_P_NONSTRICT): Likewise.
22254         (REG_OK_FOR_BASE_P_NONSTRICT): Likewise.
22256 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22258         * config/arc/arc.c (arc_output_addsi): Check for h-register class
22259         when emitting short ADD instructions.
22261 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
22263         * config/arc/arc.md (cmpsi_cc_insn_mixed): Use 'h' register
22264         constraint.
22265         (cmpsi_cc_c_insn): Likewise.
22266         (cbranchsi4_scratch): Compute proper instruction length using
22267         compact_hreg_operand.
22268         * config/arc/predicates.md (compact_hreg_operand): New predicate.
22270 2017-04-25  Richard Biener  <rguenther@suse.de>
22272         PR middle-end/80509
22273         * passes.c (pass_manager::pass_manager): Initialize
22274         m_name_to_pass_map.
22276 2017-04-25  Richard Biener  <rguenther@suse.de>
22278         PR tree-optimization/79201
22279         * tree-ssa-sink.c (statement_sink_location): Handle calls.
22281 2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22283         PR target/80464
22284         * config/s390/vector.md: Split MEM->GPR vector moves for
22285         non-s_operand addresses.
22287 2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22289         PR target/79895
22290         * config/s390/predicates.md (reload_const_wide_int_operand): New
22291         predicate.
22292         * config/s390/s390.md ("movti"): Remove d/P alternative.
22293         ("movti_bigconst"): New pattern definition.
22295 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
22297         PR target/80080
22298         * s390-protos.h (s390_expand_cs_hqi): Removed.
22299         (s390_expand_cs, s390_expand_atomic_exchange_tdsi): New prototypes.
22300         * config/s390/s390.c (s390_emit_compare_and_swap): Handle all integer
22301         modes as well as CCZ1mode and CCZmode.
22302         (s390_expand_atomic_exchange_tdsi, s390_expand_atomic): Adapt to new
22303         signature of s390_emit_compare_and_swap.
22304         (s390_expand_cs_hqi): Likewise, make static.
22305         (s390_expand_cs_tdsi): Generate an explicit compare before trying
22306         compare-and-swap, in some cases.
22307         (s390_expand_cs): Wrapper function.
22308         (s390_expand_atomic_exchange_tdsi): New backend specific expander for
22309         atomic_exchange.
22310         (s390_match_ccmode_set): Allow CCZmode <-> CCZ1 mode.
22311         * config/s390/s390.md ("atomic_compare_and_swap<mode>"): Merge the
22312         patterns for small and large integers.  Forbid symref memory operands.
22313         Move expander to s390.c.  Require cc register.
22314         ("atomic_compare_and_swap<DGPR:mode><CCZZ1:mode>_internal")
22315         ("*atomic_compare_and_swap<TDI:mode><CCZZ1:mode>_1")
22316         ("*atomic_compare_and_swapdi<CCZZ1:mode>_2")
22317         ("*atomic_compare_and_swapsi<CCZZ1:mode>_3"): Use s_operand to forbid
22318         symref memory operands.  Remove CC mode and call s390_match_ccmode
22319         instead.
22320         ("atomic_exchange<mode>"): Allow and implement all integer modes.
22322 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
22324         * config/s390/s390.md (define_peephole2): New peephole to help
22325         combining the load-and-test pattern with volatile memory.
22327 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
22329         * config/s390/s390.md ("cstorecc4"): Use load-on-condition and deal
22330         with CCZmode for TARGET_Z196.
22332 2017-04-25  Jakub Jelinek  <jakub@redhat.com>
22334         PR rtl-optimization/80501
22335         * combine.c (make_compound_operation_int): Set subreg_code to SET
22336         even for AND with mask of the sign bit of mode.
22338         PR rtl-optimization/80500
22339         * loop-unroll.c (combine_var_copies_in_loop_exit): Call copy_rtx on
22340         sum's initial value.
22342 2017-04-25  Julian Brown  <julian@codesourcery.com>
22343             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
22345         * config/aarch64/thunderx2t99.md (thunderx2t99_crc): New Reservation.
22347 2017-04-25  Marc Glisse  <marc.glisse@inria.fr>
22349         * fold-const.c (tree_single_nonzero_warnv_p): Handle SSA_NAME.
22351 2017-04-25  Julian Brown  <julian@codesourcery.com>
22352             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
22354         * config/aarch64/thunderx2t99.md (thunderx2t99_aes): New Reservation.
22355         (thunderx2t99_sha): New Reservation.
22357 2017-04-25  Julian Brown  <julian@codesourcery.com>
22358             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
22360         * config/aarch64/aarch64-simd.md (aarch64_simd_vec_set<mode>): Fix
22361         type for 1-element load.
22363 2017-04-24  Marc Glisse  <marc.glisse@inria.fr>
22365         * match.pd (X/[ex]C CMP Y/[ex]C): New transformation.
22367 2017-04-24  Martin Jambor  <mjambor@suse.cz>
22369         PR tree-optimization/80293
22370         * tree-sra.c (scalarizable_type_p): New parameter const_decl, make
22371         char arrays not totally scalarizable if it is false.
22372         (analyze_all_variable_accesses): Pass correct value in the new
22373         parameter.  Add a statistics counter.
22375 2017-04-24  Jan Hubicka  <hubicka@ucw.cz>
22377         PR middle-end/79931
22378         * ipa-devirt.c (dump_possible_polymorphic_call_targets): Fix ICE.
22380 2017-04-24  Richard Biener  <rguenther@suse.de>
22382         PR tree-optimization/80494
22383         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Bail
22384         out for complex types.
22386 2017-04-24  Richard Biener  <rguenther@suse.de>
22388         * tree-ssa-sccvn.h (run_scc_vn): Adjust prototype.
22389         * tree-ssa-sccvn.c (print_scc): Print SCC size.
22390         (extract_and_process_scc_for_name): Never fail but drop SCC to varying.
22391         (DFS): Adjust and never fail.
22392         (sccvn_dom_walker::fail): Remove.
22393         (sccvn_dom_walker::before_dom_children): Adjust.
22394         (run_scc_vn): Likewise and never fail.
22395         * tree-ssa-pre.c (pass_pre::execute): Adjust.
22396         (pass_fre::execute): Likewise.
22398 2017-04-24  Richard Biener  <rguenther@suse.de>
22400         PR tree-optimization/79725
22401         * tree-ssa-sink.c (statement_sink_location): Return whether
22402         failure reason was zero uses.  Move that check later.
22403         (sink_code_in_bb): Deal with zero uses by removing the stmt
22404         if possible.
22406 2017-04-24  Richard Biener  <rguenther@suse.de>
22408         PR c++/2972
22409         * tree-ssa-uninit.c (warn_uninitialized_vars): Handle some
22410         pointer-based references.
22412 2017-04-24  Richard Biener  <rguenther@suse.de>
22414         PR bootstrap/79814
22415         * pass_manager.h (pass_manager::operator new): Remove.
22416         (pass_manager::operator delete): Likewise.
22417         * passes.c (pass_manager::operator new): Remove.
22418         (pass_manager::operator delete): Likewise.
22419         (pass_manager::pass_manager): Zero individual pass members.
22421 2017-04-23  Uros Bizjak  <ubizjak@gmail.com>
22423         PR target/70799
22424         * config/i386/i386.c (dimode_scalar_to_vector_candidate_p)
22425         <case ASHIFT, case LSHIFTRT>: Also consider variable shifts.
22426         Check "XEXP (src, 1)" operand here.
22427         <case PLUS, case MINUS, case IOR, case XOR, case AND>:
22428         Check "XEXP (src, 1)" operand here.
22429         (dimode_scalar_chain::make_vector_copies): Detect count register
22430         of a shift instruction.  Zero extend count register from QImode
22431         to DImode to satisfy vector shift pattern count operand predicate.
22432         Substitute vector shift count operand with a DImode copy.
22433         (dimode_scalar_chain::convert_reg): Ditto, zero-extend from
22434         vector register.
22436 2017-04-21  Uros Bizjak  <ubizjak@gmail.com>
22438         * config/i386/i386.md (*extzvqi_mem_rex64): Move above *extzv<mode>.
22439         Remove UNSPEC_NOREX_MEM tag.  Update corresponding peephole2 pattern.
22440         (*insvqi_1_mem_rex64): Move above insv<mode>_1.  Remove
22441         UNSPEC_NOREX_MEM tag.  Update corresponding peephole2 pattern.
22442         (UNSPEC_NOREX_MEM): Remove definition.
22444 2017-04-21  Richard Biener  <rguenther@suse.de>
22446         PR tree-optimization/79547
22447         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
22448         Handle strlen, strcmp, strncmp, strcasecmp, strncasecmp, memcmp,
22449         bcmp, strspn, strcspn, __builtin_object_size and __builtin_constant_p
22450         without any constraints.
22452 2017-04-21  Richard Biener  <rguenther@suse.de>
22454         PR tree-optimization/78847
22455         * fold-const.c (split_tree): Handle POINTER_PLUS_EXPR.
22457 2017-04-21  Richard Biener  <rguenther@suse.de>
22459         * tree.h (build_qualified_type): Annotate with CXX_MEM_STAT_INFO.
22460         (build_distinct_type_copy): Likewise.
22461         (build_variant_type_copy): Likewise.
22462         * tree.c (build_qualified_type): Pass down mem-stat info.
22463         (build_distinct_type_copy): Likewise.
22464         (build_variant_type_copy): Likewise.
22466 2017-04-21  Richard Biener  <rguenther@suse.de>
22468         PR tree-optimization/80237
22469         * tree-ssa-pre.c (find_leader_in_sets): Add third set argument,
22470         defaulted to NULL.
22471         (phi_translate_1): Also allow a leader in AVAIL_OUT of pred
22472         for a simplified result.
22474 2016-04-21  Richard Biener  <rguenther@suse.de>
22476         * tree-ssa-loop-ivcanon.c (constant_after_peeling): Do not require
22477         sth as strict as a simple_iv but a chrec without symbols and an
22478         operand defined in the loop we are peeling (and not some subloop).
22479         (propagate_constants_for_unrolling): Propagate all constants.
22481 2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
22483         PR target/79804
22484         * config/i386/i386.c (print_reg): Remove assert for disalowed
22485         regno values, call output_operand_lossage instead.
22487 2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
22489         PR target/78090
22490         * config/i386/constraints.md (Yc): New register constraint.
22491         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
22492         Use Yc constraint for alternative 2 of operand 0.  Remove
22493         preferred_for_speed attribute.
22495 2017-04-20  Alexander Monakov  <amonakov@ispras.ru>
22497         * omp-low.c (lower_lastprivate_clauses): Correct handling of linear and
22498         lastprivate clauses in SIMT case.
22500 2017-04-20  Volker Reichelt  <v.reichelt@netcologne.de>
22502         * doc/invoke.texi (-Wextra-semi): Document new warning option.
22504 2017-04-20  Richard Biener  <rguenther@suse.de>
22506         PR tree-optimization/57796
22507         * tree-vect-stmts.c (vect_model_store_cost): Cost scatters
22508         as N scalar stores.
22509         (vect_model_load_cost): Cost gathers as N scalar loads.
22511 2017-04-20  Richard Biener  <rguenther@suse.de>
22513         * ggc-page.c (ggc_allocated_p): Rename to ...
22514         (safe_lookup_page_table_entry): ... this and return the lookup
22515         result.
22516         (gt_ggc_m_S): Use safe_lookup_page_table_entry.
22518 2017-04-20  Richard Biener  <rguenther@suse.de>
22520         PR tree-optimization/80453
22521         * tree-ssa-sccvn.h (struct vn_phi_s): Add cclhs and ccrhs members.
22522         * tree-ssa-sccvn.c (cond_stmts_equal_p): Use recorded lhs and rhs
22523         from the conditions.
22524         (vn_phi_eq): Pass them down.
22525         (vn_phi_lookup): Record them.
22526         (vn_phi_insert): Likewise.
22528 2017-04-20  Matthew Fortune  <matthew.fortune@imgtec.com>
22530         * config/mips/mips.c (mips_expand_vec_perm_const): Re-fix
22531         uninitialized variable warning to avoid buffer overrun.
22533 2017-04-20  Alexander Monakov  <amonakov@ispras.ru>
22535         PR other/71250
22536         * doc/invoke.texi (-Wmissing-field-initializers): Mention that warning
22537         is suppressed for '{ 0 }' in C.
22539 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
22541         * BASE-VER: Set to 8.0.0.
22543 2017-04-20  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22545         * config/arm/arm.c (arm_elf_asm_cdtor): Create non-default
22546         priority .init_array and .fini_array section with SECTION_NOTYPE
22547         flag.
22549 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
22551         PR middle-end/80423
22552         * tree.h (build_array_type): Add typeless_storage default argument.
22553         * tree.c (type_cache_hasher::equal): Also compare
22554         TYPE_TYPELESS_STORAGE flag for ARRAY_TYPEs.
22555         (build_array_type): Add typeless_storage argument, set
22556         TYPE_TYPELESS_STORAGE to it, if shared also hash it, and pass to
22557         recursive call.
22558         (build_nonshared_array_type): Adjust build_array_type_1 caller.
22559         (build_array_type): Likewise.  Add typeless_storage argument.
22561 2017-04-19  Eric Botcazou  <ebotcazou@adacore.com>
22562             Jakub Jelinek  <jakub@redhat.com>
22564         PR tree-optimization/80426
22565         * tree-vrp.c (extract_range_from_binary_expr_1): For an additive
22566         operation on symbolic operands, also compute the overflow for the
22567         invariant part when the operation degenerates into a negation.
22569 2017-04-19  Jakub Jelinek  <jakub@redhat.com>
22571         PR debug/80461
22572         * dwarf2out.c (modified_type_die, gen_type_die_with_usage):
22573         Check for t with zero TYPE_QUALS_NO_ADDR_SPACE.
22575         PR debug/80436
22576         * tree-ssa-loop-manip.c (find_uses_to_rename_def): Ignore debug uses.
22578 2017-04-19  Georg-Johann Lay  <avr@gjlay.de>
22580         PR target/80462
22581         * config/avr/avr.c (tree.h): Include it.
22582         (cgraph.h): Include it.
22583         (avr_encode_section_info): Don't warn for uninitialized progmem
22584         variable if it's just an alias.
22586 2017-04-19  Richard Biener  <rguenther@suse.de>
22588         PR ipa/65972
22589         * auto-profile.c (afdo_vpt_for_early_inline): Update SSA
22590         when needed by AutoPGO.
22592 2017-04-19  Paulo J. Matos  <paulo@matos-sorge.com>
22594         PR lto/50345
22595         * doc/lto.texi: Remove an extra 'that'.
22597 2017-04-19  Segher Boessenkool  <segher@kernel.crashing.org>
22599         PR rtl-optimization/80429
22600         * ira.c (split_live_ranges_for_shrink_wrap): Don't split regs that
22601         are only used in debug insns.
22603 2017-04-19  Eric Botcazou  <ebotcazou@adacore.com>
22604             Vladimir Makarov  <vmakarov@redhat.com>
22606         * config/sparc/predicates.md (input_operand): Add comment.  Return
22607         true for any memory operand when LRA is in progress.
22608         * config/sparc/sparc.c (sparc_expand_move): Minor formatting fix.
22610 2017-04-18  Jeff Law  <law@redhat.com>
22612         PR target/74563
22613         * mips.md ({return,simple_return}_internal): Do not overwrite
22614         operands[0].
22616 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
22618         PR tree-optimization/80443
22619         * tree-vrp.c (intersect_ranges): For signed 1-bit precision type,
22620         instead of adding 1, subtract -1 and similarly instead of subtracting
22621         1 add -1.
22623 2017-04-18  Richard Sandiford  <richard.sandiford@arm.com>
22625         PR rtl-optimization/80357
22626         * haifa-sched.c (tmp_bitmap): New variable.
22627         (model_recompute): Handle duplicate use records.
22628         (alloc_global_sched_pressure_data): Initialize tmp_bitmap.
22629         (free_global_sched_pressure_data): Free it.
22631 2017-04-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
22633         Revert:
22634         2017-02-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
22635         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
22636         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
22637         instead of SYSTEM_HEADER_DIR.
22639 2017-04-18  Jeff Law  <law@redhat.com>
22641         PR middle-end/80422
22642         * cfgcleanup.c (try_crossjump_to_edge): Verify SRC1 and SRC2 have
22643         predecessors after walking up the insn chain.
22645 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
22647         PR debug/80263
22648         * dwarf2out.c (modified_type_die): Try harder not to emit internal
22649         sizetype type into debug info.
22651 2017-04-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
22653         PR target/80099
22654         * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Eliminate
22655         unneeded test for TARGET_UPPER_REGS_SF.
22656         * config/rs6000/vsx.md (vsx_extract_v4sf_var): Likewise.
22658 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
22660         PR sanitizer/80444
22661         * sancov.c (sancov_pass): Use gsi_start_nondebug_after_labels_bb
22662         instead of gsi_after_labels.
22664 2017-04-18  Jeff Law  <law@redhat.com>
22666         * regcprop.c (maybe_mode_change): Avoid creating copies of the
22667         stack pointer.
22669         Revert:
22670         2017-04-13  Jeff Law  <law@redhat.com>
22671         * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
22672         in operands[1] if it is a MEM and TARGET_MIPS16 is active.
22674 2017-04-18  Georg-Johann Lay  <avr@gjlay.de>
22676         PR target/79453
22677         * config/avr/avr.c (intl.h): Include it.
22678         (avr_pgm_check_var_decl) [reason]: Wrap diagnostic snippets into _().
22680 2017-04-18  Martin Liska  <mliska@suse.cz>
22682         PR gcov-profile/78783
22683         * gcov-tool.c (gcov_output_files): Validate that destination
22684         file is either removed by the tool or by a user.
22686 2017-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
22687             Guy Benyei  <guybe@mellanox.com>
22689         * config/arc/arc.c (arc_reorg): Move loop_end_id into a more local
22690         block, and do not negate it, the stored id is already negative.
22692 2017-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
22694         * config/arc/arc.md (doloop_begin_i): Use @pcl assembler syntax.
22696 2017-04-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
22698         PR target/80098
22699         * config/rs6000/rs6000-cpus.def (OTHER_P9_VECTOR_MASKS): Define
22700         masks of options that should be turned off if the VSX vector
22701         options are turned off.
22702         (OTHER_P8_VECTOR_MASKS): Likewise.
22703         (OTHER_VSX_VECTOR_MASKS): Likewise.
22704         * config/rs6000/rs6000.c (rs6000_option_override_internal): Call
22705         rs6000_disable_incompatible_switches to validate no type switches
22706         like -mvsx.
22707         (rs6000_incompatible_switch): New function to disallow turning on
22708         other vector options if -mno-vsx, -mno-power8-vector, or
22709         -mno-power9-vector are specified.
22711 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
22713         * config/arc/arc.h (CRT_CALL_STATIC_FUNCTION): Use long calls.
22715 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
22717         * config/arc/arc-protos.h (arc_decl_pretend_args): Remove.
22718         * config/arc/arc.c (arc_decl_pretend_args): Likewise.
22719         * config/arc/arc.h (CFA_FRAME_BASE_OFFSET): Likewise.
22720         (ARG_POINTER_CFA_OFFSET): Likewise.
22722 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
22724         * config/arc/arc.c (arc_mode_dependent_address_p): Relax
22725         conditions to take advantage of various optimizations.
22727 2017-04-13  Jeff Law  <law@redhat.com>
22729         * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
22730         in operands[1] if it is a MEM and TARGET_MIPS16 is active.
22731         (zero_extendsidi2_dext): Likewise.
22733 2017-04-13  Jakub Jelinek  <jakub@redhat.com>
22735         PR sanitizer/80403
22736         * fold-const.c (fold_ternary_loc): Revert
22737         use op0 instead of fold_convert_loc (loc, type, arg0) part of
22738         2017-04-12 change.
22740 2017-04-13  Vladimir Makarov  <vmakarov@redhat.com>
22742         PR rtl-optimization/80343
22743         * lra-remat.c (update_scratch_ops): Assign original hard reg to
22744         new scratch pseudo.
22746 2017-04-13  Denis Khalikov <d.khalikov@partner.samsung.com>
22748         PR sanitizer/80414
22749         * ubsan.c (ubsan_expand_bounds_ifn): Pass original index
22750         to ubsan_encode_value.
22752 2017-04-13  Jeff Law  <law@redhat.com>
22754         * reload1.c (eliminate_regs_1): Call gen_rtx_raw_SUBREG for SUBREGs
22755         appearing in DEBUG_INSNs.
22757 2017-04-13  Martin Liska  <mliska@suse.cz>
22759         PR gcov-profile/80413
22760         * gcov-io.c (gcov_write_string): Copy to buffer just when
22761         allocated size is greater than zero.
22763 2017-04-13  Jakub Jelinek  <jakub@redhat.com>
22765         PR debug/80321
22766         * dwarf2out.c (decls_for_scope): Ignore declarations of
22767         current_function_decl in BLOCK_NONLOCALIZED_VARS.
22769 2017-04-12  Jan Hubicka  <hubicka@ucw.cz>
22771         PR lto/69953
22772         * ipa-visibility.c (non_local_p): Fix typos.
22773         (localize_node): When localizing symbol in same comdat group,
22774         dissolve the group only when we know external symbols are going
22775         to be privatized.
22776         (function_and_variable_visibility): Do not localize DECL_EXTERNAL.
22778 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
22780         PR tree-optimization/79390
22781         * optabs.c (emit_conditional_move): If the preferred op2/op3 operand
22782         order does not result in usable sequence, retry with reversed operand
22783         order.
22785         PR sanitizer/80403
22786         PR sanitizer/80404
22787         PR sanitizer/80405
22788         * fold-const.c (fold_ternary_loc): Use op1 instead of arg1 as argument
22789         to fold_build2_loc.  Convert TREE_OPERAND (tem, 0) to type.  Use
22790         op0 instead of fold_convert_loc (loc, type, arg0).
22792 2017-04-12  Jeff Law  <law@redhat.com>
22794         * genattrtab.c (write_eligible_delay): Verify DELAY_INSN still
22795         has a delay slot in the generated code.
22797         * config/cris/cris.md (cris_preferred_reload_class): Return
22798         GENNONACR_REGS rather than GENERAL_REGS.
22800 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
22802         PR c/80163
22803         * expr.c <CASE_CONVERT>: For EXPAND_INITIALIZER determine SIGN_EXTEND
22804         vs. ZERO_EXTEND based on signedness of treeop0's type rather than
22805         signedness of the result type.
22807 2017-04-12  Richard Biener  <rguenther@suse.de>
22808             Jeff Law  <law@redhat.com>
22810         PR tree-optimization/80359
22811         * tree-ssa-dse.c (maybe_trim_partially_dead_store): Do not
22812         trim stores to TARGET_MEM_REFs.
22814 2017-04-12  Richard Biener  <rguenther@suse.de>
22816         PR tree-optimization/79390
22817         * gimple-ssa-split-paths.c (is_feasible_trace): Restrict
22818         threading case even more.
22820 2017-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
22822         PR target/80382
22823         * config/rs6000/sync.md (atomic_load<mode>, atomic_store<mode): Test
22824         for quad_address_p for TImode, instead of just not indexed_address.
22826 2017-04-12  Richard Biener  <rguenther@suse.de>
22827             Bernd Edlinger  <bernd.edlinger@hotmail.de>
22829         PR middle-end/79671
22830         * alias.c (component_uses_parent_alias_set_from): Handle
22831         TYPE_TYPELESS_STORAGE.
22832         (get_alias_set): Likewise.
22833         * tree-core.h (tree_type_common): Add typeless_storage flag.
22834         * tree.h (TYPE_TYPELESS_STORAGE): New macro.
22835         * stor-layout.c (place_union_field): Set TYPE_TYPELESS_STORAGE
22836         for types containing members with TYPE_TYPELESS_STORAGE.
22837         (place_field): Likewise.
22838         (layout_type): Likewise for ARRAY_TYPE.
22839         * lto-streamer-out.c (hash_tree): Hash TYPE_TYPELESS_STORAGE.
22840         * tree-streamer-in.c (unpack_ts_type_common_value_fields): Stream
22841         TYPE_TYPELESS_STORAGE.
22842         * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
22844 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
22846         PR sanitizer/80349
22847         * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
22848         first argument to type.
22850 2017-04-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22852         PR target/80376
22853         PR target/80315
22854         * config/rs6000/rs6000.c (rs6000_expand_unop_builtin): Return
22855         CONST0_RTX (mode) rather than const0_rtx where appropriate.
22856         (rs6000_expand_binop_builtin): Likewise.
22857         (rs6000_expand_ternop_builtin): Likewise; also add missing
22858         vsx_xxpermdi_* variants; also fix typo (arg1 => arg2) for
22859         vshasigma built-ins.
22860         * doc/extend.texi: Document that vec_xxpermdi's third argument
22861         must be a constant.
22863 2017-04-11  Uros Bizjak  <ubizjak@gmail.com>
22865         * config/i386/i386.c (dimode_scalar_chain::compute_convert_gain):
22866         Use shift_const cost parameter when calculating gain of STV shifts.
22868 2017-04-11  Vladimir Makarov  <vmakarov@redhat.com>
22870         PR rtl-optimization/70478
22871         * lra-constraints.c (process_alt_operands): Check memory for
22872         disfavoring memory insn operand.
22874 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
22876         PR middle-end/80100
22877         * simplify-rtx.c (simplify_binary_operation_1) <case IOR>: Perform
22878         left shift in unsigned HOST_WIDE_INT type.
22880         PR rtl-optimization/80385
22881         * simplify-rtx.c (simplify_unary_operation_1): Don't transform
22882         (not (neg X)) into (plus X -1) for complex or non-integral modes.
22884         PR libgomp/80394
22885         * omp-low.c (scan_omp_task): Don't optimize away empty tasks
22886         if they have any depend clauses.
22888 2017-04-11  Martin Liska  <mliska@suse.cz>
22890         PR ipa/80212
22891         * cgraph.c (cgraph_node::dump): Dump calls_comdat_local.
22892         * ipa-split.c (split_function): Create a local comdat symbol
22893         if caller is in a comdat group.
22895 2017-04-11  Martin Liska  <mliska@suse.cz>
22897         PR ipa/80212
22898         * ipa-cp.c (determine_versionability): Handle calls_comdat_local
22899         flags.
22901 2017-04-11  Martin Sebor  <msebor@redhat.com>
22903         PR middle-end/80364
22904         * gimple-ssa-sprintf.c (get_int_range): Remove second argument and
22905         always use the int type.  Use INTEGRAL_TYPE_P() rather than testing
22906         for INTEGER_TYPE.
22907         (directive::set_width, directive::set_precision, format_character):
22908         Adjust.
22909         (parse_directive): Use INTEGRAL_TYPE_P() rather than testing for
22910         INTEGER_TYPE.
22912 2017-04-11  Richard Earnshaw  <rearnsha@arm.com>
22914         PR target/80389
22915         * config/arm/arm.c (arm_configure_build_target): When -mcpu and -arch
22916         conflict, set target->arch_name instead of target->cpu_name.
22918 2017-04-11  Richard Biener  <rguenther@suse.de>
22920         PR tree-optimization/80374
22921         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Use
22922         build_zero_cst, remove fold_convertible_p check again.
22924 2017-04-11  Martin Liska  <mliska@suse.cz>
22926         PR sanitizer/70878
22927         * ubsan.c (instrument_object_size): Do not instrument register
22928         variables.
22930 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
22932         PR target/80381
22933         * config/i386/i386-builtin-types.def
22934         (V16HI_FTYPE_V16HI_INT_V16HI_UHI_COUNT,
22935         V16HI_FTYPE_V16HI_V8HI_V16HI_UHI_COUNT,
22936         V16SI_FTYPE_V16SI_INT_V16SI_UHI_COUNT,
22937         V16SI_FTYPE_V16SI_V4SI_V16SI_UHI_COUNT,
22938         V2DI_FTYPE_V2DI_INT_V2DI_UQI_COUNT,
22939         V2DI_FTYPE_V2DI_V2DI_V2DI_UQI_COUNT,
22940         V32HI_FTYPE_V32HI_INT_V32HI_USI_COUNT,
22941         V32HI_FTYPE_V32HI_V8HI_V32HI_USI_COUNT,
22942         V4DI_FTYPE_V4DI_INT_V4DI_UQI_COUNT,
22943         V4DI_FTYPE_V4DI_V2DI_V4DI_UQI_COUNT,
22944         V4SI_FTYPE_V4SI_INT_V4SI_UQI_COUNT,
22945         V4SI_FTYPE_V4SI_V4SI_V4SI_UQI_COUNT,
22946         V8DI_FTYPE_V8DI_INT_V8DI_UQI_COUNT,
22947         V8DI_FTYPE_V8DI_V2DI_V8DI_UQI_COUNT,
22948         V8HI_FTYPE_V8HI_INT_V8HI_UQI_COUNT,
22949         V8HI_FTYPE_V8HI_V8HI_V8HI_UQI_COUNT,
22950         V8SI_FTYPE_V8SI_INT_V8SI_UQI_COUNT,
22951         V8SI_FTYPE_V8SI_V4SI_V8SI_UQI_COUNT): New function type aliases.
22952         * config/i386/i386-builtin.def (__builtin_ia32_pslld512_mask,
22953         __builtin_ia32_pslldi512_mask, __builtin_ia32_psllq512_mask,
22954         __builtin_ia32_psllqi512_mask, __builtin_ia32_psrad512_mask,
22955         __builtin_ia32_psradi512_mask, __builtin_ia32_psraq512_mask,
22956         __builtin_ia32_psraqi512_mask, __builtin_ia32_psrld512_mask,
22957         __builtin_ia32_psrldi512_mask, __builtin_ia32_psrlq512_mask,
22958         __builtin_ia32_psrlqi512_mask, __builtin_ia32_psllwi128_mask,
22959         __builtin_ia32_pslldi128_mask, __builtin_ia32_psllqi128_mask,
22960         __builtin_ia32_psllw128_mask, __builtin_ia32_pslld128_mask,
22961         __builtin_ia32_psllq128_mask, __builtin_ia32_psllwi256_mask,
22962         __builtin_ia32_psllw256_mask, __builtin_ia32_pslldi256_mask,
22963         __builtin_ia32_pslld256_mask, __builtin_ia32_psllqi256_mask,
22964         __builtin_ia32_psllq256_mask, __builtin_ia32_psradi128_mask,
22965         __builtin_ia32_psrad128_mask, __builtin_ia32_psradi256_mask,
22966         __builtin_ia32_psrad256_mask, __builtin_ia32_psraqi128_mask,
22967         __builtin_ia32_psraq128_mask, __builtin_ia32_psraqi256_mask,
22968         __builtin_ia32_psraq256_mask, __builtin_ia32_psrldi128_mask,
22969         __builtin_ia32_psrld128_mask, __builtin_ia32_psrldi256_mask,
22970         __builtin_ia32_psrld256_mask, __builtin_ia32_psrlqi128_mask,
22971         __builtin_ia32_psrlq128_mask, __builtin_ia32_psrlqi256_mask,
22972         __builtin_ia32_psrlq256_mask, __builtin_ia32_psrawi256_mask,
22973         __builtin_ia32_psraw256_mask, __builtin_ia32_psrawi128_mask,
22974         __builtin_ia32_psraw128_mask, __builtin_ia32_psrlwi256_mask,
22975         __builtin_ia32_psrlw256_mask, __builtin_ia32_psrlwi128_mask,
22976         __builtin_ia32_psrlw128_mask, __builtin_ia32_psllwi512_mask,
22977         __builtin_ia32_psllw512_mask, __builtin_ia32_psrawi512_mask,
22978         __builtin_ia32_psraw512_mask, __builtin_ia32_psrlwi512_mask,
22979         __builtin_ia32_psrlw512_mask): Use _COUNT suffixed function type
22980         aliases.
22981         * config/i386/i386.c (ix86_expand_args_builtin): Rename last_arg_count
22982         flag to second_arg_count, handle 4 argument function type _COUNT
22983         aliases, handle second_arg_count on second argument rather than last.
22985 2017-04-10  Jeff Law  <law@redhat.com>
22987         PR tree-optimization/80374
22988         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Do not try to
22989         record anything if we can not convert integer_zero_node to the
22990         desired type.
22992 2017-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22994         PR target/80108
22995         * config/rs6000/rs6000.c (rs6000_option_override_internal):
22996         Enhance special handling given to the TARGET_P9_MINMAX option in
22997         relation to certain other options.
22999 2017-04-10  Bin Cheng  <bin.cheng@arm.com>
23001         PR tree-optimization/80153
23002         * tree-ssa-loop-ivopts.c (add_iv_candidate_for_use): Check and
23003         remove POINTER_PLUS_EXPR's base part directly, rather than through
23004         aff_tree.
23006 2017-04-10  Richard Biener  <rguenther@suse.de>
23007             Bin Cheng  <bin.cheng@arm.com>
23009         PR tree-optimization/80153
23010         * tree-affine.c (aff_combination_to_tree): Get base pointer from
23011         the first element of pointer type aff_tree.  Build result expr in
23012         aff_tree's type.
23013         (add_elt_to_tree): Convert to type unconditionally.  Remove other
23014         fold_convert calls.
23015         * tree-ssa-loop-ivopts.c (alloc_iv): Pass in consistent types.
23016         (rewrite_use_nonlinear_expr): Check invariant using iv information.
23018 2017-04-10  Richard Biener  <rguenther@suse.de>
23020         * tree-ssa-structalias.c (find_func_aliases): Properly handle
23021         asm inputs.
23023 2017-04-10  Vladimir Makarov  <vmakarov@redhat.com>
23025         PR rtl-optimization/70478
23026         * lra-constraints.c (curr_small_class_check): New.
23027         (update_and_check_small_class_inputs): New.
23028         (process_alt_operands): Update curr_small_class_check.  Disfavor
23029         alternative insn memory operands.  Check available regs for small
23030         class operands.
23032 2017-03-31  Matthew Fortune  <matthew.fortune@imgtec.com>
23034         PR target/80057
23035         * config/mips/mips.opt (-mvirt): Update description.
23036         * doc/invoke.texi (-mvirt): Likewise.
23038 2017-04-10  Richard Biener  <rguenther@suse.de>
23040         PR middle-end/80362
23041         * fold-const.c (fold_binary_loc): Look at unstripped ops when
23042         looking for NEGATE_EXPR in -A / -B to A / B folding.
23044 2017-04-10  Martin Liska  <mliska@suse.cz>
23046         PR gcov-profile/80224
23047         * gcov.c (print_usage): Fix usage string.
23048         (get_gcov_intermediate_filename): Remove.
23049         (output_gcov_file): Use both for normal and intermediate format.
23050         (generate_results): Do not initialize special file for
23051         intermediate format.
23053 2017-04-10  Richard Biener  <rguenther@suse.de>
23055         PR tree-optimization/80304
23056         * tree-ssa-loop-im.c (ref_indep_loop_p_1): Also recurse
23057         for safelen.
23059 2017-04-10  Nathan Sidwell  <nathan@acm.org>
23061         PR target/79905
23062         * config/rs6000/rs6000.c (rs6000_vector_type): New.
23063         (rs6000_init_builtins): Use it.
23065 2016-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23067         * config/arm/arm.md (<mrc>): Add mode to SET source.
23068         (<mrrc>): Likewise.
23070 2017-04-10  Richard Biener  <rguenther@suse.de>
23072         PR middle-end/80344
23073         * gimplify.c (is_gimple_mem_rhs_or_call): Allow CLOBBERs.
23075 2017-04-10  Jakub Jelinek  <jakub@redhat.com>
23077         PR target/80324
23078         * config/i386/avx512fintrin.h (_mm512_reduce_add_epi32,
23079         _mm512_reduce_mul_epi32, _mm512_reduce_and_epi32,
23080         _mm512_reduce_or_epi32, _mm512_mask_reduce_add_epi32,
23081         _mm512_mask_reduce_mul_epi32, _mm512_mask_reduce_and_epi32,
23082         _mm512_mask_reduce_or_epi32, _mm512_reduce_min_epi32,
23083         _mm512_reduce_max_epi32, _mm512_reduce_min_epu32,
23084         _mm512_reduce_max_epu32, _mm512_mask_reduce_min_epi32,
23085         _mm512_mask_reduce_max_epi32, _mm512_mask_reduce_min_epu32,
23086         _mm512_mask_reduce_max_epu32, _mm512_reduce_add_ps,
23087         _mm512_reduce_mul_ps, _mm512_mask_reduce_add_ps,
23088         _mm512_mask_reduce_mul_ps, _mm512_reduce_min_ps, _mm512_reduce_max_ps,
23089         _mm512_mask_reduce_min_ps, _mm512_mask_reduce_max_ps,
23090         _mm512_reduce_add_epi64, _mm512_reduce_mul_epi64,
23091         _mm512_reduce_and_epi64, _mm512_reduce_or_epi64,
23092         _mm512_mask_reduce_add_epi64, _mm512_mask_reduce_mul_epi64,
23093         _mm512_mask_reduce_and_epi64, _mm512_mask_reduce_or_epi64,
23094         _mm512_reduce_min_epi64, _mm512_reduce_max_epi64,
23095         _mm512_mask_reduce_min_epi64, _mm512_mask_reduce_max_epi64,
23096         _mm512_reduce_min_epu64, _mm512_reduce_max_epu64,
23097         _mm512_mask_reduce_min_epu64, _mm512_mask_reduce_max_epu64,
23098         _mm512_reduce_add_pd, _mm512_reduce_mul_pd, _mm512_mask_reduce_add_pd,
23099         _mm512_mask_reduce_mul_pd, _mm512_reduce_min_pd, _mm512_reduce_max_pd,
23100         _mm512_mask_reduce_min_pd, _mm512_mask_reduce_max_pd): New intrinsics.
23102 2017-04-08  Vladimir Makarov  <vmakarov@redhat.com>
23104         PR rtl-optimization/70478
23105         * lra-constraints.c: Reverse the last patch.
23107 2017-04-08  Andreas Tobler  <andreast@gcc.gnu.org>
23109         * config/aarch64/aarch64-freebsd.h: Define MCOUNT_NAME.
23110         Add comment for WCHAR_T.
23112 2017-04-08  Martin Liska  <mliska@suse.cz>
23114         Revert:
23115         2017-04-07  Martin Liska  <mliska@suse.cz>
23117         PR ipa/80212
23118         * ipa-split.c (split_function): Add function part to a same comdat
23119         group.
23121 2017-04-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23123         PR target/80358
23124         * config/rs6000/rs6000.c (expand_block_compare): Fix boundary check.
23126 2017-04-07  Pat Haugen  <pthaugen@us.ibm.com>
23128         * rs6000/rs6000.c (vec_load_pendulum): Rename...
23129         (vec_pairing): ...to this.
23130         (power9_sched_reorder2): Rewrite code for pairing vector/vecload insns.
23131         (rs6000_sched_init): Adjust for name change.
23132         (struct rs6000_sched_context): Likewise.
23133         (rs6000_init_sched_context): Likewise.
23134         (rs6000_set_sched_context): Likewise.
23136 2017-04-07  Jakub Jelinek  <jakub@redhat.com>
23138         PR target/80322
23139         PR target/80323
23140         PR target/80325
23141         PR target/80326
23142         * config/i386/avxintrin.h (_mm256_cvtsd_f64, _mm256_cvtss_f32): New
23143         intrinsics.
23144         * config/i386/avx512fintrin.h (_mm512_int2mask, _mm512_mask2int,
23145         _mm512_abs_ps, _mm512_mask_abs_ps, _mm512_abs_pd, _mm512_mask_abs_pd,
23146         _mm512_cvtsd_f64, _mm512_cvtss_f32): Likewise.
23148 2017-04-07  Andreas Tobler  <andreast@gcc.gnu.org>
23150         * config/aarch64/aarch64-freebsd.h: Define WCHAR_TYPE.
23152 2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>
23154         PR rtl-optimization/70703
23155         * ira-color.c (update_conflict_hard_regno_costs): Use
23156         int64_t instead of HOST_WIDE_INT.
23158 2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>
23160         PR rtl-optimization/70478
23161         * lra-constraints.c (process_alt_operands): Disfavor alternative
23162         insn memory operands.
23164 2017-04-07  Jeff Law  <law@redhat.com>
23166         * config/iq2000/iq2000.c (final_prescan_insn): Do not separate a
23167         CALL and NOTE_INSN_CALL_ARG_LOCATION.
23169 2017-04-07  Martin Liska  <mliska@suse.cz>
23171         PR target/79889
23172         * config/aarch64/aarch64.c (aarch64_process_target_attr):
23173         Show error message instead of an ICE.
23175 2017-04-07  Martin Liska  <mliska@suse.cz>
23177         PR ipa/80212
23178         * ipa-split.c (split_function): Add function part to a same comdat
23179         group.
23181 2017-04-07  Richard Biener  <rguenther@suse.de>
23183         PR middle-end/80341
23184         * tree.c (get_unwidened): Also handle ! for_type case for
23185         INTEGER_CSTs.
23186         * convert.c (do_narrow): Split out from ...
23187         (convert_to_integer_1): ... here.  Do not pass final truncation
23188         type to get_unwidened for TRUNC_DIV_EXPR.
23190 2017-04-07  Richard Biener  <rguenther@suse.de>
23192         * tree-affine.c (wide_int_ext_for_comb): Take type rather
23193         than aff_tree.
23194         (aff_combination_const): Adjust.
23195         (aff_combination_scale): Likewise.
23196         (aff_combination_add_elt): Likewise.
23197         (aff_combination_add_cst): Likewise.
23198         (aff_combination_convert): Likewise.
23199         (add_elt_to_tree): Likewise.  Remove unused argument.
23200         (aff_combination_to_tree): Adjust calls to add_elt_to_tree.
23202 2017-04-07  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23204         * config/arm/arm.h (ARM_DEFAULT_SHORT_ENUMS): Provide default
23205         definition.
23206         * config/arm/arm.c (arm_default_short_enums): Use
23207         ARM_DEFAULT_SHORT_ENUMS.
23208         * config/arm/rtems.h (ARM_DEFAULT_SHORT_ENUMS): Define.
23210 2017-04-06  Jakub Jelinek  <jakub@redhat.com>
23212         PR debug/80234
23213         * dwarf2out.c (gen_member_die): Handle C++17 inline static data
23214         members with redundant out-of-class redeclaration.
23216 2017-04-06  Uros Bizjak  <ubizjak@gmail.com>
23218         PR target/80286
23219         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): New pattern.
23220         * config/i386/i386.md (*zero_extendsidi2):
23221         Add (?*x,*x) and (?*v,*v) alternatives.
23223 2017-04-06  Uros Bizjak  <ubizjak@gmail.com>
23225         PR target/79733
23226         * config/i386/i386.c (ix86_expand_builtin)
23227         <case IX86_BUILTIN_K{,OR}TEST{C,Z}{8,16,32,64}>: Determine insn operand
23228         mode from insn data. Convert operands to insn operand mode.
23229         Copy operands that don't satisfy insn predicate to a register.
23231 2017-04-06  Sam Thursfield  <sam.thursfield@codethink.co.uk>
23233         * config/rs6000/x-aix: Increase memory limit for genautomata on AIX.
23234         Update comments.
23236 2017-04-06  Richard Biener  <rguenther@suse.de>
23238         PR tree-optimization/80334
23239         * tree-ssa-loop-ivopts.c (rewrite_use_address): Properly
23240         preserve alignment of accesses.
23242 2017-04-06  Richard Biener  <rguenther@suse.de>
23244         PR tree-optimization/80262
23245         * tree-sra.c (build_ref_for_offset): Preserve address-space
23246         information.
23247         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
23248         Drop useless address-space information on MEM_REF offsets.
23250 2017-04-05  Andreas Schwab  <schwab@linux-m68k.org>
23252         * builtins.def (BUILT_IN_UPDATE_SETJMP_BUF): Fix type.
23254 2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>
23256         PR rtl-optimization/70703
23257         * ira-color.c (update_conflict_hard_regno_costs): Use
23258         HOST_WIDE_INT instead of long.
23260 2017-04-05  Uros Bizjak  <ubizjak@gmail.com>
23262         PR target/80298
23263         * config/i386/mmintrin.h: Add -msse target option when __SSE__ is
23264         not defined for x86_64 target.  Add -mmmx target option when __SSE2__
23265         is not defined.
23266         * config/i386/mm3dnow.h: Add -msse target when __SSE__ is not defined
23267         for x86_64 target.  Handle -m3dnowa option.
23269 2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>
23271         PR rtl-optimization/70703
23272         * ira-color.c (update_costs_from_allocno): Use the smallest mode.
23273         (update_conflict_hard_regno_costs): Use long instead of unsigned
23274         arithmetic for cost calculation.
23276 2017-04-05  Jakub Jelinek  <jakub@redhat.com>
23277             Bernd Edlinger  <bernd.edlinger@hotmail.de>
23279         PR sanitizer/80308
23280         * asan.c (asan_store_shadow_bytes): Fix location of last_chunk_value
23281         for big endian.
23283 2017-04-05  Eric Botcazou  <ebotcazou@adacore.com>
23285         PR target/78002
23286         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Replace
23287         ptr_mode with Pmode throughout.
23288         * config/aarch64/aarch64.md (probe_stack_range_<PTR:mode): Rename
23289         into probe_stack_range and use DImode.
23291 2017-04-05  Dominik Vogt  <vogt@linux.vnet.ibm.com>
23293         PR target/79890
23294         * config/s390/s390.c (s390_register_info_gprtofpr): Return if
23295         call_eh_return is true.
23297 2017-04-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23299         * config/s390/s390-c.c (s390_resolve_overloaded_builtin):
23300         Initialize last_match_fntype_index.
23302 2017-04-05  Jakub Jelinek  <jakub@redhat.com>
23304         PR target/80310
23305         * tree-nvr.c: Include internal-fn.h.
23306         (pass_return_slot::execute): Ignore internal calls without
23307         direct optab.
23309 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
23310             Richard Biener  <rguenther@suse.de>
23312         PR c++/80297
23313         * genmatch.c (capture::gen_transform): For GENERIC unshare_expr
23314         captures used multiple times, except for the last use.
23315         * generic-match-head.c: Include gimplify.h.
23317 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
23319         PR tree-optimization/79390
23320         * target.h (struct noce_if_info): Declare.
23321         * targhooks.h (default_noce_conversion_profitable_p): Declare.
23322         * target.def (noce_conversion_profitable_p): New target hook.
23323         * ifcvt.h (struct noce_if_info): New type, moved from ...
23324         * ifcvt.c (struct noce_if_info): ... here.
23325         (noce_conversion_profitable_p): Renamed to ...
23326         (default_noce_conversion_profitable_p): ... this.  No longer
23327         static nor inline.
23328         (noce_try_store_flag_constants, noce_try_addcc,
23329         noce_try_store_flag_mask, noce_try_cmove, noce_try_cmove_arith,
23330         noce_convert_multiple_sets): Use targetm.noce_conversion_profitable_p
23331         instead of noce_conversion_profitable_p.
23332         * config/i386/i386.c: Include ifcvt.h.
23333         (ix86_option_override_internal): Don't override
23334         PARAM_MAX_RTL_IF_CONVERSION_INSNS default.
23335         (ix86_noce_conversion_profitable_p): New function.
23336         (TARGET_NOCE_CONVERSION_PROFITABLE_P): Redefine.
23337         * config/i386/x86-tune.def (X86_TUNE_ONE_IF_CONV_INSN): Adjust comment.
23338         * doc/tm.texi.in (TARGET_NOCE_CONVERSION_PROFITABLE_P): Add.
23339         * doc/tm.texi: Regenerated.
23341 2017-04-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23343         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Grammar
23344         correction.
23346 2017-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23348         PR target/80307
23349         * config/arm/arm.c (thumb1_rtx_costs): Give a cost of 32
23350         instructions for small multiply cores.
23352 2017-04-04  Jeff Law  <law@redhat.com>
23354         * config/mips/mips.c (mips_multi_add): Zero initialize the newly
23355         added member.
23356         (mips_expand_vec_perm_const): Initialize elements in orig_perm
23357         that are not set by the loop over the elements.
23359 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
23361         PR target/80286
23362         * config/i386/i386.c (ix86_expand_args_builtin): If op has scalar
23363         int mode, convert_modes it to mode as unsigned, otherwise use
23364         lowpart_subreg to mode rather than SImode.
23365         * config/i386/sse.md (<mask_codefor>ashr<mode>3<mask_name>,
23366         ashr<mode>3, ashr<mode>3<mask_name>, <shift_insn><mode>3<mask_name>):
23367         Use DImode instead of SImode for the shift count operand.
23368         * config/i386/mmx.md (mmx_ashr<mode>3, mmx_<shift_insn><mode>3):
23369         Likewise.
23371 2017-04-04  Richard Biener  <rguenther@suse.de>
23373         PR middle-end/80281
23374         * match.pd (A + (-B) -> A - B): Make sure to preserve unsigned
23375         arithmetic done for the negate or the plus.  Simplify.
23376         (A - (-B) -> A + B): Likewise.
23377         * fold-const.c (split_tree): Make sure to not negate pointers.
23379 2017-04-04  Segher Boessenkool  <segher@kernel.crashing.org>
23381         PR rtl-optimization/60818
23382         * simplify-rtx.c (simplify_binary_operation_1): Do not replace
23383         a compare of comparisons with the thing compared if this results
23384         in a different machine mode.
23386 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
23388         * alias.c (base_alias_check): Fix typo in comment.
23389         * cgraph.h (class ipa_polymorphic_call_context): Likewise.
23390         * cgraphunit.c (symbol_table::compile): Likewise.
23391         * collect2.c (maybe_run_lto_and_relink): Likewise.
23392         * config/arm/arm.c (arm_thumb1_mi_thunk): Likewise.
23393         * config/avr/avr-arch.h (avr_arch_info_t): Likewise.
23394         * config/avr/avr.c (avr_map_op_t): Likewise.
23395         * config/cr16/cr16.h (DATA_ALIGNMENT): Likewise.
23396         * config/epiphany/epiphany.c (TARGET_ARG_PARTIAL_BYTES): Likewise.
23397         * config/epiphany/epiphany.md (movcc): Likewise.
23398         * config/i386/i386.c (legitimize_pe_coff_extern_decl): Likewise.
23399         * config/m68k/m68k.c (struct _sched_ib, m68k_sched_variable_issue):
23400         Likewise.
23401         * config/mips/mips.c (mips_save_restore_reg): Likewise.
23402         * config/rx/rx.c (rx_is_restricted_memory_address): Likewise.
23403         * config/s390/s390.c (Z10_EARLYLOAD_DISTANCE): Likewise.
23404         * config/sh/sh.c (sh_rtx_costs): Likewise.
23405         * fold-const.c (fold_truth_andor): Likewise.
23406         * genautomata.c (collapse_flag): Likewise.
23407         * gengtype.h (struct type::u::s): Likewise.
23408         * gensupport.c (has_subst_attribute, add_mnemonic_string): Likewise.
23409         * input.c (FORMAT_AMOUNT): Likewise.
23410         * ipa-cp.c (class ipcp_lattice, agg_replacements_to_vector)
23411         (known_aggs_to_agg_replacement_list): Likewise.
23412         * ipa-inline-analysis.c: Likewise.
23413         * ipa-inline.h (estimate_edge_time, estimate_edge_hints): Likewise.
23414         * ipa-polymorphic-call.c
23415         (ipa_polymorphic_call_context::restrict_to_inner_class): Likewise.
23416         * loop-unroll.c (analyze_insn_to_expand_var): Likewise.
23417         * lra.c (lra_optional_reload_pseudos, lra_subreg_reload_pseudos):
23418         Likewise.
23419         * modulo-sched.c (apply_reg_moves): Likewise.
23420         * omp-expand.c (build_omp_regions_1): Likewise.
23421         * trans-mem.c (struct tm_wrapper_hasher): Likewise.
23422         * tree-ssa-loop-ivopts.c (may_eliminate_iv): Likewise.
23423         * tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Likewise.
23424         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
23425         * value-prof.c: Likewise.
23426         * var-tracking.c (val_reset): Likewise.
23428 2017-04-03  Richard Biener  <rguenther@suse.de>
23430         PR tree-optimization/80275
23431         * fold-const.c (split_address_to_core_and_offset): Handle
23432         POINTER_PLUS_EXPR.
23434 2017-04-03  Eric Botcazou  <ebotcazou@adacore.com>
23436         * tree-nested.c (get_descriptor_type): Make sure that the alignment of
23437         descriptors is at least equal to that of functions.
23439 2017-04-02  Uros Bizjak  <ubizjak@gmail.com>
23441         * config/i386/sse.md (movdi_to_sse): Add missing DONE.
23443 2017-04-02  Uros Bizjak  <ubizjak@gmail.com>
23445         PR target/80250
23446         * config/i386/sse.md (mov<IMOD4:mode>): Remove insn pattern.
23447         (mov<IMOD4:mode>): New expander.
23448         (*mov<IMOD4:mode>_internal): New insn and split pattern.
23450 2017-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
23452         PR rtl-optimization/79405
23453         * fwprop.c (propagations_left): New variable.
23454         (forward_propagate_into): Decrement it.
23455         (fwprop_init): Initialize it.
23456         (fw_prop): If the variable has reached zero, stop propagating.
23457         (fwprop_addr): Ditto.
23459 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
23461         PR debug/79255
23462         * dwarf2out.c (decls_for_scope): If BLOCK_NONLOCALIZED_VAR is
23463         a FUNCTION_DECL, pass it as decl instead of origin to
23464         process_scope_var.
23466 2017-03-31  Alexander Monakov  <amonakov@ispras.ru>
23468         * config/nvptx/nvptx.c (nvptx_output_softstack_switch): Correct format
23469         string.
23471 2017-03-31  Pat Haugen  <pthaugen@us.ibm.com>
23473         PR target/80107
23474         * config/rs6000/rs6000.md (extendhi<mode>2): Add test for
23475         TARGET_VSX_SMALL_INTEGER.
23477 2017-03-31  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23479         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
23480         reference to the OpenPOWER 64-Bit ELF V2 ABI Specification.
23482 2017-03-31  Matthew Fortune  <matthew.fortune@imgtec.com>
23484         * config/mips/mips-msa.md (msa_vec_extract_<msafmt_f>): Update
23485         extraction from odd-numbered MSA register.
23487 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
23489         PR middle-end/80173
23490         * expmed.c (store_bit_field_1): Don't attempt to create
23491         a word subreg out of hard registers wider than word if they
23492         have HARD_REGNO_NREGS of 1 for their mode.
23494         PR middle-end/80163
23495         * varasm.c (initializer_constant_valid_p_1): Disallow sign-extending
23496         conversions to integer types wider than word and pointer.
23498         PR debug/80025
23499         * cselib.h (rtx_equal_for_cselib_1): Add depth argument.
23500         (rtx_equal_for_cselib_p): Pass 0 to it.
23501         * cselib.c (cselib_hasher::equal): Likewise.
23502         (rtx_equal_for_cselib_1): Add depth argument.  If depth
23503         is 128, don't look up VALUE locs and punt.  Increment
23504         depth in recursive calls when walking VALUE locs.
23506 2017-03-31  Bernd Edlinger  <bernd.edlinger@hotmail.de>
23508         * gcov.c (md5sum_to_hex): Fix output of MD5 hex bytes.
23509         (make_gcov_file_name): Use the canonical path name for generating
23510         the MD5 value.
23511         (read_line): Fix handling of files with ascii null bytes.
23513 2017-03-30  Matthew Fortune  <matthew.fortune@imgtec.com>
23515         * config/mips/mips.c (mips_expand_vector_init): Create a const_vector
23516         to initialise a vector register instead
23517         of using a const_int.
23519 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
23521         PR translation/80189
23522         * gimplify.c (omp_default_clause): Use %qs instead of %s in
23523         diagnostic messages.
23525 2017-03-30  Peter Bergner  <bergner@vnet.ibm.com>
23527         PR target/80246
23528         * config/rs6000/dfp.md (dfp_dxex_<mode>): Update mode of operand 0.
23529         (dfp_diex_<mode>): Update mode of operand 1.
23530         * doc/extend.texi (dxex, dxexq): Document change to return type.
23531         (diex, diexq): Document change to argument type.
23533 2017-03-30  Martin Jambor  <mjambor@suse.cz>
23535         PR ipa/77333
23536         * cgraph.h (cgraph_build_function_type_skip_args): Declare.
23537         * cgraph.c (redirect_call_stmt_to_callee): Set gimple fntype so that
23538         it reflects the signature changes performed at the callee side.
23539         * cgraphclones.c (build_function_type_skip_args): Make public, renamed
23540         to cgraph_build_function_type_skip_args.
23541         (build_function_decl_skip_args): Adjust call to the above function.
23543 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
23545         PR target/80206
23546         * config/i386/sse.md
23547         (<extract_type>_vextract<shuffletype><extract_suf>_mask): Use
23548         register as dest whenever it is a MEM not rtx_equal_p to the
23549         corresponding dup operand, and when forcing into reg move the
23550         reg into the memory afterwards.
23551         (<extract_type_2>_vextract<shuffletype><extract_suf_2>_mask):
23552         Likewise.  Use <ssehalfvecmode> instead of <ssequartermode>
23553         for the force_reg mode.
23554         (avx512vl_vextractf128<mode>): Use register as dest either
23555         always when a MEM, or when it is a MEM not rtx_equal_p to the
23556         corresponding dup operand, or even not when it is a CONST_VECTOR
23557         depending on the mode and lo vs. hi.
23558         (avx512dq_vextract<shuffletype>64x2_1_maskm): Remove extraneous
23559         parens.
23560         (avx512f_vextract<shuffletype>32x4_1_maskm): Likewise.
23561         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name>):
23562         Likewise.  Require that operands[2] is even.
23563         (<mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name>):
23564         Remove extraneous parens.  Require that operands[2] is a multiple
23565         of 4.
23566         (vec_extract_lo_<mode><mask_name>): Don't bother testing if
23567         operands[0] is a MEM if <mask_applied>, the predicates/constraints
23568         disallow memory then.
23570 2017-03-30  Richard Biener  <rguenther@suse.de>
23572         PR tree-optimization/77498
23573         * tree-ssa-pre.c (phi_translate_1): Do not allow simplifications
23574         to non-constants over backedges.
23576 2017-03-29  Segher Boessenkool  <segher@kernel.crashing.org>
23578         PR rtl-optimization/80233
23579         * combine.c (combine_instructions): Only take NONDEBUG_INSN_P insns
23580         as last_combined_insn.  Do not test for BARRIER_P separately.
23582 2017-03-29  Andreas Schwab  <schwab@suse.de>
23584         PR ada/80146
23585         * calls.c (prepare_call_address): Convert funexp to Pmode before
23586         copying to temp reg.
23588 2017-03-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23590         PR tree-optimization/80158
23591         * gimple-ssa-strength-reduction.c (replace_mult_candidate):
23592         Handle possible future case of more than one alternate
23593         interpretation.
23594         (replace_rhs_if_not_dup): Likewise.
23595         (replace_one_candidate): Likewise.
23597 2017-03-28  Vladimir Makarov  <vmakarov@redhat.com>
23599         PR rtl-optimization/80193
23600         * ira.c (ira): Do not check allocation for LRA.
23602 2017-03-28  Alexander Monakov  <amonakov@ispras.ru>
23604         * config/nvptx/nvptx-protos.h (nvptx_output_simt_enter): Declare.
23605         (nvptx_output_simt_exit): Declare.
23606         * config/nvptx/nvptx.c (nvptx_init_unisimt_predicate): Use
23607         cfun->machine->unisimt_location.  Handle NULL unisimt_predicate.
23608         (init_softstack_frame): Move initialization of crtl->is_leaf to...
23609         (nvptx_declare_function_name): ...here.  Emit declaration of local
23610         memory space buffer for omp_simt_enter insn.
23611         (nvptx_output_unisimt_switch): New.
23612         (nvptx_output_softstack_switch): New.
23613         (nvptx_output_simt_enter): New.
23614         (nvptx_output_simt_exit): New.
23615         * config/nvptx/nvptx.h (struct machine_function): New fields
23616         has_simtreg, unisimt_location, simt_stack_size, simt_stack_align.
23617         * config/nvptx/nvptx.md (UNSPECV_SIMT_ENTER): New unspec.
23618         (UNSPECV_SIMT_EXIT): Ditto.
23619         (omp_simt_enter_insn): New insn.
23620         (omp_simt_enter): New expansion.
23621         (omp_simt_exit): New insn.
23622         * config/nvptx/nvptx.opt (msoft-stack-reserve-local): New option.
23624         * internal-fn.c (expand_GOMP_SIMT_ENTER): New.
23625         (expand_GOMP_SIMT_ENTER_ALLOC): New.
23626         (expand_GOMP_SIMT_EXIT): New.
23627         * internal-fn.def (GOMP_SIMT_ENTER): New internal function.
23628         (GOMP_SIMT_ENTER_ALLOC): Ditto.
23629         (GOMP_SIMT_EXIT): Ditto.
23630         * target-insns.def (omp_simt_enter): New insn.
23631         (omp_simt_exit): Ditto.
23632         * omp-low.c (struct omplow_simd_context): New fields simt_eargs,
23633         simt_dlist.
23634         (lower_rec_simd_input_clauses): Implement SIMT privatization.
23635         (lower_rec_input_clauses): Likewise.
23636         (lower_lastprivate_clauses): Handle SIMT privatization.
23638         * omp-offload.c: Include langhooks.h, tree-nested.h, stor-layout.h.
23639         (ompdevlow_adjust_simt_enter): New.
23640         (find_simtpriv_var_op): New.
23641         (execute_omp_device_lower): Handle IFN_GOMP_SIMT_ENTER,
23642         IFN_GOMP_SIMT_ENTER_ALLOC, IFN_GOMP_SIMT_EXIT.
23644         * tree-inline.h (struct copy_body_data): New field dst_simt_vars.
23645         * tree-inline.c (expand_call_inline): Handle SIMT privatization.
23646         (copy_decl_for_dup_finish): Ditto.
23648         * tree-ssa.c (execute_update_addresses_taken): Handle GOMP_SIMT_ENTER.
23650 2017-03-28  Uros Bizjak  <ubizjak@gmail.com>
23652         PR target/53383
23653         * config/i386/i386.c (ix86_option_override_internal): Always
23654         allow -mpreferred-stack-boundary=3 for 64-bit targets.
23656 2017-03-28  Bin Cheng  <bin.cheng@arm.com>
23658         * tree-vect-loop.c (optimize_mask_stores): Add bb to the right loop.
23660 2017-03-28  Bin Cheng  <bin.cheng@arm.com>
23662         * tree-vect-loop-manip.c (slpeel_add_loop_guard): New param and
23663         mark new edge's irreducible flag accordign to it.
23664         (vect_do_peeling): Check loop preheader edge's irreducible flag
23665         and pass it to function slpeel_add_loop_guard.
23667 2017-03-28  Richard Sandiford  <richard.sandiford@arm.com>
23669         PR tree-optimization/80218
23670         * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
23671         Update block frequencies and counts.
23673 2017-03-28  Richard Biener  <rguenther@suse.de>
23675         PR tree-optimization/78644
23676         * tree-ssa-ccp.c (evaluate_stmt): When we may not use the value
23677         of a simplification result we may not use it at all.
23679 2017-03-28  Richard Biener  <rguenther@suse.de>
23681         PR ipa/80205
23682         * tree-inline.c (copy_phis_for_bb): Do not create PHI node
23683         without arguments, generate default definition of a SSA name.
23685 2017-03-28  Richard Biener  <rguenther@suse.de>
23687         PR middle-end/80222
23688         * gimple-fold.c (gimple_fold_indirect_ref): Do not touch
23689         TYPE_REF_CAN_ALIAS_ALL references.
23690         * fold-const.c (fold_indirect_ref_1): Likewise.
23692 2017-03-28  Martin Liska  <mliska@suse.cz>
23694         PR ipa/80104
23695         * cgraphunit.c (cgraph_node::expand_thunk): Mark argument of a
23696         thunk call as DECL_GIMPLE_REG_P when vector or complex type.
23698 2017-03-28  Claudiu Zissulescu  <claziss@synopsys.com>
23699             Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
23701         * config/arc/arc.h (CPP_SPEC): Add subtarget_cpp_spec.
23702         (EXTRA_SPECS): Define.
23703         (SUBTARGET_EXTRA_SPECS): Likewise.
23704         (SUBTARGET_CPP_SPEC): Likewise.
23705         * config/arc/elf.h (EXTRA_SPECS): Renamed to
23706         SUBTARGET_EXTRA_SPECS.
23707         * config/arc/linux.h (SUBTARGET_CPP_SPEC): Define.
23709 2017-03-28  Claudiu Zissulescu  <claziss@synopsys.com>
23711         * config/arc/simdext.md (vst64_insn): Update pattern.
23712         (vld32wh_insn): Likewise.
23713         (vld32wl_insn): Likewise.
23714         (vld64_insn): Likewise.
23715         (vld32_insn): Likewise.
23717 2017-03-28  Marek Polacek  <polacek@redhat.com>
23719         PR sanitizer/80067
23720         * fold-const.c (fold_comparison): Use protected_set_expr_location
23721         instead of SET_EXPR_LOCATION.
23723 2017-03-28  Markus Trippelsdorf  <markus@trippelsdorf.de>
23725         * tree.c (add_expr): Avoid name lookup warning.
23727 2017-03-27  Jeff Law  <law@redhat.com>
23729         PR tree-optimization/80216
23730         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Fix typo in
23731         function name.  Limit recursion depth.
23732         (record_temporary_equivalences): Corresponding changes.
23734 2017-03-27  Jonathan Wakely  <jwakely@redhat.com>
23736         * doc/invoke.texi (-Wno-narrowing): Reorder so default behavior is
23737         covered first.
23739 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
23741         PR target/80102
23742         * reg-notes.def (REG_CFA_NOTE): Define.  Use it for CFA related
23743         notes.
23744         * cfgcleanup.c (reg_note_cfa_p): New array.
23745         (insns_have_identical_cfa_notes): New function.
23746         (old_insns_match_p): Don't cross-jump in between /f
23747         and non-/f instructions.  If both i1 and i2 are frame related,
23748         verify all CFA notes, their order and content.
23750 2017-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
23752         PR target/78543
23753         * config/rs6000/rs6000.md (bswaphi2_extenddi): Combine bswap
23754         HImode and SImode with zero extend to DImode to one insn.
23755         (bswap<mode>2_extenddi): Likewise.
23756         (bswapsi2_extenddi): Likewise.
23757         (bswaphi2_extendsi): Likewise.
23758         (bswaphi2): Combine bswap HImode and SImode into one insn.
23759         Separate memory insns from swapping register.
23760         (bswapsi2): Likewise.
23761         (bswap<mode>2): Likewise.
23762         (bswaphi2_internal): Delete, no longer used.
23763         (bswapsi2_internal): Likewise.
23764         (bswap<mode>2_load): Split bswap HImode/SImode into separate load,
23765         store, and gpr<-gpr swap insns.
23766         (bswap<mode>2_store): Likewise.
23767         (bswaphi2_reg): Register only splitter, combine with the splitter.
23768         (bswaphi2 splitter): Likewise.
23769         (bswapsi2_reg): Likewise.
23770         (bswapsi2 splitter): Likewise.
23771         (bswapdi2): If we have the LDBRX and STDBRX instructions, split
23772         the insns into load, store, and register/register insns.
23773         (bswapdi2_ldbrx): Likewise.
23774         (bswapdi2_load): Likewise.
23775         (bswapdi2_store): Likewise.
23776         (bswapdi2_reg): Likewise.
23778 2017-03-27  Gunther Nikl  <gnikl@users.sourceforge.net>
23780         * system.h (HAVE_DESIGNATED_INITIALIZERS): Fix non C++ case.
23781         (HAVE_DESIGNATED_UNION_INITIALIZERS): Likewise.
23783 2017-03-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23785         PR target/80103
23786         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Edit and
23787         add comments.
23788         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
23789         special handling for target option conflicts between dform
23790         options (-mpower9-dform, -mpower9-dform-vector,
23791         -mpower9-dform-scalar) and -mno-direct-move.
23793 2017-03-27  Richard Biener  <rguenther@suse.de>
23795         PR tree-optimization/80181
23796         * tree-ssa-ccp.c (likely_value): UNDEFINED ^ X is UNDEFINED.
23798 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
23800         * config/arc/predicates.md (move_double_src_operand): Replace the
23801         call to move_double_src_operand with a call to address_operand.
23803 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
23805         * config/arc/elf.h (ARGET_ARC_TP_REGNO_DEFAULT): Define.
23806         * config/arc/linux.h (ARGET_ARC_TP_REGNO_DEFAULT): Likewise.
23807         * config/arc/arc.opt (mtp-regno): Use ARGET_ARC_TP_REGNO_DEFAULT.
23809 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
23811         * config/arc/predicates.md (long_immediate_loadstore_operand):
23812         Consider scaled addresses cases.
23814 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
23816         * config/arc/arc.c (arc_epilogue_uses): BLINK should be also
23817         restored when in interrupt.
23818         * config/arc/arc.md (simple_return): ARCv2 rtie instruction
23819         doesn't have delay slot.
23821 2017-03-27  Richard Biener  <rguenther@suse.de>
23823         PR ipa/79776
23824         * tree-ssa-structalias.c (associate_varinfo_to_alias): Skip
23825         inlined thunk clones.
23827 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
23829         PR sanitizer/80168
23830         * asan.c (instrument_derefs): Copy over last operand from
23831         original COMPONENT_REF to the new COMPONENT_REF with
23832         DECL_BIT_FIELD_REPRESENTATIVE.
23833         * ubsan.c (instrument_object_size): Likewise.
23835 2017-03-27  Richard Biener  <rguenther@suse.de>
23837         PR tree-optimization/80170
23838         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Make
23839         sure DR/SCEV didnt fold in constants we do not see when looking
23840         at the reference base alignment.
23842 2017-03-27  Richard Biener  <rguenther@suse.de>
23844         PR middle-end/80171
23845         * gimple-fold.c (fold_ctor_reference): Properly guard against
23846         NULL return value from canonicalize_constructor_val.
23848 2017-03-25  Uros Bizjak  <ubizjak@gmail.com>
23850         PR target/80180
23851         * config/i386/i386.c (ix86_expand_builtin)
23852         <IX86_BUILTIN_RDSEED{16,32,64}_STEP>: Do not expand arg0 between
23853         flags reg setting and flags reg using instructions.
23854         <IX86_BUILTIN_RDRAND{16,32,64}_STEP>: Ditto.  Use non-flags reg
23855         clobbering instructions to zero extend op2.
23857 2017-03-25  Gerald Pfeifer  <gerald@pfeifer.com>
23859         * doc/install.texi (Configuration) <--with-aix-soname>:
23860         Update link to AIX ld.
23862 2017-03-25  Bernd Schmidt  <bschmidt@redhat.com>
23864         PR rtl-optimization/80160
23865         PR rtl-optimization/80159
23866         * lra-assigns.c (must_not_spill_p): Tighten new test to also take
23867         reg_alternate_class into account.
23869 2017-03-24  Vladimir Makarov  <vmakarov@redhat.com>
23871         PR target/80148
23872         * lra-assigns.c (assign_by_spills): Add spilled non-reload pseudos
23873         to consider in curr_insn_transform.
23875 2017-03-24  Jakub Jelinek  <jakub@redhat.com>
23877         * genrecog.c (validate_pattern): Add VEC_SELECT validation.
23878         * genmodes.c (emit_min_insn_modes_c): Call emit_mode_nunits
23879         and emit_mode_inner.
23881 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23883         * config/s390/s390-builtins.def: Add VXE builtins.  Add a flags
23884         argument to the overloaded builtin variants.  Use the new flag to
23885         deprecate certain builtin variants.
23886         * config/s390/s390-builtin-types.def: Add new builtin types.
23887         * config/s390/s390-builtins.h: Support new flags field for
23888         overloaded builtins.
23889         * config/s390/s390-c.c (OB_DEF_VAR): New flags field.
23890         (s390_macro_to_expand): Enable vector float data type.
23891         (s390_cpu_cpp_builtins_internal): Indicate support of the new
23892         builtins by incrementing the __VEC__ version number.
23893         (s390_expand_overloaded_builtin): Support expansion of vec_xl and
23894         vec_xst.
23895         (s390_resolve_overloaded_builtin): Emit error messages depending
23896         on the builtin flags.
23897         * config/s390/s390.c (s390_expand_builtin): Support additional
23898         flags argument.  Change error message to match the messages
23899         emitted in s390-c.c.
23900         * config/s390/s390.md: New UNSPEC_* constants.
23901         (op_type): Add new instruction types.
23902         * config/s390/vecintrin.h: Add new builtins and test data class
23903         constants.
23904         * config/s390/vx-builtins.md (V_HW_32_64): Add V4SF.
23905         (V_HW_4, VEC_HW, VECF_HW): New mode iterators.
23906         (VEC_INEXACT, VEC_NOINEXACT): New constants.
23907         ("vec_splats<mode>", "vec_insert<mode>", "vec_promote<mode>")
23908         ("vec_insert_and_zero<mode>", "vec_mergeh<mode>")
23909         ("vec_mergel<mode>"): V_HW -> VEC_HW.
23911         ("vlrlrv16qi", "vstrlrv16qi", "vbpermv16qi", "vec_msumv2di")
23912         ("vmslg", "*vftci<mode>_cconly", "vftci<mode>_intcconly")
23913         ("*vftci<mode>", "vftci<mode>_intcc", "vec_double_s64")
23914         ("vec_double_u64", "vfmin<mode>", "vfmax<mode>"): New definition.
23916         ("and_av2df3", "and_cv2df3", "vec_andc_av2df3")
23917         ("vec_andc_cv2df3", "xor_av2df3", "xor_cv2df3", "vec_nor_av2df3")
23918         ("vec_nor_cv2df3", "ior_av2df3", "ior_cv2df3", "vec_nabs")
23919         ("*vftcidb", "*vftcidb_cconly", "vftcidb"): Remove definition.
23921         ("vec_all_<fpcmpcc:code>v2df", "vec_any_<fpcmpcc:code>v2df")
23922         ("vec_scatter_elementv4si_DI", "vec_cmp<fpcmp:code>v2df")
23923         ("vec_di_to_df_s64", "vec_di_to_df_u64", "vec_df_to_di_u64")
23924         ("vfidb", "*vldeb", "*vledb", "*vec_cmp<insn_cmp>v2df_cconly")
23925         ("vec_cmpeqv2df_cc", "vec_cmpeqv2df_cc", "vec_cmphv2df_cc")
23926         ("vec_cmphev2df_cc", "*vec_cmpeqv2df_cc")
23927         ("*vec_cmphv2df_cc", "*vec_cmphev2df_cc"): Enable new modes as ...
23929         ("vec_all_<fpcmpcc:code><mode>", "vec_any_<fpcmpcc:code><mode>")
23930         ("vec_scatter_element<V_HW_4:mode>_DI")
23931         ("vec_cmp<fpcmp:code><mode>", "vcdgb", "vcdlgb", "vclgdb")
23932         ("vec_fpint<mode>", "vflls")
23933         ("vflrd", "*vec_cmp<insn_cmp><mode>_cconly", "vec_cmpeq<mode>_cc")
23934         ("vec_cmpeq<mode>_cc", "vec_cmph<mode>_cc", "vec_cmphe<mode>_cc")
23935         ("*vec_cmpeq<mode>_cc", "*vec_cmph<mode>_cc")
23936         ("*vec_cmphe<mode>_cc"): ... these.
23938         ("vec_ctd_s64", "vec_ctsl", "vec_ctul", "vec_st2f"): Use rounding
23939         mode constant instead of magic value.
23941 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23943         * config/s390/s390.c (s390_expand_vec_compare): Support other
23944         vector floating point modes than just V2DF.
23945         (s390_expand_vcond): Likewise.
23946         (s390_hard_regno_mode_ok): Allow SFmode values in VRs.
23947         (s390_cannot_change_mode_class): Prevent mode changes between TF
23948         and V1TF in vector registers.
23949         * config/s390/s390.md (DF, SF): New mode attributes.
23950         ("*cmp<mode>_ccs", "add<mode>3", "sub<mode>3", "mul<mode>3")
23951         ("fma<mode>4", "fms<mode>4", "div<mode>3", "*neg<mode>2"): Add
23952         SFmode support for VRs.
23953         * config/s390/vector.md (V_HW, V_HW2, VT_HW, ti*, nonvec): Add new
23954         vector fp modes.
23955         (VFT, VF_HW): New mode iterators.
23956         (vw, sdx): New mode attributes.
23957         ("addv2df3", "subv2df3", "mulv2df3", "divv2df3", "sqrtv2df2")
23958         ("fmav2df4","fmsv2df4", "negv2df2", "absv2df2", "*negabsv2df2")
23959         ("smaxv2df3", "sminv2df3", "*vec_cmp<VFCMP_HW_OP:code>v2df_nocc")
23960         ("vec_cmpuneqv2df", "vec_cmpltgtv2df", "vec_orderedv2df")
23961         ("vec_unorderedv2df"): Adjust the v2df only patterns to support
23962         also the new vector floating point modes.  Renaming to ...
23964         ("add<mode>3", "sub<mode>3", "mul<mode>3", "div<mode>3")
23965         ("sqrt<mode>2", "fma<mode>4", "fms<mode>4", "neg<mode>2")
23966         ("abs<mode>2", "negabs<mode>2", "smax<mode>3")
23967         ("smin<mode>3", "*vec_cmp<VFCMP_HW_OP:code><mode>_nocc")
23968         ("vec_cmpuneq<mode>", "vec_cmpltgt<mode>", "vec_ordered<mode>")
23969         ("vec_unordered<mode>"): ... these.
23971         ("neg_fma<mode>4", "neg_fms<mode>4", "*smax<mode>3_vxe")
23972         ("*smin<mode>3_vxe", "*sminv2df3_vx", "*vec_extendv4sf")
23973         ("*vec_extendv2df"): New insn definitions.
23975 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23977         * config/s390/s390.md ("*adddi3_sign", "*subdi3_sign", "mulditi3")
23978         ("mulditi3_2", "*muldi3_sign"): New patterns.
23979         ("muldi3", "*muldi3", "mulsi3", "*mulsi3"): Add an expander and
23980         rename the pattern definition.
23982 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23984         * config/s390/s390.md ("indirect_jump"): Turn insn definition into
23985         expander.
23986         ("*indirect_jump", "*indirect2_jump"): New pattern definitions.
23988 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23990         * config/s390/s390.c (s390_expand_vec_init): Use vllezl
23991         instruction if possible.
23992         * config/s390/vector.md (vec_halfnumelts): New mode
23993         attribute.
23994         ("*vec_vllezlf<mode>"): New pattern.
23996 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23998         * config/s390/vector.md ("popcountv16qi2", "popcountv8hi2")
23999         ("popcountv4si2", "popcountv2di2"): Rename to ...
24000         ("popcount<mode>2", "popcountv8hi2_vx", "popcountv4si2_vx")
24001         ("popcountv2di2_vx"): ... these and add !TARGET_VXE to the
24002         condition.
24003         ("popcount<mode>2_vxe"): New pattern.
24005 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24007         * common/config/s390/s390-common.c (processor_flags_table): Add
24008         arch12.
24009         * config.gcc: Add arch12.
24010         * config/s390/driver-native.c (s390_host_detect_local_cpu):
24011         Default to arch12 for unknown CPU model numbers.
24012         * config/s390/s390-builtins.def: Add B_VXE builtin flag.
24013         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Adjust
24014         PROCESSOR_max sanity check.
24015         * config/s390/s390-opts.h (enum processor_type): Add
24016         PROCESSOR_ARCH12.
24017         * config/s390/s390.c (processor_table): Add arch12.
24018         (s390_expand_builtin): Add check for B_VXE flag.
24019         (s390_issue_rate): Add PROCESSOR_ARCH12.
24020         (s390_get_sched_attrmask): Likewise.
24021         (s390_get_unit_mask): Likewise.
24022         (s390_sched_score): Enable z13 scheduling for arch12.
24023         (s390_sched_reorder): Likewise.
24024         (s390_sched_variable_issue): Likewise.
24025         * config/s390/s390.h (enum processor_flags): Add PF_ARCH12 and
24026         PF_VXE.
24027         (s390_tune_attr): Use z13 scheduling also for arch12.
24028         (TARGET_CPU_ARCH12, TARGET_CPU_ARCH12_P, TARGET_CPU_VXE)
24029         (TARGET_CPU_VXE_P, TARGET_ARCH12, TARGET_ARCH12_P, TARGET_VXE)
24030         (TARGET_VXE_P): New macros.
24031         * config/s390/s390.md: Add arch12 to cpu attribute.  Add arch12
24032         and vxe to cpu_facility.  Add arch12 and vxe to enabled attribute.
24033         * config/s390/s390.opt: Add arch12 as processor_type.
24035 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24037         * config/s390/s390.md
24038         ("fixuns_truncdddi2", "fixuns_trunctddi2")
24039         ("fixuns_trunc<BFP:mode><GPR:mode>2"): Merge into ...
24040         ("fixuns_trunc<FP:mode><GPR:mode>2"): New expander.
24042         ("fixuns_trunc<BFP:mode><GPR:mode>2", "fixuns_trunc<mode>si2"):
24043         Rename expanders to ...
24045         ("fixuns_trunc<BFP:mode><GPR:mode>2_emu")
24046         ("fixuns_truncdddi2_emu"): ... these.
24048         ("fixuns_trunc<mode>si2_emu"): New expander.
24050         ("*fixuns_truncdfdi2_z13"): Rename to ...
24051         ("*fixuns_truncdfdi2_vx"): ... this.
24053 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24055         * config/s390/2964.md: Remove the single element vector compare
24056         instructions which are no longer used.
24057         * config/s390/s390.c (s390_select_ccmode): Remove handling of
24058         vector CCmodes.
24059         (s390_canonicalize_comparison): Remove handling of DFmode
24060         compares.
24061         (s390_expand_vec_compare_scalar): Remove function.
24062         (s390_emit_compare): Don't call s390_expand_vec_compare_scalar.
24063         * config/s390/s390.md ("*vec_cmp<insn_cmp>df_cconly"): Remove
24064         pattern.
24065         ("*cmp<mode>_ccs"): Add wfcdb instruction.
24067 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24069         * config/s390/s390.md ("mov<mode>_64dfp" DD_DF): Use vleig for loading a
24070         FP zero.
24071         ("*mov<mode>_64" DD_DF): Remove the vector instructions. These
24072         will anyway by matched by mov<mode>_64dfp.
24074 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24076         * config/s390/s390.md ("mov<mode>" SD_SF): Change vleg/vsteg to
24077         vlef/vstef.  Add missing operand to vleif.
24079 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24081         * config/s390/s390.c (s390_expand_vec_init): Enable vector load
24082         pair for all vector types with 64 bit elements.
24083         * config/s390/vx-builtins.md (V_HW_64): Move mode iterator to ...
24084         * config/s390/vector.md (V_HW_64): ... here.
24085         (V_128_NOSINGLE): New mode iterator.
24086         ("vec_init<V_HW:mode>"): Use V_128 as mode iterator.
24087         ("*vec_splat<mode>"): Use V_128_NOSINGLE mode iterator.
24088         ("*vec_tf_to_v1tf", "*vec_ti_to_v1ti"): New pattern definitions.
24089         ("*vec_load_pairv2di"): Change to ...
24090         ("*vec_load_pair<mode>"): ... this one.
24092 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24094         * config/s390/constraints.md: Add comments.
24095         (jKK): Reject element sizes > 8 bytes.
24096         * config/s390/s390.c (s390_split_ok_p): Enable splitting also for
24097         s_operands.
24098         * config/s390/s390.md: Add the s_operand checks formerly in
24099         s390_split_ok_p to various splitters where they are still
24100         required.
24101         * config/s390/vector.md ("mov<mode>" V_128): Add GPR alternatives
24102         for 128 bit vectors.  Plus two splitters.
24104 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24106         * config/s390/s390.md: Rename the cpu facilty vec to vx throughout
24107         the file.
24109 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24111         PR target/79893
24112         * config/s390/s390-c.c (s390_adjust_builtin_arglist): Issue an
24113         error if the boundary argument is not constant.
24115 2017-03-24  Jakub Jelinek  <jakub@redhat.com>
24117         PR rtl-optimization/80112
24118         * loop-doloop.c (doloop_condition_get): Don't check condition
24119         if cmp isn't SET with IF_THEN_ELSE src.
24121 2017-03-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24123         PR tree-optimization/80158
24124         * gimple-ssa-strength-reduction.c (replace_mult_candidate): When
24125         replacing a candidate statement, also replace it for the
24126         candidate's alternate interpretation.
24127         (replace_rhs_if_not_dup): Likewise.
24128         (replace_one_candidate): Likewise.
24130 2017-03-24  Richard Biener  <rguenther@suse.de>
24132         PR tree-optimization/80167
24133         * graphite-isl-ast-to-gimple.c
24134         (translate_isl_ast_to_gimple::is_valid_rename): Handle default-defs
24135         properly.
24136         (translate_isl_ast_to_gimple::get_rename): Likewise.
24138 2017-03-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24140         * config/rs6000/rs6000.c (rs6000_option_override_internal): Change
24141         handling of certain combinations of target options, including the
24142         combinations -mpower8-vector vs. -mno-vsx, -mpower9-vector vs.
24143         -mno-power8-vector, and -mpower9_dform vs. -mno-power9-vector.
24145 2017-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24147         PR target/71436
24148         * config/arm/arm.md (*load_multiple): Add reload_completed to
24149         matching condition.
24151 2017-03-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24152             Richard Biener  <rguenth@suse.de>
24154         PR tree-optimization/79908
24155         PR tree-optimization/80136
24156         * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
24157         been cast away, gimplify_and_add suffices.
24159 2017-03-23  Markus Trippelsdorf  <markus@trippelsdorf.de>
24161         * tree-vrp.c (identify_jump_threads): Delete avail_exprs.
24163 2017-03-23  Richard Biener  <rguenther@suse.de>
24165         PR tree-optimization/80032
24166         * gimplify.c (gimple_push_cleanup): Forced unconditional
24167         cleanups still have to go to the conditional_cleanups
24168         sequence.
24170 2017-03-22  Jakub Jelinek  <jakub@redhat.com>
24172         PR tree-optimization/80072
24173         * tree-ssa-reassoc.c (struct operand_entry): Change id field type
24174         to unsigned int.
24175         (next_operand_entry_id): Change type to unsigned int.
24176         (sort_by_operand_rank): Make sure to return the right return value
24177         even if unsigned fields are bigger than INT_MAX.
24178         (struct oecount): Change cnt and id type to unsigned int.
24179         (oecount_hasher::equal): Formatting fix.
24180         (oecount_cmp): Make sure to return the right return value
24181         even if unsigned fields are bigger than INT_MAX.
24182         (undistribute_ops_list): Change next_oecount_id type to unsigned int.
24184         PR c++/80129
24185         * gimplify.c (gimplify_modify_expr_rhs) <case COND_EXPR>: Clear
24186         TREE_READONLY on result if writing it more than once.
24188         PR sanitizer/80110
24189         * doc/invoke.texi (-fsanitize=thread): Document that with
24190         -fnon-call-exceptions atomics are not able to throw
24191         exceptions.
24193         PR sanitizer/80110
24194         * tsan.c: Include tree-eh.h.
24195         (instrument_builtin_call): Call maybe_clean_eh_stmt or
24196         maybe_clean_or_replace_eh_stmt where needed.
24197         (instrument_memory_accesses): Add cfg_changed argument.
24198         Call gimple_purge_dead_eh_edges on each block and set *cfg_changed
24199         if it returned true.
24200         (tsan_pass): Adjust caller.  Return TODO_cleanup_cfg if cfg_changed.
24202         PR rtl-optimization/63191
24203         * config/i386/i386.c (ix86_delegitimize_address): Turn into small
24204         wrapper function, moved the whole old content into ...
24205         (ix86_delegitimize_address_1): ... this.  New inline function.
24206         (ix86_find_base_term): Use ix86_delegitimize_address_1 with
24207         true as last argument instead of ix86_delegitimize_address.
24209 2017-03-22  Wilco Dijkstra  <wdijkstr@arm.com>
24211         * config/aarch64/aarch64.c (generic_branch_cost): Copy
24212         cortexa57_branch_cost.
24214 2017-03-22  Wilco Dijkstra  <wdijkstr@arm.com>
24216         * config/aarch64/aarch64.c (generic_tunings): Add AES fusion.
24218 2017-03-21  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24220         PR target/80123
24221         * doc/md.texi (Constraints): Document wA constraint.
24222         * config/rs6000/constraints.md (wA): New.
24223         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Add wA reg_class.
24224         (rs6000_init_hard_regno_mode_ok): Init wA constraint.
24225         * config/rs6000/rs6000.h (RS6000_CONSTRAINT_wA): New.
24226         * config/rs6000/vsx.md (vsx_splat_<mode>): Use wA constraint.
24228 2017-03-22  Cesar Philippidis  <cesar@codesourcery.com>
24230         PR c++/80029
24231         * gimplify.c (is_oacc_declared): New function.
24232         (oacc_default_clause): Use it to set default flags for acc declared
24233         variables inside parallel regions.
24234         (gimplify_scan_omp_clauses): Strip firstprivate pointers for acc
24235         declared variables.
24236         (gimplify_oacc_declare): Gimplify the declare clauses.  Add the
24237         declare attribute to any decl as necessary.
24239 2017-03-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
24241         PR target/80082
24242         * config/arm/arm-isa.h (isa_bit_lpae): New feature bit.
24243         (ISA_ARMv7ve): Add isa_bit_lpae to the definition.
24244         * config/arm/arm-protos.h (arm_arch7ve): Rename into ...
24245         (arm_arch_lpae): This.
24246         * config/arm/arm.c (arm_arch7ve): Rename into ...
24247         (arm_arch_lpae): This.  Define it in term of isa_bit_lpae.
24248         * config/arm/arm.h (TARGET_HAVE_LPAE): Redefine in term of
24249         arm_arch_lpae.
24251 2017-03-22  Martin Liska  <mliska@suse.cz>
24253         PR target/79906
24254         * config/rs6000/rs6000.c (rs6000_inner_target_options): Show
24255         error message instead of an ICE.
24257 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24259         * doc/extend.texi (6.11 Additional Floating Types): Revise.
24261 2017-03-21  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24263         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
24264         comments.
24265         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
24266         comments.
24268 2017-03-21  Martin Sebor  <msebor@redhat.com>
24270         * doc/extend.texi: Use "cannot" instead of "can't."
24271         * doc/hostconfig.texi: Same.
24272         * doc/install.texi: Same.
24273         * doc/invoke.texi: Same.
24274         * doc/loop.texi: Same.
24275         * doc/md.texi: Same.
24276         * doc/objc.texi: Same.
24277         * doc/rtl.texi: Same.
24278         * doc/tm.texi: Same.
24279         * doc/tm.texi.in: Same.
24280         * doc/trouble.texi: Same.
24282 2017-03-21  Alexandre Oliva <aoliva@redhat.com>
24284         PR debug/63238
24285         * dwarf2out.c (struct checksum_attributes): Add at_alignment.
24286         (collect_checksum_attributes): Set it.
24287         (die_checksum_ordered): Use it.
24289 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24291         PR tree-optimization/79908
24292         * tree-stdarg.c (expand_ifn_va_arg_1): Revert the following
24293         change: For a VA_ARG whose LHS has been cast away, use
24294         force_gimple_operand to construct the side effects.
24296 2017-03-21  David Malcolm  <dmalcolm@redhat.com>
24298         PR translation/80001
24299         * omp-offload.c (oacc_loop_fixed_partitions): Make diagnostics
24300         more amenable to translation.
24301         (oacc_loop_auto_partitions): Likewise.
24303 2017-03-21  Marek Polacek  <polacek@redhat.com>
24304             Martin Sebor  <msebor@redhat.com>
24306         PR tree-optimization/80109
24307         * gimple-ssa-warn-alloca.c (alloca_call_type): Only call get_range_info
24308         on INTEGRAL_TYPE_P.
24310 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
24311             Segher Boessenkool  <segher@kernel.crashing.org>
24313         PR target/80125
24314         * combine.c (can_combine_p): Revert the 2017-03-20 change, only
24315         check reg_used_between_p between insn and one of succ or succ2
24316         depending on if succ is artificial insn not inserted into insn
24317         stream.
24319 2017-03-21  Martin Liska  <mliska@suse.cz>
24321         PR gcov-profile/80081
24322         * Makefile.in: Add gcov-dump and fix installation of gcov-tool.
24323         * doc/gcc.texi: Include gcov-dump stuff.
24324         * doc/gcov-dump.texi: New file.
24326 2017-03-21  Toma Tabacu  <toma.tabacu@imgtec.com>
24328         PR rtl-optimization/79150
24329         * config/mips/mips.c (mips_block_move_loop): Emit a NOP after the
24330         conditional jump, if the jump is the last insn of the loop.
24332 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24333             Richard Biener  <rguenth@suse.de>
24335         PR tree-optimization/79908
24336         * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
24337         been cast away, use force_gimple_operand to construct the side
24338         effects.
24340 2017-03-21  Martin Liska  <mliska@suse.cz>
24342         PR libfortran/79956
24343         * simplify-rtx.c (simplify_immed_subreg): Initialize a variable
24344         to NULL.
24346 2017-03-21  Brad Spengler <spender@grsecurity.net>
24348         PR plugins/80094
24349         * plugin.c (htab_hash_plugin): New function.
24350         (add_new_plugin): Use it and adjust.
24351         (parse_plugin_arg_opt): Adjust.
24352         (init_one_plugin): Likewise.
24354 2017-03-21  Richard Biener  <rguenther@suse.de>
24356         PR tree-optimization/80032
24357         * gimplify.c (gimple_push_cleanup): Add force_uncond parameter,
24358         if set force the cleanup to happen unconditionally.
24359         (gimplify_target_expr): Push inserted clobbers with force_uncond
24360         to avoid them being removed by control-dependent DCE.
24362 2017-03-21  Richard Biener  <rguenther@suse.de>
24364         PR tree-optimization/80122
24365         * tree-inline.c (copy_bb): Do not expans va-arg packs or
24366         va_arg_pack_len when the inlined call stmt requires pack
24367         expansion itself.
24368         * tree-inline.h (struct copy_body_data): Make call_stmt a gcall *.
24370 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
24372         PR sanitizer/78158
24373         * tsan.c (instrument_builtin_call): If the memory model argument
24374         is not a constant, assume it is valid.
24376         PR c/67338
24377         * fold-const.c (round_up_loc): Negate divisor in unsigned type to
24378         avoid UB.
24380 2017-03-20  Segher Boessenkool  <segher@kernel.crashing.org>
24382         PR rtl-optimization/79910
24383         * combine.c (can_combine_p): Do not allow combining an I0 or I1
24384         if its dest is used by an insn before I2 (other than the combined
24385         insns themselves, which are properly handled already).
24387 2017-03-20  Segher Boessenkool  <segher@kernel.crashing.org>
24389         Revert:
24390         2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
24392         * combine.c (record_used_regs): New static function.
24393         (try_combine): Handle situations where there is an additional
24394         instruction between I2 and I3 which needs to have a LOG_LINK
24395         updated.
24397         Revert:
24398         2017-03-17  Jim Wilson  <jim.wilson@linaro.org>
24400         * combine.c (try_combine): Delete redundant i1 test.  Call
24401         prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
24403 2017-03-20  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24405         PR target/80083
24406         * config/rs6000/rs6000.md (*movsi_internal1): Fix constraints for
24407         alternatives 13/14.
24409 2017-03-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24411         PR tree-optimization/80054
24412         * gimple-ssa-strength-reduction.c (all_phi_incrs_profitable): Fail
24413         the optimization if a PHI or any of its arguments is not dominated
24414         by the candidate's basis.  Use gphi* rather than gimple* as
24415         appropriate.
24416         (replace_profitable_candidates): Clean up a gimple* variable that
24417         should be a gphi* variable.
24419 2017-03-20  Martin Sebor  <msebor@redhat.com>
24421         PR c++/52477
24422         * doc/extend.texi (attribute constructor): Document present limitation.
24424 2017-03-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24426         PR target/79963
24427         * config/rs6000/altivec.h (vec_all_ne): Under __cplusplus__ and
24428         __POWER9_VECTOR__ #ifdef control, change template definition to
24429         use Power9-specific built-in function.
24430         (vec_any_eq): Likewise.
24431         * config/rs6000/vector.md (vector_ae_v2di_p): Change the flag used
24432         to control outcomes from this test.
24433         (vector_ae_<mode>p): For VEC_F modes, likewise.
24435 2017-03-20  Ian Lance Taylor  <iant@google.com>
24437         * config/i386/i386.c (ix86_function_regparm): Save an extra
24438         register for -fsplit-stack with DECL_STATIC_CHAIN.
24440 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com>
24442         PR target/79912
24443         * config/riscv/riscv.c (riscv_preferred_reload_class): Remove.
24444         (TARGET_PREFERRED_RELOAD_CLASS): Likewise.
24446 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com>
24448         * config/riscv/riscv.c (riscv_print_operand): Use "fence
24449         iorw,ow".
24450         * config/riscv/sync.mc (mem_thread_fence_1): Use "fence
24451         iorw,iorw".
24453 2017-03-20  Marek Polacek  <polacek@redhat.com>
24455         PR sanitizer/80063
24456         * asan.c (DEF_SANITIZER_BUILTIN): Use do { } while (0).
24458 2017-03-20  Richard Biener  <rguenther@suse.de>
24460         PR tree-optimization/80113
24461         * graphite-isl-ast-to-gimple.c (copy_loop_phi_nodes): Do not
24462         allocate extra SSA name for PHI def.
24463         (add_close_phis_to_outer_loops): Likewise.
24464         (add_close_phis_to_merge_points): Likewise.
24465         (copy_loop_close_phi_args): Likewise.
24466         (copy_cond_phi_nodes): Likewise.
24468 2017-03-20  Martin Liska  <mliska@suse.cz>
24470         PR middle-end/79753
24471         * tree-chkp.c (chkp_build_returned_bound): Do not build
24472         returned bounds for a LHS that's not a BOUNDED_P type.
24474 2017-03-20  Martin Liska  <mliska@suse.cz>
24476         PR target/79769
24477         PR target/79770
24478         * tree-chkp.c (chkp_find_bounds_1): Handle REAL_CST,
24479         COMPLEX_CST and VECTOR_CST.
24481 2017-03-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24483         PR target/78857
24484         * config/s390/s390.md ("cmp<mode>_ccs_0"): Add a clobber of the
24485         target operand.  A new splitter adds the clobber statement in case
24486         the target operand is dead anyway.
24488 2017-03-19  Gerald Pfeifer  <gerald@pfeifer.com>
24490         * doc/install.texi (Specific) <sparc-*-linux*>: No longer refer
24491         to age-old versions of binutils and glibc.
24493 2017-03-18  Segher Boessenkool  <segher@kernel.crashing.org>
24495         * doc/contrib.texi (Contributors): Remove duplicate entry for myself.
24497 2017-03-18  Gerald Pfeifer  <gerald@pfeifer.com>
24499         * doc/contrib.texi (Contributors): Add Segher Boessenkool.
24501 2017-03-18  Gerald Pfeifer  <gerald@pfeifer.com>
24503         * doc/install.texi (Specific) <arm-*-eabi>: Remove old
24504         requirement for binutils 2.13.
24506 2017-03-17  Jim Wilson  <jim.wilson@linaro.org>
24508         * combine.c (try_combine): Delete redundant i1 test.  Call
24509         prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
24511 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com
24513         * doc/install.texi (Specific) <riscv32-*-elf>: Add riscv32-*-elf,
24514         riscv32-*-linux, riscv64-*-elf, riscv64-*-linux to the table of
24515         contents.
24516         <riscv64-*-elf>: Re-arrange section
24517         <riscv32-*-elf>: Add a note about requiring binutils 2.28.
24518         <riscv32-*-linux>: Likewise.
24519         <riscv64-*-elf>: Likewise
24520         <riscv64-*-linux>: Likewise.
24522 2017-03-17  Richard Earnshaw  <rearnsha@arm.com>
24524         PR target/80052
24525         * aarch64.opt(verbose-cost-dump): Fix typo.
24527 2017-03-17  Pat Haugen  <pthaugen@us.ibm.com>
24529         PR target/79951
24530         * config/rs6000/rs6000.md (copysign<mode>3_fcpsgn): Test
24531         for VECTOR_UNIT_VSX_P (<MODE>mode) too.
24533 2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
24535         * reload.c (find_reloads): When reloading a nonoffsettable address,
24536         use RELOAD_OTHER for it and its address reloads.
24538         PR rtl-optimization/79910
24539         * combine.c (record_used_regs): New static function.
24540         (try_combine): Handle situations where there is an additional
24541         instruction between I2 and I3 which needs to have a LOG_LINK
24542         updated.
24544 2017-03-17  Jeff Law  <law@redhat.com>
24546         PR tree-optimization/71437
24547         * tree-vrp.c (simplify_stmt_for_jump_threading): Lookup the
24548         conditional in the hash table first.
24549         (vrp_dom_walker::before_dom_children): Extract condition from
24550         ASSERT_EXPR.  Record condition, its inverion and any implied
24551         conditions as well.
24553 2017-03-17  Marek Polacek  <polacek@redhat.com>
24554             Markus Trippelsdorf  <markus@trippelsdorf.de>
24556         PR tree-optimization/80079
24557         * gimple-ssa-store-merging.c (class pass_store_merging): Initialize
24558         m_stores_head.
24560 2017-03-17  Richard Biener  <rguenther@suse.de>
24562         PR middle-end/80075
24563         * tree-eh.c (stmt_could_throw_1_p): Only handle gimple assigns.
24564         Properly verify the LHS before the RHS possibly claims to be
24565         handled.
24566         (stmt_could_throw_p): Hande gimple conds fully here.  Clobbers
24567         do not throw.
24569 2017-03-17  Martin Jambor  <mjambor@suse.cz>
24571         * doc/invoke.texi (Option Options): Include -fipa-vrp in the list.
24572         (List of -O2 options): Likewise.
24573         (-fipa-bit-cp): Replace "ipa" with "interprocedural."
24574         (-fipa-vrp) New.
24576 2017-03-17  Tom de Vries  <tom@codesourcery.com>
24578         * gcov-dump.c (print_usage): Print bug_report_url.
24580 2017-03-17  Richard Biener  <rguenther@suse.de>
24582         PR middle-end/80050
24583         * genmatch.c (parser::next): Remove pointless check for CPP_EOF.
24584         (parser::peek): Likewise.
24586 2017-03-17  Richard Biener  <rguenther@suse.de>
24588         PR tree-optimization/80048
24589         * sese.c (free_sese_info): Properly release rename_map and
24590         copied_bb_map elements.
24592 2017-03-16  Alexandre Oliva <aoliva@redhat.com>
24594         * gimple-ssa-store-merging.c (struct imm_store_chain_info):
24595         Add linked-list forward and backlinks.  Insert on
24596         construction, remove on destruction.
24597         (class pass_store_merging): Add m_stores_head field.
24598         (pass_store_merging::terminate_and_process_all_chains):
24599         Iterate over m_stores_head list.
24600         (pass_store_merging::terminate_all_aliasing_chains):
24601         Likewise.
24602         (pass_store_merging::execute): Check for debug stmts first.
24603         Push new chains onto the m_stores_head stack.
24605 2017-03-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
24607         PR target/71294
24608         * config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Allow a
24609         SPLAT operation on ISA 2.07 64-bit systems that have direct move,
24610         but no MTVSRDD support, by doing MTVSRD and XXPERMDI.
24612 2017-03-16  Jeff Law  <law@redhat.com>
24614         PR tree-optimization/71437
24615         * tree-ssa-dom.c (dom_opt_dom_walker): Remove thread_across_edge
24616         member function.  Implementation moved into after_dom_children
24617         member function and into the threader's thread_outgoing_edges
24618         function.
24619         (dom_opt_dom_walker::after_dom_children): Simplify by moving
24620         some code into new thread_outgoing_edges.
24621         * tree-ssa-threadedge.c (thread_across_edge): Make static and simplify
24622         definition.  Simplify marker handling (do it here).   Assume we always
24623         have the available expression and the const/copies tables.
24624         (thread_outgoing_edges): New function extracted from tree-ssa-dom.c
24625         and tree-vrp.c
24626         * tree-ssa-threadedge.h (thread_outgoing_edges): Declare.
24627         * tree-vrp.c (equiv_stack): No longer file scoped.
24628         (vrp_dom_walker): New class.
24629         (vrp_dom_walker::before_dom_children): New member function.
24630         (vrp_dom_walker::after_dom_children): Likewise.
24631         (identify_jump_threads):  Setup domwalker.  Use it rather than
24632         walking edges in a random order by hand.  Simplify setup/finalization.
24633         (finalize_jump_threads): Remove.
24634         (vrp_finalize): Do not call identify_jump_threads here.
24635         (execute_vrp): Do it here instead and call thread_through_all_blocks
24636         here too.
24638         PR tree-optimization/71437
24639         * tree-ssa-dom.c (pfn_simplify): Add basic_block argument.  All
24640         callers changed.
24641         (simplify_stmt_for_jump_threading): Add basic_block argument.  All
24642         callers changed.
24643         (lhs_of_dominating_assert): Moved from here into tree-vrp.c.
24644         (dom_opt_dom_walker::thread_across_edge): Remove
24645         handle_dominating_asserts argument.  All callers changed.
24646         (record_temporary_equivalences_from_stmts_at_dest): Corresponding
24647         changes.  Remove calls to lhs_of_dominating_assert.  Other
24648         uses of handle_dominating_asserts turn into unconditional code
24649         (simplify_control_stmt_condition_1): Likewise.
24650         (simplify_control_stmt_condition): Likewise.
24651         (thread_through_normal_block, thread_across_edge): Likewise.
24652         * tree-ssa-threadedge.h (thread_across_edge): Corresponding changes.
24653         * tree-vrp.c (lhs_of_dominating_assert): Move here.  Return original
24654         object if it is not an SSA_NAME.
24655         (simplify_stmt_for_jump_threading): Call lhs_of_dominating_assert
24656         before calling into the VRP specific simplifiers.
24657         (identify_jump_threads): Remove handle_dominating_asserts
24658         argument.
24660 2017-03-16  Jakub Jelinek  <jakub@redhat.com>
24662         PR fortran/79886
24663         * tree-diagnostic.c (default_tree_printer): No longer static.
24664         * tree-diagnostic.h (default_tree_printer): New prototype.
24666 2017-03-16  Tamar Christina  <tamar.christina@arm.com>
24668         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>)
24669         Change ins into fmov.
24671 2017-03-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24673         * config/aarch64/iterators.md (h_con): Return "x" for V4HF and V8HF.
24674         * config/aarch64/aarch64-simd.md (*aarch64_fma4_elt_from_dup<mode>):
24675         Use h_con constraint for operand 1.
24676         (*aarch64_fnma4_elt_from_dup<mode>): Likewise.
24677         (*aarch64_mulx_elt_from_dup<mode>): Likewise for operand 2.
24679 2017-03-15  Jeff Law  <law@redhat.com>
24681         PR tree-optimization/71437
24682         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): New function.
24683         (record_temporary_equivalences): Use it.
24685         PR tree-optimization/71437
24686         * tree-ssa-dom.c (struct cond_equivalence): Moved from here into
24687         tree-ssa-scopedtables.
24688         (lookup_avail_expr, build_and_record_new_cond): Likewise.
24689         (record_conditions, record_cond, vuse_eq): Likewise.
24690         (record_edge_info): Adjust to API tweak of record_conditions.
24691         (simplify_stmt_for_jump_threading): Similarly for lookup_avail_expr.
24692         (record_temporary_equivalences, optimize_stmt): Likewise.
24693         (eliminate_redundant_computations): Likewise.
24694         (record_equivalences_from_stmt): Likewise.
24695         * tree-ssa-scopedtables.c: Include options.h and params.h.
24696         (vuse_eq): New function, moved from tree-ssa-dom.c
24697         (build_and_record_new_cond): Likewise.
24698         (record_conditions): Likewise.  Accept vector of conditions rather
24699         than edge_equivalence structure for first argument.
24700         for the first argument.
24701         (avail_exprs_stack::lookup_avail_expr): New member function, moved
24702         from tree-ssa-dom.c.
24703         (avail_exprs_stack::record_cond): Likewise.
24704         * tree-ssa-scopedtables.h (struct cond_equivalence): Moved here
24705         from tree-ssa-dom.c.
24706         (avail_exprs_stack): Add new member functions lookup_avail_expr
24707         and record_cond.
24708         (record_conditions): Declare.
24710 2017-03-15  Vladimir Makarov  <vmakarov@redhat.com>
24712         PR target/80017
24713         * lra-constraints.c (process_alt_operands): Increase reject for
24714         reloading an input/output operand.
24716 2017-03-15  Michael Meissner  <meissner@linux.vnet.ibm.com>
24718         PR target/79038
24719         * config/rs6000/rs6000.md (float<QHI:mode><IEEE128:mode>2): Define
24720         insns to convert from signed/unsigned char/short to IEEE 128-bit
24721         floating point.
24722         (floatuns<QHI:mode><IEEE128:mode>2): Likewise.
24724 2017-03-15  Uros Bizjak  <ubizjak@gmail.com>
24726         PR target/80019
24727         * config/i386/i386.c (ix86_vector_duplicate_value): Create
24728         subreg of inner mode for values already in registers.
24730 2017-03-15  Bernd Schmidt  <bschmidt@redhat.com>
24732         * config/c6x/c6x.c (hwloop_optimize): Handle case where the old
24733         iteration reg is used after the loop.
24735 2017-03-14  Martin Sebor  <msebor@redhat.com>
24737         PR tree-optimization/79800
24738         * gimple-ssa-sprintf.c (format_floating: Add argument.  Handle
24739         precision in negative-positive range.
24740         (format_floating): Call non-const overload with adjusted precision.
24742 2017-03-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
24744         PR target/79947
24745         * config/rs6000/rs6000.h (TARGET_FRSQRTES): Add check for
24746         -mpowerpc-gfxopt.
24748 2017-03-14  Martin Sebor  <msebor@redhat.com>
24750         PR middle-end/80020
24751         * builtin-attrs.def (ATTR_ALLOC_SIZE_2_NOTHROW_LIST): New macro.
24752         * builtins.def (aligned_alloc): Use it.
24754         PR c/79936
24755         * Makefile.in (GTFILES): Add calls.c.
24756         * calls.c: Include "gt-calls.h".
24758 2017-03-14  Bernd Schmidt  <bschmidt@redhat.com>
24760         PR rtl-optimization/79728
24761         * regs.h (struct target_regs): New field
24762         x_contains_allocatable_regs_of_mode.
24763         (contains_allocatable_regs_of_mode): New macro.
24764         * reginfo.c (init_reg_sets_1): Initialize it, and change
24765         contains_reg_of_mode so it includes global regs as well.
24766         * reload.c (push_reload): Use contains_allocatable_regs_of_mode
24767         rather than contains_regs_of_mode.
24769 2017-03-14  Martin Liska  <mliska@suse.cz>
24771         * doc/invoke.texi: Document options that can't be combined with
24772         -fcheck-pointer-bounds.
24774 2017-03-14  Martin Liska  <mliska@suse.cz>
24776         PR middle-end/79831
24777         * doc/invoke.texi (-Wchkp): Document the option.
24779 2017-03-14  Martin Liska  <mliska@suse.cz>
24781         * Makefile.in: Install gcov-dump.
24783 2017-03-14  Martin Liska  <mliska@suse.cz>
24785         * multiple_target.c (expand_target_clones): Bail out for
24786         an invalid attribute.
24788 2017-03-14  Richard Biener  <rguenther@suse.de>
24790         * alias.c (struct alias_set_entry): Pack properly.
24791         * cfgloop.h (struct loop): Likewise.
24792         * cse.c (struct set): Likewise.
24793         * ipa-utils.c (struct searchc_env): Likewise.
24794         * loop-invariant.c (struct invariant): Likewise.
24795         * lra-remat.c (struct cand): Likewise.
24796         * recog.c (struct change_t): Likewise.
24797         * rtl.h (struct address_info): Likewise.
24798         * symbol-summary.h (function_summary): Likewise.
24799         * tree-loop-distribution.c (struct partition): Likewise.
24800         * tree-object-size.c (struct object_size_info): Likewise.
24801         * tree-ssa-loop-ivopts.c (struct cost_pair): Likewise.
24802         * tree-ssa-threadupdate.c (struct ssa_local_info_t): Likewise.
24803         * tree-vect-data-refs.c (struct _vect_peel_info): Likewise.
24804         * tree-vect-slp.c (struct _slp_oprnd_info): Likewise.
24805         * tree-vect-stmts.c (struct simd_call_arg_info): Likewise.
24806         * tree-vectorizer.h (struct _loop_vec_info): Likewise.
24807         (struct _stmt_vec_info): Likewise.
24809 2017-03-14  Martin Liska  <mliska@suse.cz>
24811         PR target/79892
24812         * multiple_target.c (create_dispatcher_calls): Check that
24813         a target can create a function dispatcher.
24815 2017-03-14  Martin Liska  <mliska@suse.cz>
24817         PR lto/66295
24818         * multiple_target.c (expand_target_clones): Drop local.local
24819         flag for default implementation.
24821 2017-03-14  Richard Biener  <rguenther@suse.de>
24823         PR tree-optimization/80030
24824         * tree-vect-stmts.c (vectorizable_store): Plug memleak.
24826 2017-03-13  Kito Cheng  <kito.cheng@gmail.com>
24828         * config/riscv/riscv.c (riscv_emit_float_compare>: Use
24829         gcc_fallthrough() instead of __attribute__((fallthrough));
24831 2017-03-13  Gerald Pfeifer  <gerald@pfeifer.com>
24833         * doc/gcc.texi: Remove "up" link to (DIR).
24834         * doc/gccint.texi: Ditto.
24836 2017-03-13  Gerald Pfeifer  <gerald@pfeifer.com>
24838         * doc/install.texi (Specific) <avr>: Remove reference to
24839         binutils 2.13.
24841 2017-03-13  Jeff Law  <law@redhat.com>
24843         * config/riscv/riscv.c (riscv_emit_float_compare): Use fallthru
24844         attribute rather than comments.
24846         * config/pdp11/pdp11.md (movmemhi): Adjust operand numbers to
24847         match_scratch operand is highest.
24849 2017-03-13  Martin Liska  <mliska@suse.cz>
24851         PR middle-end/78339
24852         * ipa-pure-const.c (warn_function_noreturn): If the declarations
24853         is a CHKP clone, use original declaration.
24855 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
24857         * config/arc/arc.c (arc_init): Use multiplier whenever we have it.
24858         (arc_conditional_register_usage): Use a different allocation order
24859         when optimizing for size.
24860         * common/config/arc/arc-common.c (arc_option_optimization_table):
24861         Section anchors default on when optimizing for size.
24863 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
24865         * config/arc/arc.md (*tst_bitfield_tst): Fix pattern.
24867 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
24869         * config/arc/arc.c (arc_output_addsi): Emit code density adds.
24870         * config/arc/arc.md (cpu_facility): Add cd variant.
24871         (*movqi_insn): Add code density variant.
24872         (*movhi_insn): Likewise.
24873         (*movqi_insn): Likewise.
24874         (*addsi3_mixed): Likewise.
24875         (subsi3_insn): Likewise.
24877 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
24879         * config/arc/arc.md (movsi_cond_exec): Update constraint.
24881 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
24883         * config/arc/arc.c (arc_legitimize_pic_address): Handle PIC
24884         expressions with MINUS and UNARY ops.
24886 2017-03-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24888         PR target/79911
24889         * config/arm/neon.md (vec_sel_widen_ssum_lo<VQI:mode><VW:mode>3):
24890         Rename to...
24891         (vec_sel_widen_ssum_lo<mode><V_half>3): ... This. Avoid mismatch
24892         between vec_select and vector argument.
24893         (vec_sel_widen_ssum_hi<VQI:mode><VW:mode>3): Rename to...
24894         (vec_sel_widen_ssum_hi<mode><V_half>3): ... This. Likewise.
24895         (vec_sel_widen_usum_lo<VQI:mode><VW:mode>3): Rename to...
24896         (vec_sel_widen_usum_lo<mode><V_half>3): ... This.
24897         (vec_sel_widen_usum_hi<VQI:mode><VW:mode>3): Rename to...
24898         (vec_sel_widen_usum_hi<mode><V_half>3): ... This.
24900 2017-03-13  Richard Biener  <rguenther@suse.de>
24902         PR other/79991
24903         * params.def (vect-max-peeling-for-alignment): Fix typo.
24905 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
24907         * doc/install.texi (Specific) <mips-*-*>: Remove description of
24908         issue that only occurred with binutils below 2.18.
24910 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
24912         * doc/install.texi (Specific) <cris-axis-elf>: No longer
24913         refer to binutils 2.11/2.12 minimum.
24915 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
24917         * doc/install.texi (Specific) <powerpc-*-*>: Remove link to
24918         ftp.kernel.org and simplify binutils requirement.
24920 2017-03-11  Gerald Pfeifer  <gerald@pfeifer.com>
24922         * doc/invoke.texi (Warning Options): Fix spelling of link-time
24923         optimization.
24924         (Optimize Options): Ditto.  Also remove redundancy.
24926 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
24928         PR translation/79848
24929         * ipa-devirt.c (warn_types_mismatch): Simplify uses of "%<%s%>" to
24930         "%qs".
24931         * ipa-pure-const.c (suggest_attribute): Likewise.  Convert _
24932         to G_ to avoid double translation.
24934 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
24936         PR translation/79923
24937         * auto-profile.c (get_combined_location): Convert leading
24938         character of diagnostics to lower case and remove trailing period.
24939         (read_profile): Likewise for various diagnostics.
24940         * config/arm/arm.c (arm_option_override): Remove trailing period
24941         from various diagnostics.
24942         * config/msp430/msp430.c (msp430_expand_delay_cycles): Likewise.
24943         (msp430_expand_delay_cycles): Likewise.
24945 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
24947         PR target/79925
24948         * config/aarch64/aarch64.c (aarch64_validate_mcpu): Quote the
24949         full command-line argument, rather than just "str".
24950         (aarch64_validate_march): Likewise.
24951         (aarch64_validate_mtune): Likewise.
24953 2017-03-10  Bernd Schmidt  <bschmidt@redhat.com>
24955         PR rtl-optimization/78911
24956         * lra-assigns.c (must_not_spill_p): New function.
24957         (spill_for): Use it.
24959 2017-03-10  Jakub Jelinek  <jakub@redhat.com>
24961         PR tree-optimization/79981
24962         * tree-vrp.c (extract_range_basic): Handle IMAGPART_EXPR of
24963         ATOMIC_COMPARE_EXCHANGE ifn result.
24964         (stmt_interesting_for_vrp, vrp_visit_stmt): Handle
24965         IFN_ATOMIC_COMPARE_EXCHANGE.
24967 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
24969         PR driver/79875
24970         * opts.c (parse_sanitizer_options): Add missing question mark to
24971         "did you mean" message.
24973 2017-03-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24975         * config/rs6000/rs6000-builtin.def (VMULEUB_UNS): Remove orphaned
24976         built-in.
24977         (VMULEUH_UNS): Likewise.
24978         (VMULOUB_UNS): Likewise.
24979         (VMULOUH_UNS): Likewise.
24980         * config/rs6000/rs6000.c (builtin_function_type): Remove
24981         references to ALTIVEC_BUILTIN_VMUL[EO]U[BH]_UNS.
24983 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
24985         PR bootstrap/79952
24986         * read-rtl-function.c (function_reader::read_rtx_operand): Update
24987         x with result of extra_parsing_for_operand_code_0.
24988         (function_reader::extra_parsing_for_operand_code_0): Convert
24989         return type from void to rtx, returning x.  When reading
24990         SYMBOL_REF with SYMBOL_FLAG_HAS_BLOCK_INFO, reallocate x to the
24991         larger size containing struct block_symbol.
24993 2017-03-10  Segher Boessenkool  <segher@kernel.crashing.org>
24995         * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
24996         -mfloat128-hardware without -m64.
24998 2017-03-10  Will Schmidt <will_schmidt@vnet.ibm.com>
25000         PR target/79941
25001         * config/rs6000/rs6000.c (builtin_function_type): Add VMUL*U[HB]
25002         entries to the case statement that marks unsigned arguments to
25003         overloaded functions.
25005 2017-03-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25007         * config/rs6000/rs6000.c (rs6000_option_override_internal): Fix
25008         two typographic errors in the handling of TARGET_UPPER_REGS_DI.
25010 2017-03-10  Pat Haugen  <pthaugen@us.ibm.com>
25012         PR target/79907
25013         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Test
25014         TARGET_UPPER_REGS_DI when setting 'wi' constraint regclass.
25016 2017-03-10  Martin Liska  <mliska@suse.cz>
25018         PR target/65705
25019         PR target/69804
25020         * toplev.c (process_options): Enable MPX with LSAN and UBSAN.
25021         * tree-chkp.c (chkp_walk_pointer_assignments): Verify that
25022         FIELD != NULL.
25024 2017-03-10  Olivier Hainque  <hainque@adacore.com>
25026         * tree-switch-conversion (array_value_type): Start by resetting
25027         candidate type to it's main variant.
25029 2017-03-10  Jakub Jelinek  <jakub@redhat.com>
25031         PR rtl-optimization/79909
25032         * combine.c (try_combine): Use simplify_replace_rtx on individual
25033         CALL_INSN_FUNCTION_USAGE elements instead of replace_rtx on copy_rtx
25034         of the whole CALL_INSN_FUNCTION_USAGE.
25036         PR tree-optimization/79972
25037         * gimple-ssa-warn-alloca.c (alloca_call_type): Only call
25038         get_range_info on SSA_NAMEs.  Formatting fixes.
25040 2017-03-10  Richard Biener  <rguenther@suse.de>
25041             Jakub Jelinek  <jakub@redhat.com>
25043         PR tree-optimization/77975
25044         * tree-ssa-loop-niter.c (get_base_for): Allow phi argument from latch
25045         edge to be constant.
25046         (get_val_for): For constant x return it.  Formatting fix.
25047         (loop_niter_by_eval): Avoid pointless looping if the next iteration
25048         would use the same bases as the current one.
25050 2017-03-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25052         * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Use rotate
25053         instead of vec_select for V1TImode.
25054         * conifg/rs6000/vsx.md (VSX_LE): Remove mode iterator that is no
25055         longer needed.
25056         (VSX_LE_128): Add V1TI to this mode iterator.
25057         (*vsx_le_perm_load_<mode>): Change to use VSX_D mode iterator.
25058         (*vsx_le_perm_store_<mode>): Likewise.
25059         (pre-reload splitter for VSX stores): Likewise.
25060         (post-reload splitter for VSX stores): Likewise.
25061         (*vsx_xxpermdi2_le_<mode>): Likewise.
25062         (*vsx_lxvd2x2_le_<mode>): Likewise.
25063         (*vsx_stxvd2x2_le_<mode>): Likewise.
25065 2017-03-09  Michael Eager  <eager@eagercon.com>
25067         Correct failures with --enable-checking=yes,rtl.
25069         * config/microblaze/microblaze.c (microblaze_expand_shift):
25070         Replace GET_CODE test with CONST_INT_P and INTVAL test with
25071         test for const0_rtx.
25072         * config/microblaze/microblaze.md (ashlsi3_byone, ashrsi3_byone,
25073         lshrsi3_byone): Replace INTVAL with test for const1_rtx.
25075 2017-03-09  Richard Biener  <rguenther@suse.de>
25077         PR tree-optimization/79977
25078         * graphite-scop-detection.c (scop_detection::merge_sese):
25079         Handle the case of extra exits to blocks dominating the entry.
25081 2017-03-09  Toma Tabacu  <toma.tabacu@imgtec.com>
25083         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
25084         Document rdynamic.
25086 2017-03-09  Vladimir Makarov  <vmakarov@redhat.com>
25088         PR rtl-optimization/79949
25089         * lra-constraints.c (process_alt_operands): Check memory when
25090         trying to predict a cycle.  Print about the overall increase.
25092 2017-03-09  Richard Biener  <rguenther@suse.de>
25094         PR middle-end/79971
25095         * gimple-expr.c (useless_type_conversion_p): Preserve
25096         TYPE_SATURATING for fixed-point types.
25098 2017-03-09  Richard Biener  <rguenther@suse.de>
25100         PR ipa/79970
25101         * ipa-prop.c (ipa_modify_formal_parameters): Avoid changing
25102         alignment of BLKmode params.
25104 2017-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25106         PR target/79913
25107         * config/aarch64/iterators.md (VALL_F16_NO_V2Q): New mode iterator.
25108         (VALL_NO_V2Q): Likewise.
25109         (VDQF_DF): Delete.
25110         * config/aarch64/aarch64-simd.md
25111         (aarch64_dup_lane_<vswap_width_name><mode>): Use VALL_F16_NO_V2Q
25112         iterator.
25113         (*aarch64_simd_vec_copy_lane_<vswap_width_name><mode>): Use
25114         VALL_NO_V2Q mode iterator.
25115         (*aarch64_vgetfmulx<mode>): Use VDQF iterator.
25117 2017-03-09  Martin Liska  <mliska@suse.cz>
25119         PR tree-optimization/79631
25120         * tree-chkp-opt.c (chkp_is_constant_addr): Call
25121         tree_int_cst_sign_bit just for INTEGER constants.
25123 2017-03-09  Martin Liska  <mliska@suse.cz>
25125         PR target/65705
25126         PR target/69804
25127         * toplev.c (process_options): Disable -fcheck-pointer-bounds with
25128         sanitizers.
25130 2017-03-09  Marek Polacek  <polacek@redhat.com>
25132         PR c++/79672
25133         * tree.c (inchash::add_expr): Handle TREE_VEC.
25135 2017-03-09  Martin Liska  <mliska@suse.cz>
25137         PR ipa/79764
25138         (chkp_narrow_size_and_offset): New function.
25139         (chkp_parse_array_and_component_ref): Support BIT_FIELD_REF.
25140         (void chkp_parse_bit_field_ref): New function.
25141         (chkp_make_addressed_object_bounds): Add case for BIT_FIELD_REF.
25142         (chkp_process_stmt): Use chkp_parse_bit_field_ref.
25144 2017-03-09  Martin Liska  <mliska@suse.cz>
25146         PR ipa/79761
25147         * tree-chkp.c (chkp_get_bound_for_parm): Get bounds for a param.
25148         (chkp_find_bounds_1): Remove gcc_unreachable.
25150 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
25152         PR sanitizer/79944
25153         * asan.c (get_mem_refs_of_builtin_call): For BUILT_IN_ATOMIC* and
25154         BUILT_IN_SYNC*, determine the access type from the size suffix and
25155         always build a MEM_REF with that type.  Handle forgotten
25156         BUILT_IN_SYNC_FETCH_AND_NAND_16 and BUILT_IN_SYNC_NAND_AND_FETCH_16.
25158         PR target/79932
25159         * config/i386/avx512vlintrin.h (_mm256_cmpge_epi32_mask,
25160         _mm256_cmpge_epi64_mask, _mm256_cmpge_epu32_mask,
25161         _mm256_cmpge_epu64_mask, _mm256_cmple_epi32_mask,
25162         _mm256_cmple_epi64_mask, _mm256_cmple_epu32_mask,
25163         _mm256_cmple_epu64_mask, _mm256_cmplt_epi32_mask,
25164         _mm256_cmplt_epi64_mask, _mm256_cmplt_epu32_mask,
25165         _mm256_cmplt_epu64_mask, _mm256_cmpneq_epi32_mask,
25166         _mm256_cmpneq_epi64_mask, _mm256_cmpneq_epu32_mask,
25167         _mm256_cmpneq_epu64_mask, _mm256_mask_cmpge_epi32_mask,
25168         _mm256_mask_cmpge_epi64_mask, _mm256_mask_cmpge_epu32_mask,
25169         _mm256_mask_cmpge_epu64_mask, _mm256_mask_cmple_epi32_mask,
25170         _mm256_mask_cmple_epi64_mask, _mm256_mask_cmple_epu32_mask,
25171         _mm256_mask_cmple_epu64_mask, _mm256_mask_cmplt_epi32_mask,
25172         _mm256_mask_cmplt_epi64_mask, _mm256_mask_cmplt_epu32_mask,
25173         _mm256_mask_cmplt_epu64_mask, _mm256_mask_cmpneq_epi32_mask,
25174         _mm256_mask_cmpneq_epi64_mask, _mm256_mask_cmpneq_epu32_mask,
25175         _mm256_mask_cmpneq_epu64_mask, _mm_cmpge_epi32_mask,
25176         _mm_cmpge_epi64_mask, _mm_cmpge_epu32_mask, _mm_cmpge_epu64_mask,
25177         _mm_cmple_epi32_mask, _mm_cmple_epi64_mask, _mm_cmple_epu32_mask,
25178         _mm_cmple_epu64_mask, _mm_cmplt_epi32_mask, _mm_cmplt_epi64_mask,
25179         _mm_cmplt_epu32_mask, _mm_cmplt_epu64_mask, _mm_cmpneq_epi32_mask,
25180         _mm_cmpneq_epi64_mask, _mm_cmpneq_epu32_mask, _mm_cmpneq_epu64_mask,
25181         _mm_mask_cmpge_epi32_mask, _mm_mask_cmpge_epi64_mask,
25182         _mm_mask_cmpge_epu32_mask, _mm_mask_cmpge_epu64_mask,
25183         _mm_mask_cmple_epi32_mask, _mm_mask_cmple_epi64_mask,
25184         _mm_mask_cmple_epu32_mask, _mm_mask_cmple_epu64_mask,
25185         _mm_mask_cmplt_epi32_mask, _mm_mask_cmplt_epi64_mask,
25186         _mm_mask_cmplt_epu32_mask, _mm_mask_cmplt_epu64_mask,
25187         _mm_mask_cmpneq_epi32_mask, _mm_mask_cmpneq_epi64_mask,
25188         _mm_mask_cmpneq_epu32_mask, _mm_mask_cmpneq_epu64_mask): Move
25189         definitions outside of __OPTIMIZE__ guarded section.
25191         PR target/79932
25192         * config/i386/avx512bwintrin.h (_mm512_packs_epi32,
25193         _mm512_maskz_packs_epi32, _mm512_mask_packs_epi32,
25194         _mm512_packus_epi32, _mm512_maskz_packus_epi32,
25195         _mm512_mask_packus_epi32): Move definitions outside of __OPTIMIZE__
25196         guarded section.
25198 2017-03-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25200         * config/s390/vx-builtins.md ("vfee<mode>", "vfeez<mode>")
25201         ("vfenez<mode>"): Add missing constraints.
25203 2017-03-08  Martin Sebor  <msebor@redhat.com>
25205         PR target/79928
25206         * config/nds32/nds32.c (nds32_option_override):
25207         Fix misspelled diagnostic.
25209 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
25211         PR c/79940
25212         * gimplify.c (gimplify_omp_for): Replace index var in outer
25213         taskloop statement with an artificial variable and add
25214         OMP_CLAUSE_PRIVATE clause for it.
25216 2017-03-08  Richard Biener  <rguenther@suse.de>
25218         PR tree-optimization/79955
25219         * tree-ssa-uninit.c (warn_uninitialized_vars): Do not warn
25220         for accesses that are completely outside of the variable.
25222 2017-03-08  Andrew Haley  <aph@redhat.com>
25224         PR tree-optimization/79943
25225         * tree-ssa-loop-split.c (compute_new_first_bound): When
25226         calculating the new upper bound, (END-BEG) should be added, not
25227         subtracted.
25229 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
25231         * config/avr/avr.md (setmemhi): Make sure match_dup
25232         operand number comes before match_scratch.
25234 2017-03-08  Richard Biener  <rguenther@suse.de>
25236         PR tree-optimization/79920
25237         * tree-vect-slp.c (vect_create_mask_and_perm): Remove and inline
25238         with ncopies == 1 to ...
25239         (vect_transform_slp_perm_load): ... here.  Properly compute
25240         all element loads by iterating VF times over the group.  Do
25241         not handle ncopies (computed in a broken way) in
25242         vect_create_mask_and_perm.
25244 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
25246         PR sanitizer/79904
25247         * internal-fn.c (expand_vector_ubsan_overflow): If arg0 or arg1
25248         is a uniform vector, use uniform_vector_p return value instead of
25249         building ARRAY_REF on folded VIEW_CONVERT_EXPR to array type.
25251 2017-03-07  Marek Polacek  <polacek@redhat.com>
25253         PR middle-end/79809
25254         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Use HOST_WIDE_INT.
25255         (alloca_call_type): Likewise.
25257 2017-03-07  Martin Liska  <mliska@suse.cz>
25259         * gcov.c (process_args): Put comment to correct location.
25261 2017-03-07  Martin Liska  <mliska@suse.cz>
25263         PR middle-end/68270
25264         * tree-chkp.c (chkp_may_narrow_to_field): Add new argument ref.
25265         Use array_at_struct_end_p instead of DECL_CHAIN (field).
25266         (chkp_narrow_bounds_for_field): Likewise.
25267         (chkp_parse_array_and_component_ref): Pass one more argument to
25268         call.
25270 2017-03-07  Richard Biener  <rguenther@suse.de>
25272         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve
25273         preheaders.
25275 2017-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
25277         * config/i386/i386.c (ix86_local_alignment): Align most aggregates
25278         of 16 bytes and more to 16 bytes, not those of 16 bits and more.
25280 2017-03-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25282         PR c/79855
25283         * params.def (PARAM_STORE_MERGING_ALLOW_UNALIGNED): Add full stop
25284         to end of description.
25285         (PARAM_MAX_STORES_TO_MERGE): Likewise.
25287 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
25289         PR rtl-optimization/79901
25290         * config/i386/sse.md (*avx512bw_<code><mode>3<mask_name>): Renamed to
25291         ...
25292         (*avx512f_<code><mode>3<mask_name>): ... this.
25293         (<code><mode>3 with maxmin code iterator): Use VI8_AVX2_AVX512F
25294         iterator instead of VI8_AVX2_AVX512BW.
25296         PR rtl-optimization/79901
25297         * expr.c (expand_expr_real_2): For vector MIN/MAX, if there is no
25298         min/max expander, expand it using expand_vec_cond_expr.
25300         PR sanitizer/79897
25301         * ubsan.c (ubsan_encode_value): Call mark_addressable on the
25302         temporary.
25304 2017-03-06  Jakub Jelinek  <jakub@redhat.com>
25306         PR c++/79821
25307         * dwarf2out.h (dw_vec_const): Change array type from unsigned char *
25308         to void * for PCH reasons.
25309         * dwarf2out.c (output_loc_operands, output_die): Cast
25310         v.val_vec.array to unsigned char *.
25312 2017-03-06  John David Anglin  <danglin@gcc.gnu.org>
25314         PR target/77850
25315         * config/pa/pa-64.h (PAD_VARARGS_DOWN): Don't pad down complex and
25316         vector types.
25318 2017-03-06  Vladimir Makarov  <vmakarov@redhat.com>
25320         PR rtl-optimization/79571
25321         * lra-constraints.c (process_alt_operands): Calculate static
25322         reject and subtract it from overall when only addresses will be
25323         reloaded.
25325 2017-03-06  Julia Koval  <julia.koval@intel.com>
25327         PR target/79793
25328         * config/i386/i386.c (ix86_minimum_incoming_stack_boundary): Set
25329         incoming stack boundary to 128 for 64-bit targets.
25331 2017-03-06  Richard Biener  <rguenther@suse.de>
25333         PR tree-optimization/79894
25334         * tree-vectorizer.c (vectorize_loops): Set loop_vectorized_call
25335         to NULL after folding it.
25337 2017-03-06  Richard Biener  <rguenther@suse.de>
25339         PR tree-optimization/79824
25340         * tree-vect-stmts.c (get_group_load_store_type): Fix alignment
25341         check disabling peeling for gaps.
25343 2017-03-06  Toma Tabacu  <toma.tabacu@imgtec.com>
25345         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
25346         attributes): Document gettimeofday.
25348 2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>
25350         * config/s390/s390.c (s390_option_override_internal): Set
25351         PARAM_MIN_VECT_LOOP_BOUND
25353 2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>
25355         * config/s390/s390.c (s390_asm_output_function_label): Use nopr %r0.
25356         * config/s390/s390.md: Likewise.
25358 2017-03-06  Jakub Jelinek  <jakub@redhat.com>
25360         PR target/79812
25361         * config/i386/sse.md (VI8F_256_512): Remove mode iterator.
25362         (<avx2_avx512>_perm<mode>): Rename to ...
25363         (avx2_perm<mode>): ... this.  Use VI8F_256 iterator instead
25364         of VI8F_256_512.
25365         (<avx512>_perm<mode>_mask): Rename to ...
25366         (avx512vl_perm<mode>_mask): ... this.  Use VI8F_256 iterator instead
25367         of VI8F_256_512.
25368         (<avx2_avx512>_perm<mode>_1<mask_name>): Rename to ...
25369         (avx2_perm<mode>_1<mask_name): ... this.  Use VI8F_256 iterator
25370         instead of VI8F_256_512.
25371         (avx512f_perm<mode>): New define_expand.
25372         (avx512f_perm<mode>_mask): Likewise.
25373         (avx512f_perm<mode>_1<mask_name>): New define_insn.
25374         (<avx512>_vec_dup<mode>_1): Fix up vec_select mode.
25376 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
25378         * config/mips/mips-msa.md (msa_fmax_a_<msafmt>, msa_fmin_a_<msafmt>,
25379         msa_max_a_<msafmt>, msa_min_a_<msafmt>): Introduce mode interator for
25380         if_then_else.
25381         (smin<mode>3, smax<mode>3): Change operand print code from 'B' to 'E'.
25383 2017-03-06  Martin Liska  <mliska@suse.cz>
25385         PR sanitize/79783
25386         * asan.c (asan_expand_poison_ifn): Do not expand ASAN_POISON
25387         when having a SSA NAME w/o VAR_DECL assigned to it.
25389 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
25391         * config/mips/mips-msa.md (msa_dotp_<su>_d, msa_dpadd_<su>_d,
25392         msa_dpsub_<su>_d): Fix MODE for vec_select.
25394 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
25396         * config/mips/mips.c (mips_gen_const_int_vector): Change type of last
25397         argument.
25398         * config/mips/mips-protos.h (mips_gen_const_int_vector): Likewise.
25400 2017-03-06  Richard Biener  <rguenther@suse.de>
25402         * lto-streamer.c (lto_check_version): Use %qs in diagnostics.
25403         * plugin.c (register_plugin_info): Likewise.
25404         * tree-chkp.c (chkp_make_static_const_bounds): Likewise.
25406 2017-03-05  Jakub Jelinek  <jakub@redhat.com>
25408         * config/i386/sse.md (sse_storehps, sse_storelps,
25409         avx_<castmode><avxsizesuffix>_<castmode>,
25410         avx512f_<castmode><avxsizesuffix>_<castmode>,
25411         avx512f_<castmode><avxsizesuffix>_256<castmode>): Require
25412         in condition that at least one operand is not a MEM.
25414 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
25416         PR middle-end/79805
25417         * internal-fn.def (ATOMIC_BIT_TEST_AND_SET, ATOMIC_BIT_TEST_AND_RESET,
25418         ATOMIC_BIT_TEST_AND_COMPLEMENT, ATOMIC_COMPARE_EXCHANGE): Remove
25419         ECF_NOTHROW.
25420         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Set
25421         gimple_call_nothrow_p flag based on whether original builtin can throw.
25422         If it can, emit following stmts on the fallthrough edge.
25423         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Similarly, except
25424         don't create new bb if inserting just debug stmts on the edge, try to
25425         insert them on the fallthru bb or just reset debug stmts.
25427 2017-03-03  Segher Boesssenkool  <segher@kernel.crashing.org>
25429         PR target/43763
25430         * config/rs6000/rs6000.c (rs6000_final_prescan_insn): Save and
25431         restore recog_data (including the operand rtxes inside it) around
25432         the call to get_insn_template.
25434 2017-03-03  Martin Sebor  <msebor@redhat.com>
25436         PR tree-optimization/79699
25437         * context.c (context::~context): Free MPFR caches to avoid
25438         a memory leak on program exit.
25440 2017-03-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25442         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
25443         Use wide_int::ulow () instead of .elt (0).
25445 2017-03-03  Uros Bizjak  <ubizjak@gmail.com>
25447         * config/i386/i386.md (*pushtf): Change *roF constraint to *roC.
25448         (*pushxf): Limit oF constraint to 32bit targets and add oC
25449         constraint for 64bit targets.
25450         (pushxf splitter): Use PUSH_ROUNDING to calculate stack adjustment.
25451         (*pushdf): Change rmF constraint to rmC.
25453 2017-03-03  Martin Liska  <mliska@suse.cz>
25455         * tree-ssa-loop-prefetch.c (pass_loop_prefetch::execute):
25456         Remove unused variable.
25458 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
25460         PR target/79807
25461         * config/i386/i386.c (ix86_expand_multi_arg_builtin): If target
25462         is a memory operand, increase num_memory.
25463         (ix86_expand_args_builtin): Likewise.
25465 2017-03-03  Jan Hubicka  <jh@suse.cz>
25467         PR lto/79760
25468         * ipa-devirt.c (maybe_record_node): Properly handle
25469         __cxa_pure_virtual visibility.
25471 2017-03-03  Martin Liska  <mliska@suse.cz>
25473         PR tree-optimization/79803
25474         * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Remove
25475         assert.
25476         (pass_loop_prefetch::execute): Disabled optimization if an
25477         assumption about L1 cache size is not met.
25479 2017-03-03  Martin Liska  <mliska@suse.cz>
25481         PR rtl-optimization/79574
25482         * gcse.c (struct gcse_expr): Use HOST_WIDE_INT instead of int.
25483         (hash_scan_set): Likewise.
25484         (dump_hash_table): Likewise.
25485         (hoist_code): Likewise.
25487 2017-03-03  Richard Biener  <rguenther@suse.de>
25489         * fixed-value.c (fixed_from_string): Restore use of elt (1)
25490         in place of uhigh ().
25491         (fixed_convert_from_real): Likewise.
25493 2017-03-03  Uros Bizjak  <ubizjak@gmail.com>
25495         PR target/79514
25496         * config/i386/i386.md (*pushxf_rounded): Use Pmode instead of DImode.
25498 2017-03-03  Richard Biener  <rguenther@suse.de>
25500         PR middle-end/79818
25501         * match.pd ( X +- C1 CMP C2 -> X CMP C2 -+ C1): Add missing
25502         TYPE_OVERFLOW_UNDEFINED check.
25504 2017-03-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25506         * config/rs6000/vector.md (vector_ne_<mode>_p): Correct operand
25507         numbers.
25508         (vector_ae_<mode>_p): Likewise.
25509         (vector_nez_<mode>_p): Likewise.
25510         (vector_ne_v2di_p): Likewise.
25511         (vector_ae_v2di_p): Likewise.
25512         (vector_ne_<mode>_p): Likewise.
25513         * config/rs6000/vsx.md (vsx_tsqrt<mode>2_fg): Correct operand
25514         numbers.
25515         (vsx_tsqrt<mode>2_fe): Likewise.
25517 2017-03-02  Uros Bizjak  <ubizjak@gmail.com>
25519         PR target/79514
25520         * config/i386/i386.md (*pushxf_rounded): New insn_and_split pattern.
25522 2017-03-02  Jakub Jelinek  <jakub@redhat.com>
25524         PR rtl-optimization/79780
25525         * cprop.c (one_cprop_pass): When second and further conditional trap
25526         in a single basic block is turned into an unconditional trap, turn it
25527         into a deleted note to avoid RTL verification failures.
25529 2017-03-02  Richard Biener  <rguenther@suse.de>
25531         * fold-const.c (const_binop): Use ulow () instead of elt (0).
25533 2017-03-02  Richard Biener  <rguenther@suse.de>
25535         PR tree-optimization/79345
25536         PR c++/42000
25537         * tree-ssa-alias.c (walk_aliased_vdefs_1): Take a limit
25538         param and abort the walk, returning -1 if it is hit.
25539         (walk_aliased_vdefs): Take a limit param and pass it on.
25540         * tree-ssa-alias.h (walk_aliased_vdefs): Add a limit param,
25541         defaulting to 0 and return a signed int.
25542         * tree-ssa-uninit.c (struct check_defs_data): New struct.
25543         (check_defs): New helper.
25544         (warn_uninitialized_vars): Use walk_aliased_vdefs to warn
25545         about uninitialized memory.
25546         * fixed-value.c (fixed_from_string): Use ulow/uhigh to avoid
25547         bogus uninitialized warning.
25548         (fixed_convert_from_real): Likewise.
25550 2017-03-02  Bin Cheng  <bin.cheng@arm.com>
25552         PR tree-optimization/66768
25553         * tree-ssa-loop-ivopts.c (find_interesting_uses_address): Skip addr
25554         iv_use if base object can't be determined.
25556 2017-03-02  Jakub Jelinek  <jakub@redhat.com>
25558         PR tree-optimization/79345
25559         * gensupport.h (struct pattern_stats): Add min_scratch_opno field.
25560         * gensupport.c (get_pattern_stats_1) <case MATCH_SCRATCH>: Update it.
25561         (get_pattern_stats): Initialize it.
25562         * genemit.c (gen_expand): Verify match_scratch numbers come after
25563         match_operand/match_dup numbers.
25564         * config/i386/i386.md (<s>mul<mode>3_highpart): Swap match_dup and
25565         match_scratch numbers.
25566         * config/i386/sse.md (avx2_gathersi<mode>, avx2_gatherdi<mode>):
25567         Likewise.
25568         * config/s390/s390.md (trunctdsd2): Likewise.
25570 2017-03-02  Richard Biener  <rguenther@suse.de>
25572         * wide-int.h (wide_int_storage::operator=): Implement in terms
25573         of wi::copy.
25575 2017-03-02  Richard Biener  <rguenther@suse.de>
25577         PR tree-optimization/79777
25578         * tree-ssa-pre.c (eliminate_insert): Give up if we simplify
25579         the to insert expression to sth existing.
25581 2017-03-01  Martin Sebor  <msebor@redhat.com>
25583         PR middle-end/79692
25584         * gimple-ssa-sprintf.c
25585         (directive::known_width_and_precision): New function.
25586         (format_integer): Use it.
25587         (get_mpfr_format_length): Consider the full range of precision
25588         when computing %g output with the # flag.  Set the likely byte
25589         count to 3 rather than 1 when precision is indeterminate.
25590         (format_floating): Correct the lower bound of precision.
25592 2017-03-01  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25594         * doc/invoke.texi: Document default code model for 64-bit Linux.
25596 2017-03-01  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25598         PR target/79752
25599         * config/rs6000/rs6000.md (peephole2 for udiv/umod): Should emit
25600         udiv rather than div since input pattern is unsigned.
25602 2017-03-01  Uros Bizjak  <ubizjak@gmail.com>
25604         * config/i386/i386.c (print_reg): Warn for values of
25605         unsupported size in integer register.
25607 2017-03-01  Michael Meissner  <meissner@linux.vnet.ibm.com>
25609         PR target/79439
25610         * config/rs6000/predicates.md (current_file_function_operand): Do
25611         not allow self calls to be local if the function is replaceable.
25613 2017-03-01  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25615         PR target/79395
25616         * config/rs6000/altivec.h (vec_ctz and others): Change the
25617         preprocessor macro that controls conditional compilation from
25618         _ARCH_PWR9 to __POWER9_VECTOR__.
25619         (vec_all_ne): Change parameterization of __altivec_scalar_pred
25620         macro expansion under preprocessor #ifdef __POWER9_VECTOR__
25621         control (instead of _ARCH_PWR9 control) so that template
25622         definition uses power9-specific function.
25623         (vec_any_eq): Likewise.
25624         (vec_all_ne): Change macro definition to use a power9-specific
25625         expansion under #ifdef __POWER9_VECTOR__ control (instead of
25626         _ARCH_PWR9 control).
25627         (vec_any_eq) Likewise.
25628         * config/rs6000/rs6000-builtin.def (CMPNEF): Remove BU_P9V_AV_2
25629         expansion for CMPNEF to remove support for xvcmpnesp instruction.
25630         (CMPNED): Remove BU_P9V_AV2 expansion for CMPNED to remove
25631         support for xvcmpnedp instruction.
25632         (VCMPNEB_P): Replace BU_P9V_AV_P macro expansion with BU_P9V_AV_2
25633         macro expansion so that Power9 implementation of vec_all_ne does
25634         not use the AltiVec predicate framework.
25635         (VCMPNEH_P): Likewise.
25636         (VCMPNEW_P): Likewise.
25637         (VCMPNED_P): Likewise.
25638         (VCMPNEFP_P): Likewise.
25639         (VCMPNEDP_P): Likewise.
25640         (VCMPAEB_P): Add BU_P9V_AV_2 macro expansion to change
25641         implementation of vec_any_eq to not use AltiVec predicate
25642         framework.
25643         (VCMPAEH_P): Likewise.
25644         (VCMPAEW_P): Likewise.
25645         (VCMPAED_P): Likewise.
25646         (VCMPAEFP_P): Likewise.
25647         (VCMPAEDP_P): Likewise.
25648         (VCMPNE_P): Replace BU_P9V_OVERLOAD_P macro expansion with
25649         BU_P9V_OVERLOAD_2 so that Power9 implementation of vec_all_ne does
25650         not use the AltiVec predicate framework.
25651         (VCMPAE_P): Add BU_P9V_OVERLOAD_2 macro to change implementation
25652         of vec_any_eq to not use AltiVec predicate framework.
25653         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
25654         support for predefined __POWER9_VECTOR__ macro to indicate that
25655         Power9 instruction selection is enabled.
25656         (altivec_overloaded_builtins): Remove extraneous
25657         ALTIVEC_BUILTIN_VEC_CMPNE entry for overloaded
25658         function argument types RS6000_BTI_bool_V16QI and
25659         RS6000_BTI_bool_V16QI.  Remove erroneous ALTIVEC_BUILTIN_VEC_CMPNE
25660         entry for overloaded function argument types RS6000_BTI_bool_V4SI
25661         andRS6000_BTI_bool_V4SI, mapping to P9V_BUILTIN_CMPNEB.  Remove
25662         two entries mapping to P9V_BUITIN_CMPNED and one entry mapping to
25663         P9V_BUILTIN_CMPNEF to force use of instructions not specific to
25664         Power9 for implementations of vec_cmpne.  Change the signature for
25665         all definitions of the overloaded P9V_BUILTIN_VEC_CMPNE_P function
25666         (representing vec_all_ne) to remove the previously described first
25667         argument of type RS6000_BTI_INTSI, as this was an artifact of
25668         reliance on the AltiVec predicate framework, which is no longer
25669         used in the implementation of these functions.  Add
25670         P9V_BUILTIN_VEC_VCMPAE_P entries (representing the vec_anyeq
25671         function) to match all of the P9V_BUILTIN_VEC_VCMNE_P entries
25672         since, unlike the AltiVec predicate framework implementation, we
25673         do not share function descriptors between vec_alle and vec_anyeq.
25674         (altivec_resolve_overloaded_builtin): Add SFmode and DFmode to the
25675         set of modes that receive special treatment even when
25676         TARGET_P9_VECTOR is true.  The special treatment emits code that
25677         does not depend on Power9 instructions.
25678         * config/rs6000/vector.md (vector_ne_<mode>_p): Change this
25679         define_expand to not rely on AltiVec predicate framework.
25680         (vector_ae_<mode>p): New define_expand to represent vec_any_eq
25681         function.
25682         (vector_ne_v2di_p): Change this define_expand to not rely on
25683         AltiVec predicate framework.
25684         (vector_ae_v2di_p): New define_expand to represent vec_any_eq
25685         function.
25686         (vector_ne_<mode>_p): Change this define_expand to not rely on
25687         AltiVec predicate framework.
25688         (vector_ae_<mode>p): New define_expand to represent vec_any_eq
25689         function.
25690         * config/rs6000/vsx.md (*vsx_ne_<mode>_p): For modes VSX_EXTRACT_I
25691         (V16QI, V8HI, V4SI), correct a typo in the code emitted for this
25692         define_insn pattern.
25693         (*vsx_ne_<mode>_p): For modes VSX_F (V4SF and V2DF), remove this
25694         define_insn pattern because the xvcmpne<VSs>. instruction is not
25695         supported.
25696         (vcmpne<VSs>): Remove this define_insn because xvcmpne<VSs>
25697         instruction is not supported.
25699 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
25701         * config/nvptx/nvptx.c: Include intl.h.
25703 2017-03-01  Martin Jambor  <mjambor@suse.cz>
25705         PR lto/78140
25706         * ipa-prop.h (ipa_bits): Removed field known.
25707         (ipa_jump_func): Removed field vr_known.  Changed fields bits and m_vr
25708         to pointers.  Adjusted their comments to warn about their sharing.
25709         (ipcp_transformation_summary): Change bits to a vector of pointers.
25710         (ipa_check_create_edge_args): Moved to ipa-prop.c, declare.
25711         (ipa_get_ipa_bits_for_value): Declare.
25712         * tree-vrp.h (value_range): Mark as GTY((for_user)).
25713         * ipa-prop.c (ipa_bit_ggc_hash_traits): New.
25714         (ipa_bits_hash_table): Likewise.
25715         (ipa_vr_ggc_hash_traits): Likewise.
25716         (ipa_vr_hash_table): Likewise.
25717         (ipa_print_node_jump_functions_for_edge): Adjust for bits and m_vr
25718         being pointers and vr_known being removed.
25719         (ipa_set_jf_unknown): Likewise.
25720         (ipa_get_ipa_bits_for_value): New function.
25721         (ipa_set_jfunc_bits): Likewise.
25722         (ipa_get_value_range): New overloaded functions.
25723         (ipa_set_jfunc_vr): Likewise.
25724         (ipa_compute_jump_functions_for_edge): Use the above functions to
25725         construct bits and vr parts of jump functions.
25726         (ipa_check_create_edge_args): Move here from ipa-prop.h, also allocate
25727         ipa_bits_hash_table and ipa_vr_hash_table if they do not already
25728         exist.
25729         (ipcp_grow_transformations_if_necessary): Also allocate
25730         ipa_bits_hash_table and ipa_vr_hash_table if they do not already
25731         exist.
25732         (ipa_node_params_t::duplicate): Do not copy bits, just pointers to
25733         them.  Fix too long lines.
25734         (ipa_write_jump_function): Adjust for bits and m_vr being pointers and
25735         vr_known being removed.
25736         (ipa_read_jump_function): Use new setter functions to construct bits
25737         and vr parts of jump functions or set them to NULL.
25738         (write_ipcp_transformation_info): Adjust for bits being pointers.
25739         (read_ipcp_transformation_info): Likewise.
25740         (ipcp_update_bits): Likewise.  Fix excessively long lines a trailing
25741         space.
25742         Include gt-ipa-prop.h.
25743         * ipa-cp.c (propagate_bits_across_jump_function): Adjust for bits
25744         being pointers.
25745         (ipcp_store_bits_results): Likewise.
25746         (propagate_vr_across_jump_function): Adjust for m_vr being a pointer.
25747         Do not write to existing jump functions but use a temporary instead.
25749 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
25751         PR c++/79681
25752         * fold-const.c (make_bit_field_ref): If orig_inner is COMPONENT_REF,
25753         attempt to use its first operand as BIT_FIELD_REF base.
25755 2017-03-01  Richard Biener  <rguenther@suse.de>
25757         PR middle-end/79721
25758         * tree-chrec.c (chrec_evaluate): Perform computation of Newtons
25759         interpolating formula in wrapping arithmetic.
25760         (chrec_apply): Convert chrec_evaluate return value to wanted type.
25762 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
25764         PR tree-optimization/79734
25765         * tree-vect-generic.c (expand_vector_condition): Optimize
25766         AVX512 vector boolean VEC_COND_EXPRs into bitwise operations.
25767         Handle VEC_COND_EXPR where comparison has different inner width from
25768         type's inner width.
25770 2017-02-28  Sandra Loosemore  <sandra@codesourcery.com>
25772         * doc/invoke.texi (ARC Options): Copy-edit to fix punctuation,
25773         markup, and similar issues.  Remove @opindex entries for things
25774         that aren't options.  Add missing -mmpy-option entries.
25776 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
25778         PR tree-optimization/79737
25779         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): If bitlen is
25780         a multiple of BITS_PER_UNIT and !BYTES_BIG_ENDIAN, clear
25781         tmpbuf[byte_size - 1].  Call natice_encode_expr with byte_size - 1
25782         instead of byte_size.  Formatting fix.
25783         (shift_bytes_in_array_right): Formatting fix.
25785 2017-02-28  Eric Botcazou  <ebotcazou@adacore.com>
25787         PR target/79749
25788         * config/sparc/sparc.c (sparc_frame_pointer_required): Add missing
25789         condition on optimize for the leaf function test.
25791 2017-02-28  Martin Liska  <mliska@suse.cz>
25793         PR lto/79625
25794         * read-rtl-function.c (function_reader::handle_unknown_directive):
25795         Bail out when one uses -flto.
25797 2017-02-28  Martin Liska  <mliska@suse.cz>
25799         * common.opt: Replace space with tabular for options of <number>
25800         type.
25801         * config/i386/i386.opt: Show <number> value for
25802         -mlarge-data-threshold.
25803         * opts.c (print_filtered_help): Do not display number in hexadecimal
25804         format.
25806 2017-02-28  Martin Liska  <mliska@suse.cz>
25808         * common.opt: Fix --help=option -Q for options which are of
25809         an enum type.
25811 2017-02-28  Uros Bizjak  <ubizjak@gmail.com>
25813         * config/i386/i386.c (print_reg): Error out for values
25814         of 8-bit size in invalid integer register.
25816 2017-02-28  Martin Sebor  <msebor@redhat.com>
25818         PR tree-optimization/79691
25819         * passes.def (pass_all_optimizations_g): Enable pass_sprintf_length.
25821 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
25823         PR target/79729
25824         * config/i386/i386.c (ix86_print_operand) <case 'R'>: Replace
25825         gcc_unreachable with output_operand_lossage.
25827 2017-02-28  Richard Biener  <rguenther@suse.de>
25829         PR tree-optimization/79740
25830         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Allow redundant
25831         inserts.
25832         (visit_nary_op): Insert the nary into the hashtable if we
25833         pattern-matched sth.
25834         * tree-ssa-pre.c (eliminate_insert): Robustify.
25836 2017-02-28  Richard Biener  <rguenther@suse.de>
25838         PR middle-end/79731
25839         * fold-const.c (decode_field_reference): Reject out-of-bound
25840         accesses.
25842 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
25844         * config/i386/i386.c: Include intl.h.
25845         (ix86_option_override_internal): Use cond ? G_("...") : G_("...")
25846         instead of just cond ? "..." : "...".
25847         * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Likewise.
25848         * coverage.c (read_counts_file): Likewise.
25849         * omp-offload.c: Include intl.h.
25850         (oacc_loop_fixed_partitions): Use cond ? G_("...") : G_("...") instead
25851         of just cond ? "..." : "...".
25852         * gcov.c (read_count_file): Use cond ? N_("...") : N_("...") instead
25853         of just cond ? "..." : "...".
25855 2017-02-28  Richard Earnshaw  <rearnsha@arm.com>
25857         PR target/79742
25858         * config/arm/parsecpu.awk (gen_data): Set tuning target to 'tune for'
25859         entry, if present.
25860         * config/arm/arm-cpus.in (cortex-m0plus.small-multiply): Correct
25861         'tune for' CPU name.
25862         * config/arm/arm-cpu-data.h: Regenerated.
25864 2017-02-28  Richard Biener  <rguenther@suse.de>
25866         PR tree-optimization/79732
25867         * tree-inline.c (expand_call_inline): Do not shadow var.
25869 2017-02-28  Richard Biener  <rguenther@suse.de>
25871         PR tree-optimization/79723
25872         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Preserve
25873         address-space properly.
25875 2017-02-28  Thomas Schwinge  <thomas@codesourcery.com>
25877         * doc/optinfo.texi (Optimization groups): Fix option used for
25878         OPTGROUP_ALL.
25879         * doc/invoke.texi (-fopt-info): Document "omp".
25880         * dumpfile.h: Sort OPTGROUP_OMP before OPTGROUP_VEC.
25881         (OPTGROUP_ALL): Add OPTGROUP_OMP.
25882         * hsa-gen.c (pass_data_gen_hsail): Use OPTGROUP_OMP.
25883         * ipa-hsa.c (pass_data_ipa_hsa): Likewise.
25884         * omp-simd-clone.c (pass_data_omp_simd_clone): Likewise.
25886         * dumpfile.h (OPTGROUP_OPENMP): Rename to OPTGROUP_OMP.  Adjust
25887         all users.
25888         * dumpfile.c (optgroup_options): Instead of "openmp", associate
25889         OPTGROUP_OMP with "omp".
25891 2017-02-27  Pat Haugen  <pthaugen@us.ibm.com>
25893         PR target/79544
25894         * config/rs6000/rs6000-c.c (struct altivec_builtin_types): Use VSRAD
25895         for arithmetic shift of unsigned V2DI.
25897 2017-02-27  Claudiu Zissulescu  <claziss@synopsys.com>
25899         * config.gcc (arc*-): Clean up, use arc/big.h, arc/elf.h, and
25900         arc/linux.h headers.
25901         * config/arc/arc.h (TARGET_OS_CPP_BUILTINS): Remove.
25902         (LINK_SPEC): Likewise.
25903         (ARC_TLS_EXTRA_START_SPEC): Likewise.
25904         (EXTRA_SPECS): Likewise.
25905         (STARTFILE_SPEC): Likewise.
25906         (ENDFILE_SPEC): Likewise.
25907         (LIB_SPEC): Likewise.
25908         (TARGET_SDATA_DEFAULT): Likewise.
25909         (TARGET_MMEDIUM_CALLS_DEFAULT): Likewise.
25910         (MULTILIB_DEFAULTS): Likewise.
25911         (DWARF2_UNWIND_INFO): Likewise.
25912         * config/arc/big.h: New file.
25913         * config/arc/elf.h: Likewise.
25914         * config/arc/linux.h: Likewise.
25915         * config/arc/t-uClibc: Remove.
25917 2017-02-27  Bin Cheng  <bin.cheng@arm.com>
25919         PR tree-optimization/77536
25920         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): New function.
25921         (tree_transform_and_unroll_loop): Use above function to compute the
25922         estimated niter of unrolled loop and use it when scaling profile.
25923         Also use count info rather than frequency if it's non-zero.
25924         * tree-ssa-loop-manip.h niter_for_unrolled_loop(): New declaration.
25925         * tree-vect-loop.c (scale_profile_for_vect_loop): New function.
25926         (vect_transform_loop): Call above function.
25928 2017-02-27  Richard Biener  <rguenther@suse.de>
25930         PR tree-optimization/45397
25931         * tree-ssa-pre.c (eliminate_insert): Handle BIT_AND_EXPR.
25932         * tree-ssa-sccvn.c (valueized_wider_op): New helper.
25933         (visit_nary_op): Add pattern matching for CSEing sign-changed
25934         or truncated operations with wider ones.
25936 2017-02-27  Richard Biener  <rguenther@suse.de>
25938         PR tree-optimization/79690
25939         * tree-vect-stmts.c (vectorizable_store): Use vector type
25940         built from the DR with address-space.
25942 2017-02-26  Gerald Pfeifer  <gerald@pfeifer.com>
25944         * doc/invoke.texi (Optimize Options): Refine the description
25945         of asan-use-after-return.
25947 2017-02-25  Alan Modra  <amodra@gmail.com>
25949         PR rtl-optimization/79584
25950         * lra-constraints.c (base_to_reg): Reload ad->base, the entire
25951         base, not ad->base_term, the reg within base.  Remove assertion
25952         that ad->base == ad->base_term.  Replace gen_int_mode using
25953         bogus mode with const0_rtx.
25955 2017-02-25  Jakub Jelinek  <jakub@redhat.com>
25957         PR middle-end/79396
25958         * tree-eh.c (operation_could_trap_p, stmt_could_throw_1_p): Handle
25959         FMA_EXPR like tcc_binary or tcc_unary.
25961         * tree-ssa-loop-niter.c (number_of_iterations_exit): Simplify warning.
25963         PR debug/77589
25964         * dwarf2out.c (struct dw_loc_list_struct): Add noted_variable_value
25965         bitfield.
25966         (size_of_loc_descr): Handle DW_OP_GNU_variable_value.
25967         (output_loc_operands): Handle DW_OP_call_ref and
25968         DW_OP_GNU_variable_value.
25969         (struct variable_value_struct): New type.
25970         (struct variable_value_hasher): Likewise.
25971         (variable_value_hash): New variable.
25972         (string_types): Remove.
25973         (copy_loc_descr): New function.
25974         (add_loc_descr_to_each): Clarify comment.  Use copy_loc_descr.
25975         (prepend_loc_descr_to_each): New function.
25976         (add_loc_list): Fix comment typo.  Use prepend_loc_descr_to_each
25977         instead of add_loc_descr_to_each if the first argument is single
25978         location list and the second has multiple.
25979         (resolve_args_picking_1): Handle DW_OP_GNU_variable_value.
25980         (loc_list_from_tree_1): For early_dwarf, emit DW_OP_GNU_variable_value
25981         when looking for variable value which doesn't have other location info.
25982         (loc_list_from_tree): Formatting fix.
25983         (gen_array_type_die): Simplify DW_AT_string_length handling.
25984         (adjust_string_types): Remove.
25985         (gen_subprogram_die): Don't call adjust_string_types nor test/set
25986         string_types.  Call resolve_variable_values.
25987         (prune_unused_types_walk_loc_descr): Handle DW_OP_GNU_variable_value.
25988         (resolve_addr_in_expr): Likewise.  Add A argument.
25989         (copy_deref_exprloc): Remove deref argument.  Adjust for the
25990         original expression being DW_OP_GNU_variable_value with optionally
25991         DW_OP_stack_value after it instead of DW_OP_call4 with DW_OP_deref
25992         optionally after it.
25993         (optimize_string_length): Rework for DW_OP_GNU_variable_value.
25994         (resolve_addr): Adjust optimize_string_length and resolve_addr_in_expr
25995         callers.  Set remove_AT_byte_size if removing DW_AT_string_length.
25996         (variable_value_hasher::hash, variable_value_hasher::equal): New
25997         methods.
25998         (resolve_variable_value_in_expr, resolve_variable_value,
25999         resolve_variable_values, note_variable_value_in_expr,
26000         note_variable_value): New functions.
26001         (dwarf2out_early_finish): Call note_variable_value on all toplevel
26002         DIEs.
26004 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
26006         PR c/79677
26007         * opts.h (handle_generated_option): Add GENERATED_P argument.
26008         * opts-common.c (handle_option): Adjust function comment.
26009         (handle_generated_option): Add GENERATED_P argument, pass it to
26010         handle_option.
26011         (control_warning_option): Pass false to handle_generated_option
26012         GENERATED_P.
26013         * opts.c (maybe_default_option): Pass true to handle_generated_option
26014         GENERATED_P.
26015         * optc-gen.awk: Likewise.
26017 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
26019         * config/sh/sh.md (tstsi_t): If operands[0] is a SUBREG instead of
26020         a REG, look at the REG it is a SUBREG of.
26021         (splitter for cmpeqsi_t): Ditto.
26023 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
26025         * config/pa/pa.c (pa_combine_instructions): Do not share RTL.  Make
26026         the special USEs with the pattern of the insn, not the insn itself.
26028 2017-02-24  Matthew Fortune  <matthew.fortune@imgtec.com>
26030         PR target/79473
26031         * doc/invoke.texi: Document -mload-store-pairs.
26033 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
26034             Sandra Loosemore  <sandra@codesourcery.com>
26036         * config/nios2/nios2.c (nios2_simple_const_p): Returns false if the
26037         argument isn't a CONST_INT.
26038         (nios2_alternate_compare_const): Assert op is a CONST_INT.
26039         (nios2_valid_compare_const_p): Assert op is a CONST_INT.
26040         (nios2_validate_compare): Bypass alternate compare logic if *op2
26041         is not a CONST_INT.
26042         (ldstwm_operation_p): Return false if first_base is not a REG or
26043         if first_offset is not a CONST_INT.
26045 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
26047         * config/cris/cris.md: Use correct operand in a define_peephole2.
26049 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
26051         * config/c6x/c6x.c (predicate_insn): Do not incorrectly share RTL.
26053 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
26055         * config/arc/arc.c (arc_ccfsm_advance): Only take the PATTERN of
26056         this_insn if it is an INSN or JUMP_INSN.
26057         (force_offsettable): Look at base, not at addr.
26058         * config/arc/predicates.md (brcc_nolimm_operator): Don't call INTVAL
26059         on things that aren't necessarily CONST_INTs.
26061 2017-02-24  Uros Bizjak  <ubizjak@gmail.com>
26063         * doc/invoke.texi (x86 Options, -mfpmath=sse): Mention that
26064         -mfpmath=sse is the default also for x86-32 targets with SSE2
26065         instruction set when @option{-ffast-math} is enabled
26067 2017-02-24  Jeff Law  <law@redhat.com>
26069         PR rtl-optimizatoin/79286
26070         * ira.c (update_equiv_regs): Drop may_trap_p exception to
26071         dominance test.
26073 2017-02-24  Richard Biener  <rguenther@suse.de>
26075         PR tree-optimization/79389
26076         * gimple-ssa-split-paths.c (is_feasible_trace): Properly skip
26077         debug insns.
26079 2017-02-24  Aldy Hernandez  <aldyh@redhat.com>
26081         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update
26082         function comment to reflect reality.
26083         (loop_exits_before_overflow): Fix typo in function description.
26085 2017-02-24  Richard Biener  <rguenther@suse.de>
26087         PR tree-optimization/79389
26088         * gimple-ssa-split-paths.c (is_feasible_trace): Verify more
26089         properly that a threading opportunity exists.  Detect conditional
26090         copy/constant propagation opportunities.
26092 2017-02-23  Eric Botcazou  <ebotcazou@adacore.com>
26094         * config/visium/visium.md (type): Add trap.
26095         (b): New mode attribute.
26096         (*btst): Rename into...
26097         (*btst<mode>): ...this and adjust.
26098         (*cbranchsi4_btst_insn): Rename into...
26099         (*cbranch<mode>4_btst_insn): ...this and adjust.
26100         (trap): New define_insn.
26102 2017-02-23  Jakub Jelinek  <jakub@redhat.com>
26104         PR tree-optimization/79389
26105         * ifcvt.c (struct noce_if_info): Add rev_cond field.
26106         (noce_reversed_cond_code): New function.
26107         (noce_emit_store_flag): Use rev_cond if non-NULL instead of
26108         reversed_comparison_code.  Formatting fix.
26109         (noce_try_store_flag): Test rev_cond != NULL in addition to
26110         reversed_comparison_code.
26111         (noce_try_store_flag_constants): Likewise.
26112         (noce_try_store_flag_mask): Likewise.
26113         (noce_try_addcc): Use rev_cond if non-NULL instead of
26114         reversed_comparison_code.
26115         (noce_try_cmove_arith): Likewise.  Formatting fixes.
26116         (noce_try_minmax, noce_try_abs): Clear rev_cond.
26117         (noce_find_if_block): Initialize rev_cond.
26118         (find_cond_trap): Call noce_get_condition with then_bb == trap_bb
26119         instead of false as last argument never attempt to reverse it
26120         afterwards.
26122 2017-02-23  Bin Cheng  <bin.cheng@arm.com>
26124         PR tree-optimization/79663
26125         * tree-predcom.c (combine_chains): Process refs in reverse order
26126         only for ZERO length chains, and add explaining comment.
26128 2017-02-23  Jeff Law  <law@redhat.com>
26130         PR tree-optimization/79578
26131         * tree-ssa-dse.c (clear_bytes_written_by): Use OEP_ADDRESS_OF
26132         in call to operand_equal_p.
26134 2017-01-23  Dominique d'Humieres  <dominiq@lps.ens.fr>
26136         PR target/71017
26137         * config/i386/cpuid.h: Fix another undefined behavior.
26139 2017-02-23  Richard Biener  <rguenther@suse.de>
26141         PR tree-optimization/79683
26142         * tree-vect-stmts.c (vect_analyze_stmt): Do not overwrite
26143         vector types for data-refs.
26145 2017-02-23  Martin Liska  <mliska@suse.cz>
26147         * params.def (PARAM_MIN_NONDEBUG_INSN_UID): Change default to 0.
26149 2017-02-23  Jakub Jelinek  <jakub@redhat.com>
26151         PR middle-end/79665
26152         * internal-fn.c (get_range_pos_neg): Moved to ...
26153         * tree.c (get_range_pos_neg): ... here.  No longer static.
26154         * tree.h (get_range_pos_neg): New prototype.
26155         * expr.c (expand_expr_real_2) <case TRUNC_DIV_EXPR>: If both arguments
26156         are known to be in between 0 and signed maximum inclusive, try to
26157         expand both unsigned and signed divmod and use the cheaper one from
26158         those.
26160 2017-02-22  Jeff Law  <law@redhat.com>
26162         PR tree-optimization/79578
26163         * tree-ssa-dse.c (clear_bytes_written_by): Use operand_equal_p
26164         to compare base operands.
26166 2017-02-22  Segher Boessenkool  <segher@kernel.crashing.org>
26168         PR target/79211
26169         * config/rs6000/rs6000.md (*fsel<SFDF:mode><SFDF2:mode>4): Use
26170         gpc_reg_operand instead of fpr_reg_operand.
26172 2017-02-22  Sameera Deshpande  <sameera.deshpande@imgtec.com>
26174         * config/mips/mips.c (mips_return_in_memory): Force FP
26175         vector types to be returned in memory for o32 ABI.
26177 2017-02-22  Jakub Jelinek  <jakub@redhat.com>
26179         * dwarf2out.c (gen_variable_die): For -gdwarf-5, use DW_TAG_variable
26180         instead of DW_TAG_member for static data member declarations and don't
26181         set no_linkage_name for static inline data members.
26182         (gen_member_die): For -gdwarf-5 don't change DW_TAG_variable
26183         to DW_TAG_member.
26185 2017-02-22  Martin Liska  <mliska@suse.cz>
26187         * doc/invoke.texi: Replace inequality signs with square brackets
26188         for -Wnormalized.
26190 2017-02-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26192         PR tree-optimization/68644
26193         * gcc.dg/tree-ssa/ivopts-lt-2.c: Skip for powerpc*-*-*.
26195 2017-02-22  Matthew Fortune  <matthew.fortune@imgtec.com>
26197         PR target/78660
26198         * lra-constraints.c (simplify_operand_subreg): Handle
26199         WORD_REGISTER_OPERATIONS targets.
26201 2017-02-22  Jakub Jelinek  <jakub@redhat.com>
26203         PR target/70465
26204         * reg-stack.c (emit_swap_insn): Treat (float_extend:?F (mem:?F))
26205         and (const_double:?F) like (mem:?F) for the purpose of fxch %st(1)
26206         elimination by swapping fld*.
26208 2017-02-22  Richard Biener  <rguenther@suse.de>
26210         PR tree-optimization/79673
26211         * tree-ssa-pre.c (compute_avail): Use wide_int_to_tree to
26212         convert the [TARGET_]MEM_REF offset INTEGER_CST, scrapping off
26213         irrelevant address-space qualifiers and avoiding a
26214         ADDR_SPACE_CONVERT_EXPR from fold_convert.
26216 2017-02-22  Richard Biener  <rguenther@suse.de>
26218         PR tree-optimization/79666
26219         * tree-vrp.c (extract_range_from_binary_expr_1): Make sure
26220         to not symbolically negate if that may introduce undefined
26221         overflow.
26223 2017-02-22  Martin Liska  <mliska@suse.cz>
26225         PR lto/79587
26226         * data-streamer-in.c (streamer_read_gcov_count): Remove assert.
26227         * data-streamer-out.c (streamer_write_gcov_count_stream):
26228         Likewise.
26229         * value-prof.c (stream_out_histogram_value): Make assert more
26230         precise based on type of counter.
26232 2017-02-21  Uros Bizjak  <ubizjak@gmail.com>
26234         PR target/79593
26235         * config/i386/i386.md (standard_x87sse_constant_load splitter):
26236         Use nonimmediate_operand instead of memory_operand for operand 1.
26237         (float-extend standard_x87sse_constant_load splitter): Ditto.
26239 2017-02-21  Jeff Law  <law@redhat.com>
26241         PR tree-optimization/79621
26242         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Ignore
26243         blocks with edges to themselves.
26245 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
26247         PR target/79633
26248         * tree-chkp-opt.c (chkp_optimize_string_function_calls): Use
26249         is_gimple_call instead of comparing gimple_code with GIMPLE_CALL.
26250         Use gimple_call_builtin_p.
26252         PR target/79570
26253         * sel-sched.c (moveup_expr_cached): Don't call sel_bb_head
26254         on temporarily removed DEBUG_INSNs.
26256         PR tree-optimization/79649
26257         * tree-loop-distribution.c (classify_partition): Give up on
26258         non-generic address space loads/stores.
26260 2017-02-21  Aldy Hernandez  <aldyh@redhat.com>
26262         * doc/loop.texi (Loop manipulation): Remove nonexistent
26263         tree_ssa_loop_version from the documentation.
26264         * cfgloopmanip.c (loop_version): Document CONDITION_BB argument.
26266 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
26268         PR target/79494
26269         * config/i386/i386.c (ix86_expand_split_stack_prologue): Call
26270         make_reg_eh_region_note_nothrow_nononlocal on call_insn.
26271         * config/rs6000/rs6000.c: Include except.h.
26272         (rs6000_expand_split_stack_prologue): Call
26273         make_reg_eh_region_note_nothrow_nononlocal on the call insn.
26275 2017-02-21  Martin Jambor  <mjambor@suse.cz>
26277         PR lto/79579
26278         * ipa-prop.c (ipa_prop_write_jump_functions): Bail out if no edges
26279         have been analyzed.
26281 2017-02-21  Martin Jambor  <mjambor@suse.cz>
26283         * common.opt (-fipa-cp-alignment): Mark as ignored and preserved
26284         for backward compatibility only.
26285         * doc/invoke.texi (Option Summary): Remove all references to
26286         -fipa-cp-alignment.
26288 2017-02-21  Matthew Fortune  <matthew.fortune@imgtec.com>
26290         PR target/78660
26291         Revert:
26292         2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
26294         * lra-constraints.c (curr_insn_transform): Handle
26295         WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
26297 2017-02-21  Martin Liska  <mliska@suse.cz>
26299         * config/i386/i386.opt: Replace -masm-dialect with -masm.
26301 2017-02-21  Thomas Schwinge  <thomas@codesourcery.com>
26303         PR translation/79638
26304         * config/nvptx/nvptx.c (ENTRY_TEMPLATE): Single out "%ntid.y".
26306 2017-02-21  Eric Botcazou  <ebotcazou@adacore.com>
26308         PR ada/67205
26309         * config/arm/arm.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define.
26310         (arm_function_ok_for_sibcall): Return false for an indirect call by
26311         descriptor if all the argument registers are used.
26312         (arm_relayout_function): Use FUNCTION_ALIGNMENT macro to adjust the
26313         alignment of the function.
26315 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
26317         PR tree-optimization/61441
26318         * simplify-rtx.c (simplify_const_unary_operation): For
26319         -fsignaling-nans and sNaN operand, return NULL_RTX rather than
26320         the sNaN unmodified.
26322 2017-02-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
26324         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
26325         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
26326         instead of SYSTEM_HEADER_DIR.
26328 2017-02-20  Gerald Pfeifer  <gerald@pfeifer.com>
26329             Martin LiÅ¡ka  <mliska@suse.cz>
26331         * doc/invoke.texi (use-after-scope-direct-emission-threshold):
26332         Fix typos and grammar, use active voice, and clarify.
26334 2017-02-20  Marek Polacek  <polacek@redhat.com>
26336         PR middle-end/79537
26337         * gimplify.c (gimplify_expr): Handle unused *&&L;.
26339         PR sanitizer/79558
26340         * ubsan.c (ubsan_type_descriptor): Check if TYPE_MAX_VALUE is null.
26342 2017-02-20  Jakub Jelinek  <jakub@redhat.com>
26344         PR target/79568
26345         * config/i386/i386.c (ix86_expand_builtin): Handle
26346         OPTION_MASK_ISA_AVX512VL and OPTION_MASK_ISA_64BIT in
26347         ix86_builtins_isa[fcode].isa as a requirement of those
26348         flags and any other flag in the bitmask.
26349         (ix86_init_mmx_sse_builtins): Use 0 instead of
26350         ~OPTION_MASK_ISA_64BIT as mask.
26351         * config/i386/i386-builtin.def (__builtin_ia32_rdtsc,
26352         __builtin_ia32_rdtscp, __builtin_ia32_pause, __builtin_ia32_bsrsi,
26353         __builtin_ia32_rdpmc, __builtin_ia32_rolqi, __builtin_ia32_rolhi,
26354         __builtin_ia32_rorqi, __builtin_ia32_rorhi): Likewise.
26356 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
26358         PR target/78012
26359         * lra-constraints.c (split_reg): Check requested split mode
26360         is supported by the register.
26362 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
26364         * lra-constraints.c (simplify_operand_subreg): Remove early
26365         return false.
26367 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
26369         PR target/78660
26370         * lra-constraints.c (curr_insn_transform): Tighten condition
26371         for converting SUBREG reloads from OP_OUT to OP_INOUT.
26373 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
26375         PR target/78660
26376         * lra-constraints.c (curr_insn_transform): Handle
26377         WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
26379 2017-02-19  Uros Bizjak  <ubizjak@gmail.com>
26381         Revert:
26382         2016-05-30  Uros Bizjak  <ubizjak@gmail.com>
26384         * config/i386/sync.md (mfence_nosse): Use "lock orl $0, -4(%esp)".
26386 2017-02-19  Jonathan Wakely  <jwakely@redhat.com>
26388         PR c++/69523
26389         * doc/invoke.texi (C++ Dialect Options) [-Wliteral-suffix]: Update
26390         description.
26392 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26394         * gimple-pretty-print.c (dump_ternary_rhs): Adjust gimple dump format
26395         for FMA_EXPR.
26397 2017-02-18  Jakub Jelinek  <jakub@redhat.com>
26399         * final.c (last_columnnum, override_columnnum): New variables.
26400         (final_start_function): Set last_columnnum, pass it to begin_prologue
26401         hook and pass 0 to dwarf2out_begin_prologue.
26402         (final_scan_insn): Update override_columnnum.  Pass last_columnnum
26403         to source_line debug hook.
26404         (notice_source_line): Compute last_columnnum and for debug_column_info
26405         return true on column changes.
26406         * debug.h (struct gcc_debug_hooks): Add column argument to
26407         source_line and begin_prologue hooks.
26408         (debug_nothing_int_charstar_int_bool): Remove prototype.
26409         (debug_nothing_int_int_charstar,
26410         debug_nothing_int_int_charstar_int_bool): New prototypes.
26411         (dwarf2out_begin_prologue): Add column argument.
26412         * debug.c (do_nothing_debug_hooks): Adjust source_line and
26413         begin_prologue hooks.
26414         (debug_nothing_int_charstar_int_bool): Remove.
26415         (debug_nothing_int_int_charstar,
26416         debug_nothing_int_int_charstar_int_bool): New functions.
26417         * dwarf2out.c (dwarf2out_begin_prologue): Add column argument, pass it
26418         through to dwarf2out_source_line.
26419         (dwarf2_lineno_debug_hooks): Adjust begin_prologue hook.
26420         (dwarf2out_source_line): Add column argument, emit it if requested.
26421         * sdbout.c (sdbout_source_line, sdbout_begin_prologue): Add column
26422         arguments.
26423         * xcoffout.h (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
26424         * xcoffout.c (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
26425         * vmsdbgout.c (vmsdbgout_begin_prologue): Add column argument, pass it
26426         through to dwarf2out_begin_prologue.
26427         (vmsdbgout_source_line): Add column argument, pass it through to
26428         dwarf2out_source_line.
26429         * dbxout.c (dbxout_begin_prologue): Add column argument, adjust
26430         dbxout_source_line caller.
26431         (dbxout_source_line): Add column argument.
26433         * common.opt (gno-column-info, gcolumn-info): New options.
26434         * dwarf2out.c (dwarf2_lineno_debug_hooks): Formatting fix.
26435         (check_die): Also test for multiple DW_AT_decl_column attributes.
26436         (add_src_coords_attributes, dwarf2out_imported_module_or_decl_1): Add
26437         DW_AT_decl_column if requested.
26438         (gen_subprogram_die): Compare and/or add also DW_AT_decl_column
26439         if requested.
26440         (gen_variable_die): Likewise.
26441         (add_call_src_coords_attributes): Add DW_AT_call_column if requested.
26442         * doc/invoke.texi (-gcolumn-info, -gno-column-info): Document.
26444         PR target/79569
26445         * config/i386/i386.opt (m3dnowa): Replace Undocumented with Report.
26446         * common/config/i386/i386-common.c (OPTION_MASK_ISA_3DNOW_A_SET): Define.
26447         (ix86_handle_option): Handle OPT_m3dnowa.
26448         * doc/invoke.texi (-m3dnowa): Document.
26449         * doc/extend.texi (__builtin_ia32_pmulhuw, __builtin_ia32_pf2iw): Use
26450         -m3dnowa instead of -m3dnow -march=athlon.
26452         PR target/79559
26453         * config/i386/i386.c (ix86_print_operand): Use output_operand_lossage
26454         instead of gcc_assert for K, r and R code checks.  Formatting fixes.
26456 2017-02-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26458         PR target/79261
26459         * config/rs6000/rs6000.c (rs6000_expand_ternop_builtin): Add
26460         support for CODE_FOR_vsx_xxpermdi_v2d[fi]_be.
26461         * config/rs6000/rs6000.md (reload_gpr_from_vsx<mode>): Call
26462         generator for vsx_xxpermdi_<mode>_be.
26463         * config/rs6000/vsx.md (vsx_xxpermdi_<mode>): Remove logic to
26464         force big-endian semantics.
26465         (vsx_xxpermdi_<mode>_be): New define_expand with same
26466         implementation as previous version of vsx_xxpermdi_<mode>.
26468 2017-02-17  Jakub Jelinek  <jakub@redhat.com>
26470         PR tree-optimization/79327
26471         * gimple-ssa-sprintf.c (format_integer): Remove likely_adjust
26472         variable, its initialization and use.
26474 2017-02-17  Julia Koval  <julia.koval@intel.com>
26476         * common/config/i386/i386-common.c (OPTION_MASK_ISA_RDPID_SET): New.
26477         (OPTION_MASK_ISA_PKU_UNSET): New.
26478         (ix86_handle_option): Handle -mrdpid.
26479         * config/i386/cpuid.h (bit_RDPID): New.
26480         * config/i386/driver-i386.c (host_detect_local_cpu):
26481         Detect RDPID feature.
26482         * config/i386/i386-builtin.def (__builtin_ia32_rdpid): New.
26483         * config/i386/i386-c.c (ix86_target_macros_internal):
26484         Handle RDPID flag.
26485         * config/i386/i386.c (ix86_target_string): Add -mrdpid to isa2_opts.
26486         (ix86_valid_target_attribute_inner_p): Add "rdpid".
26487         (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
26488         * config/i386/i386.h (TARGET_RDPID, TARGET_RDPID_P): New.
26489         * config/i386/i386.md (define_insn "rdpid"): New.
26490         * config/i386/i386.opt Add -mrdpid.
26491         * config/i386/immintrin.h (_rdpid_u32): New.
26493 2017-02-17  Vladimir Makarov  <vmakarov@redhat.com>
26495         PR rtl-optimization/79541
26496         * lra-constraints.c (curr_insn_transform): Remove wrong asm insn
26497         instead of transforming it into USE.
26499 2017-02-17  Segher Boessenkool  <segher@kernel.crashing.org>
26501         * config/rs6000/rs6000.md (extendsfdf2): Remove default arguments.
26502         If HONOR_SNANS (SFmode) force the input to a register.
26503         (*extendsfdf2_fpr): Add !HONOR_SNANS (SFmode) condition.
26504         (*extendsfdf2_snan): New pattern, used when using SNaNs; it generates
26505         an frsp or similar insn.
26507 2017-02-17  Martin Liska  <mliska@suse.cz>
26509         PR rtl-optimization/79577
26510         * params.def (selsched-max-sched-times): Increase minimum to 1.
26512 2017-02-17  Martin Liska  <mliska@suse.cz>
26514         PR rtl-optimization/79574
26515         * gcse.c (want_to_gcse_p): Prevent integer overflow.
26517 2017-02-17  Martin Liska  <mliska@suse.cz>
26519         PR tree-optimization/79529
26520         * tree-ssa-loop-unswitch.c (is_maybe_undefined): Use
26521         ssa_defined_default_def_p to handle cases which are implicitly
26522         defined.
26523         * tree-ssa.c (ssa_defined_default_def_p): New function.
26524         (ssa_undefined_value_p): Use ssa_defined_default_def_p to handle cases
26525         which are implicitly defined.
26526         * tree-ssa.h (ssa_defined_default_def_p): Declare.
26528 2017-02-17  Richard Biener  <rguenther@suse.de>
26530         PR middle-end/79576
26531         * params.def (max-ssa-name-query-depth): Limit to 10.
26533 2017-02-17  Richard Biener  <rguenther@suse.de>
26535         PR tree-optimization/79552
26536         * tree-ssa-structalias.c (visit_loadstore): Properly verify
26537         default defs.
26539 2017-02-17  Richard Biener  <rguenther@suse.de>
26541         PR bootstrap/79567
26542         * genmatch.c (output_line_directive): Handle DIR_SEPARATOR_2.
26544 2017-02-17  Marek Polacek  <polacek@redhat.com>
26546         PR middle-end/79536
26547         * fold-const.c (fold_negate_expr_1): Renamed from fold_negate_expr.
26548         (fold_negate_expr): New wrapper.
26550 2017-02-16  Sandra Loosemore  <sandra@codesourcery.com>
26552         * doc/invoke.texi (C++ Dialect Options) [-Wno-non-template-friend]: 
26553         Correct terminology and de-emphasize pre-standard behavior.
26555 2017-02-16  Alan Modra  <amodra@gmail.com>
26557         PR rtl-optimization/79286
26558         * ira.c (def_dominates_uses): New function.
26559         (update_equiv_regs): Don't create an equivalence for insns that
26560         may trap where the register def does not dominate the use.
26562 2017-02-16  Vladimir Makarov  <vmakarov@redhat.com>
26564         PR rtl-optimization/78127
26565         * lra.c (lra): Call lra_eliminate before finish the loop after
26566         lra_constraint.
26568 2017-02-16  Richard Biener  <rguenther@suse.de>
26570         * graphite.h: Do not include isl/isl_val_gmp.h, instead include
26571         isl/isl_val.h.
26572         * graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
26573         (gcc_expression_from_isl_expr_int): Use generic isl_val interface.
26574         * graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
26575         (isl_val_int_from_wi): New function.
26576         (extract_affine_gmp): Rename to ...
26577         (extract_affine_wi): ... this, take a widest_int.
26578         (extract_affine_int): Just wrap extract_affine_wi.
26579         (add_param_constraints): Use isl_val_int_from_wi.
26580         (add_loop_constraints): Likewise, and extract_affine_wi.
26582 2017-02-15  Jeff Law  <law@redhat.com>
26584         PR middle-end/79521
26585         * ira-costs.c (scan_one_insn): Check have_regs_of_mode before calling
26586         ira_init_register_move_cost_if_necessary.
26588 2017-02-15  Martin Sebor  <msebor@redhat.com>
26590         PR middle-end/32003
26591         * doc/invoke.texi (-fdump-final-insns): Replace option accidentally
26592         removed in a prior commit.
26594 2017-02-15  Bin Cheng  <bin.cheng@arm.com>
26596         PR tree-optimization/79347
26597         * tree-vect-loop-manip.c (vect_do_peeling): Maintain profile
26598         counters during peeling.
26600 2017-02-15  Thomas Schwinge  <thomas@codesourcery.com>
26602         * Makefile.in (site.exp): Remove "set ISLVER".
26604 2017-02-15  Jakub Jelinek  <jakub@redhat.com>
26606         PR target/79487
26607         * real.c (real_from_integer): Call real_convert even for decimal.
26609 2017-02-15  Dominik Vogt  <vogt@linux.vnet.ibm.com>
26611         PR target/79421
26612         * config/s390/s390.c: define TARGET_CUSTOM_FUNCTION_DESCRIPTORS.
26614 2017-02-14  Andrew Pinski  <apinski@cavium.com>
26616         * config/aarch64/aarch64-cores.def (thunderx2t99): Move to under 'C"
26617         cores and change the partno/implementer to be correct.
26618         (thunderx2t99p1): New core which replaces thunderx2t99 and still has
26619         the 'B" as the implementer.
26620         * config/aarch64/aarch64-tune.md: Regenerate.
26622 2017-02-14  Carl Love  <cel@us.ibm.com>
26624         * config/rs6000/rs6000.c: Add case statement entry to make the
26625         xvcvuxdsp built-in argument unsigned.
26626         * config/rs6000/vsx.md: Fix the source and return operand types so they
26627         match the instruction definitions from the ISA document.  Fix typo
26628         in the instruction generation for the (define_insn "vsx_xvcvuxdsp"
26629         statement.
26631 2017-02-14  Vladimir Makarov  <vmakarov@redhat.com>
26633         PR target/79282
26634         * lra-int.h (struct lra_operand_data, struct lra_insn_reg): Add
26635         member early_clobber_alts.
26636         * lra-lives.c (reg_early_clobber_p): New.
26637         (process_bb_lives): Use it.
26638         * lra.c (new_insn_reg): New arg early_clobber_alts.  Use it.
26639         (debug_operand_data): Initialize early_clobber_alts.
26640         (setup_operand_alternative): Set up early_clobber_alts.
26641         (collect_non_operand_hard_regs): Ditto.  Pass early clobber
26642         alternatives to new_insn_reg.
26643         (add_regs_to_insn_regno_info): Add arg early_clobber_alts.  Use
26644         it.
26645         (lra_update_insn_regno_info): Pass the new arg.
26647 2017-02-14  Jakub Jelinek  <jakub@redhat.com>
26649         PR middle-end/79505
26650         * omp-offload.c (free_oacc_loop): Release loop->ifns vector.
26651         (new_oacc_loop_raw): Don't clear already cleared fields.
26653         PR target/79481
26654         * config/i386/avx512pfintrin.h (_mm512_prefetch_i32gather_pd,
26655         _mm512_prefetch_i32gather_ps, _mm512_prefetch_i64gather_pd,
26656         _mm512_prefetch_i64gather_ps): New inline functions and macros.
26658 2017-02-14  Uros Bizjak  <ubizjak@gmail.com>
26660         PR target/79495
26661         * config/i386/i386.md (*movxf_internal): Add (o,rC) alternative.
26663 2017-02-14  H.J. Lu  <hongjiu.lu@intel.com>
26665         PR target/79498
26666         * config/i386/i386.c (timode_scalar_chain::convert_insn): Insert
26667         the extra instruction to the right place to store 128-bit constant
26668         when needed.
26670 2017-02-14  Martin Sebor  <msebor@redhat.com>
26672         PR middle-end/79448
26673         * gimple-ssa-sprintf.c (format_directive): Avoid issuing INT_MAX
26674           warning for strings of unknown length.
26676 2017-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
26678         * config.gcc (supported_defaults) [powerpc*-*-*]: Update.
26680 2017-02-14  Jeff Law  <law@redhat.com>
26682         PR target/79404
26683         * ira-costs.c (scan_one_insn): Initialize register move costs
26684         for pseudos seen in USE/CLOBBER insns.
26686         PR tree-optimization/79095
26687         * tree-vrp.c (extract_range_from_binary_expr_1): For EXACT_DIV_EXPR,
26688         if the numerator has the range ~[0,0] make the resultant range ~[0,0].
26689         (extract_range_from_binary_expr): For MINUS_EXPR with no derived range,
26690         if the operands are known to be not equal, then the resulting range
26691         is ~[0,0].
26692         (intersect_ranges): If the new range is ~[0,0] and the old range is
26693         wide, then prefer ~[0,0].
26694         * tree-vrp.c (overflow_comparison_p_1): New function.
26695         (overflow_comparison_p): New function.
26696         * tree-vrp.c (register_edge_assert_for_2): Register additional asserts
26697         if NAME is used in an overflow test.
26698         (vrp_evaluate_conditional_warnv_with_ops): If the ops represent an
26699         overflow check that can be expressed as an equality test, then adjust
26700         ops to be that equality test.
26702 2017-02-14  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
26704         * config/s390/s390-builtin-types.def: Remove flags argument.
26705         * config/s390/s390.c (s390_init_builtins): Likewise.
26707 2017-02-14  Martin Liska  <mliska@suse.cz>
26709         * tree-ssa-loop-unswitch.c (hoist_guard): Release get_loop_body
26710         vector.  Fix trailing white spaces.
26712 2017-02-14  James Greenhalgh  <james.greenhalgh@arm.com>
26714         * config/aarch64/aarch64.c (aarch64_simd_container_mode): Handle
26715         HFmode.
26717 2017-02-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26719         PR rtl-optimization/68664
26720         * config/arm/arm.c (arm_sched_can_speculate_insn):
26721         New function.  Declare prototype.
26722         (TARGET_SCHED_CAN_SPECULATE_INSN): Define.
26724 2017-02-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26726         PR rtl-optimization/68664
26727         * config/aarch64/aarch64.c (aarch64_sched_can_speculate_insn):
26728         New function.
26729         (TARGET_SCHED_CAN_SPECULATE_INSN): Define.
26731 2017-02-14  Amit Pawar  <amit.pawar@amd.com>
26733         * config/i386/i386.c (znver1_cost): Fix the alignment for function and
26734         max skip bytes for function, loop and jump.
26736 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26738         * gimple-pretty-print.c (dump_unary_rhs): Adjust dump format for
26739         ABS_EXPR for gimple dump.
26741 2017-02-14  Jakub Jelinek  <jakub@redhat.com>
26743         PR target/79462
26744         * config/sh/sh.c (expand_cbranchdi4): Don't clear operands[4].
26746         PR tree-optimization/79408
26747         * tree-vrp.c (simplify_div_or_mod_using_ranges): Handle also the
26748         case when on TRUNC_MOD_EXPR op0 is INTEGER_CST.
26749         (simplify_stmt_using_ranges): Call simplify_div_or_mod_using_ranges
26750         also if rhs1 is INTEGER_CST.
26752 2017-02-14  Richard Biener  <rguenther@suse.de>
26754         PR middle-end/79432
26755         * tree-into-ssa.c (insert_phi_nodes): When the function can
26756         have abnormal edges rewrite SSA names with broken use-def
26757         dominance out of SSA and register them for PHI insertion.
26759 2017-02-13  Martin Sebor  <msebor@redhat.com>
26761         PR middle-end/79496
26762         * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call): Avoid
26763         clearing info.nowrite flag when snprintf size argument is a range.
26765 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
26767         * cprop.c (cprop_jump): Add missing space in string literal.
26768         * tree-ssa-structalias.c (rewrite_constraints): Likewise.
26769         (get_constraint_for_component_ref): Likewise.
26770         * df-core.c (df_worklist_dataflow_doublequeue): Likewise.
26771         * tree-outof-ssa.c (insert_partition_copy_on_edge): Likewise.
26772         * lra-constraints.c (process_alt_operands): Likewise.
26773         * ipa-inline.c (inline_small_functions): Likewise.
26774         * tree-ssa-sccvn.c (visit_reference_op_store): Likewise.
26775         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
26776         * trans-mem.c (diagnose_tm_1_op): Likewise.
26777         * omp-grid.c (grid_find_single_omp_among_assignments): Likewise.
26778         (grid_parallel_clauses_gridifiable): Likewise.
26780         * config/nvptx/mkoffload.c (process): Add space in between
26781         , and %d.
26783         * config/i386/i386.h (REG_CLASS_NAMES): Add , in between
26784         "MOD4_SSE_REGS" and "ALL_REGS".
26786         * spellcheck.c (test_data): Add , in between "foo" and "food".
26788 2017-02-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26790         PR target/79449
26791         * config/rs6000/rs6000.c (expand_block_compare): Make sure runtime
26792         boundary crossing check and subsequent code generation agree.
26794 2017-02-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26796         * config/aarch64/aarch64.c (has_memory_op): Delete.
26797         (aarch64_madd_needs_nop): Use contains_mem_rtx_p instead of
26798         has_memory_op.
26800 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
26802         PR rtl-optimization/79388
26803         PR rtl-optimization/79450
26804         * combine.c (distribute_notes): When removing TEM_INSN for which
26805         corresponding dest has last value recorded, invalidate that last
26806         value.
26808 2017-02-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26810         * config/arm/arm.c (arm_print_tune_info): Use ASM_COMMENT_START instead
26811         of explicit '@'.  Add missing assembly comment marker on branch costs
26812         printout.
26814 2017-02-13  Nathan Sidwell  <nathan@acm.org>
26816         * gengtype-lex.l (<in_struct>): Add '/'.
26818 2017-02-13  Martin Liska  <mliska@suse.cz>
26820         PR c/79471
26821         * calls.c (expand_call): Replace XALLOCAVEC with XCNEWVEC.
26823 2017-02-13  Richard Biener  <rguenther@suse.de>
26825         * configure.ac (HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS):
26826         Remove.
26827         * configure: Re-generate.
26828         * config.in: Likewise.
26829         * graphite-dependences.c: Simplify as if
26830         HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS was defined.
26831         * graphite-isl-ast-to-gimple.c: Likewise.
26832         * graphite-optimize-isl.c: Likewise.
26833         * graphite-poly.c: Likewise.
26834         * graphite-sese-to-poly.c: Likewise.
26835         * graphite.h: Likewise.
26836         * toplev.c: Include isl/version.h and use isl_version () for
26837         printing the ISL version.
26838         * doc/install.texi: Update ISL requirement.
26840 2017-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
26842         * doc/standards.texi (Standards): Update reference to
26843         Objective-C 2.0.
26845 2017-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
26847         * doc/extend.texi (Named Address Spaces): sourceware.org now
26848         defaults to https.
26849         * doc/install.texi (Binaries): Ditto.
26850         (Specific): Ditto.
26852 2017-02-11  Sandra Loosemore  <sandra@codesourcery.com>
26854         * doc/cpp.texi: Replace "stringify"/"stringification" with C
26855         standard terminology "stringize"/"stringizing" throughout.
26856         * doc/cppinternals.texi: Likewise.
26858 2017-02-11  Sandra Loosemore  <sandra@codesourcery.com>
26860         * doc/extend.texi: Fix some spelling mistakes and typos.
26861         * doc/invoke.texi: Likewise.
26863 2017-02-11  Jan Hubicka  <hubicka@ucw.cz>
26865         PR ipa/79224
26866         * params.def (inline-min-speedup) Change from 10 to 8.
26868 2017-02-11  Jakub Jelinek  <jakub@redhat.com>
26870         * doc/invoke.texi (fopenmp): Bump OpenMP version from 4.0 to
26871         4.5.
26873 2017-02-11  Jan Hubicka  <hubicka@ucw.cz>
26875         PR ipa/79224
26876         * ipa-inline-analysis.c (get_minimal_bb): New function.
26877         (record_modified): Use it.
26878         (remap_edge_change_prob): Handle also ancestor functions.
26880 2017-02-11  Gerald Pfeifer  <gerald@pfeifer.com>
26882         * doc/contrib.texi (Contributors): Remove broken link into
26883         the Mauve CVS repository.
26885 2017-02-11  Jakub Jelinek  <jakub@redhat.com>
26887         PR middle-end/79454
26888         * internal-fn.c (expand_vector_ubsan_overflow): Use piece-wise
26889         result computation whenever lhs doesn't have vector mode, not
26890         just when it has BLKmode.
26892 2017-02-10  Gerald Pfeifer  <gerald@pfeifer.com>
26894         * doc/makefile.texi (profiledbootstrap): Refer to the
26895         installation instructions only in textual form.
26897 2017-02-10  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26899         PR target/79295
26900         * config/rs6000/altivec.md (bcd<bcd_add_sub>): Fix constraints.
26902 2017-02-10  Gerald Pfeifer  <gerald@pfeifer.com>
26904         * doc/install.texi (Specific): Use https for blackfin.uclinux.org.
26905         (Specific): Update mingw-w64 reference.
26906         (Binaries): Ditto.
26907         (Specific): Remove broken link to Renesas RX processor.
26909 2017-02-10  Richard Biener  <rguenther@suse.de>
26911         * toplev.c (process_options): Do not mention obsolete graphite
26912         options when printing sorry message about missing graphite support.
26913         Mention -floop-nest-optimize.
26915 2017-02-10  Christophe Lyon  <christophe.lyon@linaro.org>
26917         * config/aarch64/arm_neon.h (vtst_p8): Rewrite without asm.
26918         (vtst_p16): Likewise.
26919         (vtstq_p8): Likewise.
26920         (vtstq_p16): Likewise.
26921         (vtst_p64): New.
26922         (vtstq_p64): Likewise.
26923         * config/arm/arm_neon.h (vgetq_lane_p64): New.
26924         (vset_lane_p64): New.
26925         (vsetq_lane_p64): New.
26927 2017-02-10  Jakub Jelinek  <jakub@redhat.com>
26929         PR tree-optimization/79411
26930         * tree-ssa-reassoc.c (is_reassociable_op): Return false if
26931         stmt operands are SSA_NAMEs used in abnormal phis.
26932         (can_reassociate_p): Return false if op is SSA_NAME used in abnormal
26933         phis.
26935 2017-02-09  Jan Hubicka  <hubicka@ucw.cz>
26937         PR ipa/70795
26938         * cgraphunit.c (cgraph_node::add_new_function): Set externally_visible
26939         flag if needed.
26941 2017-02-09  Jan Hubicka  <hubicka@ucw.cz>
26943         * tree-ssa-loop-unswitch.c (hoist_guard): Update profile.
26945 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
26947         * omp-offload.c (oacc_loop_auto_partitions): Use || instead of |
26948         to avoid warning.
26950         PR c/79413
26951         * gimplify.h (is_gimple_sizepos): Only test for INTEGER_CST constants,
26952         not arbitrary TREE_CONSTANT.
26954         PR c/79431
26955         * gimplify.c (gimplify_adjust_omp_clauses): Ignore
26956         "omp declare target link" attribute unless is_global_var.
26957         * omp-offload.c (find_link_var_op): Likewise.
26959 2017-02-09  Nathan Sidwell  <nathan@codesourcery.com>
26960             Chung-Lin Tang  <cltang@codesourcery.com>
26962         * gimplify.c (gimplify_scan_omp_clauses): No special handling for
26963         OMP_CLAUSE_TILE.
26964         (gimplify_adjust_omp_clauses): Don't delete TILE.
26965         (gimplify_omp_for): Deal with TILE.
26966         * internal-fn.c (expand_GOACC_TILE): New function.
26967         * internal-fn.def (GOACC_DIM_POS): Comment may be overly conservative.
26968         (GOACC_TILE): New.
26969         * omp-expand.c (struct oacc_collapse): Add tile and outer fields.
26970         (expand_oacc_collapse_init): Add LOC paramter.  Initialize tile
26971         element fields.
26972         (expand_oacc_collapse_vars): Add INNER parm, adjust for tiling,
26973         avoid DIV for outermost collapse var.
26974         (expand_oacc_for): Insert tile element loop as needed.  Adjust.
26975         Remove out of date comments, fix whitespace.
26976         * omp-general.c (omp_extract_for_data): Deal with tiling.
26977         * omp-general.h (enum oacc_loop_flags): Add OLF_TILE flag,
26978         adjust OLF_DIM_BASE value.
26979         (struct omp_for_data): Add tiling field.
26980         * omp-low.c (scan_sharing_clauses): Allow OMP_CLAUSE_TILE.
26981         (lower_oacc_head_mark): Add OLF_TILE as appropriate.  Ensure 2 levels
26982         for auto loops.  Remove default auto determining, moved to
26983         oacc_loop_fixed_partitions.
26984         * omp-offload.c (struct oacc_loop): Change 'ifns' to vector of call
26985         stmts, add e_mask field.
26986         (oacc_dim_call): New function, abstracted out from oacc_thread_numbers.
26987         (oacc_thread_numbers): Use oacc_dim_call.
26988         (oacc_xform_tile): New.
26989         (new_oacc_loop_raw): Initialize e_mask, adjust for ifns vector.
26990         (finish_oacc_loop): Adjust for ifns vector.
26991         (oacc_loop_discover_walk): Append loop abstraction sites to list,
26992         add case for GOACC_TILE fns.
26993         (oacc_loop_xform_loop): Delete.
26994         (oacc_loop_process): Iterate over call list directly, and add
26995         handling for GOACC_TILE fns.
26996         (oacc_loop_fixed_partitions): Determine default auto, deal with TILE,
26997         dump partitioning.
26998         (oacc_loop_auto_partitions): Add outer_assign parm. Assign all but
26999         vector partitioning to outer loops.  Assign 2 partitions to loops
27000         when available. Add TILE handling.
27001         (oacc_loop_partition): Adjust oacc_loop_auto_partitions call.
27002         (execite_oacc_device_lower): Process GOACC_TILE fns,
27003         ignore unknown specs.
27004         * tree-nested.c (convert_nonlocal_omp_clauses): Allow OMP_CLAUSE_TILE.
27005         * tree.c (omp_clause_num_ops): Adjust TILE ops.
27006         * tree.h (OMP_CLAUSE_TILE_ITERVAR, OMP_CLAUSE_TILE_COUNT): New.
27008 2017-02-09  Gerald Pfeifer  <gerald@pfeifer.com>
27010         * configure.ac (ACX_BUGURL): Update.
27011         * configure: Regenerate.
27013 2017-02-09  Richard Biener  <rguenther@suse.de>
27015         PR tree-optimization/69823
27016         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
27017         Properly enumerate all BBs in the region.  Use auto_vec/auto_bitmap.
27019 2017-02-09  Andrew Burgess  <andrew.burgess@embecosm.com>
27021         * config/arc/arc-c.def: Add __NPS400__ definition.
27022         * config/arc/arc.h (CPP_SPEC): Don't define __NPS400__ here.
27023         (TARGET_NPS400): Define.
27025 2017-02-09  Andrew Burgess  <andrew.burgess@embecosm.com>
27027         * config/arc/arc-arch.h (arc_arch_t): Move unchanged to earlier in
27028         file.
27029         (arc_cpu_t): Change base_architecture field, arch, to a arc_arc_t
27030         pointer, arch_info.
27031         (arc_cpu_types): Fill the arch_info field with a pointer into the
27032         arc_arch_types table.
27033         (arc_selected_cpu): Declare.
27034         * config/arc/arc.c (arc_selected_cpu): Make global.
27035         (arc_selected_arch): Delete.
27036         (arc_base_cpu): Delete.
27037         (arc_override_options): Remove references to deleted variables,
27038         update access to arch information.
27039         (ARC_OPT): Update access to arch information.
27040         (ARC_OPTX): Likewise.
27041         * config/arc/arc.h (arc_base_cpu): Remove declaration.
27042         (TARGET_ARC600): Update access to arch information.
27043         (TARGET_ARC601): Likewise.
27044         (TARGET_ARC700): Likewise.
27045         (TARGET_EM): Likewise.
27046         (TARGET_HS): Likewise.
27047         * config/arc/driver-arc.c (arc_cpu_to_as): Update access to arch
27048         information.
27050 2017-02-08  Pat Haugen  <pthaugen@us.ibm.com>
27052         PR target/78604
27053         * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Invert
27054         condition/operands for integer GE/LE/GEU/LEU operations.
27056 2017-02-08  Segher Boessenkool  <segher@kernel.crashing.org>
27058         PR translation/79397
27059         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Fix spelling
27060         of AltiVec.
27062 2017-02-08  Martin Jambor  <mjambor@suse.cz>
27064         PR ipa/79375
27065         * ipa-prop.c (ipa_alloc_node_params): Make static, return bool
27066         whether allocation happened.
27067         (ipa_initialize_node_params): Do not call ipa_alloc_node_params if
27068         nothing was allocated.
27070 2017-02-08  Jakub Jelinek  <jakub@redhat.com>
27072         PR tree-optimization/79408
27073         * tree-vrp.c (simplify_div_or_mod_using_ranges): If op1 is not
27074         constant, but SSA_NAME with a known integer range, use the minimum
27075         of that range instead of op1 to determine if modulo can be replaced
27076         with its first operand.
27078 2016-02-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27080         * config/riscv/riscv.c (riscv_build_integer_1): Avoid use of INT16_MAX.
27082 2017-02-08  Richard Biener  <rguenther@suse.de>
27084         PR tree-optimization/71824
27085         * graphite-scop-detection.c (scop_detection::build_scop_breadth):
27086         Check all loops contained in the merged region.
27088 2017-02-07  Andrew Pinski  <apinski@cavium.com>
27090         * config/aarch64/aarch64.md (popcount<mode>2): New pattern.
27092 2017-02-07  Andrew Pinski  <apinski@cavium.com>
27094         * config/aarch64/aarch64-cores.def (thunderx): Disable LSE.
27095         (thunderxt88): Likewise.
27096         (thunderxt81): Disable LSE and change v8.1 to v8.
27097         (thunderxt83): Likewise.
27099 2017-02-07  Jakub Jelinek  <jakub@redhat.com>
27100             Richard Biener  <rguenther@suse.de>
27102         PR middle-end/79399
27103         * ira-int.h (struct target_ira_int): Change x_max_struct_costs_size
27104         type from int to size_t.
27105         * ira-costs.c (struct_costs_size): Change type from int to size_t.
27107 2017-02-07  Jakub Jelinek  <jakub@redhat.com>
27109         PR rtl-optimization/79386
27110         * cprop.c (bypass_conditional_jumps): Initialize
27111         bypass_last_basic_block already before splitting bbs after
27112         unconditional traps...
27113         (bypass_conditional_jumps): ... rather than here.
27115         PR target/79299
27116         * config/i386/sse.md (xtg_mode, gatherq_mode): New mode attrs.
27117         (*avx512f_gathersi<mode>, *avx512f_gathersi<mode>_2,
27118         *avx512f_gatherdi<mode>, *avx512f_gatherdi<mode>_2): Use them,
27119         fix -masm=intel patterns.
27121 2017-02-07  Richard Biener  <rguenther@suse.de>
27123         PR tree-optimization/79256
27124         PR middle-end/79278
27125         * builtins.c (get_object_alignment_2): Use min_align_of_type
27126         to extract alignment for MEM_REFs to honor BIGGEST_FIELD_ALIGNMENT
27127         and ADJUST_FIELD_ALIGN.
27129         * doc/tm.texi.in (ADJUST_FIELD_ALIGN): Adjust to take additional
27130         type parameter.
27131         * doc/tm.texi: Regenerate.
27132         * stor-layout.c (layout_decl): Adjust.
27133         (update_alignment_for_field): Likewise.
27134         (place_field): Likewise.
27135         (min_align_of_type): Likewise.
27136         * config/arc/arc.h (ADJUST_FIELD_ALIGN): Adjust.
27137         * config/epiphany/epiphany.h (ADJUST_FIELD_ALIGN): Likewise.
27138         * config/epiphany/epiphany.c (epiphany_adjust_field_align): Likewise.
27139         * config/frv/frv.h (ADJUST_FIELD_ALIGN): Likewise.
27140         * config/frv/frv.c (frv_adjust_field_align): Likewise.
27141         * config/i386/i386.h (ADJUST_FIELD_ALIGN): Likewise.
27142         * config/i386/i386.c (x86_field_alignment): Likewise.
27143         * config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Likewise.
27144         * config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Likewise.
27145         * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
27146         * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
27147         * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Likewise.
27148         * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p):
27149          Likewise.
27151         Revert
27152         2017-01-30  Richard Biener  <rguenther@suse.de>
27154         PR tree-optimization/79256
27155         * targhooks.c (default_builtin_vector_alignment_reachable): Honor
27156         BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
27157         alignment on TYPE.
27159 2017-02-07  Toma Tabacu  <toma.tabacu@imgtec.com>
27161         * config/mips/mips.c (mips_expand_builtin_insn): Convert the QImode
27162         argument of the pshufh, psllh, psllw, psrah, psraw, psrlh, psrlw
27163         builtins to SImode and emit a zero-extend, if necessary.
27165 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
27167         * docs/invoke.texi (RISC-V Options): Alphabetize.
27169 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
27171         * doc/invoke.texi (RISC-V Options): Use two spaces to separate
27172         options.
27174 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
27176         * config/riscv/riscv.c: New file.
27177         * common/config/riscv/riscv-common.c: Likewise.
27178         * config.gcc: Likewise.
27179         * config/riscv/constraints.md: Likewise.
27180         * config/riscv/elf.h: Likewise.
27181         * config/riscv/generic.md: Likewise.
27182         * config/riscv/linux.h: Likewise.
27183         * config/riscv/multilib-generator: Likewise.
27184         * config/riscv/peephole.md: Likewise.
27185         * config/riscv/pic.md: Likewise.
27186         * config/riscv/predicates.md: Likewise.
27187         * config/riscv/riscv-builtins.c: Likewise.
27188         * config/riscv/riscv-c.c: Likewise.
27189         * config/riscv/riscv-ftypes.def: Likewise.
27190         * config/riscv/riscv-modes.def: Likewise.
27191         * config/riscv/riscv-opts.h: Likewise.
27192         * config/riscv/riscv-protos.h: Likewise.
27193         * config/riscv/riscv.h: Likewise.
27194         * config/riscv/riscv.md: Likewise.
27195         * config/riscv/riscv.opt: Likewise.
27196         * config/riscv/sync.md: Likewise.
27197         * config/riscv/t-elf-multilib: Likewise.
27198         * config/riscv/t-linux: Likewise.
27199         * config/riscv/t-linux-multilib: Likewise.
27200         * config/riscv/t-riscv: Likewise.
27201         * configure.ac: Likewise.
27202         * doc/contrib.texi: Add Kito Cheng, Palmer Dabbelt, and Andrew
27203         Waterman as RISC-V maintainers.
27204         * doc/install.texi: Add RISC-V entries.
27205         * doc/invoke.texi: Add RISC-V options section.
27206         * doc/md.texi: Add RISC-V constraints section.
27207         * configure: Regenerated.
27209 2017-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
27211         PR target/66144
27212         * config/rs6000/vector.md (vcond<mode><mode>): Allow the true and
27213         false values to be constant vectors with all 0 or all 1 bits set.
27214         (vcondu<mode><mode>): Likewise.
27215         * config/rs6000/predicates.md (vector_int_reg_or_same_bit): New
27216         predicate.
27217         (fpmask_comparison_operator): Update comment.
27218         (vecint_comparison_operator): New predicate.
27219         * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Optimize
27220         vector conditionals when the true and false values are constant
27221         vectors with all 0 bits or all 1 bits set.
27223 2017-02-06  Martin Sebor  <msebor@redhat.com>
27225         PR  tree-optimization/79376
27226         * gimple-fold.c (get_range_strlen): Set the minimum length to zero.
27228 2017-02-06  Uros Bizjak  <ubizjak@gmail.com>
27230         * config/i386/sse.md (vector modes -> vec_extract* splitter): Use
27231         explicit subreg RTX with operand 1.  Use VECTOR_MODE_P predicate
27232         to simplify split condition.
27234 2017-02-06  Jakub Jelinek  <jakub@redhat.com>
27236         * omp-expand.c (oxpand_omp_atomic_fetch_op,
27237         expand_omp_atomic_pipeline): Return false if can_atomic_load_p is
27238         false.
27240 2017-02-06  Segher Boessenkool  <segher@kernel.crashing.org>
27242         PR rtl-optimization/68664
27243         * target.def (can_speculate_insn): New hook.
27244         * doc/tm.texi.in (TARGET_SCHED_CAN_SPECULATE_INSN): New hook.
27245         * doc/tm.texi: Regenerate.
27246         * sched-rgn.c (can_schedule_ready_p): Use the new hook.
27247         * config/rs6000/rs6000.c (TARGET_SCHED_CAN_SPECULATE_INSN): New macro.
27248         (rs6000_sched_can_speculate_insn): New function.
27250 2017-02-06  Jakub Jelinek  <jakub@redhat.com>
27252         PR tree-optimization/79284
27253         * tree-vectorizer.h (VECT_SCALAR_BOOLEAN_TYPE_P): Define.
27254         * tree-vect-stmts.c (vect_get_vec_def_for_operand,
27255         vectorizable_mask_load_store, vectorizable_operation,
27256         vect_is_simple_cond, get_same_sized_vectype): Use it instead
27257         of comparing TREE_CODE of a type against BOOLEAN_TYPE.
27258         * tree-vect-patterns.c (check_bool_pattern, search_type_for_mask_1,
27259         vect_recog_bool_pattern, vect_recog_mask_conversion_pattern): Likewise.
27260         * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
27261         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
27262         Remove redundant gimple_code (stmt) == GIMPLE_ASSIGN test after
27263         is_gimple_assign (stmt).  Replace another such test with
27264         is_gimple_assign (stmt).
27266 2017-02-06  Georg-Johann Lay  <avr@gjlay.de>
27268         PR target/78883
27269         * config/avr/avr.c (rtl-iter.h): Include it.
27270         (TARGET_LEGITIMATE_COMBINED_INSN): New hook define...
27271         (avr_legitimate_combined_insn): ...and implementation.
27273 2017-02-06  Dominik Vogt  <vogt@linux.vnet.ibm.com>
27275         * config/s390/predicates.md ("larl_operand"): Use macros from hwint.h.
27276         * config/s390/s390.c (s390_const_operand_ok)
27277         (s390_canonicalize_comparison, s390_extract_part)
27278         (s390_single_part, s390_contiguous_bitmask_nowrap_p)
27279         (s390_contiguous_bitmask_p, s390_rtx_costs)
27280         (legitimize_pic_address): Likewise.
27281         * config/s390/s390.md ("clzdi2", "clztidi2"): Likewise.
27282         * config/s390/vx-builtins.md ("vec_genbytemaskv16qi")
27283         ("vec_permi<mode>", "vfae<mode>", "*vfaes<mode>", "vstrc<mode>")
27284         ("*vstrcs<mode>"): Use UINTVAL() to set unsigned HOST_WIDE_INT.
27285         * config/s390/vector.md ("vec_vfenes<mode>"): Likewise.
27287 2017-02-06  Georg-Johann Lay  <avr@gjlay.de>
27289         * config/avr/avr.md (*addhi3_zero_extend): Add alternative where
27290         REGNO($0) == REGNO($1).
27292 2017-02-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27294         * config/s390/linux.h(SIZE_TYPE): Add comment.
27296 2017-02-06  Julian Brown  <julian@codesourcery.com>
27297             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
27298             Virendra Pathak  <virendra.pathak@broadcom.com>
27300         * config/aarch64/aarch64-cores.def: Change the scheduler
27301         to Thunderx2t99.
27302         * config/aarch64/aarch64.md: Include thunderx2t99.md.
27303         * config/aarch64/thunderx2t99.md: New file.
27305 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
27307         * doc/standards.texi (Go Language): Update link to language
27308         standard.
27310 2017-02-05  Jan Hubicka  <hubicka@ucw.cz>
27312         * tree-eh.c (lower_resx): Sanitize profile.
27313         (cleanup_empty_eh_move_lp): Likewise.
27315 2017-02-05  Jan Hubicka  <hubicka@ucw.cz>
27317         PR tree-ssa/79347
27318         * cfgloopmanip.c (lv_adjust_loop_entry_edge, loop_version): Add
27319         ELSE_PROB.
27320         * cfgloopmanip.h (loop_version): Update prototype.
27321         * modulo-sched.c (sms_schedule): Update call of loop_version.
27322         * tree-if-conv.c(version_loop_for_if_conversion): Likewise.
27323         * tree-parloops.c (gen_parallel_loop): Likewise.
27324         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Likewise.
27325         * tree-ssa-loop-split.c (split_loop): Likewise.
27326         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Likewise.
27327         * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
27329 2017-02-05  Martin Liska  <mliska@suse.cz>
27331         PR bootstrap/78985
27332         * config/s390/s390.c (s390_gimplify_va_arg): Initialize local
27333         variable to NULL.
27334         (print_operand_address): Initialize a struct to zero.
27336 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
27338         * doc/contrib.texi (Contributors): Refer to Hans Boehm's
27339         garbage collector only in textual form.
27341 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
27343         * doc/extend.texi (x86 specific memory model extensions for
27344         transactional memory): Simplify a phrase.
27346 2017-02-05  Eric Botcazou  <ebotcazou@adacore.com>
27348         PR target/79353
27349         * config/sparc/sync.md (atomic_loaddi_1): Replace 'U' constraint with
27350         'r', 'm' constraint with 'T' and !TARGET_ARCH64 with TARGET_ARCH32.
27351         (atomic_storedi_1): Likewise.
27353 2017-02-04  Jakub Jelinek  <jakub@redhat.com>
27355         PR tree-optimization/79338
27356         * tree-parloops.c (gather_scalar_reductions): Don't call
27357         vect_analyze_loop_form for loop->inner before destroying loop's
27358         loop_vinfo.
27360 2017-02-03  Martin Sebor  <msebor@redhat.com>
27362         PR tree-optimization/79327
27363         * gimple-ssa-sprintf.c (tree_digits): Avoid adding the base prefix
27364         when precision has resulted in leading zeros.
27365         (format_integer): Adjust the likely counter to assume an unknown
27366         argument that may be zero is non-zero.
27368 2017-02-03  Jason Merrill  <jason@redhat.com>
27370         PR c++/78689
27371         * tree-inline.c (copy_tree_body_r) [COND_EXPR]: Revert change to
27372         avoid copying non-taken branch.
27374 2017-02-03  Jakub Jelinek  <jakub@redhat.com>
27376         PR tree-optimization/79340
27377         * tree-vect-loop.c (vectorizable_reduction): Release
27378         vec_defs elements after safe_splicing them into other vectors.
27379         Formatting fixes.
27381         PR tree-optimization/79327
27382         * gimple-ssa-sprintf.c (adjust_range_for_overflow): If returning
27383         true, always set *argmin and *argmax to TYPE_{MIN,MAX}_VALUE of
27384         dirtype.
27385         (format_integer): Use wide_int_to_tree instead of build_int_cst
27386         + to_?hwi.  If argmin is NULL, just set argmin and argmax to
27387         TYPE_{MIN,MAX}_VALUE of argtype.  Simplify and fix computation
27388         of shortest and longest sequence.
27390 2017-02-03  Uros Bizjak  <ubizjak@gmail.com>
27392         * config/i386/i386.c (dimode_scalar_chain::convert_reg):
27393         Use pextrd for TARGET_SSE4_1 when creating scalar copy.
27395 2017-02-03  Walter Lee  <walt@tilera.com>
27397         PR target/78862
27398         * config/tilegx/tilegx.md (tilegx_expand_prologue): Add blockage
27399         after initial stackframe link reg save.
27400         * config/tilepro/tilepro.md (tilepro_expand_prologue): Likewise.
27402 2017-02-03  Jakub Jelinek  <jakub@redhat.com>
27404         PR target/79354
27405         * config/rs6000/rs6000.md (movsi_from_sf): Use wb constraint instead of
27406         wu for stxssp alternative.
27408 2017-02-03  Martin Sebor  <msebor@redhat.com>
27410         PR tree-optimization/79352
27411         * gimple-fold.c (get_range_strlen): Add argument.
27412         (get_range_strlen): Change return type to bool.
27413         (get_maxval_strlen): Pass in a dummy argument.
27414         * gimple-fold.h (get_range_strlen): Change return type to bool.
27415         * gimple-ssa-sprintf.c (get_string_length): Set unlikely counter.
27416         * tree.h (array_at_struct_end_p): Add argument.
27417         * tree.c (array_at_struct_end_p): Handle it.
27419 2017-02-03  Martin Liska  <mliska@suse.cz>
27421         PR lto/66295
27422         * multiple_target.c (create_dispatcher_calls): Redirect edge
27423         from a caller of a dispatcher.
27424         (expand_target_clones): Make the clones local.
27425         (ipa_target_clone): Do both target clones and resolvers.
27426         (ipa_dispatcher_calls): Remove the pass.
27427         (pass_dispatcher_calls::gate): Likewise.
27428         (make_pass_dispatcher_calls): Likewise.
27429         * passes.def (pass_target_clone): Put as very first IPA early
27430         pass.
27432 2017-02-03  Martin Liska  <mliska@suse.cz>
27434         * symtab.c (symtab_node::binds_to_current_def_p): Bail out
27435         in case of a function with ifunc attribute.
27437 2017-02-03  Martin Liska  <mliska@suse.cz>
27439         * cgraph.c (cgraph_node::dump): Dump function version info.
27440         * symtab.c (symtab_node::dump_base): Add missing new line.
27442 2017-02-02  Jan Hubicka  <hubicka@ucw.cz>
27444         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): New function.
27445         (ifcombine_ifandif): Use it.
27447 2017-02-03  Martin Liska  <mliska@suse.cz>
27449         * doc/invoke.texi: Document default value for
27450         use-after-scope-direct-emission-threshold.
27452 2017-02-03  Martin Liska  <mliska@suse.cz>
27454         PR tree-optimization/79339
27455         * gimple-ssa-sprintf.c (format_floating_max): Call mpfr_clear.
27456         (format_floating): Likewise.
27458 2017-02-03  Martin Liska  <mliska@suse.cz>
27460         PR ipa/79337
27461         * ipa-prop.c (ipa_node_params_t::insert): Remove current
27462         implementation.
27463         (ipa_node_params_t::remove): Likewise.
27464         * ipa-prop.h (ipa_node_params::ipa_node_params): Make default
27465         initialization from removed ipa_node_params_t::insert.
27466         (ipa_node_params::~ipa_node_params): Move from removed
27467         ipa_node_params_t::release.
27468         * symbol-summary.h (symbol_summary::m_released): New member.
27469         Do not release a summary twice.  Do not allow to call finalizer
27470         for types of a summary that live in GGC memory.
27472 2017-02-02  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
27474         * config/aarch64/aarch64.c (thunderx2t99_tunings): Enable AES and
27475         cmp_branch fusion.
27477 2017-02-02  Martin Sebor  <msebor@redhat.com>
27479         PR middle-end/79275
27480         * gimple-ssa-sprintf.c (get_string_length): Set lower bound to zero.
27481         (format_string): Tighten up the range of output for non-constant
27482         strings and correct the expected range for wide non-constant strings.
27484 2017-02-02  Martin Sebor  <msebor@redhat.com>
27486         * doc/invoke.texi (-maccumulate-args): Fix bad grammar.
27488         PR middle-end/32003
27489         * doc/invoke.texi (-fdump-tree-): Remove pass-specific options from
27490         index.
27491         (-fdump-tree-@var): Add to index and document how to come up
27492         with pass-specific option and dump file names.
27493         (-fdump-passes): Clarify where to look for output.
27495 2017-02-02  Jan Hubicka  <hubicka@ucw.cz>
27497         PR middle-end/77445
27498         * tree-ssa-threadbackward.c (profitable_jump_thread_path): Dump
27499         statistics of the analyzed path; allow threading for speed when
27500         any of BBs along the path are optimized for speed.
27502 2017-02-02  Eric Botcazou  <ebotcazou@adacore.com>
27504         PR middle-end/78468
27505         * emit-rtl.c (init_emit): Add ??? comment for problematic alignment
27506         settings of the virtual registers.
27508         Revert again
27509         2016-08-23  Dominik Vogt  <vogt@linux.vnet.ibm.com>
27511         * explow.c (get_dynamic_stack_size): Take known alignment of stack
27512         pointer + STACK_DYNAMIC_OFFSET into account when calculating the size
27513         needed.
27515 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27517         * config/s390/vx-builtins.md ("vec_ceil", "vec_floor")
27518         ("vec_trunc", "vec_roundc", "vec_round"): Remove expanders.
27520 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27522         * config/s390/s390.md: Add missing comments with the expanded
27523         mnemonics.
27524         * config/s390/vector.md: Likewise.
27525         * config/s390/vx-builtins.md: Likewise.
27527 2017-02-02  Jakub Jelinek  <jakub@redhat.com>
27529         PR target/79197
27530         * config/rs6000/rs6000.md (*fixuns_trunc<mode>di2_fctiduz): Rename to ...
27531         (fixuns_trunc<mode>di2): ... this, remove previous expander.  Put all
27532         conditions on a single line.
27534 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27536         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
27537         __S390_VX__ to __VX__.
27539 2017-02-01  Andrew Pinski  <apinski@cavium.com>
27541         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost): Pass
27542         stmt_info to record_stmt_cost.
27543         (vect_get_known_peeling_cost): Pass stmt_info if known to
27544         record_stmt_cost.
27545         * config/aarch64/aarch64-protos.h (cpu_vector_cost): Split
27546         cpu_vector_cost field into
27547         scalar_int_stmt_cost and scalar_fp_stmt_cost.  Split vec_stmt_cost
27548         field into vec_int_stmt_cost and vec_fp_stmt_cost.
27549         * config/aarch64/aarch64.c (generic_vector_cost): Update for the
27550         splitting of scalar_stmt_cost and vec_stmt_cost.
27551         (thunderx_vector_cost): Likewise.
27552         (cortexa57_vector_cost): LIkewise.
27553         (exynosm1_vector_cost): Likewise.
27554         (xgene1_vector_cost): Likewise.
27555         (thunderx2t99_vector_cost): Improve after the splitting of the two
27556         fields.
27557         (aarch64_builtin_vectorization_cost): Update for the splitting of
27558         scalar_stmt_cost and vec_stmt_cost.
27560 2017-02-01  Torvald Riegel  <triegel@redhat.com>
27561             Richard Henderson  <rth@redhat.com>
27563         * builtins.c (fold_builtin_atomic_always_lock_free): Make "lock-free"
27564         conditional on existance of a fast atomic load.
27565         * optabs-query.c (can_atomic_load_p): New function.
27566         * optabs-query.h (can_atomic_load_p): Declare it.
27567         * optabs.c (expand_atomic_exchange): Always delegate to libatomic if
27568         no fast atomic load is available for the particular size of access.
27569         (expand_atomic_compare_and_swap): Likewise.
27570         (expand_atomic_load): Likewise.
27571         (expand_atomic_store): Likewise.
27572         (expand_atomic_fetch_op): Likewise.
27573         * testsuite/lib/target-supports.exp
27574         (check_effective_target_sync_int_128): Remove x86 because it provides
27575         no fast atomic load.
27576         (check_effective_target_sync_int_128_runtime): Likewise.
27578 2017-02-01  Richard Biener  <rguenther@suse.de>
27580         * graphite.c: Include tree-vectorizer.h for find_loop_location.
27581         (graphite_transform_loops): Provide opt-info for optimized nests.
27582         * tree-parloop.c (parallelize_loops): Provide opt-info for
27583         parallelized loops.
27585 2017-02-01  Richard Biener  <rguenther@suse.de>
27587         PR middle-end/79315
27588         * tree-cfg.c (move_stmt_op): Never set TREE_BLOCK when it
27589         was not set before.
27591 2017-02-01  Richard Biener  <rguenther@suse.de>
27593         PR tree-optimization/71824
27594         * graphite-scop-detection.c (scop_detection::build_scop_breadth):
27595         Verify the loops are valid in the merged SESE region.
27596         (scop_detection::can_represent_loop_1): Check analyzing the
27597         evolution of the number of iterations in the region succeeds.
27599 2017-01-31  Ian Lance Taylor  <iant@golang.org>
27601         * config/i386/i386.c (ix86_expand_split_stack_prologue): Add
27602         REG_ARGS_SIZE note to 32-bit push insns and call insn.
27604 2017-01-31  David Malcolm  <dmalcolm@redhat.com>
27606         PR preprocessor/79210
27607         * input.c (get_substring_ranges_for_loc): Replace line_width
27608         assertion with error-handling.
27610 2017-01-31  Richard Biener  <rguenther@suse.de>
27612         PR tree-optimization/77318
27613         * graphite-sese-to-poly.c (extract_affine): Fix assert.
27614         (create_pw_aff_from_tree): Take loop parameter.
27615         (add_condition_to_pbb): Pass loop of the condition to
27616         create_pw_aff_from_tree.
27618 2017-01-31  Jakub Jelinek  <jakub@redhat.com>
27620         * config/s390/s390.c (s390_asan_shadow_offset): New function.
27621         (TARGET_ASAN_SHADOW_OFFSET): Redefine.
27623 2017-01-31  Michael Meissner  <meissner@linux.vnet.ibm.com>
27625         PR target/78597
27626         PR target/79038
27627         * config/rs6000/rs6000-protos.h (convert_float128_to_int): Delete,
27628         no longer used.
27629         (convert_int_to_float128): Likewise.
27630         * config/rs6000/rs6000.c (convert_float128_to_int): Likewise.
27631         (convert_int_to_float128): Likewise.
27632         * config/rs6000/rs6000.md (UNSPEC_IEEE128_MOVE): Likewise.
27633         (UNSPEC_IEEE128_CONVERT): Likewise.
27634         (floatsi<mode>2, FLOAT128 iterator): Bypass calling
27635         rs6000_expand_float128_convert if we have IEEE 128-bit hardware.
27636         Use local variables for IBM extended format.
27637         (fix_trunc<mode>si2, FLOAT128 iterator): Likewise.
27638         (fix_trunc<mode>si2_fprs): Likewise.
27639         (fixuns_trunc<IEEE128:mode><SDI:mode>2): Likewise.
27640         (floatuns<IEEE128:mode>2, IEEE128 iterator): Likewise.
27641         (fix<uns>_<mode>si2_hw): Rework the IEEE 128-bt hardware support
27642         to know that we can now have integers of all sizes in vector
27643         registers.
27644         (fix<uns>_<mode>di2_hw): Likewise.
27645         (float<uns>_<mode>si2_hw): Likewise.
27646         (fix_<mode>si2_hw): Likewise.
27647         (fixuns_<mode>si2_hw): Likewise.
27648         (float<uns>_<mode>di2_hw): Likewise.
27649         (float_<mode>di2_hw): Likewise.
27650         (float_<mode>si2_hw): Likewise.
27651         (floatuns_<mode>di2_hw): Likewise.
27652         (floatuns_<mode>si2_hw): Likewise.
27653         (xscvqp<su>wz_<mode>): Delete, no longer used.
27654         (xscvqp<su>dz_<mode>): Likewise.
27655         (xscv<su>dqp_<mode>): Likewise.
27656         (ieee128_mfvsrd_64bit): Likewise.
27657         (ieee128_mfvsrd_32bit): Likewise.
27658         (ieee128_mfvsrwz): Likewise.
27659         (ieee128_mtvsrw): Likewise.
27660         (ieee128_mtvsrd_64bit): Likewise.
27661         (ieee128_mtvsrd_32bit): Likewise.
27663 2017-01-31  Martin Liska  <mliska@suse.cz>
27665         PR ipa/79285
27666         * ipa-prop.c (ipa_free_all_node_params): Call release method
27667         instead of ~sumbol_summary to not to trigger double times
27668         dtor of hash_map.
27670 2017-01-31  Aldy Hernandez  <aldyh@redhat.com>
27672         PR tree-optimization/71691
27673         * bitmap.h (class auto_bitmap): New.
27674         * tree-ssa-loop-unswitch.c (tree_may_unswitch_on): Call
27675         is_maybe_undefined instead of ssa_undefined_value_p.
27677 2017-01-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27679         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
27680         __S390_ARCH_LEVEL__ to __ARCH__.
27682 2017-01-31  Jakub Jelinek  <jakub@redhat.com>
27684         PR tree-optimization/79267
27685         * value-prof.c (gimple_ic): Only drop lhs for noreturn calls
27686         if should_remove_lhs_p is true.
27688 2017-01-30  Alexandre Oliva <aoliva@redhat.com>
27690         PR debug/63238
27691         * dwarf2out.c (clone_as_declaration): Drop DW_AT_alignment.
27692         (add_alignment_attribute): New.
27693         (base_type_die): Add alignment attribute.
27694         (subrange_type_die): Likewise.
27695         (modified_type_die): Likewise.
27696         (gen_array_type_die): Likewise.
27697         (gen_descr_array_type_die: Likewise.
27698         (gen_enumeration_type_die): Likewise.
27699         (gen_subprogram_die): Likewise.
27700         (gen_variable_die): Likewise.
27701         (gen_field_die): Likewise.
27702         (gen_ptr_to_mbr_type_die): Likewise.
27703         (gen_struct_or_union_type_die): Likewise.
27704         (gen_subroutine_type_die): Likewise.
27705         (gen_typedef_die): Likewise.
27706         (base_type_cmp): Compare alignment attribute.
27708 2017-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27710         PR target/79170
27711         * config/rs6000/altivec.md (*setb_internal): Rename to setb_signed.
27712         (setb_unsigned) New pattern for setb with CCUNS.
27713         * config/rs6000/rs6000.c (expand_block_compare): Use a different
27714         subfc./subfe sequence to avoid overflow problems.  Generate a
27715         shorter sequence with cmpld/setb for power9.
27716         * config/rs6000/rs6000.md (subf<mode>3_carry_dot2): Add a new pattern
27717         for generating subfc. instruction.
27718         (cmpstrsi): Add TARGET_POPCNTD predicate as the generate sequence
27719         now uses this instruction.
27721 2017-01-30  Ian Lance Taylor  <iant@google.com>
27723         PR debug/79289
27724         * dwarf2out.c (gen_type_die_with_usage): When picking a variant
27725         for FUNCTION_TYPE/METHOD_TYPE, use the first matching one.
27727 2017-01-30  Martin Sebor  <msebor@redhat.com>
27729         * gimple-ssa-sprintf.c (fmtresult::adjust_for_width_or_precision):
27730         Move constant to the right of a relational operator.
27731         (get_mpfr_format_length, format_character, format_string): Ditto.
27732         (should_warn_p, maybe_warn): Same.
27734         * doc/invoke.texi (-Wformat-truncation=1): Fix typo.
27736 2017-01-30  Maxim Ostapenko  <m.ostapenko@samsung.com>
27738         PR lto/79061
27739         * asan.c (get_translation_unit_decl): Remove function.
27740         (asan_add_global): Force has_dynamic_init to zero in LTO mode.
27742 2017-01-30  Martin Liska  <mliska@suse.cz>
27744         PR gcov-profile/79259
27745         * opts.c (common_handle_option): Enable flag_ipa_bit_cp w/
27746         -fprofile-generate.
27748 2017-01-30  Martin Liska  <mliska@suse.cz>
27750         PR bootstrap/78985
27751         * config/aarch64/cortex-a57-fma-steering.c (func_fma_steering::analyze):
27752         Initialize variables with NULL value.
27754 2017-01-30  Richard Earnshaw  <rearnsh@arm.com>
27756         PR target/79260
27757         * config.gcc (arm*-*-*): Add arm/arm-flags.h and arm/arm-isa.h to
27758         tm_p_file.
27759         * arm/arm-protos.h: Don't directly include arm-flags.h and arm-isa.h.
27761 2017-01-30  Richard Biener  <rguenther@suse.de>
27763         PR tree-optimization/79276
27764         * tree-vrp.c (process_assert_insertions): Properly adjust common
27765         when removing a duplicate.
27767         * gcc.dg/torture/pr79276.c: New testcase.
27769 2017-01-30  Richard Biener  <rguenther@suse.de>
27771         PR tree-optimization/79256
27772         * targhooks.c (default_builtin_vector_alignment_reachable): Honor
27773         BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
27774         alignment on TYPE.
27775         * tree.c (build_aligned_type): Set TYPE_USER_ALIGN.
27777 2017-01-30  Dominik Vogt  <vogt@linux.vnet.ibm.com>
27779         PR target/79240
27780         * config/s390/s390.md ("*r<noxa>sbg_<mode>_srl_bitmask")
27781         ("*r<noxa>sbg_<mode>_sll_bitmask")
27782         ("*extzv_<mode>_srl<clobbercc_or_nocc>")
27783         ("*extzv_<mode>_sll<clobbercc_or_nocc>"):
27784         Use contiguous_bitmask_nowrap_operand.
27786 2017-01-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27788         PR target/79268
27789         * config/rs6000/altivec.h (vec_xl): Revise #define.
27790         (vec_xst): Likewise.
27792 2017-01-27  Uros Bizjak  <ubizjak@gmail.com>
27794         * config/i386/i386.c (print_reg): Use REGNO instead of true_regnum.
27796 2017-01-27  Bernd Schmidt  <bschmidt@redhat.com>
27798         PR rtl-optimization/79194
27799         * cprop.c (one_cprop_pass): Move deletion of code after unconditional
27800         traps before call to bypass_conditional_jumps.
27802 2017-01-27  Vladimir Makarov  <vmakarov@redhat.com>
27804         PR tree-optimization/71374
27805         * lra-constraints.c (check_conflict_input_operands): New.
27806         (match_reload): Use it.
27808 2017-01-27  Vladimir Makarov  <vmakarov@redhat.com>
27810         PR target/79131
27811         * lra-assigns.c (find_hard_regno_for_1): Take endianess for into
27812         account to calculate conflict_set.
27814 2017-01-27  Bin Cheng  <bin.cheng@arm.com>
27816         PR rtl-optimization/78559
27817         * combine.c (try_combine): Discard REG_EQUAL and REG_EQUIV for
27818         other_insn in combine.
27820 2017-01-27  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
27822         * builtin-types.def: Use unsigned_char_type_node for BT_UINT8.  Use
27823         uint16_type_node for BT_UINT16.
27825 2017-01-27  David Malcolm  <dmalcolm@redhat.com>
27827         * doc/sourcebuild.texi (Testsuites): Add "GIMPLE Tests" and
27828         "RTL Tests" to menu.
27829         (GIMPLE Tests): New node.
27830         (RTL Tests): New node.
27832 2017-01-27  Richard Biener  <rguenther@suse.de>
27834         PR tree-optimization/79245
27835         * tree-loop-distribution.c (distribute_loop): Apply cost
27836         modeling also to detected patterns.
27838 2017-01-27  Richard Biener  <rguenther@suse.de>
27840         PR tree-optimization/71433
27841         * tree-vrp.c (register_new_assert_for): Revert earlier changes.
27842         (compare_assert_loc): New function.
27843         (process_assert_insertions): Sort and optimize assert locations
27844         to remove duplicates and push down identical assertions on
27845         edges to their destination block.
27847 2017-01-27  Richard Biener  <rguenther@suse.de>
27849         PR tree-optimization/79244
27850         * tree-vrp.c (remove_range_assertions): Forcefully propagate
27851         out SSA names even if abnormal.
27853 2017-01-27  Jakub Jelinek  <jakub@redhat.com>
27855         * realmpfr.h: Poison MPFR_RND{N,Z,U,D}.
27856         * gimple-ssa-sprintf.c (format_floating_max): Use GMP_RNDN
27857         instead of MPFR_RNDN.
27859 2017-01-27  Richard Earnshaw  <rearnsha@arm.com>
27861         PR target/79239
27862         * arm.c (arm_option_override): Don't call build_target_option_node
27863         until after doing all option overrides.
27864         (arm_valid_target_attribute_tree): Likewise.
27866 2017-01-27  Martin Liska  <mliska@suse.cz>
27868         * doc/invoke.texi (-fprofile-arcs): Document profiling support
27869         for {cd}tors and C++ {cd}tors.
27871 2017-01-27  Dominik Vogt  <vogt@linux.vnet.ibm.com>
27873         * config/s390/s390.md ("*setmem_long_and")
27874         ("*setmem_long_and_31z"): Use zero_extend instead of and.
27876 2017-01-26  Martin Sebor  <msebor@redhat.com>
27878         * gimple-ssa-sprintf.c (format_floating): Simplify the computation
27879         of precision.
27881 2017-01-26  Martin Sebor  <msebor@redhat.com>
27883         * gimple-ssa-sprintf.c (format_floating): Test HAVE_XFmode and
27884         HAVE_DFmode before using XFmode or DFmode.
27885         (parse_directive): Avoid using the z length modifier to avoid
27886         the ISO C++98 does not support the â€˜z’ gnu_printf length modifier.
27888         PR middle-end/78703
27889         * gimple-ssa-sprintf.c (adjust_for_width_or_precision): Change
27890         to accept adjustment as an array.
27891         (get_int_range): New function.
27892         (struct directive): Make width and prec arrays.
27893         (directive::set_width, directive::set_precision): Call get_int_range.
27894         (format_integer, format_floating): Handle width and precision ranges.
27895         (format_string, parse_directive): Same.
27897 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
27899         PR debug/79129
27900         * dwarf2out.c (generate_skeleton_bottom_up): For children with
27901         comdat_type_p set, just clone them, but keep the children in the
27902         original DIE.
27904         PR debug/78835
27905         * dwarf2out.c (prune_unused_types): Mark all functions with DIEs
27906         which have direct callers with -fvar-tracking-assignments enabled
27907         in the current TU.
27908         (resolve_addr): Avoid adding skeleton DIEs for DW_AT_call_origin
27909         inside of type units.
27911 2017-01-26  Martin Sebor  <msebor@redhat.com>
27913         PR middle-end/78703
27914         * gimple-ssa-sprintf.c (struct result_range): Add likely and
27915         unlikely counters.
27916         (struct format_result): Replace number_chars, number_chars_min,
27917         and number_chars_max with a single member of struct result_range.
27918         Remove bounded.
27919         (format_result::operator+=): Adjust.
27920         (struct fmtresult): Remove bounded.  Handle likely and unlikely
27921         counters.
27922         (fmtresult::adjust_for_width_or_precision): New function.
27923         (fmtresult:type_max_digits): New function.
27924         (bytes_remaining): Handle likely and unlikely counters.
27925         (min_bytes_remaining): Remove.
27926         (format_percent): Simplify.
27927         (format_integer, format_floating): Set likely and unlikely counters.
27928         (get_string_length, format_character, format_string): Same.
27929         (format_plain, should_warn_p): New function.
27930         (maybe_warn): Call should_warn_p.  Update diagnostic messages
27931         and handle those for all directives, including plain strings.
27932         (format_directive): Handle likely and unlikely counters.
27933         Remove unnecessary quoting from diagnostics.  Add an informational
27934         note.
27935         (add_bytes): Remove.
27936         (pass_sprintf_length::compute_format_length): Simplify.
27937         (try_substitute_return_value): Handle likely and unlikely counters.
27939 2017-01-26  Carl Love  <cel@us.ibm.com>
27941         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Remove
27942         bogus entries for the P8V_BUILTIN_VEC_VGBBD built-ins
27944 2017-01-26  Vladimir Makarov  <vmakarov@redhat.com>
27946         PR target/79131
27947         * lra-assigns.c (setup_live_pseudos_and_spill_after_risky): Take
27948         endianess for subregs into account.
27949         * lra-constraints.c (lra_constraints): Do risky transformations
27950         always on the first iteration.
27951         * lra-lives.c (check_pseudos_live_through_calls): Add arg
27952         last_call_used_reg_set.
27953         (process_bb_lives): Define and use last_call_used_reg_set.
27954         * lra.c (lra): Always continue after lra_constraints on the first
27955         iteration.
27957 2017-01-26  Kirill Yukhin  <kirill.yukhin@gmail.com>
27959         * gcc.target/i386/avx512bw-kshiftlq-2.c: Use unsigned long long
27960         constant.
27961         * gcc.target/i386/avx512bw-kshiftrq-2.c: Ditto.
27963 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
27965         * config/i386/avx512fintrin.h (_ktest_mask16_u8,
27966         _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): Move to ...
27967         * config/i386/avx512dqintrin.h (_ktest_mask16_u8,
27968         _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): ... here.
27969         * config/i386/i386-builtin.def (__builtin_ia32_ktestchi,
27970         __builtin_ia32_ktestzhi, __builtin_ia32_kaddhi): Use
27971         OPTION_MASK_ISA_AVX512DQ instead of OPTION_MASK_ISA_AVX512F.
27972         * config/i386/sse.md (SWI1248_AVX512BWDQ2): New mode iterator.
27973         (kadd<mode>, ktest<mode>): Use it instead of SWI1248_AVX512BWDQ.
27975 2017-01-26  Marek Polacek  <polacek@redhat.com>
27977         PR c/79199
27978         * fold-const.c (operand_equal_p) [COND_EXPR]: Use OP_SAME_WITH_NULL
27979         for the third operand.
27981 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
27983         PR middle-end/79236
27984         * omp-low.c (struct omp_context): Add simt_stmt field.
27985         (scan_omp_for): Return omp_context *.
27986         (scan_omp_simd): Set simt_stmt on the non-_simt_ SIMD
27987         context to the _simt_ SIMD stmt.
27988         (lower_omp_for): For combined SIMD with sibling _simt_
27989         SIMD, make sure to use the same decls in _looptemp_
27990         clauses as in the sibling.
27992 2017-01-26  David Sherwood  <david.sherwood@arm.com>
27994         PR middle-end/79212
27995         * gimplify.c (omp_notice_variable): Add GOVD_SEEN flag to variables in
27996         all contexts.
27998 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
28000         PR target/70465
28001         * reg-stack.c (emit_swap_insn): Instead of fld a; fld b; fxchg %st(1);
28002         emit fld b; fld a; if possible.
28004         * brig-builtins.def: Update copyright years.
28005         * config/arm/arm_acle_builtins.def: Update copyright years.
28007 2017-01-25  Michael Meissner  <meissner@linux.vnet.ibm.com>
28009         PR target/79179
28010         * config/rs6000/vsx.md (vsx_extract_<mode>_store): Use wY
28011         constraint instead of o for the stxsd instruction.
28013 2017-01-25  Carl Love  <cel@us.ibm.com>
28015         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Fix order
28016         of entries for ALTIVEC_BUILTIN_VEC_PACKS and P8V_BUILTIN_VEC_VGBBD.
28018 2017-01-25  Jonathan Wakely  <jwakely@redhat.com>
28020         * doc/invoke.texi (C++ Dialect Options): Fix typo.
28022 2017-01-25  Richard Biener  <rguenther@suse.de>
28024         PR tree-optimization/69264
28025         * target.def (vector_alignment_reachable): Improve documentation.
28026         * doc/tm.texi: Regenerate.
28027         * targhooks.c (default_builtin_vector_alignment_reachable): Simplify
28028         and add a comment.
28029         * tree-vect-data-refs.c (vect_supportable_dr_alignment): Revert
28030         earlier changes with respect to TYPE_USER_ALIGN.
28031         (vector_alignment_reachable_p): Likewise.  Improve dumping.
28033 2016-01-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28035         PR target/79145
28036         * config/arm/arm.md (xordi3): Force constant operand into a register
28037         for TARGET_IWMMXT.
28039 2016-01-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28041         * doc/invoke.texi (-fstore-merging): Correct default optimization
28042         levels at which it is enabled.
28043         (-O): Move -fstore-merging from list to...
28044         (-O2): ... Here.
28046 2017-01-25  Richard Biener  <rguenther@suse.de>
28048         PR debug/78363
28049         * omp-expand.c: Include debug.h.
28050         (expand_omp_taskreg): Make sure to generate early debug before
28051         outlining anything from a function.
28052         (expand_omp_target): Likewise.
28053         (grid_expand_target_grid_body): Likewise.
28055 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
28057         PR lto/79061
28058         * asan.c (get_translation_unit_decl): New function.
28059         (asan_add_global): Extract modules file name from globals
28060         TRANSLATION_UNIT_DECL name.
28062 2017-01-24  Eric Botcazou  <ebotcazou@adacore.com>
28064         PR target/77439
28065         * config/arm/arm.c (arm_function_ok_for_sibcall): Add back restriction
28066         for long calls with APCS frame and VFP.
28068 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
28070         * cfg.c (original_copy_tables_initialized_p): New function.
28071         * cfg.h (original_copy_tables_initialized_p): New decl.
28072         * cfgrtl.c (relink_block_chain): Guard the call to
28073         free_original_copy_tables with a call to
28074         original_copy_tables_initialized_p.
28075         * cgraph.h (symtab_node::native_rtl_p): New decl.
28076         * cgraphunit.c (symtab_node::native_rtl_p): New function.
28077         (symtab_node::needed_p): Don't assert for early assembly output
28078         for __RTL functions.
28079         (cgraph_node::finalize_function): Set "force_output" for __RTL
28080         functions.
28081         (cgraph_node::analyze): Bail out early for __RTL functions.
28082         (analyze_functions): Update assertion to support __RTL functions.
28083         (cgraph_node::expand): Bail out early for __RTL functions.
28084         * final.c (rest_of_clean_state): Don't call delete_tree_ssa for
28085         __RTL functions.
28086         * function.h (struct function): Update comment for field
28087         "pass_startwith".
28088         * gimple-expr.c: Include "tree-pass.h".
28089         (gimple_has_body_p): Return false for __RTL functions.
28090         * Makefile.in (OBJS): Add run-rtl-passes.o.
28091         * pass_manager.h (gcc::pass_manager::get_rest_of_compilation): New
28092         accessor.
28093         (gcc::pass_manager::get_clean_slate): New accessor.
28094         * passes.c: Include "insn-addr.h".
28095         (should_skip_pass_p): Add logging.  Update logic for running
28096         "expand" to be compatible with both __GIMPLE and __RTL.  Guard
28097         property-provider override so it is only done for gimple passes.
28098         Don't skip dfinit.
28099         (skip_pass): New function.
28100         (execute_one_pass): Call skip_pass when skipping passes.
28101         * read-md.c (md_reader::read_char): Support filtering
28102         the input to a subset of line numbers.
28103         (md_reader::md_reader): Initialize fields
28104         m_first_line and m_last_line.
28105         (md_reader::read_file_fragment): New function.
28106         * read-md.h (md_reader::read_file_fragment): New decl.
28107         (md_reader::m_first_line): New field.
28108         (md_reader::m_last_line): New field.
28109         * read-rtl-function.c (function_reader::create_function): Only
28110         create cfun if it doesn't already exist.  Set PROP_rtl on cfun's
28111         curr_properties.  Set DECL_INITIAL to a dummy block.
28112         (read_rtl_function_body_from_file_range): New function.
28113         * read-rtl-function.h (read_rtl_function_body_from_file_range):
28114         New decl.
28115         * run-rtl-passes.c: New file.
28116         * run-rtl-passes.h: New file.
28118 2017-01-24  Jeff Law  <law@redhat.com>
28120         * config/microblaze/microblaze.h (ASM_FORMAT_PRIVATE_NAME): Increase
28121         buffer size.
28123 2017-01-24  Bin Cheng  <bin.cheng@arm.com>
28125         PR tree-optimization/79159
28126         * tree-ssa-loop-niter.c (get_cst_init_from_scev): New function.
28127         (record_nonwrapping_iv): Improve boundary using above function if no
28128         value range information.
28130 2017-01-24  Pekka Jääskeläinen  <pekka@parmance.com>
28131             Martin Jambor  <mjambor@suse.cz>
28133         * brig-builtins.def: New file.
28134         * builtins.def (DEF_HSAIL_BUILTIN): New macro.
28135         (DEF_HSAIL_ATOMIC_BUILTIN): Likewise.
28136         (DEF_HSAIL_SAT_BUILTIN): Likewise.
28137         (DEF_HSAIL_INTR_BUILTIN): Likewise.
28138         (DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN): Likewise.
28139         * builtin-types.def (BT_INT8): New.
28140         (BT_INT16): Likewise.
28141         (BT_UINT8): Likewise.
28142         (BT_UINT16): Likewise.
28143         (BT_FN_ULONG): Likewise.
28144         (BT_FN_UINT_INT): Likewise.
28145         (BT_FN_UINT_ULONG): Likewise.
28146         (BT_FN_UINT_LONG): Likewise.
28147         (BT_FN_UINT_PTR): Likewise.
28148         (BT_FN_ULONG_PTR): Likewise.
28149         (BT_FN_INT8_FLOAT): Likewise.
28150         (BT_FN_INT16_FLOAT): Likewise.
28151         (BT_FN_UINT32_FLOAT): Likewise.
28152         (BT_FN_UINT16_FLOAT): Likewise.
28153         (BT_FN_UINT8_FLOAT): Likewise.
28154         (BT_FN_UINT64_FLOAT): Likewise.
28155         (BT_FN_UINT16_UINT32): Likewise.
28156         (BT_FN_UINT32_UINT16): Likewise.
28157         (BT_FN_UINT16_UINT16_UINT16): Likewise.
28158         (BT_FN_INT_PTR_INT): Likewise.
28159         (BT_FN_UINT_PTR_UINT): Likewise.
28160         (BT_FN_LONG_PTR_LONG): Likewise.
28161         (BT_FN_ULONG_PTR_ULONG): Likewise.
28162         (BT_FN_VOID_UINT64_UINT64): Likewise.
28163         (BT_FN_UINT8_UINT8_UINT8): Likewise.
28164         (BT_FN_INT8_INT8_INT8): Likewise.
28165         (BT_FN_INT16_INT16_INT16): Likewise.
28166         (BT_FN_INT_INT_INT): Likewise.
28167         (BT_FN_UINT_FLOAT_UINT): Likewise.
28168         (BT_FN_FLOAT_UINT_UINT): Likewise.
28169         (BT_FN_ULONG_UINT_UINT): Likewise.
28170         (BT_FN_ULONG_UINT_PTR): Likewise.
28171         (BT_FN_ULONG_ULONG_ULONG): Likewise.
28172         (BT_FN_UINT_UINT_UINT): Likewise.
28173         (BT_FN_VOID_UINT_PTR): Likewise.
28174         (BT_FN_UINT_UINT_PTR: Likewise.
28175         (BT_FN_UINT32_UINT64_PTR): Likewise.
28176         (BT_FN_INT_INT_UINT_UINT): Likewise.
28177         (BT_FN_UINT_UINT_UINT_UINT): Likewise.
28178         (BT_FN_UINT_UINT_UINT_PTR): Likewise.
28179         (BT_FN_UINT_ULONG_ULONG_UINT): Likewise.
28180         (BT_FN_ULONG_ULONG_ULONG_ULONG): Likewise.
28181         (BT_FN_LONG_LONG_UINT_UINT): Likewise.
28182         (BT_FN_ULONG_ULONG_UINT_UINT): Likewise.
28183         (BT_FN_VOID_UINT32_UINT64_PTR): Likewise.
28184         (BT_FN_VOID_UINT32_UINT32_PTR): Likewise.
28185         (BT_FN_UINT_UINT_UINT_UINT_UINT): Likewise.
28186         (BT_FN_UINT_FLOAT_FLOAT_FLOAT_FLOAT): Likewise.
28187         (BT_FN_ULONG_ULONG_ULONG_UINT_UINT): Likewise.
28188         * doc/frontends.texi: List BRIG FE.
28189         * doc/install.texi (Testing): Add BRIG tesring requirements.
28190         * doc/invoke.texi (Overall Options): Mention BRIG.
28191         * doc/standards.texi (Standards): Doucment BRIG HSA version.
28193 2017-01-24  Richard Biener  <rguenther@suse.de>
28195         PR translation/79208
28196         * ipa-devirt.c (odr_types_equivalent_p): Fix typo in diagnostic.
28198 2017-01-24  Martin Jambor  <mjambor@suse.cz>
28200         PR bootstrap/79198
28201         * ipa-prop.c (ipa_free_all_node_params): Call summary destructor.
28202         * ipa-prop.c (ipa_node_params_t::insert): Initialize fields known_csts
28203         and known_contexts.
28205 2017-01-24  Aldy Hernandez  <aldyh@redhat.com>
28207         PR middle-end/79123
28208         * gimple-ssa-warn-alloca.c (alloca_call_type): Make sure
28209         casts from signed to unsigned really don't have a range.
28211 2017-01-24  Markus Trippelsdorf  <markus@trippelsdorf.de>
28213         * gimple-ssa-sprintf.c (format_floating): Change MPFR_RNDx to
28214         GMP_RNDx for compatiblity.
28216 2017-01-24  Martin Liska  <mliska@suse.cz>
28218         PR bootstrap/79132
28219         * tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Insert assert
28220         that would prevent us to call alloca with -1 as argument.
28222 2017-01-24  Jakub Jelinek  <jakub@redhat.com>
28224         * dwarf2out.c (output_compilation_unit_header, output_file_names):
28225         Avoid -Wformat-security warning.
28227 2017-01-23  Andrew Pinski  <apinski@cavium.com>
28229         * config/aarch64/aarch64.c (thunderx2t99_addrcost_table): Improve
28230         cost table.
28232 2017-01-23  Martin Sebor  <msebor@redhat.com>
28234         PR middle-end/78703
28235         * gimple-ssa-sprintf.c (warn_level): New global.
28236         (format_integer): Use it here and throughout the rest of the file.
28237         Use the same switch to compute sign as base.
28238         (maybe_warn): New function.
28239         (format_directive): Factor out warnings into maybe_warn.
28240         Add debugging output.  Use warn_level.
28241         (add_bytes): Use warn_level.
28242         (pass_sprintf_length::compute_format_length): Add debugging output.
28243         (try_substitute_return_value): Same.
28244         (pass_sprintf_length::handle_gimple_call): Set and use warn_level.
28246         PR middle-end/78703
28247         * gimple-ssa-sprintf.c (struct format_result): Remove constant member.
28248         (struct fmtresult, format_integer, format_floating): Adjust.
28249         (fmtresult::fmtresult): Set max correctly in two argument ctor.
28250         (get_string_length, format_string,format_directive): Same.
28251         (pass_sprintf_length::compute_format_length): Same.
28252         (try_substitute_return_value): Simplify slightly.
28254         PR middle-end/78703
28255         * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust formatting.
28256         (fmtresult::operator+=): Outlined.
28257         (struct fmtresult): Add ctors.
28258         (struct conversion_spec): Rename...
28259         (struct directive): ...to this.  Add and remove data members.
28260         (directive::set_width, directive::set_precision): New functions.
28261         (format_percent): Use fmtresult ctor.
28262         (get_width_and_precision): Remove.
28263         (format_integer): Make naming changes.  Avoid computing width and
28264         precision.
28265         (format_floating): Same.  Adjust indentation.
28266         (format_character, format_none): New functions.
28267         (format_string): Moved character handling to format_character.
28268         (format_directive): Remove arguments, change return type.
28269         (parse_directive): New function.
28270         (pass_sprintf_length::compute_format_length): Move directive
28271         parsing to parse_directive.
28273 2017-01-23  Jakub Jelinek  <jakub@redhat.com>
28275         * tree.h (assign_assembler_name_if_neeeded): Rename to ...
28276         (assign_assembler_name_if_needed): ... this.
28277         * tree.c (assign_assembler_name_if_neeeded): Rename to ...
28278         (assign_assembler_name_if_needed): ... this.
28279         (free_lang_data_in_cgraph): Adjust callers.
28280         * cgraphunit.c (cgraph_node::analyze): Likewise.
28281         * omp-expand.c (expand_omp_taskreg, expand_omp_target):
28282         Likewise.
28284 2017-01-23  Richard Biener  <rguenther@suse.de>
28286         PR tree-optimization/79088
28287         PR tree-optimization/79188
28288         * tree-ssa-threadupdate.c (mark_threaded_blocks): Move code
28289         resetting loop bounds after last path deletion.  Reset loop
28290         bounds of the target loop, make code match the comments.
28291         * tree-ssa-threadbackwards.c (pass_early_thread_jumps::execute):
28292         Make sure loops need no fixups.
28294 2017-01-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>
28296         * config/rs6000/rs6000-builtin.def (VSIEDPF): Add scalar insert
28297         exponent support with double type for first argument.
28298         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Changed
28299         type returned by __builtin_vec_extract_sig,
28300         __builtin_vec_extract_sig_sp, and __builtin_vec_extract_sig_dp
28301         functions from "vector int" to "vector unsigned int" or from
28302         "vector long long int" to "vector unsigned long long int".
28303         Changed type returned by __builtin_vec_extract_exp,
28304         __builtin_vec_extract_exp_sp, and __builtin_vec_extract_exp_dp
28305         functions from "vector int" to "vector unsigned int" or from
28306         "vector long long int" to "vector unsigned long long int".
28307         Changed return type of __builtin_vec_test_data_class,
28308         __builtin_vec_test_data_class_sp, and
28309         __builtin_vec_test_data_class_dp from "vector int" to
28310         "vector bool int" or from "vector long long int" to "vector bool
28311         long long int" and changed second argument type from "unsigned
28312         int" to "int".  Added new overloaded function forms "vector float
28313         __builtin_vec_insert_exp (vector float, vector unsigned int)" and
28314         "vector float __builtin_vec_insert_exp_sp (vector float, vector
28315         unsigned int)" and "vector double __builtin_vec_insert_exp (vector
28316         double, vector unsigned long long int)" and "vector double
28317         __builtin_vec_insert_exp_dp (vector double, vector unsigned long
28318         long int)".  Changed return type of
28319         __builtin_scalar_test_data_class and
28320         __builtin_scalar_test_data_class_sp and
28321         __builtin_scalar_test_data_class_dp from "unsigned int" to "bool
28322         int" and changed second argument from "unsigned int" to "int".
28323         Changed type returned by __builtin_scalar_test_neg,
28324         __builtin_scalar_test_neg_sp, and __builtin_scalar_test_neg_dp
28325         from "int" to "bool int".  Added new overloaded function form
28326         "double __builtin_scalar_insert_exp (double, unsigned long long int)".
28327         * config/rs6000/vsx.md (xsiexpdpf): New insn for scalar insert
28328         exponent double-precision with floating point first argument.
28329         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
28330         documentation of scalar_test_data_class, scalar_test_neg,
28331         scalar_extract_sig, scalar_extract_exp, scalar_insert_exp,
28332         vector_extract_exp, vec_extract_sig, vec_insert_exp, and
28333         vec_test_data_class built-in functions to reflect refinements in
28334         their type signatures.
28336 2017-01-23  Andreas Tobler  <andreast@gcc.gnu.org>
28338         * config/aarch64/aarch64.c (aarch64_elf_asm_constructor): Increase
28339         size of buf.
28340         (aarch64_elf_asm_destructor): Likewise.
28342 2017-01-23  Bernd Schmidt  <bschmidt@redhat.com>
28344         PR rtl-optimization/78634
28345         * config/i386/i386.c (ix86_max_noce_ifcvt_seq_cost): New function.
28346         (TARGET_MAX_NOCE_IFCVT_SEQ_COST): Define.
28347         * ifcvt.c (noce_try_cmove): Add missing cost check.
28349         PR rtl-optimization/71724
28350         * combine.c (if_then_else_cond): Look for situations where it is
28351         beneficial to undo the work of one of the recursive calls.
28353 2017-01-23  Bin Cheng  <bin.cheng@arm.com>
28355         PR tree-optimization/70754
28356         * tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
28357         (reassociate_to_the_same_stmt): New parameter INSERT_BEFORE.  Insert
28358         combined stmt before it if not NULL.
28359         (combine_chains): Process refs reversely and compute dominance point
28360         for root ref.
28362 2017-01-23  Martin Liska  <mliska@suse.cz>
28364         PR tree-optimization/79196
28365         * tree-ssa-strlen.c (fold_strstr_to_memcmp): Rename to ...
28366         (fold_strstr_to_strncmp): ... this.  Fold the pattern to strncmp
28367         instead of memcmp.
28368         (strlen_optimize_stmt): Call the renamed function.
28370 2017-01-23  Michael Matz  <matz@suse.de>
28372         PR tree-optimization/78384
28373         * tree-ssa-loop-split.c (patch_loop_exit): Use correct edge.
28375 2017-01-23  Richard Biener  <rguenther@suse.de>
28377         PR tree-optimization/79186
28378         * tree-vrp.c (register_new_assert_for): Make sure we've seen
28379         both incoming edges before moving an assert.
28381 2017-01-23  Martin Jambor  <mjambor@suse.cz>
28383         * ipa-prop.c (load_from_param_1): Removed.
28384         (load_from_unmodified_param): Bits from load_from_param_1 put back
28385         here.
28386         (load_from_param): Removed.
28387         (compute_complex_assign_jump_func): Removed stmt2 and just replaced it
28388         with stmt.  Reverted back to use of load_from_unmodified_param.
28390 2017-01-23  Martin Jambor  <mjambor@suse.cz>
28392         PR ipa/79108
28393         * ipa-prop.h (ipa_param_descriptor): Anotate with with GTY(()).
28394         (ipa_node_params): Annotate with GTY((for_user)).  Make descriptors
28395         field a pointer to garbage collected vector, mark lattices and
28396         ipcp_orig_node with GTY((skip)).
28397         (ipa_get_param_count): Adjust to descriptors being a pointer.
28398         (ipa_get_param): Likewise.
28399         (ipa_get_type): Likewise.
28400         (ipa_get_param_move_cost): Likewise.
28401         (ipa_set_param_used): Likewise.
28402         (ipa_get_controlled_uses): Likewise.
28403         (ipa_set_controlled_uses): Likewise.
28404         (ipa_is_param_used): Likewise.
28405         (ipa_node_params_t): Move into garbage collector.  New methods insert
28406         and remove.
28407         (ipa_node_params_sum): Annotate wth GTY(()).
28408         (ipa_check_create_node_params): Adjust to ipa_node_params_sum being
28409         garbage collected.
28410         (ipa_load_from_parm_agg): Adjust declaration.
28411         * ipa-icf.c (param_used_p): Adjust to descriptors being a pointer.
28412         * ipa-profile.c (ipa_profile): Likewise.
28413         * ipa-prop.c (ipa_get_param_decl_index_1): Likewise.
28414         (ipa_populate_param_decls): Make descriptors parameter garbage
28415         collected.
28416         (ipa_dump_param): Adjust to descriptors being a pointer.
28417         (ipa_alloc_node_params): Likewise.
28418         (ipa_initialize_node_params): Likewise.
28419         (load_from_param_1): Make descriptors parameter garbage collected.
28420         (load_from_unmodified_param): Likewise.
28421         (load_from_param): Likewise.
28422         (ipa_load_from_parm_agg): Likewise.
28423         (ipa_node_params::~ipa_node_params): Removed.
28424         (ipa_free_all_node_params): Remove call to delete operator.
28425         (ipa_node_params_t::insert): New.
28426         (ipa_node_params_t::remove): Likewise.
28427         (ipa_node_params_t::duplicate): Adjust to descriptors being a pointer,
28428         copy known_csts and known_contexts vectors.
28429         (ipa_read_node_info): Adjust to descriptors being a pointer.
28430         (ipcp_modif_dom_walker): Make m_descriptors field garbage
28431         collected.
28432         (ipcp_transform_function): Make descriptors variable garbage
28433         collected.
28435 2017-01-23  Andrew Senkevich  <andrew.senkevich@intel.com>
28437         * config/i386/avx512bwintrin.h: Add k-mask test, kortest intrinsics.
28438         * config/i386/avx512dqintrin.h: Ditto.
28439         * config/i386/avx512fintrin.h: Ditto.
28440         * config/i386/i386.c: Handle new builtins.
28441         * config/i386/i386-builtin.def: Add new builtins.
28442         * config/i386/sse.md (ktest<mode>, kortest<mode>): New.
28443         (UNSPEC_KORTEST, UNSPEC_KTEST): New.
28445 2017-01-23  Jakub Jelinek  <jakub@redhat.com>
28446             Martin Liska  <mliska@suse.cz>
28448         * asan.h: Define ASAN_USE_AFTER_SCOPE_ATTRIBUTE.
28449         * asan.c (asan_expand_poison_ifn): Support stores and use
28450         appropriate ASAN report function.
28451         * internal-fn.c (expand_ASAN_POISON_USE): New function.
28452         * internal-fn.def (ASAN_POISON_USE): Declare.
28453         * tree-into-ssa.c (maybe_add_asan_poison_write): New function.
28454         (maybe_register_def): Create ASAN_POISON_USE when sanitizing.
28455         * tree-ssa-dce.c (eliminate_unnecessary_stmts): Remove
28456         ASAN_POISON calls w/o LHS.
28457         * tree-ssa.c (execute_update_addresses_taken): Create clobber
28458         for ASAN_MARK (UNPOISON, &x, ...) in order to prevent usage of a LHS
28459         from ASAN_MARK (POISON, &x, ...) coming to a PHI node.
28460         * gimplify.c (asan_poison_variables): Add attribute
28461         use_after_scope_memory to variables that really needs to live
28462         in memory.
28463         * tree-ssa.c (is_asan_mark_p): Do not rewrite into SSA when
28464         having the attribute.
28466 2017-01-23  Martin Liska  <mliska@suse.cz>
28468         * asan.c (create_asan_shadow_var): New function.
28469         (asan_expand_poison_ifn): Likewise.
28470         * asan.h (asan_expand_poison_ifn): New declaration.
28471         * internal-fn.c (expand_ASAN_POISON): Likewise.
28472         * internal-fn.def (ASAN_POISON): New builtin.
28473         * sanopt.c (pass_sanopt::execute): Expand
28474         asan_expand_poison_ifn.
28475         * tree-inline.c (copy_decl_for_dup_finish): Make function
28476         external.
28477         * tree-inline.h (copy_decl_for_dup_finish): Likewise.
28478         * tree-ssa.c (is_asan_mark_p): New function.
28479         (execute_update_addresses_taken): Rewrite local variables
28480         (identified just by use-after-scope as addressable) into SSA.
28482 2017-01-22  Gerald Pfeifer  <gerald@pfeifer.com>
28484         * doc/install.texi (Specific): opensource.apple.com uses https
28485         now. Remove trailing slash.
28487 2017-01-22  Gerald Pfeifer  <gerald@pfeifer.com>
28489         * README.Portability: Remove note on an Irix compatibility issue.
28491 2017-01-22  Dimitry Andric <dim@FreeBSD.org>
28493         * gcov.c (INCLUDE_ALGORITHM): Define.
28494         (INCLUDE_VECTOR): Define.
28495         No longer include <vector> and <algorithm> directly.
28497 2017-01-21  Gerald Pfeifer  <gerald@pfeifer.com>
28499         * doc/extend.texi (Thread-Local): Change www.akkadia.org reference
28500         to https.
28501         * doc/invoke.texi (Code Gen Options): Ditto.
28503 2017-01-21  Jan Hubicka  <hubicka@ucw.cz>
28505         PR lto/78407
28506         * cfg.c (update_bb_profile_for_threading): Fix updating of probablity.
28508 2017-01-21  Bernd Schmidt  <bschmidt@redhat.com>
28510         rtl-optimization/79125
28511         * cprop.c (local_cprop_pass): Handle cases where we make an
28512         unconditional trap.
28514 2017-01-20  Segher Boessenkool  <segher@kernel.crashing.org>
28516         PR target/61729
28517         PR target/77850
28518         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
28519         read from, for big endian.
28521 2017-01-20  Jiong Wang  <jiong.wang@arm.com>
28523         * config/aarch64/aarch64-builtins.c (aarch64_init_builtins): Register
28524         register pauth builtins for LP64 only.
28526 2017-01-20  Marek Polacek  <polacek@redhat.com>
28528         PR c/79152
28529         * gimplify.c (should_warn_for_implicit_fallthrough): Handle consecutive
28530         non-case labels.
28532 2017-01-20  Alexander Monakov  <amonakov@ispras.ru>
28534         * omp-expand.c (expand_omp_simd): Clear PROP_gimple_lomp_dev regardless
28535         of safelen status.
28536         * omp-offload.c (pass_omp_device_lower::gate): Use PROP_gimple_lomp_dev.
28537         * passes.c (dump_properties): Handle PROP_gimple_lomp_dev.
28538         * tree-inline.c (expand_call_inline): Propagate PROP_gimple_lomp_dev.
28540 2017-01-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28542         PR target/71270
28543         * config/arm/arm.c (neon_valid_immediate): Reject vector constants
28544         in big-endian mode when they are not a single duplicated value.
28546 2017-01-20  Richard Biener  <rguenther@suse.de>
28548         * BASE-VER: Bump to 7.0.1.
28550 2017-01-20  Alexander Monakov  <amonakov@ispras.ru>
28552         * omp-low.c (omplow_simd_context): New struct.  Use it...
28553         (lower_rec_simd_input_clauses): ...here and...
28554         (lower_rec_input_clauses): ...here to hold common data.  Adjust all
28555         references to idx, lane, max_vf, is_simt.
28557 2017-01-20  Graham Markall  <graham.markall@embecosm.com>
28559         * config/arc/arc.h (LINK_SPEC): Use arclinux_nps emulation when
28560         mcpu=nps400.
28562 2017-01-20  Martin Jambor  <mjambor@suse.cz>
28564         * hsa.h: Renaed to hsa-common.h.  Adjusted a comment.
28565         * hsa.c: Renaed to hsa-common.c.  Change include of gt-hsa.h to
28566         gt-hsa-common.h.
28567         * Makefile.in (OBJS): Rename hsa.o to hsa-common.o.
28568         (GTFILES): Rename hsa.c to hsa-common.c.
28569         * hsa-brig.c: Change include of hsa.h to hsa-common.h.
28570         * hsa-dump.c: Likewise.
28571         * hsa-gen.c: Likewise.
28572         * hsa-regalloc.c: Likewise.
28573         * ipa-hsa.c: Likewise.
28574         * omp-expand.c: Likewise.
28575         * omp-low.c: Likewise.
28576         * toplev.c: Likewise.
28578 2017-01-20  Marek Polacek  <polacek@redhat.com>
28580         PR c/64279
28581         * doc/invoke.texi: Document -Wduplicated-branches.
28582         * fold-const.c (operand_equal_p): Handle MODIFY_EXPR, INIT_EXPR,
28583         COMPOUND_EXPR, PREDECREMENT_EXPR, PREINCREMENT_EXPR,
28584         POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, CLEANUP_POINT_EXPR, EXPR_STMT,
28585         STATEMENT_LIST, and RETURN_EXPR.  For non-pure non-const functions
28586         return 0 only when not OEP_LEXICOGRAPHIC.
28587         (fold_build_cleanup_point_expr): Use the expression
28588         location when building CLEANUP_POINT_EXPR.
28589         * tree-core.h (enum operand_equal_flag): Add OEP_LEXICOGRAPHIC.
28590         * tree.c (add_expr): Handle error_mark_node.
28592 2017-01-20  Martin Liska  <mliska@suse.cz>
28594         PR lto/69188
28595         * tree-profile.c (init_ic_make_global_vars): Do not call
28596         finalize_decl.
28597         (gimple_init_gcov_profiler): Likewise.
28599 2017-01-20  Martin Liska  <mliska@suse.cz>
28601         PR ipa/71190
28602         * cgraph.h (maybe_create_reference): Remove argument and
28603         update comment.
28604         * cgraphclones.c (cgraph_node::create_virtual_clone): Remove one
28605         argument.
28606         * ipa-cp.c (create_specialized_node): Likewise.
28607         * symtab.c (symtab_node::maybe_create_reference): Handle
28608         VAR_DECLs and ADDR_EXPRs and select ipa_ref_use type.
28610 2017-01-20  Martin Liska  <mliska@suse.cz>
28612         * read-rtl-function.c (function_reader::create_function): Use
28613         build_decl instread of build_decl_stat.
28615 2017-01-20  Andrew Senkevich  <andrew.senkevich@intel.com>
28617         * config/i386/avx512bwintrin.h: Add k-mask registers shift intrinsics.
28618         * config/i386/avx512dqintrin.h: Ditto.
28619         * config/i386/avx512fintrin.h: Ditto.
28620         * config/i386/i386-builtin-types.def: Add new types.
28621         * config/i386/i386.c: Handle new types.
28622         * config/i386/i386-builtin.def (__builtin_ia32_kshiftliqi)
28623         (__builtin_ia32_kshiftlihi, __builtin_ia32_kshiftlisi)
28624         (__builtin_ia32_kshiftlidi, __builtin_ia32_kshiftriqi)
28625         (__builtin_ia32_kshiftrihi, __builtin_ia32_kshiftrisi)
28626         (__builtin_ia32_kshiftridi): New.
28627         * config/i386/sse.md (k<code><mode>): Rename *k<code><mode>.
28629 2017-01-19  Segher Boessenkool  <segher@kernel.crashing.org>
28631         PR target/78875
28632         PR target/79140
28633         * config/rs6000/rs6000.c (TARGET_STACK_PROTECT_GUARD): Unconditionally
28634         define to rs6000_init_stack_protect_guard.
28635         (rs6000_init_stack_protect_guard): New function.
28637 2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
28638             Yunqiang Su  <yunqiang.su@imgtec.com>
28640         * config.gcc (supported_defaults): Add madd4.
28641         (with_madd4): Add validation.
28642         (all_defaults): Add madd4.
28643         * config/mips/mips.opt (mmadd4): New option.
28644         * config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
28645         mmadd4.
28646         (TARGET_CPU_CPP_BUILTINS): Add builtin_define for
28647         __mips_no_madd4.
28648         (ISA_HAS_UNFUSED_MADD4): Gate with mips_madd4.
28649         (ISA_HAS_FUSED_MADD4): Likewise.
28650         * doc/invoke.texi (-mmadd4): Document the new option.
28651         * doc/install.texi (--with-madd4): Document the new option.
28653 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
28655         * config/aarch64/aarch64-builtins.c (enum aarch64_builtins): New
28656         entries for AARCH64_PAUTH_BUILTIN_XPACLRI,
28657         AARCH64_PAUTH_BUILTIN_PACIA1716, AARCH64_PAUTH_BUILTIN_AUTIA1716.
28658         (aarch64_init_pauth_hint_builtins): New.
28659         (aarch64_init_builtins): Call aarch64_init_pauth_hint_builtins.
28660         (aarch64_expand_builtin): Expand new builtins.
28662 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
28664         * reg-notes.def (CFA_TOGGLE_RA_MANGLE): New reg-note.
28665         * combine-stack-adj.c (no_unhandled_cfa): Handle
28666         REG_CFA_TOGGLE_RA_MANGLE.
28667         * dwarf2cfi.c (dwarf2out_frame_debug): Handle REG_CFA_TOGGLE_RA_MANGLE.
28668         * config/aarch64/aarch64.c (aarch64_expand_prologue): Generates DWARF
28669         info for return address signing.
28670         (aarch64_expand_epilogue): Likewise.
28672 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
28674         * config/aarch64/aarch64-opts.h (aarch64_function_type): New enum.
28675         * config/aarch64/aarch64-protos.h
28676         (aarch64_return_address_signing_enabled): New declaration.
28677         * config/aarch64/aarch64.c (aarch64_return_address_signing_enabled):
28678         New function.
28679         (aarch64_expand_prologue): Sign return address before it's pushed onto
28680         stack.
28681         (aarch64_expand_epilogue): Authenticate return address fetched from
28682         stack.
28683         (aarch64_override_options): Sanity check for ILP32 and ISA level.
28684         (aarch64_attributes): New function attributes for "sign-return-address".
28685         * config/aarch64/aarch64.md (UNSPEC_AUTI1716, UNSPEC_AUTISP,
28686         UNSPEC_PACI1716, UNSPEC_PACISP, UNSPEC_XPACLRI): New unspecs.
28687         ("*do_return"): Generate combined instructions according to key index.
28688         ("<pauth_mnem_prefix>sp", "<pauth_mnem_prefix1716", "xpaclri"): New.
28689         * config/aarch64/iterators.md (PAUTH_LR_SP, PAUTH_17_16): New integer
28690         iterators.
28691         (pauth_mnem_prefix, pauth_hint_num_a): New integer attributes.
28692         * config/aarch64/aarch64.opt (msign-return-address=): New.
28693         * doc/extend.texi (AArch64 Function Attributes): Documents
28694         "sign-return-address=".
28695         * doc/invoke.texi (AArch64 Options): Documents "-msign-return-address=".
28697 2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
28699         * doc/invoke.texi: Add missing -mlxc1-sxc1 options to
28700         overall option summary.
28702 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
28704         * config/aarch64/aarch64-arches.def: New entry for "armv8.3-a".
28705         * config/aarch64/aarch64.h (AARCH64_FL_V8_3, AARCH64_FL_FOR_ARCH8_3,
28706         AARCH64_ISA_V8_3, TARGET_ARMV8_3): New.
28707         * doc/invoke.texi (AArch64 Options): Document "armv8.3-a".
28709 2017-01-19  Michael Meissner  <meissner@linux.vnet.ibm.com>
28711         * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Enable
28712         -mpower9-minmax by default for -mcpu=power9.
28713         (ISA_3_MASKS_IEEE): Require -mvsx-small-integer to enable IEEE
28714         128-bit floating point.
28716 2017-01-20  Alan Modra  <amodra@gmail.com>
28718         * config/rs6000/rs6000.md (cmpstrnsi, cmpstrsi): Fail if
28719         optimizing for size.
28721 2017-01-20  Alan Modra  <amodra@gmail.com>
28723         PR target/79144
28724         * config/rs6000/rs6000.c (expand_strn_compare): Get the asm name
28725         for strcmp and strncmp from corresponding builtin decl.
28727 2017-01-19  Uros Bizjak  <ubizjak@gmail.com>
28729         * config.gcc (x86_64-*-rtems*): Use i386/rtemself.h
28730         instead of i386/rtems-64.h.
28731         * config/i386/rtems-64.h: Remove.
28733 2017-01-19  Uros Bizjak  <ubizjak@gmail.com>
28735         PR target/78478
28736         Revert:
28737         2013-11-05  Uros Bizjak  <ubizjak@gmail.com>
28739         * config/i386/rtemself.h (LONG_DOUBLE_TYPE_SIZE): New define.
28741 2017-01-19  Tamar Christina  <tamar.christina@arm.com>
28743         * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup):
28744         Change int to HOST_WIDE_INT.
28745         * config/aarch64/aarch64-protos.h
28746         (aarch64_simd_gen_const_vector_dup): Likewise.
28747         * config/aarch64/aarch64-simd.md: Add copysign<mode>3.
28749 2017-01-19  David Malcolm  <dmalcolm@redhat.com>
28751         * langhooks-def.h (lhd_type_for_size): New decl.
28752         (LANG_HOOKS_TYPE_FOR_SIZE): Define as lhd_type_for_size.
28753         * langhooks.c (lhd_type_for_size): New function, taken from
28754         lto_type_for_size.
28756 2017-01-19  Pat Haugen  <pthaugen@us.ibm.com>
28758         * config/rs6000/power9.md (power9-alu): Remove 'cmp' type and add
28759         define_bypass for CR latency.
28760         (power9-cracked-alu): Update bypass latency and remove power9-branch.
28761         (power9-alu2): Add define_bypass for CR latency.
28762         (power9-cmp): New.
28763         (power9-mul): Update insn latency.
28764         (power9-mul-compare): Update insn latency, bypass latency and remove
28765         power9-branch.
28767 2016-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28769         * config/aarch64/aarch64-protos.h (aarch64_nopcrelative_literal_loads):
28770         Delete.
28771         * config/aarch64/aarch64.md
28772         (aarch64_reload_movcp<GPF_TF:mode><P:mode>): Delete reference to
28773         aarch64_nopcrelative_literal_loads.
28774         (aarch64_reload_movcp<VALL:mode><P:mode>): Likewise.
28776 2017-01-19  Chenghua Xu  <paul.hua.gm@gmail.com>
28778         * config/mips/mips.h (ISA_HAS_FUSED_MADD4): Enable for
28779         TARGET_LOONGSON_3A.
28780         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_LOONGSON_3A.
28782 2017-01-19  Doug Gilmore  <doug.gilmore@imgtec.com>
28784         PR target/78176
28785         * config.gcc (supported_defaults): Add lxc1-sxc1.
28786         (with_lxc1_sxc1): Add validation.
28787         (all_defaults): Add lxc1-sxc1.
28788         * config/mips/mips.opt (mlxc1-sxc1): New option.
28789         * config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
28790         mlxc1-sxc1.
28791         (TARGET_CPU_CPP_BUILTINS): Add builtin_define for
28792         __mips_no_lxc1_sxc1.
28793         (ISA_HAS_LXC1_SXC1): Gate with mips_lxc1_sxc1.
28794         * doc/invoke.texi (-mlxc1-sxc1): Document the new option.
28795         * doc/install.texi (--with-lxc1-sxc1): Document the new option.
28797 2017-01-19  Richard Biener  <rguenther@suse.de>
28799         PR tree-optimization/72488
28800         * tree-ssa-sccvn.c (run_scc_vn): When we abort the VN make
28801         sure to restore SSA info.
28802         * tree-ssa.c (verify_ssa): Verify SSA info is not shared.
28804 2017-01-19  Richard Earnshaw  <rearnsha@arm.com>
28806         PR rtl-optimization/79121
28807         * expr.c (expand_expr_real_2, case LSHIFT_EXPR): Look at the signedness
28808         of the inner type when shifting an extended value.
28810 2017-01-17  Jan Hubicka  <hubicka@ucw.cz>
28812         PR lto/78407
28813         * symtab.c (symtab_node::equal_address_to): Fix comparing of
28814         interposable aliases.
28816 2017-01-18  Peter Bergner  <bergner@vnet.ibm.com>
28818         PR target/78516
28819         * config/rs6000/spe.md (mov_si<mode>_e500_subreg0): Fix constraints.
28820         Use the evmergelohi instruction.
28821         (mov_si<mode>_e500_subreg4_2_le): Likewise.
28822         (mov_sitf_e500_subreg8_2_be): Likewise.
28823         (mov_sitf_e500_subreg12_2_le): Likewise.
28824         (mov_si<mode>_e500_subreg0_2_le): Fix constraints.
28825         (mov_si<mode>_e500_subreg4_2_be): Likewise.
28826         (mov_sitf_e500_subreg8_2_le): Likewise.
28827         (mov_sitf_e500_subreg12_2_be): Likewise.
28829 2017-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28831         * config/rs6000/altivec.md (altivec_vbpermq): Change "type"
28832         attribute from vecsimple to vecperm.
28833         (altivec_vbpermq2): Likewise.
28835 2017-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28837         PR target/79040
28838         * config/rs6000/altivec.h: Fix typo of vec_cntlz to vec_cnttz.
28840 2017-01-18  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
28841         * config/rs6000/rs6000-protos.h (expand_strn_compare): Add arg.
28842         * config/rs6000/rs6000.c (expand_strn_compare): Add ability to expand
28843         strcmp. Fix bug where comparison didn't stop with zero byte. Fix
28844         case where N arg is SIZE_MAX.
28845         * config/rs6000/rs6000.md (cmpstrnsi): Args to expand_strn_compare.
28846         (cmpstrsi): Add pattern.
28848 2017-01-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
28850         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
28851         __builtin_vec_revb builtins.
28852         * config/rs6000/rs6000-builtins.def (P9V_BUILTIN_XXBRQ_V16QI): Add
28853         built-in functions to support generation of the ISA 3.0 XXBR<x>
28854         vector byte reverse instructions.
28855         (P9V_BUILTIN_XXBRQ_V1TI): Likewise.
28856         (P9V_BUILTIN_XXBRD_V2DI): Likewise.
28857         (P9V_BUILTIN_XXBRD_V2DF): Likewise.
28858         (P9V_BUILTIN_XXBGW_V4SI): Likewise.
28859         (P9V_BUILTIN_XXBGW_V4SF): Likewise.
28860         (P9V_BUILTIN_XXBGH_V8HI): Likewise.
28861         (P9V_BUILTIN_VEC_REVB): Likewise.
28862         * config/rs6000/vsx.md (p9_xxbrq_v1ti): New insns/expanders to
28863         generate the ISA 3.0 XXBR<x> vector byte reverse instructions.
28864         (p9_xxbrq_v16qi): Likewise.
28865         (p9_xxbrd_<mode>, VSX_D iterator): Likewise.
28866         (p9_xxbrw_<mode>, VSX_W iterator): Likewise.
28867         (p9_xxbrh_v8hi): Likewise.
28868         * config/rs6000/altivec.h (vec_revb): Define if ISA 3.0.
28869         * doc/extend.texi (RS/6000 Altivec Built-ins): Document the
28870         vec_revb built-in functions.
28872 2017-01-18  Uros Bizjak  <ubizjak@gmail.com>
28874         PR rtl-optimization/78952
28875         * config/i386/i386.md (any_extract): New code iterator.
28876         (*insvqi_2): Use any_extract for source operand.
28877         (*insvqi_3): Use any_shiftrt for source operand.
28879 2017-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
28881         * config/aarch64/aarch64.c (aarch64_sched_adjust_priority)
28882         New function.
28883         (TARGET_SCHED_ADJUST_PRIORITY): Define target hook.
28885 2017-01-18  Matthias Klose  <doko@ubuntu.com>
28887         * doc/install.texi: Allow default for --with-target-bdw-gc-include.
28889 2016-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28891         * config/rs6000/altivec.h (vec_bperm): Change #define.
28892         * config/rs6000/altivec.md (UNSPEC_VBPERMD): New enum constant.
28893         (altivec_vbpermq2): New define_insn.
28894         (altivec_vbpermd): Likewise.
28895         * config/rs6000/rs6000-builtin.def (VBPERMQ2): New monomorphic
28896         function interface.
28897         (VBPERMD): Likewise.
28898         (VBPERM): New polymorphic function interface.
28899         * config/rs6000/r6000-c.c (altivec_overloaded_builtins_table):
28900         Add entries for P9V_BUILTIN_VEC_VBPERM.
28901         * doc/extend.texi: Add interfaces for vec_bperm.
28903 2017-01-18  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
28905         * config/s390/s390-c.c (s390_expand_overloaded_builtin): Downcase
28906         first letter of error messages.
28907         (s390_resolve_overloaded_builtin): Likewise.
28908         * config/s390/s390.c (s390_expand_builtin): Likewise.
28909         (s390_invalid_arg_for_unprototyped_fn): Likewise.
28910         (s390_valid_target_attribute_inner_p): Likewise.
28911         * config/s390/s390.md ("tabort"): Likewise.
28913 2017-01-18  Toma Tabacu  <toma.tabacu@imgtec.com>
28915         * config/mips/mips.h (ISA_HAS_DIV3): Remove unused macro.
28916         (ISA_AVOID_DIV_HILO): New macro.
28917         (ISA_HAS_DIV): Use new ISA_AVOID_DIV_HILO macro.
28918         (ISA_HAS_DDIV): Likewise.
28920 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
28922         * doc/invoke.texi (fabi-version): Correct number of occurrences.
28924 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
28926         * doc/invoke.texi (fabi-version): Spelling fix.
28928 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
28930         PR c++/70182
28931         * doc/invoke.texi (fabi-version): Mention mangling fix for
28932         operator names.
28934 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
28936         PR c++/77489
28937         * doc/invoke.texi (fabi-version): Document discriminator mangling.
28939 2017-01-17  Segher Boessenkool  <segher@kernel.crashing.org>
28941         PR target/78875
28942         * config/rs6000/rs6000-opts.h (stack_protector_guard): New enum.
28943         * config/rs6000/rs6000.c (rs6000_option_override_internal): Handle
28944         the new options.
28945         * config/rs6000/rs6000.md (stack_protect_set): Handle the new more
28946         flexible settings.
28947         (stack_protect_test): Ditto.
28948         * config/rs6000/rs6000.opt (mstack-protector-guard=,
28949         mstack-protector-guard-reg=, mstack-protector-guard-offset=): New
28950         options.
28951         * doc/invoke.texi (Option Summary) [RS/6000 and PowerPC Options]:
28952         Add -mstack-protector-guard=, -mstack-protector-guard-reg=, and
28953         -mstack-protector-guard-offset=.
28954         (RS/6000 and PowerPC Options): Ditto.
28956 2017-01-17  Uros Bizjak  <ubizjak@gmail.com>
28958         * config/i386/i386.h (MASK_CLASS_P): New define.
28959         * config/i386/i386.c (inline_secondary_memory_needed): Ensure that
28960         there are no registers from different register sets also when
28961         mask registers are used.  Update function comment.
28962         * config/i386/i386.md (*movsi_internal): Split (*k/*krm) alternative
28963         to (*k/*r) and (*k/*km) alternatives.
28965 2017-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
28967         * config/aarch64/aarch64.md (eh_return): Remove pattern and splitter.
28968         * config/aarch64/aarch64.h (AARCH64_EH_STACKADJ_REGNUM): Remove.
28969         (EH_RETURN_HANDLER_RTX): New define.
28970         * config/aarch64/aarch64.c (aarch64_frame_pointer_required):
28971         Force frame pointer in EH return functions.
28972         (aarch64_expand_epilogue): Add barrier for eh_return.
28973         (aarch64_final_eh_return_addr): Remove.
28974         (aarch64_eh_return_handler_rtx): New function.
28975         * config/aarch64/aarch64-protos.h (aarch64_final_eh_return_addr):
28976         Remove.
28977         (aarch64_eh_return_handler_rtx): New prototype.
28979 2017-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28981         * config/rs6000/altivec.h (vec_rlmi): New #define.
28982         (vec_vrlnm): Likewise.
28983         (vec_rlnm): Likewise.
28984         * config/rs6000/altivec.md (UNSPEC_VRLMI): New UNSPEC enum value.
28985         (UNSPEC_VRLNM): Likewise.
28986         (VIlong): New mode iterator.
28987         (altivec_vrl<VI_char>mi): New define_insn.
28988         (altivec_vrl<VI_char>nm): Likewise.
28989         * config/rs6000/rs6000-builtin.def (VRLWNM): New monomorphic
28990         function entry.
28991         (VRLDNM): Likewise.
28992         (RLNM): New polymorphic function entry.
28993         (VRLWMI): New monomorphic function entry.
28994         (VRLDMI): Likewise.
28995         (RLMI): New polymorphic function entry.
28996         * config/rs6000/r6000-c.c (altivec_overloaded_builtin_table): Add
28997         new entries for P9V_BUILTIN_VEC_RLMI and P9V_BUILTIN_VEC_RLNM.
28998         * doc/extend.texi: Add description of vec_rlmi, vec_rlnm, and
28999         vec_vrlnm.
29001 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
29003         PR debug/78839
29004         * dwarf2out.c (field_byte_offset): Restore the
29005         PCC_BITFIELD_TYPE_MATTERS behavior for INTEGER_CST DECL_FIELD_OFFSET
29006         and DECL_FIELD_BIT_OFFSET.  Use fold_build2 instead of build2 + fold.
29007         (analyze_variants_discr, gen_variant_part): Use fold_build2 instead
29008         of build2 + fold.
29010 2017-01-17  Eric Botcazou  <ebotcazou@adacore.com>
29012         PR ada/67205
29013         * config/aarch64/aarch64.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define
29015 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
29017         PR debug/71669
29018         * dwarf2out.c (add_data_member_location_attribute): For constant
29019         offset bitfield emit for -gdwarf-5 DW_AT_data_bit_offset attribute
29020         instead of DW_AT_data_member_location, DW_AT_bit_offset and
29021         DW_AT_byte_size attributes.
29023 2017-01-17  Eric Botcazou  <ebotcazou@adacore.com>
29025         * config/rs6000/rs6000.c (rs6000_emit_move): Also use a TOC reference
29026         after forcing to constant memory when the code model is medium.
29028 2017-01-17  Julia Koval  <julia.koval@intel.com>
29030         PR target/76731
29031         * config/i386/avx512fintrin.h
29032         (_mm512_i32gather_ps): Change __addr type to void const*.
29033         (_mm512_mask_i32gather_ps): Ditto.
29034         (_mm512_i32gather_pd): Ditto.
29035         (_mm512_mask_i32gather_pd): Ditto.
29036         (_mm512_i64gather_ps): Ditto.
29037         (_mm512_mask_i64gather_ps): Ditto.
29038         (_mm512_i64gather_pd): Ditto.
29039         (_mm512_mask_i64gather_pd): Ditto.
29040         (_mm512_i32gather_epi32): Ditto.
29041         (_mm512_mask_i32gather_epi32): Ditto.
29042         (_mm512_i32gather_epi64): Ditto.
29043         (_mm512_mask_i32gather_epi64): Ditto.
29044         (_mm512_i64gather_epi32): Ditto.
29045         (_mm512_mask_i64gather_epi32): Ditto.
29046         (_mm512_i64gather_epi64): Ditto.
29047         (_mm512_mask_i64gather_epi64): Ditto.
29048         (_mm512_i32scatter_ps): Change __addr type to void*.
29049         (_mm512_mask_i32scatter_ps): Ditto.
29050         (_mm512_i32scatter_pd): Ditto.
29051         (_mm512_mask_i32scatter_pd): Ditto.
29052         (_mm512_i64scatter_ps): Ditto.
29053         (_mm512_mask_i64scatter_ps): Ditto.
29054         (_mm512_i64scatter_pd): Ditto.
29055         (_mm512_mask_i64scatter_pd): Ditto.
29056         (_mm512_i32scatter_epi32): Ditto.
29057         (_mm512_mask_i32scatter_epi32): Ditto.
29058         (_mm512_i32scatter_epi64): Ditto.
29059         (_mm512_mask_i32scatter_epi64): Ditto.
29060         (_mm512_i64scatter_epi32): Ditto.
29061         (_mm512_mask_i64scatter_epi32): Ditto.
29062         (_mm512_i64scatter_epi64): Ditto.
29063         (_mm512_mask_i64scatter_epi64): Ditto.
29064         * config/i386/avx512pfintrin.h
29065         (_mm512_mask_prefetch_i32gather_pd): Change __addr type to void const*.
29066         (_mm512_mask_prefetch_i32gather_ps): Ditto.
29067         (_mm512_mask_prefetch_i64gather_pd): Ditto.
29068         (_mm512_mask_prefetch_i64gather_ps): Ditto.
29069         (_mm512_prefetch_i32scatter_pd): Change __addr type to void*.
29070         (_mm512_prefetch_i32scatter_ps): Ditto.
29071         (_mm512_mask_prefetch_i32scatter_pd): Ditto.
29072         (_mm512_mask_prefetch_i32scatter_ps): Ditto.
29073         (_mm512_prefetch_i64scatter_pd): Ditto.
29074         (_mm512_prefetch_i64scatter_ps): Ditto.
29075         (_mm512_mask_prefetch_i64scatter_pd): Ditto.
29076         (_mm512_mask_prefetch_i64scatter_ps): Ditto.
29077         * config/i386/avx512vlintrin.h
29078         (_mm256_mmask_i32gather_ps): Change __addr type to void const*.
29079         (_mm_mmask_i32gather_ps): Ditto.
29080         (_mm256_mmask_i32gather_pd): Ditto.
29081         (_mm_mmask_i32gather_pd): Ditto.
29082         (_mm256_mmask_i64gather_ps): Ditto.
29083         (_mm_mmask_i64gather_ps): Ditto.
29084         (_mm256_mmask_i64gather_pd): Ditto.
29085         (_mm_mmask_i64gather_pd): Ditto.
29086         (_mm256_mmask_i32gather_epi32): Ditto.
29087         (_mm_mmask_i32gather_epi32): Ditto.
29088         (_mm256_mmask_i32gather_epi64): Ditto.
29089         (_mm_mmask_i32gather_epi64): Ditto.
29090         (_mm256_mmask_i64gather_epi32): Ditto.
29091         (_mm_mmask_i64gather_epi32): Ditto.
29092         (_mm256_mmask_i64gather_epi64): Ditto.
29093         (_mm_mmask_i64gather_epi64): Ditto.
29094         (_mm256_i32scatter_ps): Change __addr type to void*.
29095         (_mm256_mask_i32scatter_ps): Ditto.
29096         (_mm_i32scatter_ps): Ditto.
29097         (_mm_mask_i32scatter_ps): Ditto.
29098         (_mm256_i32scatter_pd): Ditto.
29099         (_mm256_mask_i32scatter_pd): Ditto.
29100         (_mm_i32scatter_pd): Ditto.
29101         (_mm_mask_i32scatter_pd): Ditto.
29102         (_mm256_i64scatter_ps): Ditto.
29103         (_mm256_mask_i64scatter_ps): Ditto.
29104         (_mm_i64scatter_ps): Ditto.
29105         (_mm_mask_i64scatter_ps): Ditto.
29106         (_mm256_i64scatter_pd): Ditto.
29107         (_mm256_mask_i64scatter_pd): Ditto.
29108         (_mm_i64scatter_pd): Ditto.
29109         (_mm_mask_i64scatter_pd): Ditto.
29110         (_mm256_i32scatter_epi32): Ditto.
29111         (_mm256_mask_i32scatter_epi32): Ditto.
29112         (_mm_i32scatter_epi32): Ditto.
29113         (_mm_mask_i32scatter_epi32): Ditto.
29114         (_mm256_i32scatter_epi64): Ditto.
29115         (_mm256_mask_i32scatter_epi64): Ditto.
29116         (_mm_i32scatter_epi64): Ditto.
29117         (_mm_mask_i32scatter_epi64): Ditto.
29118         (_mm256_i64scatter_epi32): Ditto.
29119         (_mm256_mask_i64scatter_epi32): Ditto.
29120         (_mm_i64scatter_epi32): Ditto.
29121         (_mm_mask_i64scatter_epi32): Ditto.
29122         (_mm256_i64scatter_epi64): Ditto.
29123         (_mm256_mask_i64scatter_epi64): Ditto.
29124         (_mm_i64scatter_epi64): Ditto.
29125         (_mm_mask_i64scatter_epi64): Ditto.
29126         * config/i386/i386-builtin-types.def (V16SF_V16SF_PCFLOAT_V16SI_HI_INT)
29127         (V8DF_V8DF_PCDOUBLE_V8SI_QI_INT, V8SF_V8SF_PCFLOAT_V8DI_QI_INT)
29128         (V8DF_V8DF_PCDOUBLE_V8DI_QI_INT, V16SI_V16SI_PCINT_V16SI_HI_INT)
29129         (V8DI_V8DI_PCINT64_V8SI_QI_INT, V8SI_V8SI_PCINT_V8DI_QI_INT)
29130         (V8DI_V8DI_PCINT64_V8DI_QI_INT, V2DF_V2DF_PCDOUBLE_V4SI_QI_INT)
29131         (V4DF_V4DF_PCDOUBLE_V4SI_QI_INT, V2DF_V2DF_PCDOUBLE_V2DI_QI_INT)
29132         (V4DF_V4DF_PCDOUBLE_V4DI_QI_INT, V4SF_V4SF_PCFLOAT_V4SI_QI_INT)
29133         (V8SF_V8SF_PCFLOAT_V8SI_QI_INT, V4SF_V4SF_PCFLOAT_V2DI_QI_INT)
29134         (V4SF_V4SF_PCFLOAT_V4DI_QI_INT, V2DI_V2DI_PCINT64_V4SI_QI_INT)
29135         (V4DI_V4DI_PCINT64_V4SI_QI_INT, V2DI_V2DI_PCINT64_V2DI_QI_INT)
29136         (V4DI_V4DI_PCINT64_V4DI_QI_INT, V4SI_V4SI_PCINT_V4SI_QI_INT)
29137         (V8SI_V8SI_PCINT_V8SI_QI_INT, V4SI_V4SI_PCINT_V2DI_QI_INT)
29138         (V4SI_V4SI_PCINT_V4DI_QI_INT, VOID_PFLOAT_HI_V16SI_V16SF_INT)
29139         (VOID_PFLOAT_QI_V8SI_V8SF_INT, VOID_PFLOAT_QI_V4SI_V4SF_INT)
29140         (VOID_PDOUBLE_QI_V8SI_V8DF_INT, VOID_PDOUBLE_QI_V4SI_V4DF_INT)
29141         (VOID_PDOUBLE_QI_V4SI_V2DF_INT, VOID_PFLOAT_QI_V8DI_V8SF_INT)
29142         (VOID_PFLOAT_QI_V4DI_V4SF_INT, VOID_PFLOAT_QI_V2DI_V4SF_INT)
29143         (VOID_PDOUBLE_QI_V8DI_V8DF_INT, VOID_PDOUBLE_QI_V4DI_V4DF_INT)
29144         (VOID_PDOUBLE_QI_V2DI_V2DF_INT, VOID_PINT_HI_V16SI_V16SI_INT)
29145         (VOID_PINT_QI_V8SI_V8SI_INT, VOID_PINT_QI_V4SI_V4SI_INT)
29146         (VOID_PLONGLONG_QI_V8SI_V8DI_INT, VOID_PLONGLONG_QI_V4SI_V4DI_INT)
29147         (VOID_PLONGLONG_QI_V4SI_V2DI_INT, VOID_PINT_QI_V8DI_V8SI_INT)
29148         (VOID_PINT_QI_V4DI_V4SI_INT, VOID_PINT_QI_V2DI_V4SI_INT)
29149         (VOID_PLONGLONG_QI_V8DI_V8DI_INT, VOID_QI_V8SI_PCINT64_INT_INT)
29150         (VOID_PLONGLONG_QI_V4DI_V4DI_INT, VOID_PLONGLONG_QI_V2DI_V2DI_INT)
29151         (VOID_HI_V16SI_PCINT_INT_INT, VOID_QI_V8DI_PCINT64_INT_INT)
29152         (VOID_QI_V8DI_PCINT_INT_INT): Remove.
29153         (V16SF_V16SF_PCVOID_V16SI_HI_INT,  V8DF_V8DF_PCVOID_V8SI_QI_INT)
29154         (V8SF_V8SF_PCVOID_V8DI_QI_INT, V8DF_V8DF_PCVOID_V8DI_QI_INT)
29155         (V16SI_V16SI_PCVOID_V16SI_HI_INT, V8DI_V8DI_PCVOID_V8SI_QI_INT)
29156         (V8SI_V8SI_PCVOID_V8DI_QI_INT, V8DI_V8DI_PCVOID_V8DI_QI_INT)
29157         (VOID_PVOID_HI_V16SI_V16SF_INT, VOID_PVOID_QI_V8SI_V8DF_INT)
29158         (VOID_PVOID_QI_V8DI_V8SF_INT, VOID_PVOID_QI_V8DI_V8DF_INT)
29159         (VOID_PVOID_HI_V16SI_V16SI_INT, VOID_PVOID_QI_V8SI_V8DI_INT)
29160         (VOID_PVOID_QI_V8DI_V8SI_INT, VOID_PVOID_QI_V8DI_V8DI_INT)
29161         (V2DF_V2DF_PCVOID_V4SI_QI_INT, V4DF_V4DF_PCVOID_V4SI_QI_INT)
29162         (V2DF_V2DF_PCVOID_V2DI_QI_INT, V4DF_V4DF_PCVOID_V4DI_QI_INT
29163         (V4SF_V4SF_PCVOID_V4SI_QI_INT, V8SF_V8SF_PCVOID_V8SI_QI_INT)
29164         (V4SF_V4SF_PCVOID_V2DI_QI_INT, V4SF_V4SF_PCVOID_V4DI_QI_INT)
29165         (V2DI_V2DI_PCVOID_V4SI_QI_INT, V4DI_V4DI_PCVOID_V4SI_QI_INT)
29166         (V2DI_V2DI_PCVOID_V2DI_QI_INT, V4DI_V4DI_PCVOID_V4DI_QI_INT)
29167         (V4SI_V4SI_PCVOID_V4SI_QI_INT, V8SI_V8SI_PCVOID_V8SI_QI_INT)
29168         (V4SI_V4SI_PCVOID_V2DI_QI_INT, V4SI_V4SI_PCVOID_V4DI_QI_INT)
29169         (VOID_PVOID_QI_V8SI_V8SF_INT, VOID_PVOID_QI_V4SI_V4SF_INT)
29170         (VOID_PVOID_QI_V4SI_V4DF_INT, VOID_PVOID_QI_V4SI_V2DF_INT)
29171         (VOID_PVOID_QI_V4DI_V4SF_INT, VOID_PVOID_QI_V2DI_V4SF_INT)
29172         (VOID_PVOID_QI_V4DI_V4DF_INT, VOID_PVOID_QI_V2DI_V2DF_INT)
29173         (VOID_PVOID_QI_V8SI_V8SI_INT, VOID_PVOID_QI_V4SI_V4SI_INT)
29174         (VOID_PVOID_QI_V4SI_V4DI_INT, VOID_PVOID_QI_V4SI_V2DI_INT)
29175         (VOID_PVOID_QI_V4DI_V4SI_INT, VOID_PVOID_QI_V2DI_V4SI_INT)
29176         (VOID_PVOID_QI_V4DI_V4DI_INT, VOID_PVOID_QI_V2DI_V2DI_INT)
29177         (VOID_QI_V8SI_PCVOID_INT_INT, VOID_HI_V16SI_PCVOID_INT_INT)
29178         (VOID_QI_V8DI_PCVOID_INT_INT): Add.
29179         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Adjust builtin
29180         definitions accordingly.
29182 2017-01-17  Kito Cheng  <kito.cheng@gmail.com>
29183             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
29185         PR target/79079
29186         * internal-fn.c (expand_mul_overflow): Use convert_modes instead of
29187         gen_lowpart.
29189 2017-01-17  Vladimir Makarov  <vmakarov@redhat.com>
29191         PR target/79058
29192         * ira-conflicts.c (ira_build_conflicts): Update total conflict
29193         hard regs for inner regno.
29195 2017-01-17  Martin Liska  <mliska@suse.cz>
29197         PR ipa/71207
29198         * ipa-polymorphic-call.c (contains_type_p): Fix wrong
29199         assumption and add comment.
29201 2017-01-17  Nathan Sidwell  <nathan@acm.org>
29203         * ipa-visibility.c (localize_node): New function, broken out of ...
29204         (function_and_variable_visibility): ... here. Call it.
29206 2017-01-17  Jan Hubicka  <hubicka@ucw.cz>
29208         PR middle-end/77445
29209         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges):
29210         correctly set frequency of oudgoing edge.
29211         (duplicate_thread_path): Fix profile updating.
29213 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
29215         PR other/79046
29216         * configure.ac: Add GCC_BASE_VER.
29217         * Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
29218         version from BASE-VER file.
29219         (CFLAGS-gcc.o): Add -DBASEVER=$(BASEVER_s).
29220         (gcc.o): Depend on $(BASEVER).
29221         * common.opt (dumpfullversion): New option.
29222         * gcc.c (driver_handle_option): Handle OPT_dumpfullversion.
29223         * doc/invoke.texi: Document -dumpfullversion.
29224         * doc/install.texi: Document --with-gcc-major-version-only.
29225         * configure: Regenerated.
29227 2017-01-17  Richard Biener  <rguenther@suse.de>
29229         PR tree-optimization/71433
29230         * tree-vrp.c (register_new_assert_for): Merge same asserts
29231         on all incoming edges.
29232         (process_assert_insertions_for): Handle insertions at the
29233         beginning of BBs.
29235 2017-01-17  Gerald Pfeifer  <gerald@pfeifer.com>
29237         * config/i386/cygwin.h (LIBGCJ_SONAME): Remove.
29238         * config/i386/mingw32.h (LIBGCJ_SONAME): Remove.
29240 2017-01-17  Kaz Kojima  <kkojima@gcc.gnu.org>
29242         PR target/78633
29243         * config/sh/sh.md (cmpeqsi_t+1): Call copy_rtx to avoid invalid
29244         RTL sharing.
29246 2017-01-17  Alan Modra  <amodra@gmail.com>
29248         PR target/79066
29249         * config/rs6000/rs6000.md (elf_high, elf_low): Disable when pic.
29250         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Don't allow
29251         symbolic stack limit when pic.
29253 2017-01-16  Martin Sebor  <msebor@redhat.com>
29255         PR tree-optimization/78608
29256         * gimple-ssa-sprintf.c (tree_digits): Avoid negating TYPE_MIN.
29258 2017-01-16  Jeff Law  <law@redhat.com>
29260         Revert:
29261         2016-12-02  Tadek Kijkowski  <tkijkowski@gmail.com>
29262         * Makefile.in (PREPROCESSOR_DEFINES): Add a level of indirection
29263         for several include directories that may be relative to sysroot.
29264         * config/i386/x-mingw32 (gplus_includedir): Define.
29265         (gplus_tool_includedir, gplus_backward_include_dir): Likewise.
29266         (native_system_includedir): Likewise.
29267         * config/i386/mingw32.h (STANDARD_STARTFILE_PREFIX_1): Do not
29268         override if TARGET_SYSTEM_ROOT is defined.
29269         (NATIVE_SYSTEM_HEADER_DIR): Likewise.
29271         PR tree-optimization/79090
29272         PR tree-optimization/33562
29273         PR tree-optimization/61912
29274         PR tree-optimization/77485
29275         * tree-ssa-dse.c (compute_trims): Accept STMT argument.  Dump STMT
29276         and computed trims into the dump file.
29278 2017-01-17  Uros Bizjak  <ubizjak@gmail.com>
29280         * config/i386/i386.h (LIMIT_RELOAD_CLASS): Remove.
29282 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
29284         PR c/79089
29285         * gimplify.c (gimplify_init_constructor): If want_value and
29286         object == lhs, unshare lhs to avoid invalid tree sharing.  Formatting
29287         fix.
29289         PR target/79080
29290         * loop-doloop.c (doloop_modify): Call unshare_all_rtl_in_chain on
29291         sequence.  Formatting fixes.
29292         (doloop_optimize): Formatting fixes.
29294         PR driver/49726
29295         * gcc.c (debug_level_greater_than_spec_func): New function.
29296         (static_spec_functions): Add debug-level-gt spec function.
29297         (ASM_DEBUG_SPEC, cpp_options): Use %:debug-level-gt(0) instead of
29298         !g0.
29299         * config/darwin.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
29300         * config/darwin9.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
29301         * common.opt (g, gcoff, gdwarf, gdwarf-, ggdb, gno-pubnames,
29302         gpubnames, ggnu-pubnames, gno-record-gcc-switches,
29303         grecord-gcc-switches, gno-strict-dwarf, gstrict-dwarf, gstabs,
29304         gstabs+, gtoggle, gvms, gxcoff, gxcoff+): Add Driver flag.
29306 2017-01-16  Uros Bizjak  <ubizjak@gmail.com>
29308         * config/i386/i386.h (HARD_REGNO_CALLER_SAVE_MODE): Apply HImode and
29309         QImode fixups to general and mask registers only.
29311 2017-01-16  Carl Love  <cel@us.ibm.com>
29313         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Add support
29314         for built-in functions
29315         vector signed char vec_nabs (vector signed char)
29316         vector signed short vec_nabs (vector signed short)
29317         vector signed int vec_nabs (vector signed int)
29318         vector signed long long vec_nabs (vector signed long long)
29319         vector float vec_nabs (vector float)
29320         vector double vec_nabs (vector double)
29321         * config/rs6000/rs6000-builtin.def: Add definitions for NABS functions
29322         and NABS overload.
29323         * config/rs6000/altivec.md: New define_expand nabs<mode>2 types
29324         * config/rs6000/altivec.h: New define for vec_nabs built-in function.
29325         * doc/extend.texi: Update the documentation file for the new built-in
29326         functions.
29328 2017-01-16  Martin Sebor  <msebor@redhat.com>
29330         * gimple-ssa-sprintf.c (format_directive): Correct a typo in a warning
29331         message.
29333 2017-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29335         * config/rs6000/rs6000.c (rtx_is_swappable_p): Change
29336         UNSPEC_VSX__XXSPLTD to require special splat handling.
29338 2017-01-16  David Malcolm  <dmalcolm@redhat.com>
29340         PR bootstrap/78616
29341         * system.h: Poison strndup.
29343 2017-01-16  Alan Modra  <amodra@gmail.com>
29345         PR target/79098
29346         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Don't
29347         use a switch.
29349 2017-01-16  Georg-Johann Lay  <avr@gjlay.de>
29351         * config/avr/avr.h (BRANCH_COST) [reload_completed]: Increase by 4.
29353 2017-01-15  Uros Bizjak  <ubizjak@gmail.com>
29355         * config/i386/i386.c (ix86_legitimate_combined_insn): Do not
29356         call recog here.  Assert that INSN_CODE (insn) is non-negative.
29358 2017-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
29360         PR target/72749
29361         * cfgrtl.c (rtl_split_edge): Also patch jump insns that jump to the
29362         fallthrough.
29363         * haifa-sched.c (dump_insn_stream): Don't crash if there is a label
29364         in the currently scheduled RTL fragment.
29366 2017-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
29368         PR rtl-optimization/78751
29369         * ifcvt.c (find_cond_trap): If we generated a non-existing insn,
29370         give up.
29372 2017-01-14  Jeff Law  <law@redhat.com>
29374         PR tree-optimization/79090
29375         * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject zero length and
29376         variable length stores.
29377         (compute_trims): Delete dead assignment to *trim_tail.
29378         (dse_dom_walker::dse_optimize_stmt): Optimize mem* calls with
29379         zero length.
29381 2017-01-14  Bernd Schmidt  <bschmidt@redhat.com>
29383         PR rtl-optimization/78626
29384         PR rtl-optimization/78727
29385         * cprop.c (one_cprop_pass): Collect unconditional traps in the middle
29386         of a block, and split such blocks after everything else is finished.
29388 2017-01-14  Alan Modra  <amodra@gmail.com>
29390         PR target/72749
29391         * combine.c (recog_for_combine_1): Set INSN_CODE before calling
29392         target legitimate_combined_insn.
29393         * config/rs6000/rs6000.c (TARGET_LEGITIMATE_COMBINED_INSN): Define.
29394         (rs6000_legitimate_combined_insn): New function.
29395         * config/rs6000/rs6000.md (UNSPEC_DOLOOP): Delete, and remove
29396         all uses.
29397         (ctr<mode>_internal3): Rename from *ctr<mode>_internal5.
29398         (ctr<mode>_internal4): Rename from *ctr<mode>_internal6.
29399         (ctr<mode>_internal1, ctr<mode>_internal2): Remove '*' from name.
29401 2017-01-14  Gerald Pfeifer  <gerald@pfeifer.com>
29403         * doc/frontends.texi (G++ and GCC): Remove references to Java.
29405 2017-01-13  Jeff Law  <law@redhat.com>
29407         PR tree-optimization/33562
29408         PR tree-optimization/61912
29409         PR tree-optimization/77485
29410         * tree-ssa-dse.c (delete_dead_call): Accept gsi rather than
29411         a statement.
29412         (delete_dead_assignment): Likewise.
29413         (dse_dom_walker::dse_optimize_stmt): Pass in the gsi rather than
29414         statement to delete_dead_call and delete_dead_assignment.
29416 2017-01-13  David Malcolm  <dmalcolm@redhat.com>
29418         PR c/78304
29419         * substring-locations.c (format_warning_va): Strengthen case 1 so
29420         that both endpoints of the substring must be within the format
29421         range for just the substring to be printed.
29423 2017-01-13  Uros Bizjak  <ubizjak@gmail.com>
29425         * config/i386/i386.opt (msgx): Use ix86_isa_flags2 variable.
29426         * config/i386/i386.c (ix86_target_string): Add missing options
29427         to isa_opts and reorder options by implied ISAs.  Rename isa_opts2 to
29428         isa2_opts, ix86_flag_opts to flag2_opts, ix86_target_other to
29429         flags_other and ix86_target_other to flags2_other.  Display unknown
29430         isa2 options.
29431         (ix86_valid_target_attribute_inner_p): Add missing options and
29432         reorder options by implied ISAs, as in ix86_target_string.
29434 2017-01-13  Richard Sandiford  <richard.sandiford@arm.com>
29436         * hash-table.h (hash_table::too_empty_p): New function.
29437         (hash_table::expand): Use it.
29438         (hash_table::traverse): Likewise.
29439         (hash_table::empty_slot): Use sizeof (value_type) instead of
29440         sizeof (PTR) to convert bytes to elements.  Shrink the table
29441         if the current size is excessive for the current number of
29442         elements.
29444 2017-01-13  Richard Sandiford  <richard.sandiford@arm.com>
29446         * ira-costs.c (record_reg_classes): Break from the inner loop
29447         early once alt_fail is known to be true.  Update outer loop
29448         handling accordingly.
29450 2017-01-13  Jeff Law  <law@redhat.com>
29452         * tree-ssa-dse.c (decrement_count): New function.
29453         (increment_start_addr, maybe_trim_memstar_call): Likewise.
29454         (dse_dom_walker::optimize_stmt): Call maybe_trim_memstar_call directly
29455         when we know the partially dead statement is a mem* function.
29457         PR tree-optimization/61912
29458         PR tree-optimization/77485
29459         * tree-ssa-dse.c: Include expr.h.
29460         (maybe_trim_constructor_store): New function.
29461         (maybe_trim_partially_dead_store): Call maybe_trim_constructor_store.
29463         PR tree-optimization/33562
29464         PR tree-optimization/61912
29465         PR tree-optimization/77485
29466         * doc/invoke.texi: Document new dse-max-object-size param.
29467         * params.def (PARM_DSE_MAX_OBJECT_SIZE): New PARAM.
29468         * tree-ssa-dse.c: Include params.h.
29469         (dse_store_status): New enum.
29470         (initialize_ao_ref_for_dse): New, partially extracted from
29471         dse_optimize_stmt.
29472         (valid_ao_ref_for_dse, normalize_ref): New.
29473         (setup_live_bytes_from_ref, compute_trims): Likewise.
29474         (clear_bytes_written_by, maybe_trim_complex_store): Likewise.
29475         (maybe_trim_partially_dead_store): Likewise.
29476         (maybe_trim_complex_store): Likewise.
29477         (dse_classify_store): Renamed from dse_possibly_dead_store_p.
29478         Track what bytes live from the original store.  Return tri-state
29479         for dead, partially dead or live.
29480         (dse_dom_walker): Add constructor, destructor and new private members.
29481         (delete_dead_call, delete_dead_assignment): New extracted from
29482         dse_optimize_stmt.
29483         (dse_optimize_stmt): Make a member of dse_dom_walker.
29484         Use initialize_ao_ref_for_dse.
29486         PR tree-optimization/33562
29487         PR tree-optimization/61912
29488         PR tree-optimization/77485
29489         * sbitmap.h (bitmap_count_bits): Prototype.
29490         (bitmap_clear_range, bitmap_set_range): Likewise.
29491         * sbitmap.c (bitmap_clear_range): New function.
29492         (bitmap_set_range, sbitmap_popcount, bitmap_count_bits): Likewise.
29494 2017-01-13  Martin Liska  <mliska@suse.cz>
29496         PR ipa/79043
29497         * function.c (set_cfun): Add new argument force.
29498         * function.h (set_cfun): Likewise.
29499         * ipa-inline-transform.c (inline_call): Use the function when
29500         strict alising from is dropped for function we inline to.
29502 2017-01-13  Richard Biener  <rguenther@suse.de>
29504         * tree-pretty-print.c (dump_generic_node): Fix inverted condition
29505         for dumping GIMPLE INTEGER_CSTs.
29507 2017-01-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
29509         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define __STDC_VERSION__
29510         to 201112L since C++17.
29512 2017-01-13  Maxim Ostapenko  <m.ostapenko@samsung.com>
29514         PR sanitizer/78887
29515         * asan.c (asan_needs_odr_indicator_p): Don't emit ODR indicators
29516         if -fsanitize=kernel-address is present.
29518 2017-01-13  Richard Biener  <rguenther@suse.de>
29520         * tree-pretty-print.c (dump_generic_node): Dump INTEGER_CSTs
29521         as _Literal ( type ) number in case usual suffixes do not
29522         preserve all information.
29524 2017-01-13  Richard Biener  <rguenther@suse.de>
29526         PR tree-optimization/77283
29527         * gimple-ssa-split-paths.c: Include gimple-ssa.h, tree-phinodes.h
29528         and ssa-iterators.h.
29529         (is_feasible_trace): Implement a cost model based on joiner
29530         PHI node uses.
29532 2017-01-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
29534         PR target/79004
29535         * config/rs6000/rs6000.md (FP_ISA3): Do not optimize converting
29536         char or short to __float128/_Float128 directly.
29538 2017-01-12  Martin Sebor  <msebor@redhat.com>
29540         to -Wformat-overflow.
29541         * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust.
29542         (min_bytes_remaining): Same.
29543         (get_string_length): Same.
29544         (format_string): Same.
29545         (format_directive): Same.
29546         (add_bytes): Same.
29547         (pass_sprintf_length::handle_gimple_call): Same.
29549 2017-01-12  Jakub Jelinek  <jakub@redhat.com>
29551         * gimple-ssa-sprintf.c (try_substitute_return_value): Remove
29552         info.nowrite calls with no lhs that can't throw.  Return bool
29553         whether gsi_remove has been called or not.
29554         (pass_sprintf_length::handle_gimple_call): Return bool whether
29555         try_substitute_return_value called gsi_remove.  Formatting fix.
29556         (pass_sprintf_length::execute): Don't use gsi_remove if
29557         handle_gimple_call returned true.
29559         PR bootstrap/79069
29560         * cfgrtl.c (rtl_tidy_fallthru_edge): For any_uncondjump_p that can't
29561         be removed due to side-effects, don't remove following barrier nor
29562         turn the successor edge into fallthru edge.
29564 2017-01-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29566         PR target/79044
29567         * config/rs6000/rs6000.c (insn_is_swappable_p): Mark
29568         element-reversing loads and stores as not swappable.
29570 2017-01-12  Nathan Sidwell  <nathan@acm.org>
29571             Nicolai Stange  <nicstange@gmail.com>
29573         * combine.c (try_combine): Don't ignore result of overlap checking
29574         loop.  Combine overlap & asm check into single loop.
29576 2017-01-12  Richard Biener  <rguenther@suse.de>
29578         * tree-pretty-print.c (dump_generic_node): Provide -gimple
29579         variant for MEM_REF.  Sanitize INTEGER_CST for -gimple.
29581 2017-01-12  Richard Biener  <rguenther@suse.de>
29583         * tree.c (initialize_tree_contains_struct): Make TS_OPTIMIZATION
29584         and TS_TARGET_OPTION directly derive from TS_BASE.
29585         * tree-core.h (tree_optimization_option): Derive from tree_base.
29586         (tree_target_option): Likewise.
29588 2017-01-11  Uros Bizjak  <ubizjak@gmail.com>
29590         * config/i386/i386.c (memory_address_length): Increase len
29591         only when rip_relative_addr_p returns false.
29593 2017-01-11  Julia Koval  <julia.koval@intel.com>
29595         * common/config/i386/i386-common.c (OPTION_MASK_ISA_SGX_UNSET): New.
29596         (OPTION_MASK_ISA_SGX_SET): New.
29597         (ix86_handle_option): Handle OPT_msgx.
29598         * config.gcc: Added sgxintrin.h.
29599         * config/i386/driver-i386.c (host_detect_local_cpu): Detect sgx.
29600         * config/i386/i386-c.c (ix86_target_macros_internal): Define __SGX__.
29601         * config/i386/i386.c (ix86_target_string): Add -msgx.
29602         (PTA_SGX): New.
29603         (ix86_option_override_internal): Handle new options.
29604         (ix86_valid_target_attribute_inner_p): Add sgx.
29605         * config/i386/i386.h (TARGET_SGX, TARGET_SGX_P): New.
29606         * config/i386/i386.opt: Add msgx.
29607         * config/i386/sgxintrin.h: New file.
29608         * config/i386/x86intrin.h: Add sgxintrin.h.
29610 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
29612         PR c++/71537
29613         * fold-const.c (maybe_nonzero_address): Return 1 for function
29614         local objects.
29615         (tree_single_nonzero_warnv_p): Don't handle function local objects
29616         here.
29618         PR c++/72813
29619         * gcc.c (default_compilers): Don't add -o %g.s for -S -save-temps
29620         of c-header.
29622 2017-01-11  David Malcolm  <dmalcolm@redhat.com>
29624         PR driver/78877
29625         * opts.c: Include "spellcheck.h"
29626         (struct string_fragment): New struct.
29627         (struct edit_distance_traits<const string_fragment &>): New
29628         struct.
29629         (get_closest_sanitizer_option): New function.
29630         (parse_sanitizer_options): Offer suggestions for unrecognized arguments.
29632 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
29634         * dwarf2out.c (DWARF_COMPILE_UNIT_HEADER_SIZE): For DWARF5 decrease
29635         by 12.
29636         (DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE): Always
29637         DWARF_COMPILE_UNIT_HEADER_SIZE plus 12.
29638         (DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE): Define.
29639         (calc_base_type_die_sizes): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE
29640         for initial die_offset if dwarf_split_debug_info.
29641         (output_comp_unit): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE for
29642         initial next_die_offset if dwo_id is non-NULL.  Don't emit padding
29643         fields.
29644         (output_skeleton_debug_sections): Formatting fix.  Use
29645         DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE instead of
29646         DWARF_COMPILE_UNIT_HEADER_SIZE.  Don't emit padding.
29648 2017-01-11  Wilco Dijkstra  <wdijkstr@arm.com>
29650         * config/arm/cortex-a53.md: Add bypasses for
29651         cortex_a53_r2f_cvt.
29652         (cortex_a53_r2f): Only use for transfers.
29653         (cortex_a53_f2r): Likewise.
29654         (cortex_a53_r2f_cvt): Add reservation for conversions.
29655         (cortex_a53_f2r_cvt): Likewise.
29657 2017-01-11  Tamar Christina  <tamar.christina@arm.com>
29659         * config/arm/arm_neon.h: Add __artificial__ and gnu_inline
29660         to all inlined functions, change static to extern.
29662 2017-01-11  Christophe Lyon  <christophe.lyon@linaro.org>
29664         PR target/78253
29665         * config/arm/arm.c (legitimize_pic_address): Handle reference to
29666         weak symbol.
29667         (arm_assemble_integer): Likewise.
29669 2017-01-11  Richard Earnshaw  <rearnsha@arm.com>
29671         * config.gcc: Use new awk script to check CPU, FPU and architecture
29672         parameters for --with-... options.
29673         * config/arm/parsecpu.awk: New file
29674         * config/arm/arm-cpus.in: New file.
29675         * config/arm/arm-opts.h: Include arm-cpu.h instead of processing .def
29676         files.
29677         * config/arm/arm.c: Include arm-cpu-data.h instead of processing .def
29678         files.
29679         * config/arm/t-arm: Update dependency rules.
29680         * common/config/arm/arm-common.c: Include arm-cpu-cdata.h instead
29681         of processing .def files.
29682         * config/arm/genopt.sh: Deleted.
29683         * config/arm/gentune.sh: Deleted.
29684         * config/arm/arm-cores.def: Deleted.
29685         * config/arm/arm-arches.def: Deleted.
29686         * config/arm/arm-fpus.def: Deleted.
29687         * config/arm/arm-tune.md: Regenerated.
29688         * config/arm/arm-tables.opt: Regenerated.
29689         * config/arm/arm-cpu.h: New generated file.
29690         * config/arm/arm-cpu-data.h: New generated file.
29691         * config/arm/arm-cpu-cdata.h: New generated file.
29693 2017-01-11  Maxim Ostapenko  <m.ostapenko@samsung.com>
29695         PR lto/79042
29696         * lto-cgraph.c (lto_output_varpool_node): Pack dynamically_initialized
29697         bit.
29698         (input_varpool_node): Unpack dynamically_initialized bit.
29700 2017-01-11  Eric Botcazou  <ebotcazou@adacore.com>
29702         PR rtl-optimization/79032
29703         * lra-constraints.c (simplify_operand_subreg): In the MEM case, test
29704         the alignment of the adjusted memory reference against that of MODE,
29705         instead of the alignment of the original memory reference.
29707 2017-01-11  Martin Jambor  <mjambor@suse.cz>
29709         * hsa.c (hsa_callable_function_p): Revert addition of DECL_ARTIFICIAL
29710         test.
29711         * ipa-hsa.c (process_hsa_functions): Only duplicate non-artificial
29712         decorated functions.
29714 2017-01-11  Richard Biener  <rguenther@suse.de>
29716         * tree-vrp.c (evrp_dom_walker::before_dom_children): Also
29717         set range/nonnull info for PHI results.  Do not set it on
29718         stmts marked for removal.
29720 2017-01-10  Eric Botcazou  <ebotcazou@adacore.com>
29722         * expr.c (store_field): In the bitfield case, fetch the return value
29723         from the registers before applying a single big-endian adjustment.
29724         Always do a final load for a BLKmode value not larger than a word.
29726 2017-01-10  David Malcolm  <dmalcolm@redhat.com>
29728         PR c++/77949
29729         * input.c (selftest::test_accessing_ordinary_linemaps): Verify
29730         that we correctly handle column numbers greater than
29731         LINE_MAP_MAX_COLUMN_NUMBER.
29733 2017-01-10  Martin Sebor  <msebor@redhat.com>
29735         PR middle-end/78245
29736         * gimple-ssa-sprintf.c (get_destination_size): Call
29737         {init,fini}object_sizes.
29738         * tree-object-size.c (addr_object_size): Adjust.
29739         (pass_through_call): Adjust.
29740         (pass_object_sizes::execute): Adjust.
29741         * tree-object-size.h (fini_object_sizes): Declare.
29743 2017-01-10  Martin Sebor  <msebor@redhat.com>
29745         PR tree-optimization/78775
29746         * builtins.c (get_size_range): Move...
29747         * calls.c: ...to here.
29748         (alloc_max_size): Accept zero argument.
29749         (operand_signed_p): Remove.
29750         (maybe_warn_alloc_args_overflow): Call get_size_range.
29751         * calls.h (get_size_range): Declare.
29753 2017-01-10  Joe Seymour  <joe.s@somniumtech.com>
29755         * config/msp430/driver-msp430.c (msp430_mcu_data): Sync with data
29756         from TI's devices.csv file as of September 2016.
29757         * config/msp430/msp430.c (msp430_mcu_data): Likewise.
29759 2017-01-10  Sandra Loosemore  <sandra@codesourcery.com>
29761         * doc/extend.texi: Tweak formatting to fix overfull hbox warnings.
29762         * doc/invoke.texi: Likewise.
29763         * doc/md.texi: Likewise.
29764         * doc/objc.texi: Likewise.
29766 2017-01-10  Joshua Conner  <joshconner@google.com>
29768         * config/arm/fuchsia-elf.h: New file.
29769         * config/fuchsia.h: New file.
29770         * config.gcc (*-*-fuchsia*): Set native_system_header_dir.
29771         (aarch64*-*-fuchsia*, arm*-*-fuchsia*, x86_64-*-fuchsia*): Add to
29772         targets.
29773         * config.host: (aarch64*-*-fuchsia*, arm*-*-fuchsia*): Add to hosts.
29775 2016-01-10  Richard Biener  <rguenther@suse.de>
29777         PR tree-optimization/79034
29778         * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
29779         Propagate out degenerate PHIs in the joiner.
29781 2017-01-10  Martin Liska  <mliska@suse.cz>
29783         * ipa-icf.c (sort_sem_items_by_decl_uid): New function.
29784         (sort_congruence_classes_by_decl_uid): Likewise.
29785         (sort_congruence_class_groups_by_decl_uid): Likewise.
29786         (sem_item_optimizer::merge_classes): Sort class, groups in these
29787         classes and members in the groups by DECL_UID of declarations.
29788         This would make merge operations stable.
29790 2017-01-10  Martin Liska  <mliska@suse.cz>
29792         * ipa-icf.c (sem_item_optimizer::sem_item_optimizer): Remove
29793         usage of m_classes_vec.
29794         (sem_item_optimizer::~sem_item_optimizer):  Likewise.
29795         (sem_item_optimizer::get_group_by_hash): Likewise.
29796         (sem_item_optimizer::subdivide_classes_by_equality): Likewise.
29797         (sem_item_optimizer::subdivide_classes_by_sensitive_refs): Likewise.
29798         (sem_item_optimizer::verify_classes): Likewise.
29799         (sem_item_optimizer::process_cong_reduction): Likewise.
29800         (sem_item_optimizer::dump_cong_classes): Likewise.
29801         (sem_item_optimizer::merge_classes): Likewise.
29802         * ipa-icf.h (congruence_class_hash): Rename from
29803         congruence_class_group_hash.  Remove declaration of m_classes_vec.
29805 2017-01-10  Andrew Senkevich  <andrew.senkevich@intel.com>
29807         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VPOPCNTDQ_SET,
29808         OPTION_MASK_ISA_AVX512VPOPCNTDQ_UNSET): New.
29809         * config.gcc: Add avx512vpopcntdqintrin.h.
29810         * config/i386/avx512vpopcntdqintrin.h: New.
29811         * config/i386/cpuid.h (bit_AVX512VPOPCNTDQ): New.
29812         * config/i386/i386-builtin-types.def: Add new types.
29813         * config/i386/i386-builtin.def (__builtin_ia32_vpopcountd_v16si,
29814         __builtin_ia32_vpopcountd_v16si_mask, __builtin_ia32_vpopcountq_v8di,
29815         __builtin_ia32_vpopcountq_v8di_mask): New.
29816         * config/i386/i386-c.c (ix86_target_macros_internal): Define
29817         __AVX512VPOPCNTDQ__.
29818         * config/i386/i386.c (ix86_target_string): Add -mavx512vpopcntdq.
29819         (PTA_AVX512VPOPCNTDQ): Define.
29820         * config/i386/i386.h (TARGET_AVX512VPOPCNTDQ,
29821         TARGET_AVX512VPOPCNTDQ_P): Define.
29822         * config/i386/i386.opt: Add mavx512vpopcntdq.
29823         * config/i386/immintrin.h: Include avx512vpopcntdqintrin.h.
29824         * config/i386/sse.md (define_insn "vpopcount<mode><mask_name>"): New.
29826 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
29828         PR middle-end/77484
29829         * predict.def (PRED_CALL): Set to 67.
29831 2017-01-09  Eric Botcazou  <ebotcazou@adacore.com>
29833         * expr.c (store_field): In the bitfield case, if the value comes from
29834         a function call and is of an aggregate type returned in registers, do
29835         not modify the field mode; extract the value in all cases if the mode
29836         is BLKmode and the size is not larger than a word.
29838 2017-01-09  Dominique d'Humieres  <dominiq@lps.ens.fr>
29840         PR target/71017
29841         * config/i386/cpuid.h: Fix undefined behavior.
29843 2017-01-04  Jeff Law  <law@redhat.com>
29845         PR tree-optimization/79007
29846         PR tree-optimization/67955
29847         * tree-ssa-alias.c (same_addr_size_stores_p): Only need to be
29848         conservative for pt.null when flag_non_call_exceptions is on.
29850 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
29852         PR translation/79019
29853         PR translation/79020
29854         * params.def (PARAM_INLINE_MIN_SPEEDUP,
29855         PARAM_IPA_CP_SINGLE_CALL_PENALTY,
29856         PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD): Fix typos
29857         in descriptions.
29858         * config/avr/avr.opt (maccumulate-args): Likewise.
29859         * config/msp430/msp430.opt (mwarn-mcu): Likewise.
29860         * common.opt (freport-bug): Likewise.
29861         * cif-code.def (CIF_FINAL_ERROR): Likewise.
29862         * doc/invoke.texi (ipa-cp-single-call-penalty): Likewise.
29863         * config/s390/s390.c (s390_invalid_binary_op): Fix spelling in
29864         translatable string.
29865         * config/i386/i386.c (function_value_32): Likewise.
29866         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Likewise.
29867         * config/msp430/msp430.c (msp430_option_override, msp430_attr):
29868         Likewise.
29869         * config/msp430/driver-msp430.c (msp430_select_hwmult_lib): Likewise.
29870         * common/config/msp430/msp430-common.c (msp430_handle_option):
29871         Likewise.
29872         * symtab.c (symtab_node::verify_base): Likewise.
29873         * opts.c (set_debug_level): Likewise.
29874         * tree.c (verify_type_variant): Likewise.  Fix typo in comment.
29875         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add
29876         missing whitespace to translatable strings.
29877         * config/avr/avr.md (bswapsi2): Fix typo in comment.
29878         * config/sh/superh.h: Likewise.
29879         * config/i386/xopintrin.h: Likewise.
29880         * config/i386/znver1.md: Likewise.
29881         * config/rs6000/rs6000.c (struct rs6000_opt_mask): Likewise.
29882         * ipa-inline-analysis.c (compute_inline_parameters): Likewise.
29883         * double-int.h (struct double_int): Likewise.
29884         * double-int.c (div_and_round_double): Likewise.
29885         * wide-int.cc: Likewise.
29886         * tree-ssa.c (non_rewritable_mem_ref_base): Likewise.
29887         * tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
29888         * cfgcleanup.c (crossjumps_occured): Renamed to ...
29889         (crossjumps_occurred): ... this.
29890         (try_crossjump_bb, try_head_merge_bb, try_optimize_cfg, cleanup_cfg):
29891         Adjust all uses.
29893         PR tree-optimization/78899
29894         * tree-if-conv.c (version_loop_for_if_conversion): Instead of
29895         returning bool return struct loop *, NULL for failure and the new
29896         loop on success.
29897         (versionable_outer_loop_p): Don't version outer loop if it has
29898         dont_vectorized bit set.
29899         (tree_if_conversion): When versioning outer loop, ensure
29900         tree_if_conversion is performed also on the inner loop of the
29901         non-vectorizable outer loop copy.
29902         * tree-vectorizer.c (set_uid_loop_bbs): Formatting fix.  Fold
29903         LOOP_VECTORIZED in inner loop of the scalar outer loop and
29904         prevent vectorization of it.
29905         (vectorize_loops): For outer + inner LOOP_VECTORIZED, ensure
29906         the outer loop vectorization of the non-scalar version is attempted
29907         before vectorization of the inner loop in scalar version.  If
29908         outer LOOP_VECTORIZED guarded loop is not vectorized, prevent
29909         vectorization of its inner loop.
29910         * tree-vect-loop-manip.c (rename_variables_in_bb): If outer_loop
29911         has 2 inner loops, rename also on edges from bb whose single pred
29912         is outer_loop->header.  Fix typo in function comment.
29914 2017-01-09  Martin Sebor  <msebor@redhat.com>
29916         PR bootstrap/79033
29917         * asan.c (asan_emit_stack_protection): Increase local buffer size
29918         to avoid snprintf truncation warning.
29920 2017-01-09  Andrew Pinski  <apinski@cavium.com>
29922         * config/aarch64/aarch64-cores.def: Add thunderx2t99.  Change vulcan
29923         to reference thunderx2t99 for the tuning structure
29924         * config/aarch64/aarch64-cost-tables.h (vulcan_extra_costs):
29925         Rename to ...
29926         (thunderx2t99_extra_costs): This.
29927         * config/aarch64/aarch64-tune.md: Regenerate.
29928         * config/aarch64/aarch64.c (vulcan_addrcost_table): Rename to ...
29929         (vulcan_addrcost_table): This.
29930         (vulcan_regmove_cost): Rename to ...
29931         (thunderx2t99_regmove_cost): This.
29932         (vulcan_vector_cost): Rename to ...
29933         (thunderx2t99_vector_cost): this.
29934         (vulcan_branch_cost): Rename to ...
29935         (thunderx2t99_branch_cost): This.
29936         (vulcan_tunings): Rename to ...
29937         (thunderx2t99_tunings): This and s/vulcan/thunderx2t99 .
29938         * doc/invoke.texi (AARCH64/mtune): Add thunderx2t99.
29940 2017-01-09  Martin Jambor  <mjambor@suse.cz>
29942         PR ipa/78365
29943         PR ipa/78599
29944         * ipa-prop.h (ipa_jump_func): Swap positions of vr_known and m_vr.
29945         * ipa-cp.c (ipa_vr_operation_and_type_effects): New function.
29946         (propagate_vr_accross_jump_function): Use the above function for all
29947         value range computations for pass-through jump functions and type
29948         converasion from explicit value range values.
29949         (ipcp_propagate_stage): Do not attempt to deduce types of formal
29950         parameters from TYPE_ARG_TYPES.
29951         * ipa-prop.c (ipa_write_jump_function): Remove trailing whitespace.
29952         (ipa_write_node_info): Stream type of the actual argument.
29953         (ipa_read_node_info): Likewise. Also remove trailing whitespace.
29955 2017-01-09  Martin Liska  <mliska@suse.cz>
29957         PR pch/78970
29958         * gcc.c (driver_handle_option): Handle OPT_E and set have_E.
29959         (lookup_compiler): Do not show error message with have_E.
29961 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
29963         PR tree-optimization/78938
29964         * tree-vect-stmts.c (vectorizable_condition): For non-masked COND_EXPR
29965         where comp_vectype is VECTOR_BOOLEAN_TYPE_P, use
29966         BIT_{NOT,XOR,AND,IOR}_EXPR on the comparison operands instead of
29967         {EQ,NE,GE,GT,LE,LT}_EXPR directly inside of VEC_COND_EXPR.  Formatting
29968         fixes.
29970 2017-01-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29972         * tree-ssa-address.c (gen_addr_rtx): Don't handle index if it
29973         is const0_rtx.
29975 2017-01-09  Richard Biener  <rguenther@suse.de>
29977         PR tree-optimization/78997
29978         * tree-vect-slp.c (vect_mask_constant_operand_p): Handle SSA
29979         name condition properly.
29981 2017-01-09  Richard Biener  <rguenther@suse.de>
29983         PR debug/79000
29984         * dwarf2out.c (is_cxx): New overload with context.
29985         (is_naming_typedef_decl): Use it.
29987 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
29989         * invoke.texi (Option Summary): Correct spacing in option lists
29990         and add line breaks to fix over-long lines.
29992 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
29994         PR middle-end/17660
29996         * extend.texi (Common Variable Attributes): Add xref to GCC
29997         Internals manual to explain mode attribute keywords.
29999 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
30001         PR other/16519
30002         * doc/invoke.texi (Option Summary): Move -pthread to Linker Options
30003         and Preprocessor Options.
30004         (Options for Linking): Document -pthread here....
30005         (RS/6000 and PowerPC Options): ...not here.
30006         (Solaris 2 Options): ...or here.
30007         * doc/cppopts.texi: Document -pthread.
30009 2017-01-08  Martin Sebor  <msebor@redhat.com>
30011         PR middle-end/77708
30012         * doc/invoke.texi (Warning Options): Document -Wformat-truncation.
30013         * gimple-ssa-sprintf.c (call_info::reval_used, call_info::warnopt):
30014         New member functions.
30015         (format_directive): Used them.
30016         (add_bytes): Same.
30017         (pass_sprintf_length::handle_gimple_call): Same.
30018         * graphite-sese-to-poly.c (tree_int_to_gmp): Increase buffer size
30019         to avoid truncation for any argument.
30020         (extract_affine_mul): Same.
30021         * tree.c (get_file_function_name): Same.
30023 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
30025         PR middle-end/77484
30026         * predict.def (PRED_INDIR_CALL): Set to 86.
30028 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
30030         PR preprocessor/54124
30031         * doc/cppopts.texi: Reformat -d subtable to list the full name
30032         of the options.  Add cross-reference to the docs for the general
30033         compiler -d options.
30034         * doc/invoke.texi (Developer Options): Add cross-reference to the
30035         preprocessor-specific -d option documentation.
30037 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
30039         PR preprocessor/13498
30040         * doc/cpp.texi (Search Path): Rewrite to remove obsolete and
30041         redudant material, and reflect new command-line options.
30042         (System Headers): Likewise.
30044 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
30046         * doc/cppdiropts.texi: Merge documentation of -I, -iquote,
30047         -isystem, and -idirafter.  Copy-edit.
30048         * doc/cppopts.texi: Copy-edit.  Remove contradiction about
30049         default for -ftrack-macro-expansion.  Delete obsolete and
30050         badly-formatted implementation details about -fdebug-cpp output.
30051         * doc/cppwarnopts.texi: Copy-edit.
30053 2017-01-07  David Malcolm  <dmalcolm@redhat.com>
30055         PR c++/72803
30056         * input.c (selftest::test_accessing_ordinary_linemaps): Verify
30057         that the transition from a max line width >= 1<<10 to narrower
30058         lines works correctly.
30060 2017-01-07  Alexandre Oliva <aoliva@redhat.com>
30062         * doc/options.texi (PerFunction): New.
30063         * opt-functions.awk (switch_flags): Map both Optimization and
30064         PerFunction to CL_OPTIMIZATION.
30065         * opth-gen.awk: Test for PerFunction flag along with
30066         Optimization.
30067         * optc-save-gen.awk: Likewise.  Introduce var_opt_hash and set
30068         it only when the latter is present.  Skip those that don't in
30069         the hash function generator.
30070         * common.opt (fvar-tracking): Mark as PerFunction instead of
30071         Optimization.
30072         (fvar-tracking-assignments): Likewise.
30073         (fvar-tracking-assignments-toggle): Likewise.
30074         (fvar-tracking-uninit): Likewise.
30076 2017-01-07  Jakub Jelinek  <jakub@redhat.com>
30078         PR translation/79018
30079         * params.def (PARAM_MAX_STORES_TO_MERGE): Add missing space between
30080         the and store.
30082 2017-01-06  Mikael Pettersson  <mikpelinux@gmail.com>
30084         PR target/57583
30085         * config/m68k/m68k.opt (LONG_JUMP_TABLE_OFFSETS): New option.
30086         * config/m68k/linux.h (ASM_RETURN_CASE_JUMP): Handle
30087         TARGET_LONG_JUMP_TABLE_OFFSETS.
30088         * config/m68k/m68kelf.h (ASM_RETURN_CASE_JUMP): Likewise.
30089         * config/m68k/netbsd-elf.h (ASM_RETURN_CASE_JUMP): Likewise.
30090         * config/m68k/m68k.h (CASE_VECTOR_MODE): Likewise.
30091         (ASM_OUTPUT_ADDR_DIFF_ELF): Likewise.
30092         * config/m68k/m68k.md (tablejump expander): Likewise.
30093         (*tablejump_pcrel_hi): Renamed from unnamed insn, reject
30094         TARGET_LONG_JUMP_TABLE_OFFSETS.
30095         (*tablejump_pcrel_si): New insn, handle TARGET_LONG_JUMP_TABLE_OFFSETS.
30096         * doc/invoke.texi (M68K options): Add -mlong-jump-table-offsets.
30098 2017-01-06  Edgar E. Iglesias <edgar.iglesias@xilinx.com>
30099             David Holsgrove <david.holsgrove@xilinx.com>
30101         * common/config/microblaze/microblaze-common.c
30102         (TARGET_EXCEPT_UNWIND_INFO): Remove.
30103         * config/microblaze/microblaze-protos.h (microblaze_eh_return):
30104         New prototype.
30105         * config/microblaze/microblaze.c (microblaze_must_save_register)
30106         (microblaze_expand_epilogue, microblaze_return_addr): Handle
30107         calls_eh_return.
30108         (microblaze_eh_return): New function.
30109         * config/microblaze/microblaze.h (RETURN_ADDR_OFFSET)
30110         (EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM)
30111         (EH_RETURN_STACKADJ_RTX, ASM_PREFERRED_EH_DATA_FORMAT): New macros.
30112         * config/microblaze/microblaze.md (eh_return): New pattern.
30114 2017-01-06  Jakub Jelinek  <jakub@redhat.com>
30116         * system.h (GCC_DIAGNOSTIC_PUSH_IGNORED, GCC_DIAGNOSTIC_POP,
30117         GCC_DIAGNOSTIC_STRINGIFY): Define.
30119         * read-rtl.c (rtx_reader::read_rtx_code): Avoid -Wsign-compare warning.
30121 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
30123         * config/arm/arm.md (<mcrr>): New.
30124         (<mrrc>): New.
30125         * config/arm/arm.c (arm_arch5te): New.
30126         (arm_option_override): Set arm_arch5te.
30127         (arm_coproc_builtin_available): Add support for mcrr, mcrr2, mrrc
30128         and mrrc2.
30129         * config/arm/arm-builtins.c (MCRR_QUALIFIERS): Define to...
30130         (arm_mcrr_qualifiers): ... this. New.
30131         (MRRC_QUALIFIERS): Define to...
30132         (arm_mrrc_qualifiers): ... this. New.
30133         * config/arm/arm_acle.h (__arm_mcrr, __arm_mcrr2, __arm_mrrc,
30134         __arm_mrrc2): New.
30135         * config/arm/arm_acle_builtins.def (mcrr, mcrr2, mrrc, mrrc2): New.
30136         * config/arm/iterators.md (MCRRI, mcrr, MCRR): New.
30137         (MRRCI, mrrc, MRRC): New.
30138         * config/arm/unspecs.md (VUNSPEC_MCRR, VUNSPEC_MCRR2, VUNSPEC_MRRC,
30139         VUNSPEC_MRRC2): New.
30141 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
30143         * config/arm/arm.md (<mcr>): New.
30144         (<mrc>): New.
30145         * config/arm/arm.c (arm_coproc_builtin_available): Add
30146         support for mcr, mrc, mcr2 and mrc2.
30147         * config/arm/arm-builtins.c (MCR_QUALIFIERS): Define to...
30148         (arm_mcr_qualifiers): ... this. New.
30149         (MRC_QUALIFIERS): Define to ...
30150         (arm_mrc_qualifiers): ... this. New.
30151         (MCR_QUALIFIERS): Define to ...
30152         (arm_mcr_qualifiers): ... this. New.
30153         * config/arm/arm_acle.h (__arm_mcr, __arm_mrc, __arm_mcr2,
30154         __arm_mrc2): New.
30155         * config/arm/arm_acle_builtins.def (mcr, mcr2, mrc, mrc2): New.
30156         * config/arm/iterators.md (MCRI, mcr, MCR, MRCI, mrc, MRC): New.
30157         * config/arm/unspecs.md (VUNSPEC_MCR, VUNSPEC_MCR2, VUNSPEC_MRC,
30158         VUNSPEC_MRC2): New.
30160 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
30162         * config/arm/arm.md (*ldc): New.
30163         (*stc): New.
30164         (<ldc>): New.
30165         (<stc>): New.
30166         * config/arm/arm.c (arm_coproc_builtin_available): Add
30167         support for ldc,ldcl,stc,stcl,ldc2,ldc2l,stc2 and stc2l.
30168         (arm_coproc_ldc_stc_legitimate_address): New.
30169         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
30170         'qualifier_const_pointer'.
30171         (LDC_QUALIFIERS): Define to...
30172         (arm_ldc_qualifiers): ... this. New.
30173         (STC_QUALIFIERS): Define to...
30174         (arm_stc_qualifiers): ... this. New.
30175         * config/arm/arm-protos.h
30176         (arm_coproc_ldc_stc_legitimate_address): New.
30177         * config/arm/arm_acle.h (__arm_ldc, __arm_ldcl, __arm_stc,
30178         __arm_stcl, __arm_ldc2, __arm_ldc2l, __arm_stc2, __arm_stc2l): New.
30179         * config/arm/arm_acle_builtins.def (ldc, ldc2, ldcl, ldc2l, stc,
30180         stc2, stcl, stc2l): New.
30181         * config/arm/constraints.md (Uz): New.
30182         * config/arm/iterators.md (LDCI, STCI, ldc, stc, LDC STC): New.
30183         * config/arm/unspecs.md (VUNSPEC_LDC, VUNSPEC_LDC2, VUNSPEC_LDCL,
30184         VUNSPEC_LDC2L, VUNSPEC_STC, VUNSPEC_STC2, VUNSPEC_STCL,
30185         VUNSPEC_STC2L): New.
30187 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
30189         * config/arm/arm.md (<cdp>): New.
30190         * config/arm/arm.c (neon_const_bounds): Rename this ...
30191         (arm_const_bounds): ... this.
30192         (arm_coproc_builtin_available): New.
30193         * config/arm/arm-builtins.c (SIMD_MAX_BUILTIN_ARGS): Increase.
30194         (arm_type_qualifiers): Add 'qualifier_unsigned_immediate'.
30195         (CDP_QUALIFIERS): Define to...
30196         (arm_cdp_qualifiers): ... this. New.
30197         (void_UP): Define.
30198         (arm_expand_builtin_args): Add case for 6 arguments.
30199         * config/arm/arm-protos.h (neon_const_bounds): Rename this ...
30200         (arm_const_bounds): ... this.
30201         (arm_coproc_builtin_available): New.
30202         * config/arm/arm_acle.h (__arm_cdp): New.
30203         (__arm_cdp2): New.
30204         * config/arm/arm_acle_builtins.def (cdp): New.
30205         (cdp2): New.
30206         * config/arm/iterators.md (CDPI,CDP,cdp): New.
30207         * config/arm/neon.md: Rename all 'neon_const_bounds' to
30208         'arm_const_bounds'.
30209         * config/arm/types.md (coproc): New.
30210         * config/arm/unspecs.md (VUNSPEC_CDP, VUNSPEC_CDP2): New.
30211         * doc/extend.texi (ACLE): Add a mention of Coprocessor intrinsics.
30212         * doc/sourcebuild.texi (arm_coproc1_ok, arm_coproc2_ok,
30213         arm_coproc3_ok, arm_coproc4_ok): Document new effective targets.
30215 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
30217         * config/arm/arm-builtins.c (arm_unsigned_binop_qualifiers): New.
30218         (UBINOP_QUALIFIERS): New.
30219         (si_UP): Define.
30220         (acle_builtin_data): New. Change comment.
30221         (arm_builtins): Remove ARM_BUILTIN_CRC32B, ARM_BUILTIN_CRC32H,
30222         ARM_BUILTIN_CRC32W, ARM_BUILTIN_CRC32CB, ARM_BUILTIN_CRC32CH,
30223         ARM_BUILTIN_CRC32CW. Add ARM_BUILTIN_ACLE_BASE and include
30224         arm_acle_builtins.def.
30225         (ARM_BUILTIN_ACLE_PATTERN_START): Define.
30226         (arm_init_acle_builtins): New.
30227         (CRC32_BUILTIN): Remove.
30228         (bdesc_2arg): Remove entries for crc32b, crc32h, crc32w,
30229         crc32cb, crc32ch and crc32cw.
30230         (arm_init_crc32_builtins): Remove.
30231         (arm_init_builtins): Use arm_init_acle_builtins rather
30232         than arm_init_crc32_builtins.
30233         (arm_expand_acle_builtin): New.
30234         (arm_expand_builtin): Use 'arm_expand_acle_builtin'.
30235         * config/arm/arm_acle_builtins.def: New.
30237 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
30239         * config/arm/arm-builtins.c (neon_builtin_datum): Rename to ..
30240         (arm_builtin_datum): ... this.
30241         (arm_init_neon_builtin): Rename to ...
30242         (arm_init_builtin): ... this. Add a new parameters PREFIX
30243         and USE_SIG_IN_NAME.
30244         (arm_init_neon_builtins): Replace 'arm_init_neon_builtin' with
30245         'arm_init_builtin'. Replace type 'neon_builtin_datum' with
30246         'arm_builtin_datum'.
30247         (arm_init_vfp_builtins): Likewise.
30248         (builtin_arg): Rename enum's replacing 'NEON_ARG' with
30249         'ARG_BUILTIN' and add a 'ARG_BUILTIN_NEON_MEMORY.
30250         (arm_expand_neon_args): Rename to ...
30251         (arm_expand_builtin_args): ... this. Rename builtin_arg
30252         enum values and differentiate between ARG_BUILTIN_MEMORY
30253         and ARG_BUILTIN_NEON_MEMORY.
30254         (arm_expand_neon_builtin_1): Rename to ...
30255         (arm_expand_builtin_1): ... this. Rename builtin_arg enum
30256         values, arm_expand_builtin_args and add bool parameter NEON.
30257         (arm_expand_neon_builtin): Use arm_expand_builtin_1.
30258         (arm_expand_vfp_builtin): Likewise.
30259         (NEON_MAX_BUILTIN_ARGS): Remove, it was unused.
30261 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
30263         PR middle-end/77484
30264         * predict.def (PRED_POLYMORPHIC_CALL): Set to 59.
30265         * predict.c (tree_estimate_probability_bb): Reverse direction of
30266         polymorphic call predictor.
30268 2017-01-06  David Malcolm  <dmalcolm@redhat.com>
30270         * passes.c (execute_one_pass): Split out pass-skipping logic into...
30271         (determine_pass_name_match): ...this new function and...
30272         (should_skip_pass_p): ...this new function.
30274 2017-01-06  Nathan Sidwell  <nathan@acm.org>
30276         * ipa-visibility.c (function_and_variable_visibility): Reformat
30277         comments and long lines.  Remove extrneous if.
30278         * symtab.c (symtab_node::make_decl_local): Fix code format.
30279         (symtab_node::set_section_for_node): Fix comment typo.
30281 2017-01-06  Martin Liska  <mliska@suse.cz>
30283         PR bootstrap/79003
30284         * lra-constraints.c: Rename invariant to lra_invariant.
30285         * predict.c (set_even_probabilities): Initialize e to NULL.
30287 2017-01-05  Martin Sebor  <msebor@redhat.com>
30289         PR tree-optimization/78910
30290         * gimple-ssa-sprintf.c (tree_digits): Add an argument.
30291         (format_integer): Correct off-by-one error in the handling
30292         of precision with negative numbers in signed conversions..
30294 2017-01-05  Eric Botcazou  <ebotcazou@adacore.com>
30296         * doc/invoke.texi (C Dialect Options): Adjust -fsso-struct entry.
30298 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
30300         PR tree-optimization/71016
30301         * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Pass cond_stmt to
30302         factor_out_conditional_conversion.  Formatting fix.
30303         (factor_out_conditional_conversion): Add cond_stmt argument.
30304         If arg1 is INTEGER_CST, punt if new_arg0 is not any operand of
30305         cond_stmt and if arg0_def_stmt is not the only stmt in its bb.
30306         Formatting fix.
30308 2017-01-05  David Malcolm  <dmalcolm@redhat.com>
30310         * Makefile.in (OBJS): Add read-md.o, read-rtl.o,
30311         read-rtl-function.o, and selftest-rtl.o.
30312         * config/aarch64/aarch64.c: Include selftest.h and selftest-rtl.h.
30313         (selftest::aarch64_test_loading_full_dump): New function.
30314         (selftest::aarch64_run_selftests): New function.
30315         (TARGET_RUN_TARGET_SELFTESTS): Wire it up to
30316         selftest::aarch64_run_selftests.
30317         * config/i386/i386.c
30318         (selftest::ix86_test_loading_dump_fragment_1): New function.
30319         (selftest::ix86_test_loading_call_insn): New function.
30320         (selftest::ix86_test_loading_full_dump): New function.
30321         (selftest::ix86_test_loading_unspec): New function.
30322         (selftest::ix86_run_selftests): Call the new functions.
30323         * emit-rtl.c (maybe_set_max_label_num): New function.
30324         * emit-rtl.h (maybe_set_max_label_num): New decl.
30325         * function.c (instantiate_decls): Guard call to
30326         instantiate_decls_1 with if (DECL_INITIAL (fndecl)).
30327         * function-tests.c (selftest::verify_three_block_rtl_cfg): Remove
30328         "static".
30329         * gensupport.c (gen_reader::gen_reader): Pass "false"
30330         for new "compact" param of rtx_reader.
30331         * print-rtl.c (rtx_writer::print_rtx_operand): Print "(nil)"
30332         rather than an empty string for NULL strings.
30333         * read-md.c: Potentially include config.h rather than bconfig.h.
30334         Wrap include of errors.h with #ifdef GENERATOR_FILE.
30335         (have_error): New global, copied from errors.c.
30336         (md_reader::read_name): Rename to...
30337         (md_reader::read_name_1): ...this, adding "out_loc" param,
30338         and converting "missing name or number" to returning false, rather
30339         than failing.
30340         (md_reader::read_name): Reimplement in terms of read_name_1.
30341         (md_reader::read_name_or_nil): New function.
30342         (md_reader::read_string): Handle "(nil)" by returning NULL.
30343         (md_reader::md_reader): Add new param "compact".
30344         (md_reader::read_md_files): Wrap with #ifdef GENERATOR_FILE.
30345         (md_reader::read_file): New method.
30346         * read-md.h (md_reader::md_reader): Add new param "compact".
30347         (md_reader::read_file): New method.
30348         (md_reader::is_compact): New accessor.
30349         (md_reader::read_name): Convert return type from void to file_location.
30350         (md_reader::read_name_or_nil): New decl.
30351         (md_reader::read_name_1): New decl.
30352         (md_reader::m_compact): New field.
30353         (noop_reader::noop_reader): Pass "false" for new "compact" param
30354         of rtx_reader.
30355         (rtx_reader::rtx_reader): Add new "compact" param.
30356         (rtx_reader::read_rtx_operand): Make virtual and convert return
30357         type from void to rtx.
30358         (rtx_reader::read_until): New decl.
30359         (rtx_reader::handle_any_trailing_information): New virtual function.
30360         (rtx_reader::postprocess): New virtual function.
30361         (rtx_reader::finalize_string): New virtual function.
30362         (rtx_reader::m_in_call_function_usage): New field.
30363         (rtx_reader::m_reuse_rtx_by_id): New field.
30364         * read-rtl-function.c: New file.
30365         * selftest-rtl.c (selftest::assert_rtx_ptr_eq_at): New function.
30366         * selftest-rtl.h (ASSERT_RTX_PTR_EQ): New macro.
30367         (selftest::verify_three_block_rtl_cfg): New decl.
30368         * read-rtl-function.h: New file.
30369         * read-rtl.c: Potentially include config.h rather than bconfig.h.
30370         For host, include function.h, memmodel.h, and emit-rtl.h.
30371         (one_time_initialization): New function.
30372         (struct compact_insn_name): New struct.
30373         (compact_insn_names): New array.
30374         (find_code): Handle insn codes in compact dumps.
30375         (apply_subst_iterator): Wrap with #ifdef GENERATOR_FILE.
30376         (bind_subst_iter_and_attr): Likewise.
30377         (add_condition_to_string): Likewise.
30378         (add_condition_to_rtx): Likewise.
30379         (apply_attribute_uses): Likewise.
30380         (add_current_iterators): Likewise.
30381         (apply_iterators): Likewise.
30382         (initialize_iterators): Guard usage of apply_subst_iterator with
30383         #ifdef GENERATOR_FILE.
30384         (read_conditions): Wrap with #ifdef GENERATOR_FILE.
30385         (md_reader::read_mapping): Likewise.
30386         (add_define_attr_for_define_subst): Likewise.
30387         (add_define_subst_attr): Likewise.
30388         (read_subst_mapping): Likewise.
30389         (check_code_iterator): Likewise.
30390         (rtx_reader::read_rtx): Likewise.  Move one-time initialization
30391         logic to...
30392         (one_time_initialization): New function.
30393         (rtx_reader::read_until): New method.
30394         (read_flags): New function.
30395         (parse_reg_note_name): New function.
30396         (rtx_reader::read_rtx_code): Initialize "iterator" to NULL.
30397         Handle reuse_rtx ids.
30398         Wrap iterator lookup within #ifdef GENERATOR_FILE.
30399         Add parsing support for RTL dumps, mirroring the special-cases in
30400         print_rtx, by calling read_flags, reading REG_NOTE names, INSN_UID
30401         values, and calling handle_any_trailing_information.
30402         (rtx_reader::read_rtx_operand): Convert return type from void
30403         to rtx, returning return_rtx.  Handle case 'e'.  Call
30404         finalize_string on XSTR and XTMPL fields.
30405         (rtx_reader::read_nested_rtx):  Handle dumps in which trailing
30406          "(nil)" values were omitted.  Call the postprocess vfunc on the
30407         return_rtx.
30408         (rtx_reader::rtx_reader): Add new "compact" param and pass to base
30409         class ctor.  Initialize m_in_call_function_usage.  Call
30410         one_time_initialization.
30411         * rtl-tests.c (selftest::test_uncond_jump): Call
30412         set_new_first_and_last_insn.
30413         * rtl.h (read_rtx): Wrap decl with #ifdef GENERATOR_FILE.
30414         * selftest-rtl.c: New file.
30415         * selftest-rtl.h (class selftest::rtl_dump_test): New class.
30416         (selftest::get_insn_by_uid): New decl.
30417         * selftest-run-tests.c (selftest::run_tests): Call
30418         read_rtl_function_c_tests.
30419         * selftest.h  (selftest::read_rtl_function_c_tests): New decl.
30420         * tree-dfa.c (ssa_default_def): Return NULL_TREE for rtl function
30421         dumps.
30423 2017-01-05  Uros Bizjak  <ubizjak@gmail.com>
30425         * config/i386/i386.md (*testqi_ext_3): No need to handle memory
30426         operands in a special way.  Assert that pos+len <= mode precision.
30428 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
30430         * common.opt (fvect-cost-model): Remove RejectNegative flag, use
30431         3 argument Alias with unlimited for the negative form.
30432         (fno-vect-cost-model): Removed.
30434 2017-01-05  Martin Liska  <mliska@suse.cz>
30436         * hsa-gen.c (gen_hsa_divmod): New function.
30437         (gen_hsa_insn_for_internal_fn_call): Use the function for IFN_DIVMOD.
30439 2017-01-05  Martin Liska  <mliska@suse.cz>
30441         PR pch/78970
30442         * gcc.c (lookup_compiler): Reject '-' filename for a precompiled
30443         header.
30445 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
30447         * config/s390/s390.c (s390_expand_setmem): Unroll the loop for
30448         small constant length operands.
30450 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
30452         * config/s390/s390.c (s390_expand_setmem): Avoid overlapping bytes
30453         between loop iterations.
30455 2017-01-05  Martin Liska  <mliska@suse.cz>
30457         PR sanitizer/78815
30458         * gimplify.c (gimplify_decl_expr): Compare to
30459         asan_poisoned_variables instread of checking flags.
30460         (gimplify_target_expr): Likewise.
30461         (gimplify_expr): Likewise.
30462         (gimplify_function_tree): Conditionally initialize
30463         asan_poisoned_variables.
30465 2017-01-04  Jeff Law  <law@redhat.com>
30467         PR tree-optimizatin/78812
30468         * rtl.h (contains_mem_rtx_p): Prototype.
30469         * ifcvt.c (containts_mem_rtx_p): Move from here to...
30470         * rtlanal.c (contains_mem_rtx_p): Here and remove static linkage.
30471         * gcse.c (prune_expressions): Use contains_mem_rtx_p to discover
30472         and prune MEMs that are not at the toplevel of a SET_SRC rtx.  Look
30473         through ZERO_EXTEND and SIGN_EXTEND when trying to avoid pruning MEMs.
30475 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
30477         * input.c (assert_char_at_range): Default-initialize actual_range.
30479 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
30481         * df-scan.c (df_ref_create_structure): Make regno unsigned,
30482         to match the caller.
30484 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
30486         * cfgexpand.c (expand_gimple_basic_block): Disregard debug
30487         insns after final jump in test to emit dummy move.
30489 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
30491         * gimple-iterator.h (gsi_one_nondebug_before_end_p): New.
30492         * tree-eh.c (cleanup_empty_eh): Skip more debug stmts.
30494 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
30496         * multiple_target.c (create_dispatcher_calls): Init e_next.
30497         * tree-ssa-loop-split.c (split_loop): Init border.
30498         * tree-vect-loop.c (vect_determine_vectorization_factor): Init
30499         scalar_type.
30501 2017-01-04  Michael Meissner  <meissner@linux.vnet.ibm.com>
30503         PR target/71977
30504         PR target/70568
30505         PR target/78823
30506         * config/rs6000/predicates.md (sf_subreg_operand): New predicate.
30507         (altivec_register_operand): Do not return true if the operand
30508         contains a SUBREG mixing SImode and SFmode.
30509         (vsx_register_operand): Likewise.
30510         (vsx_reg_sfsubreg_ok): New predicate.
30511         (vfloat_operand): Do not return true if the operand contains a
30512         SUBREG mixing SImode and SFmode.
30513         (vint_operand): Likewise.
30514         (vlogical_operand): Likewise.
30515         (gpc_reg_operand): Likewise.
30516         (int_reg_operand): Likewise.
30517         * config/rs6000/rs6000-protos.h (valid_sf_si_move): Add declaration.
30518         * config/rs6000/rs6000.c (valid_sf_si_move): New function to
30519         determine if a MOVSI or MOVSF operation contains SUBREGs that mix
30520         SImode and SFmode.
30521         (rs6000_emit_move_si_sf_subreg): New helper function.
30522         (rs6000_emit_move): Call rs6000_emit_move_si_sf_subreg to possbily
30523         fixup SUBREGs involving SImode and SFmode.
30524         * config/rs6000/vsx.md (SFBOOL_*): New constants that are operand
30525         numbers for the new peephole2 optimization.
30526         (peephole2 for SFmode unions): New peephole2 to optimize cases in
30527         the GLIBC math library that do AND/IOR/XOR operations on single
30528         precision floating point.
30529         * config/rs6000/rs6000.h (TARGET_NO_SF_SUBREG): New internal
30530         target macros to say whether we need to avoid SUBREGs mixing
30531         SImode and SFmode.
30532         (TARGET_ALLOW_SF_SUBREG): Likewise.
30533         * config/rs6000/rs6000.md (UNSPEC_SF_FROM_SI): New unspecs.
30534         (UNSPEC_SI_FROM_SF): Likewise.
30535         (iorxor): Change spacing.
30536         (and_ior_xor): New iterator for AND, IOR, and XOR.
30537         (movsi_from_sf): New insns for SImode/SFmode SUBREG support.
30538         (movdi_from_sf_zero_ext): Likewise.
30539         (mov<mode>_hardfloat, FMOVE32 iterator): Use register_operand
30540         instead of gpc_reg_operand.  Add SImode/SFmode SUBREG support.
30541         (movsf_from_si): New insn for SImode/SFmode SUBREG support.
30542         (fma<mode>4): Use gpc_reg_operand instead of register_operand.
30543         (fms<mode>4): Likewise.
30544         (fnma<mode>4): Likewise.
30545         (fnms<mode>4): Likewise.
30546         (nfma<mode>4): Likewise.
30547         (nfms<mode>4): Likewise.
30549 2017-01-04  Marek Polacek  <polacek@redhat.com>
30551         PR c++/64767
30552         * doc/invoke.texi: Document -Wpointer-compare.
30554 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
30556         * optc-gen.awk: Emit #error for -W*/-f*/-m* Enum without
30557         RejectNegative.
30559         * dwarf2out.c (output_loc_list): Don't throw away 64K+ location
30560         descriptions for -gdwarf-5 and emit them as uleb128 instead of
30561         2-byte data.
30563 2017-01-04  Kelvin Nilsen  <kelvin@gcc.gnu.org>
30565         PR target/78056
30566         * doc/sourcebuild.texi (PowerPC-specific attributes): Add
30567         documentation of the powerpc_popcntb_ok attribute.
30568         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
30569         code to issue warning messages if a requested CPU configuration is
30570         not supported by the binary (assembler and loader) toolchain.
30571         (spe_init_builtins): Add two assertions to prevent ICE if attempt is
30572         made to define a built-in function that has been disabled.
30573         (paired_init_builtins): Add assertion to prevent ICE if attempt is
30574         made to define a built-in function that has been disabled.
30575         (altivec_init_builtins): Add comment explaining why definition
30576         of the DST built-in functions is not preceded by an assertion
30577         check.  Add assertions to prevent ICE if attempts are made to
30578         define an altivec predicate or an abs* built-in function that has
30579         been disabled.
30580         (htm_init_builtins): Add comment explaining why definition of the
30581         htm built-in functions is not preceded by an assertion check.
30583 2017-01-04  Jeff Law  <law@redhat.com>
30585         PR tree-optimizatin/67955
30586         * tree-ssa-alias.c (same_addr_size_stores_p): Check offsets first.
30587         Allow any SSA_VAR_P as the base objects.  Use integer_zerop.  Verify
30588         the points-to solution does not include pt_null.  Use DECL_PT_UID
30589         unconditionally.
30591 2017-01-04  Uros Bizjak  <ubizjak@gmail.com>
30593         * config/i386/i386.md (HI/SImode test with imm to QImode splitters):
30594         Use gen_int_mode instead of gen_lopwart for const_int operands.
30596 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
30598         PR tree-optimization/71563
30599         * match.pd: Simplify X << Y into X if Y is known to be 0 or
30600         out of range value - has low bits known to be zero.
30602 2017-01-04  Alan Modra  <amodra@gmail.com>
30604         * Makefile.in (aclocal_deps): Update and order as per aclocal.m4.
30605         * configure: Regenerate.
30606         * config.in: Regenerate.
30608 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
30610         PR bootstrap/77569
30611         * input.c (ebcdic_execution_charset::on_error): Don't use strstr for
30612         a substring of the message, but strcmp with the whole message.  Ifdef
30613         ENABLE_NLS, translate the message first using dgettext.
30615 2017-01-03  Jeff Law  <law@redhat.com>
30617         PR tree-optimizatin/78856
30618         * tree-ssa-threadupdate.c: Include tree-vectorizer.h.
30619         (mark_threaded_blocks): Remove code to truncate thread paths that
30620         cross multiple loop headers.  Instead invalidate the cached loop
30621         iteration information and handle case of a thread path walking
30622         into an irreducible region.
30624 2017-01-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
30626         PR target/78900
30627         * config/rs6000/rs6000.c (rs6000_split_signbit): Change some
30628         assertions.  Add support for doing the signbit if the IEEE 128-bit
30629         floating point value is in a GPR.
30630         * config/rs6000/rs6000.md (Fsignbit): Delete.
30631         (signbit<mode>2_dm): Delete using <Fsignbit> and just use "wa".
30632         Update the length attribute if the value is in a GPR.
30633         (signbit<mode>2_dm_<su>ext): Add combiner pattern to eliminate
30634         the sign or zero extension instruction, since the value is always 0/1.
30635         (signbit<mode>2_dm2): Delete using <Fsignbit>.
30637         PR target/78953
30638         * config/rs6000/vsx.md (vsx_extract_<mode>_store_p9): If we are
30639         extracting SImode to a GPR register so that we can generate a
30640         store, limit the vector to be in a traditional Altivec register
30641         for the vextuwrx instruction.
30643 2017-01-03  Ian Lance Taylor  <iant@google.com>
30645         * godump.c (go_format_type): Treat ENUMERAL_TYPE like INTEGER_TYPE.
30647 2017-01-03  Martin Sebor  <msebor@redhat.com>
30649         PR tree-optimization/78696
30650         * gimple-ssa-sprintf.c (format_floating): Correct handling of
30651         precision.  Use MPFR for %f for greater fidelity.  Correct handling
30652         of %g.
30653         (pass_sprintf_length::compute_format_length): Set width and precision
30654         specified by asrerisk to void_node for vararg functions.
30655         (try_substitute_return_value): Adjust dump output.
30657 2017-01-03  David Edelsohn  <dje.gcc@gmail.com>
30659         * doc/invoke.texi (RS6000 options): LRA is enabled by default.
30661 2017-01-03  Eric Botcazou  <ebotcazou@adacore.com>
30663         * doc/invoke.texi (SPARC options): Document -mlra as the default.
30664         * config/sparc/sparc.c (sparc_option_override): Force LRA unless
30665         -mlra/-mno-lra was passed to the compiler.
30667 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
30669         PR rtl-optimization/65618
30670         * emit-rtl.c (try_split): Move initialization of "before" and
30671         "after" to just before the call to emit_insn_after_setloc.
30673 2017-01-03  Gerald Pfeifer  <gerald@pfeifer.com>
30675         * doc/md.texi (Standard Names): Remove reference to Java frontend.
30677 2017-01-03  Pierre-Marie de Rodat  <derodat@adacore.com>
30679         * dwarf2out.c (gen_enumeration_type_die): When
30680         -gno-strict-dwarf, add a DW_AT_encoding attribute.
30682 2017-01-03  Jakub Jelinek  <jakub@redhat.com>
30684         PR tree-optimization/78965
30685         * gimple-ssa-sprintf.c (pass_sprintf_length::compute_format_length):
30686         Change first argument from const call_info & to call_info &.  For %n
30687         set info.nowrite to false.
30689         PR middle-end/78901
30690         * gimple-ssa-sprintf.c (try_substitute_return_value): Don't change
30691         possibly throwing calls.
30693         * genmatch.c (dt_node::gen_kids_1): If generic_exprs include SSA_NAME
30694         and exprs_len || fns_len, emit the code for SSA_NAME next to the exprs
30695         and fns handling, rather than in a separate case SSA_NAME.
30697 2017-01-02  Jeff Law  <law@redhat.com>
30699         * config/darwin-driver.c (darwin_driver_init): Const-correctness
30700         fixes for first_period and second_period variables.
30702 2017-01-02  Uros Bizjak  <ubizjak@gmail.com>
30704         PR target/78967
30705         * config/i386/i386.md (UNSPEC_NOREX_MEM): New unspec.
30706         (*insvqi_1): New insn pattern.
30707         (*insvqi_1_mem_rex64): Ditto.
30708         (*insvqi_2): Ditto.
30709         (*insvqi_3): Rename from *insvqi.
30711         (*extzvqi_mem_rex64): Add UNSPEC_NOREX_MEM tag.
30713 2017-01-02  Gerald Pfeifer  <gerald@pfeifer.com>
30715         * doc/cfg.texi (Edges): Remove reference to Java.
30716         (Maintaining the CFG): Ditto.
30718 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
30720         PR middle-end/77674
30721         * symtab.c (symtab_node::binds_to_current_def_p): Fix handling of
30722         transparent aliases.
30724 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
30726         PR middle-end/77484
30727         * predict.def (PRED_CALL): Update hitrate.
30728         (PRED_INDIR_CALL, PRED_POLYMORPHIC_CALL): New predictors.
30729         * predict.c (tree_estimate_probability_bb): Split CALL predictor
30730         into direct/indirect/polymorphic variants.
30732 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
30734         Update copyright years.
30736         * gcc.c (process_command): Update copyright notice dates.
30737         * gcov-dump.c (print_version): Ditto.
30738         * gcov.c (print_version): Ditto.
30739         * gcov-tool.c (print_version): Ditto.
30740         * gengtype.c (create_file): Ditto.
30741         * doc/cpp.texi: Bump @copying's copyright year.
30742         * doc/cppinternals.texi: Ditto.
30743         * doc/gcc.texi: Ditto.
30744         * doc/gccint.texi: Ditto.
30745         * doc/gcov.texi: Ditto.
30746         * doc/install.texi: Ditto.
30747         * doc/invoke.texi: Ditto.
30749 Copyright (C) 2017 Free Software Foundation, Inc.
30751 Copying and distribution of this file, with or without modification,
30752 are permitted in any medium without royalty provided the copyright
30753 notice and this notice are preserved.